Class CompareFilter

    • Constructor Summary

      Constructors 
      Constructor Description
      CompareFilter​(java.lang.String attribute, int value)
      Convenience constructor for int values.
      CompareFilter​(java.lang.String attribute, java.lang.String value)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.StringBuffer encode​(java.lang.StringBuffer buff)
      Encodes the filter to a StringBuffer.
      protected java.lang.String encodeValue​(java.lang.String value)
      Override to perform special encoding in subclass.
      boolean equals​(java.lang.Object o)
      All filters must implement equals.
      protected abstract java.lang.String getCompareString()
      Implement this method in subclass to return a String representing the operator.
      int hashCode()
      All filters must implement hashCode.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CompareFilter

        public CompareFilter​(java.lang.String attribute,
                             java.lang.String value)
      • CompareFilter

        public CompareFilter​(java.lang.String attribute,
                             int value)
        Convenience constructor for int values.
        Parameters:
        attribute - Name of attribute in filter.
        value - The value of the attribute in the filter.
    • Method Detail

      • encodeValue

        protected java.lang.String encodeValue​(java.lang.String value)
        Override to perform special encoding in subclass.
        Parameters:
        value - the value to encode.
        Returns:
        properly escaped value.
      • encode

        public java.lang.StringBuffer encode​(java.lang.StringBuffer buff)
        Description copied from interface: Filter
        Encodes the filter to a StringBuffer.
        Parameters:
        buff - The StringBuffer to encode the filter to
        Returns:
        The same StringBuffer as was given
      • equals

        public boolean equals​(java.lang.Object o)
        Description copied from interface: Filter
        All filters must implement equals.
        Specified by:
        equals in interface Filter
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if the objects are equal.
      • hashCode

        public int hashCode()
        Description copied from interface: Filter
        All filters must implement hashCode.
        Specified by:
        hashCode in interface Filter
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hash code according to the contract in Object.hashCode()
      • getCompareString

        protected abstract java.lang.String getCompareString()
        Implement this method in subclass to return a String representing the operator. The EqualsFilter.getCompareString() would for example return an equals sign, "=".
        Returns:
        the String to use as operator in the comparison for the specific subclass.