java.lang.Object |
Function.evaluate(int functionType,
ExpressionQueryRequest request,
EvaluableExpression[] operand,
int expectedValueType)
Static evaluation of the function. The functionType is one of (Function.TYPE_ADD,
Function.TYPE_AND, Function.TYPE_CONTAINSNONE,
Function.TYPE_CONTAINSNONE, Function.TYPE_DIV, Function.TYPE_EQUAL,
Function.TYPE_GREATER, Function.TYPE_GREATEROREQUAL, Function.TYPE_LIKE,
Function.TYPE_MINUS, Function.TYPE_MOD, Function.TYPE_MULT,
Function.TYPE_NAMEDFUNCTION, Function.TYPE_NOT, Function.TYPE_OR,
Function.TYPE_PLUS, Function.TYPE_SMALLER, Function.TYPE_SMALLEROREQUAL,
Function.TYPE_SUB, Function.TYPE_UNEQUAL) and will always be one of the
types returned by Function.getTypes(). The expectedValueType is
one of (ExpressionEvaluator.OBJECTTYPE_ANY,
ExpressionEvaluator.OBJECTTYPE_BOOLEAN,
ExpressionEvaluator.OBJECTTYPE_COLLECTION,
ExpressionEvaluator.OBJECTTYPE_DATE,
ExpressionEvaluator.OBJECTTYPE_NULL,
ExpressionEvaluator.OBJECTTYPE_NUMBER,
ExpressionEvaluator.OBJECTTYPE_STRING), where
ExpressionEvaluator.OBJECTTYPE_ANY shall be used when any value
type is acceptable. Implementations must respect the expected value
type and must throw a
EvaluationException when it
cannot generate a value of this type. |
void |
Function.generateFilterPart(int functionType,
ExpressionQueryRequest request,
FilterPart filterPart,
EvaluableExpression[] operand,
int expectedValueType)
Generate the filter part for the function. The functionType is one
of (Function.TYPE_ADD, Function.TYPE_AND, Function.TYPE_CONTAINSNONE,
Function.TYPE_CONTAINSNONE, Function.TYPE_DIV, Function.TYPE_EQUAL,
Function.TYPE_GREATER, Function.TYPE_GREATEROREQUAL, Function.TYPE_LIKE,
Function.TYPE_MINUS, Function.TYPE_MOD, Function.TYPE_MULT,
Function.TYPE_NAMEDFUNCTION, Function.TYPE_NOT, Function.TYPE_OR,
Function.TYPE_PLUS, Function.TYPE_SMALLER, Function.TYPE_SMALLEROREQUAL,
Function.TYPE_SUB, Function.TYPE_UNEQUAL) and will always be one of the
types returned by Function.getTypes(). The expectedValueType is
one of (ExpressionEvaluator.OBJECTTYPE_ANY,
ExpressionEvaluator.OBJECTTYPE_BOOLEAN,
ExpressionEvaluator.OBJECTTYPE_COLLECTION,
ExpressionEvaluator.OBJECTTYPE_DATE,
ExpressionEvaluator.OBJECTTYPE_NULL,
ExpressionEvaluator.OBJECTTYPE_NUMBER,
ExpressionEvaluator.OBJECTTYPE_STRING), where
ExpressionEvaluator.OBJECTTYPE_ANY shall be used when any value
type is acceptable. Implementations must respect the expected value
type and must throw a
FilterGeneratorException
when it cannot generate a value of this type. |