Class DataRowConnector

  • All Implemented Interfaces:
    DataRow

    public final class DataRowConnector
    extends Object
    implements DataRow
    This is the connection-proxy to the various data sources contained in the elements. During report processing the report states get cloned while the elements remain uncloned. The DataRowConnector connects the DataRowBackend (which contains the data) with the stateless elements.
    Author:
    Thomas Morgner
    • Constructor Detail

      • DataRowConnector

        public DataRowConnector()
        Default constructor.
    • Method Detail

      • getDataRowBackend

        public DataRow getDataRowBackend()
        Returns the assigned data row backend.
        Returns:
        the currently assigned DataRowBackend for this DataRowConnector.
      • getColumnNames

        public String[] getColumnNames()
        Description copied from interface: DataRow
        Returns the known column names, this data-row understands. The column names may change over time but do not change while a event is processed by a function. The array returned is a copy of the internal data-storage and can be safely modified.
        Specified by:
        getColumnNames in interface DataRow
        Returns:
        the column names as array.
      • setDataRowBackend

        public void setDataRowBackend​(DataRow dataRow)
        Sets the data row backend for this DataRowConnector. The backend actually contains the data which will be queried, while this DataRowConnector is simply a proxy forwarding all requests to the backend.
        Parameters:
        dataRow - the data row backend
      • get

        public Object get​(String col)
        Returns the value of the column, function or expression using its name.
        Specified by:
        get in interface DataRow
        Parameters:
        col - the column, function or expression index.
        Returns:
        The column, function or expression value.
        Throws:
        IllegalStateException - if there is no backend connected
      • getLastDatasource

        public static DataSource getLastDatasource​(DataTarget e)
        Deprecated.
        no longer used.
        Queries the last datasource in the chain of targets and filters.

        The last datasource is used to feed data into the data processing chain. The result of this computation is retrieved by the element using the registered datasource to query the queue.

        Parameters:
        e - the data target.
        Returns:
        The last DataSource in the chain.
      • toString

        public String toString()
        Returns a string describing the object.
        Overrides:
        toString in class Object
        Returns:
        The string.
      • isChanged

        public boolean isChanged​(String name)
        Description copied from interface: DataRow
        Checks whether the value contained in the column has changed since the last advance-operation.
        Specified by:
        isChanged in interface DataRow
        Parameters:
        name - the name of the column.
        Returns:
        true, if the value has changed, false otherwise.