public abstract class OwExprBinaryOperator extends OwExprOperator
Binary operator class (egg. 1+2
, 'aaaa'+'b'
, 1<2
).
A two operands operation implementation (left and right).
Index present in the parameters names usually denote left (index 1) or right (index 2) correlation.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Constructor and Description |
---|
OwExprBinaryOperator(String image_p,
OwExprBinaryConversionTable conversionTable_p)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected OwExprValue |
binaryEvaluation(OwExprScope scope_p,
OwExprValue v1_p,
OwExprValue v2_p)
Binary evaluation method to be called at evaluation time.
|
OwExprBinaryExpressionType |
computeExpressionType(OwExprExpression operand1_p,
OwExprExpression operand2_p)
Computes the resulted expression type based on given operands and regresses
sub-expression types accordingly
|
OwExprType |
computeType(OwExprType type1_p,
OwExprType type2_p)
Type computation method.
|
OwExprValue |
evaluate(OwExprBooleanValue v1_p,
OwExprBooleanValue v2_p)
BOOLEAN operator BOOLEAN operation evaluation
|
OwExprValue |
evaluate(OwExprBooleanValue v1_p,
OwExprNullValue v2_p)
BOOLEAN operator NULL operation evaluation
|
OwExprValue |
evaluate(OwExprBooleanValue v1_p,
OwExprStringValue v2_p)
BOOLEAN operator STRING operation evaluation
|
OwExprValue |
evaluate(OwExprBooleanValue v1_p,
OwExprValue v2_p)
Stage 2 evaluation by visiting entry point with concrete left operand type.
|
OwExprValue |
evaluate(OwExprDateValue v1_p,
OwExprDateValue v2_p)
DATE operator DATE operation evaluation
|
OwExprValue |
evaluate(OwExprDateValue v1_p,
OwExprNullValue v2_p)
DATE operator NULL operation evaluation
|
OwExprValue |
evaluate(OwExprDateValue v1_p,
OwExprStringValue v2_p)
DATE operator STRING operation evaluation
|
OwExprValue |
evaluate(OwExprDateValue v1_p,
OwExprTimeValue v2_p)
DATE operator TIME operation evaluation
|
OwExprValue |
evaluate(OwExprDateValue v1_p,
OwExprValue v2_p)
Stage 2 evaluation by visiting entry point with concrete left operand type.
|
OwExprValue |
evaluate(OwExprNullValue v1_p,
OwExprValue v2_p)
Stage 2 evaluation by visiting entry point with concrete left operand type.
|
OwExprValue |
evaluate(OwExprNumericValue v1_p,
OwExprNullValue v2_p)
NUMERIC operator NULL operation evaluation
|
OwExprValue |
evaluate(OwExprNumericValue v1_p,
OwExprNumericValue v2_p)
NUMERIC operator NUMERIC operation evaluation
|
OwExprValue |
evaluate(OwExprNumericValue v1_p,
OwExprStringValue v2_p)
NUMERIC operator STRING operation evaluation
|
OwExprValue |
evaluate(OwExprNumericValue v1_p,
OwExprValue v2_p)
Stage 2 evaluation by visiting entry point with concrete left operand type.
|
OwExprValue |
evaluate(OwExprScopeValue v1_p,
OwExprNullValue v2_p)
SCOPE operator NULL operation evaluation
|
OwExprValue |
evaluate(OwExprScopeValue v1_p,
OwExprScopeValue v2_p)
SCOPE operator SCOPE operation evaluation
|
OwExprValue |
evaluate(OwExprScopeValue v1_p,
OwExprValue v2_p)
Stage 2 evaluation by visiting entry point with concrete left operand type.
|
OwExprValue |
evaluate(OwExprStringValue v1_p,
OwExprBooleanValue v2_p)
STRING operator BOOLEAN operation evaluation
|
OwExprValue |
evaluate(OwExprStringValue v1_p,
OwExprDateValue v2_p)
STRING operator DATE operation evaluation
|
OwExprValue |
evaluate(OwExprStringValue v1_p,
OwExprNullValue v2_p)
STRING operator NULL operation evaluation
|
OwExprValue |
evaluate(OwExprStringValue v1_p,
OwExprNumericValue v2_p)
STRING operator NUMERIC operation evaluation
|
OwExprValue |
evaluate(OwExprStringValue v1_p,
OwExprStringValue v2_p)
STRING operator STRING operation evaluation
|
OwExprValue |
evaluate(OwExprStringValue v1_p,
OwExprTimeValue v2_p)
STRING operator TIME operation evaluation
|
OwExprValue |
evaluate(OwExprStringValue v1_p,
OwExprValue v2_p)
Stage 2 evaluation by visiting entry point with concrete left operand type.
|
OwExprValue |
evaluate(OwExprTimeValue v1_p,
OwExprDateValue v2_p)
TIME operator DATE operation evaluation
|
OwExprValue |
evaluate(OwExprTimeValue v1_p,
OwExprNullValue v2_p)
TIME operator NULL operation evaluation
|
OwExprValue |
evaluate(OwExprTimeValue v1_p,
OwExprStringValue v2_p)
TIME operator STRING operation evaluation
|
OwExprValue |
evaluate(OwExprTimeValue v1_p,
OwExprTimeValue v2_p)
TIME operator TIME operation evaluation
|
Set |
getRegressingTypes1(Set regressedTypes_p)
Returns a set of compatible left side operand types (
OwExprType s ) for a set of given operation result
types set. |
Set |
getRegressingTypes2(Set regressedTypes_p)
Returns a set of compatible right side operand types (
OwExprType s ) for a set of given operation result
types set. |
toString
public OwExprBinaryOperator(String image_p, OwExprBinaryConversionTable conversionTable_p)
image_p
- String image of this operator (egg. "+","-" or "<=")conversionTable_p
- the conversion table m_conversionTable
protected final OwExprValue binaryEvaluation(OwExprScope scope_p, OwExprValue v1_p, OwExprValue v2_p) throws OwExprEvaluationException
scope_p
- the scope this operation is evaluated onv1_p
- left side operand (1)v2_p
- right side operand (2)OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprBooleanValue v1_p, OwExprValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprNumericValue v1_p, OwExprValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprStringValue v1_p, OwExprValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprDateValue v1_p, OwExprValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprScopeValue v1_p, OwExprValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprNullValue v1_p, OwExprValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
OwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprStringValue v1_p, OwExprNullValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprNumericValue v1_p, OwExprNullValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprBooleanValue v1_p, OwExprNullValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprDateValue v1_p, OwExprNullValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprTimeValue v1_p, OwExprNullValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprBooleanValue v1_p, OwExprBooleanValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprBooleanValue v1_p, OwExprStringValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprNumericValue v1_p, OwExprNumericValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprNumericValue v1_p, OwExprStringValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprStringValue v1_p, OwExprNumericValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprStringValue v1_p, OwExprStringValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprStringValue v1_p, OwExprBooleanValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprStringValue v1_p, OwExprDateValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprStringValue v1_p, OwExprTimeValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprDateValue v1_p, OwExprDateValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprDateValue v1_p, OwExprTimeValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprDateValue v1_p, OwExprStringValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprTimeValue v1_p, OwExprTimeValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprTimeValue v1_p, OwExprDateValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprTimeValue v1_p, OwExprStringValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprScopeValue v1_p, OwExprNullValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public OwExprValue evaluate(OwExprScopeValue v1_p, OwExprScopeValue v2_p) throws OwExprEvaluationException
v1_p
- v2_p
- OwExprValue
according to the conversion rulesOwExprEvaluationException
- if the operation fails for any reason (unsupported operand types ,
incompatible operands, unimplemented operation or operation failure at evaluation time)public final OwExprType computeType(OwExprType type1_p, OwExprType type2_p) throws OwExprTypeMissmatchException
m_conversionTable
type1_p
- left operand typetype2_p
- right operand typeOwExprTypeMissmatchException
public final OwExprBinaryExpressionType computeExpressionType(OwExprExpression operand1_p, OwExprExpression operand2_p) throws OwExprTypeMissmatchException
operand1_p
- the left side OwExprExpression
operandoperand2_p
- the right side OwExprExpression
operandOwExprBinaryExpressionType
OwExprTypeMissmatchException
- if the operator evaluation cannot not be performed due to type incompatibility
(type incompatibility resulted from the operator itself or due to the regression process)public final Set getRegressingTypes1(Set regressedTypes_p)
OwExprType
s ) for a set of given operation result
types set.
The returned type set is a subset of all left side operand types that can result invalid types
(different from OwExprType.NOTYPE
) for this operator.regressedTypes_p
- the operation result types setOwExprType
spublic final Set getRegressingTypes2(Set regressedTypes_p)
OwExprType
s ) for a set of given operation result
types set.
The returned type set is a subset of all right side operand types that can result invalid types
(different from OwExprType.NOTYPE
) for this operator.regressedTypes_p
- the operation result types setOwExprType
sCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.