Package org.jfree.report.data

# Class GlobalView

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

All Implemented Interfaces:
  `DataRow`, `DataSet`

public final class GlobalView extends Object implements DataRow
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 Type
Method
Description
`GlobalView`
`advance()`
`static GlobalView`
`createView()`
`GlobalView`
`derive()`
`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.
`void`
`putField(String name, Object value, boolean update)`
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.

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

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

## Method Details

### createView

public static GlobalView createView()

### putField

public void putField(String name, Object value, boolean update) throws DataSourceException
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

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)
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.

### 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

### derive

public GlobalView derive()

### advance

public GlobalView advance()

### removeColumn

public void removeColumn(String name)
Note: Dont remove the column. It will stay around here as long as the process lives.

Parameters:
  `name` -