Package org.jfree.report.data
Class ExpressionDataRow
java.lang.Object
org.jfree.report.data.ExpressionDataRow
A datarow for all expressions encountered in the report. This datarow is a
stack-like structure, which allows easy adding and removing of expressions,
even if these expressions have been cloned and or otherwisely modified.
- Author:
- Thomas Morgner
-
Constructor Summary
ConstructorsConstructorDescriptionExpressionDataRow
(GlobalMasterRow masterRow, ReportContext reportContext, int capacity) -
Method Summary
Modifier and TypeMethodDescriptionadvance
(GlobalMasterRow master, boolean deepTraversing) Advances to the next row and attaches the given master row to the objects contained in that client data row.derive
(GlobalMasterRow master) get
(int col) Returns the value of the expressions or column in the tablemodel using the given column number as index.Returns the value of the function, expressions or column using its specific name.int
Returns the number of columns, expressions and functions and marked ReportProperties in the report.getColumnName
(int col) Returns the name of the column, expressions or function.getFlags
(int col) Queries lowlevel meta-data for the current value of the specified column.Queries lowlevel meta-data for the current value of the specified column.getSlots()
void
void
popExpressions
(int counter) void
pushExpression
(ExpressionSlot expressionSlot) This adds the expression to the data-row and queries the expression for the first time.void
pushExpressions
(ExpressionSlot[] expressionSlots)
-
Constructor Details
-
ExpressionDataRow
-
-
Method Details
-
pushExpression
This adds the expression to the data-row and queries the expression for the first time.- Parameters:
ex
-rd
-- Throws:
DataSourceException
-
pushExpressions
- Throws:
DataSourceException
-
popExpressions
- Throws:
DataSourceException
-
popExpression
- Throws:
DataSourceException
-
get
Returns the value of the expressions or column in the tablemodel using the given column number as index. For functions and expressions, thegetValue()
method is called and for columns from the tablemodel the tablemodel methodgetValueAt(row, column)
gets called.- Specified by:
get
in interfaceDataRow
- Specified by:
get
in interfaceDataSet
- Parameters:
col
- the item index.- Returns:
- the value.
- Throws:
IllegalStateException
- if the datarow detected a deadlock.DataSourceException
- if an error occured.
-
get
Returns the value of the function, expressions or column using its specific name. The given name is translated into a valid column number and the the column is queried. For functions and expressions, thegetValue()
method is called and for columns from the tablemodel the tablemodel methodgetValueAt(row, column)
gets called.- Specified by:
get
in interfaceDataRow
- Parameters:
col
- the item index.- Returns:
- the value.
- Throws:
IllegalStateException
- if the datarow detected a deadlock.DataSourceException
- if an error occured.
-
getColumnName
Returns the name of the column, expressions or function. For columns from the tablemodel, the tablemodelsgetColumnName
method is called. For functions, expressions and report properties the assigned name is returned.- Specified by:
getColumnName
in interfaceDataRow
- Specified by:
getColumnName
in interfaceDataSet
- Parameters:
col
- the item index.- Returns:
- the name.
-
getColumnCount
public int getColumnCount()Returns the number of columns, expressions and functions and marked ReportProperties in the report.- Specified by:
getColumnCount
in interfaceDataRow
- Specified by:
getColumnCount
in interfaceDataSet
- Returns:
- the item count.
-
getFlags
Description copied from interface:DataRow
Queries lowlevel meta-data for the current value of the specified column. -
getFlags
Description copied from interface:DataRow
Queries lowlevel meta-data for the current value of the specified column. -
advance
public ExpressionDataRow advance(GlobalMasterRow master, boolean deepTraversing) throws DataSourceException Advances to the next row and attaches the given master row to the objects contained in that client data row.- Parameters:
master
-deepTraversing
- only advance expressions that have been marked as deeply traversing- Returns:
- Throws:
DataSourceException
-
derive
- Throws:
DataSourceException
-
getSlots
-