Class OperatorUtil
java.lang.Object
org.eclipse.birt.report.model.api.util.OperatorUtil
Represents the utility class to help compute level of operator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
If operator is not in the choice list, then level is fail.static final int
If operater is >, >= , = , < , <= , like , top , bottom , any , then level is one.static final int
If operater is between , not between , then level is two.static final int
If operater is null, not null, true , false , then level is zero. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
computeFilterOperatorLevel
(String operator) Computes the level of operator.static int
computeStyleRuleOperatorLevel
(String operator) Computes the level of operator.
-
Field Details
-
OPERATOR_LEVEL_ZERO
public static final int OPERATOR_LEVEL_ZEROIf operater is null, not null, true , false , then level is zero. Delete value1 and value2 in design file- See Also:
-
OPERATOR_LEVEL_ONE
public static final int OPERATOR_LEVEL_ONEIf operater is >, >= , = , < , <= , like , top , bottom , any , then level is one. Set value1, delete value2 in design file- See Also:
-
OPERATOR_LEVEL_TWO
public static final int OPERATOR_LEVEL_TWOIf operater is between , not between , then level is two. Set value1 and value2 in design file.- See Also:
-
OPERATOR_LEVEL_NOT_EXIST
public static final int OPERATOR_LEVEL_NOT_EXISTIf operator is not in the choice list, then level is fail.- See Also:
-
-
Constructor Details
-
OperatorUtil
public OperatorUtil()
-
-
Method Details
-
computeStyleRuleOperatorLevel
Computes the level of operator. The allowed values are defined inDesignChoiceConstants
, If operator is one of follows:MAP_OPERATOR_NULL
MAP_OPERATOR_NOT_NULL
MAP_OPERATOR_TRUE
MAP_OPERATOR_FALSE
OPERATOR_LEVEL_ZERO
; If operator is one of follows:
MAP_OPERATOR_EQ
MAP_OPERATOR_NE
MAP_OPERATOR_LT
MAP_OPERATOR_LE
MAP_OPERATOR_GE
MAP_OPERATOR_GT
MAP_OPERATOR_LIKE
MAP_OPERATOR_TOP_N
MAP_OPERATOR_BOTTOM_N
MAP_OPERATOR_NOT_LIKE
MAP_OPERATOR_NOT_MATCH
MAP_OPERATOR_ANY
OPERATOR_LEVEL_ONE
; If operator is one of follows:
MAP_OPERATOR_BETWEEN
MAP_OPERATOR_NOT_BETWEEN
OPERATOR_LEVEL_TWO
; If operator is not in the choice list, return
OPERATOR_LEVEL_NOT_EXIST
.
- Parameters:
operator
- the operator to compute.- Returns:
- level of operator.
-
computeFilterOperatorLevel
Computes the level of operator. The allowed values are defined inDesignChoiceConstants
, If operator is one of follows:FILTER_OPERATOR_NULL
FILTER_OPERATOR_NOT_NULL
FILTER_OPERATOR_TRUE
FILTER_OPERATOR_FALSE
OPERATOR_LEVEL_ZERO
; If operator is one of follows:
FILTER_OPERATOR_EQ
FILTER_OPERATOR_NE
FILTER_OPERATOR_LT
FILTER_OPERATOR_LE
FILTER_OPERATOR_GE
FILTER_OPERATOR_GT
FILTER_OPERATOR_LIKE
FILTER_OPERATOR_TOP_N
FILTER_OPERATOR_BOTTOM_N
FILTER_OPERATOR_TOP_PERCENT
FILTER_OPERATOR_BOTTOM_PERCENT
FILTER_OPERATOR_ANY
OPERATOR_LEVEL_ONE
; If operator is one of follows:
FILTER_OPERATOR_BETWEEN
FILTER_OPERATOR_NOT_BETWEEN
OPERATOR_LEVEL_TWO
; If operator is not in the choice list, return
OPERATOR_LEVEL_NOT_EXIST
.
- Parameters:
operator
- the operator to compute.- Returns:
- level of operator.
-