Class SearchCriteria.MatchClause

    • Method Detail

      • createPropertyMatch

        public static SearchCriteria.MatchClause createPropertyMatch​(java.lang.String propertyCode,
                                                                     java.lang.String desiredValue)
        Factory method to create a MatchClause matching against a specific property.
        Parameters:
        propertyCode - The name of the property to compare against.
        desiredValue - The desired value for the property.
      • createAttributeMatch

        public static SearchCriteria.MatchClause createAttributeMatch​(SearchCriteria.MatchClauseAttribute attribute,
                                                                      java.lang.String desiredValue)
        Factory method to create a MatchClause matching against a specific attribute.
        Parameters:
        attribute - The attribute to compare against.
        desiredValue - The desired value for the attribute.
      • createTimeAttributeMatch

        public static SearchCriteria.MatchClause createTimeAttributeMatch​(SearchCriteria.MatchClauseTimeAttribute attribute,
                                                                          SearchCriteria.CompareMode mode,
                                                                          java.lang.String date,
                                                                          java.lang.String timezone)
        Factory method to create a MatchClause matching against registration or modification date.
        Parameters:
        attribute - The attribute to compare against
        mode - The kind of comparison (<=, ==, >=)
        date - The date to compare against, format YYYY-MM-DD
      • createAnyPropertyMatch

        public static SearchCriteria.MatchClause createAnyPropertyMatch​(java.lang.String desiredValue)
        Factory method to create a MatchClause matching against any property.
        Parameters:
        desiredValue - The desired value for a property.
      • createAnyFieldMatch

        public static SearchCriteria.MatchClause createAnyFieldMatch​(java.lang.String desiredValue)
        Factory method to create a MatchClause matching against any property or attribute.
        Parameters:
        desiredValue - The desired value for a property or an attribute.
      • escape

        public static java.lang.String escape​(java.lang.String s)
        Returns a String where those characters that Lucene expects to be escaped are escaped by a preceding \.

        Copy of Lucene's QueryParser.escape() method.

      • getFieldCode

        protected java.lang.String getFieldCode()
        The code of the field.
      • getDesiredValue

        public java.lang.String getDesiredValue()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object