Package org.ametys.cms.search.query
Class BooleanQuery
java.lang.Object
org.ametys.cms.search.query.AbstractFieldQuery
org.ametys.cms.search.query.BooleanQuery
- All Implemented Interfaces:
Query
Represents a
Query
testing a boolean field.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Query.Operator
The operator.protected Boolean
The boolean value to test.Fields inherited from class org.ametys.cms.search.query.AbstractFieldQuery
_fieldPath
-
Constructor Summary
ConstructorsConstructorDescriptionBooleanQuery
(String fieldPath) Build a BooleanQuery testing the existence of the field.BooleanQuery
(String fieldPath, Boolean value) Build a BooleanQuery.BooleanQuery
(String fieldPath, Query.Operator op, Boolean value) Build a BooleanQuery. -
Method Summary
Methods inherited from class org.ametys.cms.search.query.AbstractFieldQuery
getFieldPath
-
Field Details
-
_operator
The operator. -
_value
The boolean value to test.
-
-
Constructor Details
-
BooleanQuery
Build a BooleanQuery testing the existence of the field.- Parameters:
fieldPath
- the field's path
-
BooleanQuery
Build a BooleanQuery.- Parameters:
fieldPath
- the field's pathvalue
- the value.
-
BooleanQuery
Build a BooleanQuery.- Parameters:
fieldPath
- the field's pathop
- the operator.value
- the value.
-
-
Method Details
-
getOperator
Get the operator.- Returns:
- the operator.
-
getValue
Get the value.- Returns:
- the value.
-
build
Description copied from interface:Query
Build the solr query string representing the Query object.- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException
- if the query can't be built because of a syntax error.
-
hashCode
- Overrides:
hashCode
in classAbstractFieldQuery
-
equals
- Overrides:
equals
in classAbstractFieldQuery
-