org.pentaho.reporting.engine.classic.core.function
Class AbstractCompareExpression

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.function.AbstractExpression
      extended by org.pentaho.reporting.engine.classic.core.function.AbstractCompareExpression
All Implemented Interfaces:
Serializable, Cloneable, Expression
Direct Known Subclasses:
CompareDateExpression, CompareFieldsExpression, CompareNumberExpression, CompareStringExpression

Deprecated. This can be better handled in a formula.

public abstract class AbstractCompareExpression
extends AbstractExpression

The base class for all expressions that compare a value read from the datarow with another value. This expression and all subclasses have been made obsolete by the Formula-Support.

The given field name is always used to retrieve the left hand operand of the comparison. The value supplied by the expression implementation is always the right hand operand.

Author:
Thomas Morgner
See Also:
Serialized Form

Field Summary
static String EQUAL
          Deprecated. A constant for an equals comparison.
static String GREATER
          Deprecated. A constant for greater than comparison.
static String GREATER_EQUAL
          Deprecated. A constant for greater than or equal comparison.
static String LOWER
          Deprecated. A constant for lower than comparison.
static String LOWER_EQUAL
          Deprecated. A constant for lower than or equal comparison.
static String NOT_EQUAL
          Deprecated. A constant for a not equals comparison.
 
Method Summary
 String getCompareMethod()
          Deprecated. Returns the compare method that should be used in the expression evaluation.
 String getField()
          Deprecated. Returns the name of the field from where to read the first operand.
 Object getValue()
          Deprecated. Compares the value read from the data-row with the value supplied by the expression itself.
 void setCompareMethod(String compareMethod)
          Deprecated. Defines the compare method that should be used in the expression evaluation.
 void setField(String field)
          Deprecated. Defines the name of the field from where to read the first operand.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
clone, getDataRow, getDependencyLevel, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EQUAL

public static final String EQUAL
Deprecated. 
A constant for an equals comparison.

See Also:
Constant Field Values

NOT_EQUAL

public static final String NOT_EQUAL
Deprecated. 
A constant for a not equals comparison.

See Also:
Constant Field Values

LOWER

public static final String LOWER
Deprecated. 
A constant for lower than comparison.

See Also:
Constant Field Values

GREATER

public static final String GREATER
Deprecated. 
A constant for greater than comparison.

See Also:
Constant Field Values

LOWER_EQUAL

public static final String LOWER_EQUAL
Deprecated. 
A constant for lower than or equal comparison.

See Also:
Constant Field Values

GREATER_EQUAL

public static final String GREATER_EQUAL
Deprecated. 
A constant for greater than or equal comparison.

See Also:
Constant Field Values
Method Detail

getValue

public Object getValue()
Deprecated. 
Compares the value read from the data-row with the value supplied by the expression itself. If the value is null or no comparable or cannot be compared for other reasons, this expression returns Boolean.FALSE.

Returns:
Boolean.TRUE or Boolean.FALSE.

getField

public String getField()
Deprecated. 
Returns the name of the field from where to read the first operand.

Returns:
the field name.

setField

public void setField(String field)
Deprecated. 
Defines the name of the field from where to read the first operand.

Parameters:
field - the field name.

getCompareMethod

public String getCompareMethod()
Deprecated. 
Returns the compare method that should be used in the expression evaluation. Must be one of the constants declared in this expression.

Returns:
the compare method.

setCompareMethod

public void setCompareMethod(String compareMethod)
Deprecated. 
Defines the compare method that should be used in the expression evaluation. Must be one of the constants declared in this expression.

Parameters:
compareMethod - the compare method.