Package org.jfree.report.data

# Class ExpressionDataRow

java.lang.Object
org.jfree.report.data.ExpressionDataRow

All Implemented Interfaces:
  `DataRow`, `DataSet`

public final class ExpressionDataRow extends Object implements DataRow
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

Constructors
Constructor
Description
`ExpressionDataRow(GlobalMasterRow masterRow, ReportContext reportContext, int capacity)`

## Method Summary

Modifier and Type
Method
Description
`ExpressionDataRow`
`advance(GlobalMasterRow master, boolean deepTraversing)`
Advances to the next row and attaches the given master row to the objects contained in that client data row.
`ExpressionDataRow`
`derive(GlobalMasterRow master)`
`Object`
`get(int col)`
Returns the value of the expressions or column in the tablemodel using the given column number as index.
`Object`
`get(String col)`
Returns the value of the function, expressions or column using its specific name.
`int`
`getColumnCount()`
Returns the number of columns, expressions and functions and marked ReportProperties in the report.
`String`
`getColumnName(int col)`
Returns the name of the column, expressions or function.
`DataFlags`
`getFlags(int col)`
Queries lowlevel meta-data for the current value of the specified column.
`DataFlags`
`getFlags(String col)`
Queries lowlevel meta-data for the current value of the specified column.
`ExpressionSlot[]`
`getSlots()`
`void`
`popExpression()`
`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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ExpressionDataRow

public ExpressionDataRow(GlobalMasterRow masterRow, ReportContext reportContext, int capacity)

## Method Details

### pushExpression

public void pushExpression(ExpressionSlot expressionSlot) throws DataSourceException
This adds the expression to the data-row and queries the expression for the first time.

Parameters:
  `ex` -
  `rd` -
Throws:
  `DataSourceException`

### pushExpressions

public void pushExpressions(ExpressionSlot[] expressionSlots) throws DataSourceException

Throws:
  `DataSourceException`

### popExpressions

public void popExpressions(int counter) throws DataSourceException

Throws:
  `DataSourceException`

### popExpression

public void popExpression() throws DataSourceException

Throws:
  `DataSourceException`

### get

public Object get(int col) throws DataSourceException
Returns the value of the expressions or column in the tablemodel using the given column number as index. For functions and expressions, the `getValue()` method is called and for columns from the tablemodel the tablemodel method `getValueAt(row, column)` gets called.

Specified by:
  `get` in interface `DataRow`
Specified by:
  `get` in interface `DataSet`
Parameters:
  `col` - the item index.
Returns:
  the value.
Throws:
  `IllegalStateException` - if the datarow detected a deadlock.
  `DataSourceException` - if an error occured.

### get

public Object get(String col) throws DataSourceException
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, the `getValue()` method is called and for columns from the tablemodel the tablemodel method `getValueAt(row, column)` gets called.

Specified by:
  `get` in interface `DataRow`
Parameters:
  `col` - the item index.
Returns:
  the value.
Throws:
  `IllegalStateException` - if the datarow detected a deadlock.
  `DataSourceException` - if an error occured.

### getColumnName

public String getColumnName(int col)
Returns the name of the column, expressions or function. For columns from the tablemodel, the tablemodels `getColumnName` method is called. For functions, expressions and report properties the assigned name is returned.

Specified by:
  `getColumnName` in interface `DataRow`
Specified by:
  `getColumnName` in interface `DataSet`
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 interface `DataRow`
Specified by:
  `getColumnCount` in interface `DataSet`
Returns:
  the item count.

### getFlags

public DataFlags getFlags(String col)
Description copied from interface: `DataRow`
Queries lowlevel meta-data for the current value of the specified column.

Specified by:
  `getFlags` in interface `DataRow`
Parameters:
  `col` - the colum for which to query the meta-data flags
Returns:
  the dataflag collection for the value in the named column

### getFlags

public DataFlags getFlags(int col)
Description copied from interface: `DataRow`
Queries lowlevel meta-data for the current value of the specified column.

Specified by:
  `getFlags` in interface `DataRow`
Parameters:
  `col` - the colum for which to query the meta-data flags
Returns:
  the dataflag collection for the value in 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

public ExpressionDataRow derive(GlobalMasterRow master) throws DataSourceException

Throws:
  `DataSourceException`

### getSlots

public ExpressionSlot[] getSlots()