Class OperatorUtil


  • public class OperatorUtil
    extends java.lang.Object
    Represents the utility class to help compute level of operator.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int OPERATOR_LEVEL_NOT_EXIST
      If operator is not in the choice list, then level is fail.
      static int OPERATOR_LEVEL_ONE
      If operater is >, >= , = , < , <= , like , top , bottom , any , then level is one.
      static int OPERATOR_LEVEL_TWO
      If operater is between , not between , then level is two.
      static int OPERATOR_LEVEL_ZERO
      If operater is null, not null, true , false , then level is zero.
    • Constructor Summary

      Constructors 
      Constructor Description
      OperatorUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int computeFilterOperatorLevel​(java.lang.String operator)
      Computes the level of operator.
      static int computeStyleRuleOperatorLevel​(java.lang.String operator)
      Computes the level of operator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • OPERATOR_LEVEL_ZERO

        public static final int OPERATOR_LEVEL_ZERO
        If operater is null, not null, true , false , then level is zero. Delete value1 and value2 in design file
        See Also:
        Constant Field Values
      • OPERATOR_LEVEL_ONE

        public static final int OPERATOR_LEVEL_ONE
        If operater is >, >= , = , < , <= , like , top , bottom , any , then level is one. Set value1, delete value2 in design file
        See Also:
        Constant Field Values
      • OPERATOR_LEVEL_TWO

        public static final int OPERATOR_LEVEL_TWO
        If operater is between , not between , then level is two. Set value1 and value2 in design file.
        See Also:
        Constant Field Values
      • OPERATOR_LEVEL_NOT_EXIST

        public static final int OPERATOR_LEVEL_NOT_EXIST
        If operator is not in the choice list, then level is fail.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OperatorUtil

        public OperatorUtil()
    • Method Detail

      • computeStyleRuleOperatorLevel

        public static int computeStyleRuleOperatorLevel​(java.lang.String operator)
        Computes the level of operator. The allowed values are defined in DesignChoiceConstants, If operator is one of follows:
        • MAP_OPERATOR_NULL
        • MAP_OPERATOR_NOT_NULL
        • MAP_OPERATOR_TRUE
        • MAP_OPERATOR_FALSE
        return 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
        return OPERATOR_LEVEL_ONE; If operator is one of follows:
        • MAP_OPERATOR_BETWEEN
        • MAP_OPERATOR_NOT_BETWEEN
        return 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

        public static int computeFilterOperatorLevel​(java.lang.String operator)
        Computes the level of operator. The allowed values are defined in DesignChoiceConstants, If operator is one of follows:
        • FILTER_OPERATOR_NULL
        • FILTER_OPERATOR_NOT_NULL
        • FILTER_OPERATOR_TRUE
        • FILTER_OPERATOR_FALSE
        return 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
        return OPERATOR_LEVEL_ONE; If operator is one of follows:
        • FILTER_OPERATOR_BETWEEN
        • FILTER_OPERATOR_NOT_BETWEEN
        return 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.