org.eclipse.birt.chart.integrate
Class SimpleDataRowExpressionEvaluator

java.lang.Object
  extended by org.eclipse.birt.chart.factory.DataRowExpressionEvaluatorAdapter
      extended by org.eclipse.birt.chart.integrate.SimpleDataRowExpressionEvaluator
All Implemented Interfaces:
IDataRowExpressionEvaluator

public class SimpleDataRowExpressionEvaluator
extends DataRowExpressionEvaluatorAdapter

Simple implementation of IDataRowExpressionEvaluator.


Constructor Summary
SimpleDataRowExpressionEvaluator(java.lang.String[] expressions, java.lang.Object[][] data)
           
 
Method Summary
 void close()
          Closes the underlying resultset.
 java.lang.Object evaluate(java.lang.String expression)
          Evaluates the expression based on the current row
 java.lang.Object evaluateGlobal(java.lang.String expression)
          Evaluates the global expressions which are not associated with the data rows.
 boolean first()
          Moves to the first row.
 boolean next()
          Moves to the next row.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDataRowExpressionEvaluator

public SimpleDataRowExpressionEvaluator(java.lang.String[] expressions,
                                        java.lang.Object[][] data)
Method Detail

evaluate

public java.lang.Object evaluate(java.lang.String expression)
Description copied from interface: IDataRowExpressionEvaluator
Evaluates the expression based on the current row

Specified by:
evaluate in interface IDataRowExpressionEvaluator
Overrides:
evaluate in class DataRowExpressionEvaluatorAdapter
Returns:
An Object representing the evaluated expression. The Object must be of a type String, Number, Date, Calendar, or it will be evaluated as a String using toString().

first

public boolean first()
Description copied from interface: IDataRowExpressionEvaluator
Moves to the first row. Optional if already positioned on the first row when passed to Generator.bindData()

Specified by:
first in interface IDataRowExpressionEvaluator
Overrides:
first in class DataRowExpressionEvaluatorAdapter
Returns:
true if the cursor is on a valid row; false if there are no rows in the result set

next

public boolean next()
Description copied from interface: IDataRowExpressionEvaluator
Moves to the next row.

Specified by:
next in interface IDataRowExpressionEvaluator
Overrides:
next in class DataRowExpressionEvaluatorAdapter
Returns:
False if the last row has been reached. True otherwise.

close

public void close()
Description copied from interface: IDataRowExpressionEvaluator
Closes the underlying resultset. This is optional (it can be a no-op if the close is handled externally or not needed).

Specified by:
close in interface IDataRowExpressionEvaluator
Overrides:
close in class DataRowExpressionEvaluatorAdapter

evaluateGlobal

public java.lang.Object evaluateGlobal(java.lang.String expression)
Description copied from interface: IDataRowExpressionEvaluator
Evaluates the global expressions which are not associated with the data rows.

Specified by:
evaluateGlobal in interface IDataRowExpressionEvaluator
Overrides:
evaluateGlobal in class DataRowExpressionEvaluatorAdapter
Returns:
An Object representing the evaluated expression. The Object must be of a type String, Number, Date, Calendar, or it will be evaluated as a String using toString().


Copyright © 2005-2008 Actuate Corp. All rights reserved.