Package lumis.portal.bigdata.query
Class SearchFieldClause
- java.lang.Object
-
- lumis.portal.bigdata.query.SearchFieldClause
-
- All Implemented Interfaces:
ISearchQueryFilter
@StableMinor(version="14.0", sinceVersion="8.1") public class SearchFieldClause extends Object implements ISearchQueryFilter
A search query clause used by asearcher
to search content. Defines an operator and values to be applied on a optionally specified field.- Since:
- 8.1.0
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SearchFieldClause.Operator
Supported operators.
-
Constructor Summary
Constructors Constructor Description SearchFieldClause(String fieldId)
Creates a new instance using the given field identifier.SearchFieldClause(DocumentTypeField field)
Creates a new search field clause for the given field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFieldId()
Returns the field identifier for this search clause.SearchFieldClause.Operator
getOperator()
Returns the operator for this clause.Collection<Object>
getValues()
Returns the values this clause searches for.SearchFieldClause
setOperator(SearchFieldClause.Operator operator)
Sets the operator for this clause.SearchFieldClause
setValues(Object... values)
Sets the values this clause searches for.SearchFieldClause
setValues(Collection<?> values)
Sets the values this clause searches for.
-
-
-
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)
-
setOperator
public SearchFieldClause setOperator(SearchFieldClause.Operator operator)
Sets the operator for this clause. The default value isSearchFieldClause.Operator.ANY
.- Parameters:
operator
- the operator value to set.- Returns:
- this
SearchFieldClause
. - Since:
- 8.1.0
- See Also:
SearchFieldClause.Operator
-
getValues
public Collection<Object> getValues()
Returns the values this clause searches for. The default value is an empty list.- Returns:
- a immutable collection containing the values.
- Since:
- 8.1.0
- See Also:
setValues(java.util.Collection<?>)
-
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)
-
-