Class DataRowConnector
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.states.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 Summary
Constructors Constructor Description DataRowConnector()
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Object
get(String col)
Returns the value of the column, function or expression using its name.String[]
getColumnNames()
Returns the known column names, this data-row understands.DataRow
getDataRowBackend()
Returns the assigned data row backend.static DataSource
getLastDatasource(DataTarget e)
Deprecated.no longer used.boolean
isChanged(String name)
Checks whether the value contained in the column has changed since the last advance-operation.void
setDataRowBackend(DataRow dataRow)
Sets the data row backend for this DataRowConnector.String
toString()
Returns a string describing the object.
-
-
-
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 interfaceDataRow
- 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 interfaceDataRow
- 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.
-
-