Package org.jfree.report.data
Class GlobalView
java.lang.Object
org.jfree.report.data.GlobalView
The global view holds all *named* data columns. Expressions which have no
name will not appear here. There is a slot for each name - if expressions
share the same name, the last name wins.
This acts as some kind of global variables heap - which allows named
functions to export their values to a global space.
This datarow is optimized for named access - the sequential access is only
generated when absolutly needed.
- Author:
- Thomas Morgner
-
Method Summary
Modifier and TypeMethodDescriptionadvance()
static GlobalView
derive()
get
(int col) Returns the value of the expression or column in the tablemodel using the given column number as index.Returns the value of the function, expression 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, expression 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.void
This adds the expression to the data-row and queries the expression for the first time.void
removeColumn
(String name) Note: Dont remove the column.
-
Method Details
-
createView
-
putField
This adds the expression to the data-row and queries the expression for the first time.- Parameters:
name
- the name of the field (cannot be null)value
- the value of that field (may be null)- Throws:
DataSourceException
-
get
Returns the value of the expression 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, 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.DataSourceException
- if an error occured.
-
getColumnName
Returns the name of the column, expression 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. -
derive
-
advance
-
removeColumn
Note: Dont remove the column. It will stay around here as long as the process lives.- Parameters:
name
-
-