Class SearchFieldClause

  • All Implemented Interfaces:
    ISearchQueryFilter

    @StableMinor(version="14.1",
                 sinceVersion="8.1")
    public class SearchFieldClause
    extends Object
    implements ISearchQueryFilter
    A search query clause used by a searcher to search content. Defines an operator and values to be applied on a optionally specified field.
    Since:
    8.1.0
    Version:
    $Revision: 24683 $ $Date: 2021-08-23 18:55:58 -0300 (Mon, 23 Aug 2021) $
    • Constructor Detail

      • SearchFieldClause

        public SearchFieldClause​(DocumentTypeField field)
        Creates a new search field clause for the given field.
        Parameters:
        field - the field.
        Since:
        8.1.0
      • SearchFieldClause

        public SearchFieldClause​(String fieldId)
        Creates a new instance using the given field identifier.
        Parameters:
        fieldId - the field identifier.
        Since:
        8.1.0
    • Method Detail

      • getOperator

        public SearchFieldClause.Operator getOperator()
        Returns the operator for this clause.
        Returns:
        the operator for this clause.
        Since:
        8.1.0
        See Also:
        #setOperator(String)
      • setValues

        public SearchFieldClause setValues​(Collection<?> values)
        Sets the values this clause searches for.

        Its not allowed to set a null list or list of values that has a empty value or a null value.

        Parameters:
        values - a list containing the values.
        Returns:
        this SearchFieldClause.
        Since:
        8.1.0
      • setValues

        public SearchFieldClause setValues​(Object... values)
        Sets the values this clause searches for.

        Its not allowed to set a null or empty string value.

        Parameters:
        values - the values.
        Returns:
        this SearchFieldClause.
        Since:
        8.1.0
      • getFieldId

        public String getFieldId()
        Returns the field identifier for this search clause.
        Returns:
        the field identifier for this search clause.
        Since:
        8.1.0
        See Also:
        #setScope(String)