Class FieldFilterRange

  • All Implemented Interfaces:
    Serializable

    public class FieldFilterRange
    extends Object
    implements Serializable
    A filter value range. Used to construct a range (open or closed on either end) of values for filtering records. The value range can be a single value for an equality filter.
    See Also:
    Serialized Form
    • Constructor Detail

      • FieldFilterRange

        public FieldFilterRange​(String v,
                                FieldFilterRange.Bound rangeBound,
                                boolean leftRangeOpen,
                                boolean rightRangeOpen,
                                boolean donotquote,
                                short prefixMatchLength)
        Use for single value ranges.
        Parameters:
        v - the value
        rangeBound - the range bound
        leftRangeOpen - the left range open
        rightRangeOpen - the right range open
        donotquote - entry should not be quoted
        prefixMatchLength - the prefix match length
      • FieldFilterRange

        public FieldFilterRange​(String v,
                                FieldFilterRange.Bound rangeBound,
                                boolean leftRangeOpen,
                                boolean rightRangeOpen,
                                boolean donotquote)
        Use for single value ranges.
        Parameters:
        v - the value
        rangeBound - the range bound
        leftRangeOpen - the left range open
        rightRangeOpen - the right range open
        donotquote - entry should not be quoted
      • FieldFilterRange

        public FieldFilterRange​(String low,
                                String high,
                                boolean leftRangeOpen,
                                boolean rightRangeOpen,
                                boolean donotquote)
        Use for bounded range.
        Parameters:
        low - the low
        high - the high
        leftRangeOpen - the left range open
        rightRangeOpen - the right range open
        donotquote - entry should not be quoted
      • FieldFilterRange

        public FieldFilterRange​(Object[] valueList,
                                boolean donotquote)
        Use for a set of discrete values.
        Parameters:
        valueList - the value list
        donotquote - entry should not be quoted
    • Method Detail

      • getValues

        public String[] getValues()
      • getLeftOpen

        public boolean getLeftOpen()
      • getRightOpen

        public boolean getRightOpen()
      • makeEq

        public static FieldFilterRange makeEq​(Object v)
        Create equality filter range.
        Parameters:
        v - the test value
        Returns:
        the test range
      • makeNE

        public static FieldFilterRange makeNE​(Object v)
        Create inequality filter range.
        Parameters:
        v - the test value
        Returns:
        the test range
      • makeLT

        public static FieldFilterRange makeLT​(Object v)
        Create less than filter range.
        Parameters:
        v - the test value
        Returns:
        the test range
      • makeLE

        public static FieldFilterRange makeLE​(Object v)
        Create less or equal filter range.
        Parameters:
        v - the test value
        Returns:
        the test range
      • makeGT

        public static FieldFilterRange makeGT​(Object v)
        Create greater than filter range.
        Parameters:
        v - the test value
        Returns:
        the test range
      • makeGE

        public static FieldFilterRange makeGE​(Object v)
        Create greater or equal filter range.
        Parameters:
        v - the test value
        Returns:
        the test range
      • makeIn

        public static FieldFilterRange makeIn​(Object[] vs)
        Create IN filter range If all entries are numeric, numeric based compare created. Otherwise, string-wise compare
        Parameters:
        vs - set of values
        Returns:
        the filter range
      • makeIn

        public static FieldFilterRange makeIn​(Object[] vs,
                                              boolean stringecapsulate)
        Create IN filter range Encapsulate entries as string values based on stringecapsulate.
        Parameters:
        vs - set of values
        stringecapsulate - the stringecapsulate
        Returns:
        the filter range
      • makeStartsWith

        public static FieldFilterRange makeStartsWith​(Object v,
                                                      short len)
                                               throws Exception
        Create startswith filter range.
        Parameters:
        v - the subset
        len - the length to compare
        Returns:
        the filter range
        Throws:
        Exception - the exception
      • filterExpression

        public String filterExpression()
        The filter test range in appropriate syntax for the remote read engine.
        Returns:
        the filter string