Class AbstractCompareExpression
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.function.AbstractExpression
-
- org.pentaho.reporting.engine.classic.core.function.AbstractCompareExpression
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Expression
- Direct Known Subclasses:
CompareDateExpression
,CompareFieldsExpression
,CompareNumberExpression
,CompareStringExpression
public abstract class AbstractCompareExpression extends AbstractExpression
Deprecated.This can be better handled in a formula.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
Fields Modifier and Type Field Description 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.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCompareExpression()
Deprecated.The default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract Comparable
getComparable()
Deprecated.Returns the right-hand operand used in the comparison.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
-
-
-
-
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.
-
getComparable
protected abstract Comparable getComparable()
Deprecated.Returns the right-hand operand used in the comparison.- Returns:
- the right-hand operand.
-
-