com.jrefinery.report.filter
Class FunctionDataSource

java.lang.Object
  |
  +--com.jrefinery.report.filter.FunctionDataSource
All Implemented Interfaces:
java.lang.Cloneable, DataRowConnectable, DataSource, java.io.Serializable

Deprecated. use DataRowDataSource as unified access class instead

public class FunctionDataSource
extends java.lang.Object
implements DataSource, DataRowConnectable, java.io.Serializable

The base class for a function data source. A function datasource does not query a function directly. The functions value is filled into this datasource by the current band to be printend when the bands populateElements() function is called.

The value for this element is retrieved from a function registered in the report's function collection by the name defined in this elements function property.

If the function name is invalid (no function registered by that name), null is returned.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
FunctionDataSource()
          Deprecated. Default constructor.
FunctionDataSource(java.lang.String function)
          Deprecated. Constructs a new function data source.
 
Method Summary
 java.lang.Object clone()
          Deprecated. Clones this datasource.
 void connectDataRow(DataRow row)
          Deprecated. Connects the DataRowBackend with the named DataSource or DataFilter.
 void disconnectDataRow(DataRow row)
          Deprecated. Releases the connection to the datarow.
protected  DataRow getDataRow()
          Deprecated. Returns the data row assigned to this DataSource.
 java.lang.String getFunction()
          Deprecated. Returns the name of the function bound to this datasource.
 java.lang.Object getValue()
          Deprecated. Returns the value of the function.
 void setFunction(java.lang.String field)
          Deprecated. Sets the function.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionDataSource

public FunctionDataSource()
Deprecated. 
Default constructor. The function name is empty ("", not null), the value initially null.


FunctionDataSource

public FunctionDataSource(java.lang.String function)
Deprecated. 
Constructs a new function data source.

Parameters:
function - The function.
Method Detail

setFunction

public void setFunction(java.lang.String field)
Deprecated. 
Sets the function.

Parameters:
field - the name of the function as defined in the function collection.

getFunction

public java.lang.String getFunction()
Deprecated. 
Returns the name of the function bound to this datasource.

Returns:
the registered function name

getValue

public java.lang.Object getValue()
Deprecated. 
Returns the value of the function.

Specified by:
getValue in interface DataSource
Returns:
The value.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Deprecated. 
Clones this datasource.

Specified by:
clone in interface DataSource
Overrides:
clone in class java.lang.Object
Returns:
a clone of this object.
Throws:
java.lang.CloneNotSupportedException - if the cloning failed.

connectDataRow

public void connectDataRow(DataRow row)
                    throws java.lang.IllegalStateException
Deprecated. 
Connects the DataRowBackend with the named DataSource or DataFilter. The filter is now able to query the other DataSources to compute the result.

Specified by:
connectDataRow in interface DataRowConnectable
Parameters:
row - the data row.
Throws:
java.lang.IllegalStateException - if there is already a data row connected.

disconnectDataRow

public void disconnectDataRow(DataRow row)
                       throws java.lang.IllegalStateException
Deprecated. 
Releases the connection to the datarow. If no datarow is connected, an

Specified by:
disconnectDataRow in interface DataRowConnectable
Parameters:
row - the data row.
Throws:
java.lang.IllegalStateException - if there is no data row connected.

getDataRow

protected DataRow getDataRow()
Deprecated. 
Returns the data row assigned to this DataSource.

Returns:
the data row.