Package org.jfree.report.data

# Class StaticDataRow

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

All Implemented Interfaces:
  `DataRow`, `DataSet`

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
`protected`
`StaticDataRow()`
``
`StaticDataRow(String[] names, Object[] values)`
`protected`
`StaticDataRow(StaticDataRow dataRow)`
``
`StaticDataRow(DataRow dataRow)`

## Method Summary

Modifier and Type
Method
Description
`Object`
`get(int col)`
Returns the value of the expression or column in the tablemodel using the given column number as index.
`Object`
`get(String col)`
Returns the value of the function, expression 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, expression 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.
`protected void`
`setData(String[] names, Object[] values)`
`protected void`
`updateData(Object[] values)`

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

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

## Constructor Details

### StaticDataRow

protected StaticDataRow()

### StaticDataRow

protected StaticDataRow(StaticDataRow dataRow)

### StaticDataRow

public StaticDataRow(DataRow dataRow) throws DataSourceException

Throws:
  `DataSourceException`

### StaticDataRow

public StaticDataRow(String[] names, Object[] values)

## Method Details

### setData

protected void setData(String[] names, Object[] values)

### updateData

protected void updateData(Object[] values)

### get

public Object get(int col) throws DataSourceException
Returns the value of the expression 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, 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, 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) throws DataSourceException
Returns the name of the column, expression 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.
Throws:
  `DataSourceException` - if an error occured.

### getColumnCount

public int getColumnCount() throws DataSourceException
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.
Throws:
  `DataSourceException` - if an error occured.

### getFlags

public DataFlags getFlags(String col) throws DataSourceException
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
Throws:
  `DataSourceException` - if an error occured.

### getFlags

public DataFlags getFlags(int col) throws DataSourceException
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
Throws:
  `DataSourceException` - if an error occured.