Class StaticDataRow
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.StaticDataRow
-
- All Implemented Interfaces:
DataRow
- Direct Known Subclasses:
ImportedVariablesDataRow
,ParameterDataRow
public class StaticDataRow extends Object implements DataRow
This is a static datarow holding a value for each name in the datarow. This datarow does not hold dataflags and thus does not track the changes done to the data inside. The StaticDataRow is a derived view and is used to provide a safe collection of the values of the previous datarow.- Author:
- Thomas Morgner
-
-
Constructor Summary
Constructors Modifier Constructor Description StaticDataRow()
StaticDataRow(String[] names, Object[] values)
StaticDataRow(Map<String,Object> parameterValues)
StaticDataRow(DataRow dataRow)
protected
StaticDataRow(StaticDataRow dataRow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Object
get(String col)
Returns the value of the function, expression or column using its specific name.String[]
getColumnNames()
Returns the known column names, this data-row understands.int
hashCode()
boolean
isChanged(String name)
Checks whether the value contained in the column has changed since the last advance-operation.protected void
setData(String[] names, Object[] values)
protected void
updateData(Object[] values)
-
-
-
Constructor Detail
-
StaticDataRow
public StaticDataRow()
-
StaticDataRow
protected StaticDataRow(StaticDataRow dataRow)
-
StaticDataRow
public StaticDataRow(DataRow dataRow)
-
-
Method Detail
-
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.
-
updateData
protected void updateData(Object[] values)
-
get
public Object get(String col)
Returns the value of the function, expression 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.
-
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.
-
-