|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.report.filter.DataRowDataSource
A DataSource that can access values from the 'data-row'. The data-row contains all values from
the current row of the report's TableModel
, plus the current values of the defined
expressions and functions for the report.
This class replaces the three classes: ExpressionDataSource
,
FunctionDataSource
and ReportDataSource
.
DataRow
,
Serialized FormConstructor Summary | |
DataRowDataSource()
Default constructor. |
|
DataRowDataSource(java.lang.String column)
Constructs a new data source. |
Method Summary | |
java.lang.Object |
clone()
Clones the data source. |
void |
connectDataRow(DataRow row)
Connects a data-row to the data source. |
void |
disconnectDataRow(DataRow row)
Releases the connection to the data-row. |
DataRow |
getDataRow()
Returns the current data-row. |
java.lang.String |
getDataSourceColumnName()
Returns the data source column name. |
java.lang.Object |
getValue()
Returns the current value of the data source, obtained from a particular column in the data-row. |
void |
setDataSourceColumnName(java.lang.String dataSourceColumnName)
Defines the name of the column in the datarow to be queried. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataRowDataSource()
The expression name is empty ("", not null), the value initially null.
public DataRowDataSource(java.lang.String column)
column
- the name of the field, function or expression in the data-row.Method Detail |
public java.lang.String getDataSourceColumnName()
public void setDataSourceColumnName(java.lang.String dataSourceColumnName)
dataSourceColumnName
- the name of the column in the datarow to be queried.
java.lang.NullPointerException
- if the name is null
.DataRow.get(int)
public java.lang.Object getValue()
getValue
in interface DataSource
java.lang.IllegalStateException
- if there is no data-row connected.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface DataSource
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the cloning is not supported.public void connectDataRow(DataRow row) throws java.lang.IllegalStateException
connectDataRow
in interface DataRowConnectable
row
- the data-row (null not permitted).
java.lang.NullPointerException
- if the given row is null
java.lang.IllegalStateException
- if there is a datarow already connected.public void disconnectDataRow(DataRow row) throws java.lang.IllegalStateException
If no datarow is connected, an IllegalStateException
is thrown to indicate the
programming error.
disconnectDataRow
in interface DataRowConnectable
row
- the datarow to be disconnected.
java.lang.NullPointerException
- if the given row is null
java.lang.IllegalStateException
- if there is currently no datarow connected.public DataRow getDataRow()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |