Package org.ametys.cms.search.query
Class StringQuery
java.lang.Object
org.ametys.cms.search.query.AbstractOperatorQuery<String>
org.ametys.cms.search.query.AbstractTextQuery
org.ametys.cms.search.query.StringQuery
Represents a
Query
testing a string field.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator
-
Field Summary
Fields inherited from class org.ametys.cms.search.query.AbstractTextQuery
_language, _valueAlreadyEscaped
Fields inherited from interface org.ametys.cms.search.query.Query
BOOL_FILTER, BOOL_MUST, BOOL_MUST_NOT, BOOL_SHOULD
-
Constructor Summary
ConstructorDescriptionStringQuery
(String fieldPath) Build a StringQuery testing the existence of the field.StringQuery
(String fieldPath, String value) Build a string query.StringQuery
(String fieldPath, String value, String language) Build a string query.StringQuery
(String fieldPath, Query.Operator op, String value, String language) Build a string query.StringQuery
(String fieldPath, Query.Operator op, String value, String language, boolean alreadyEscaped) Build a string query. -
Method Summary
Methods inherited from class org.ametys.cms.search.query.AbstractTextQuery
checkStringValue, equals, escapeStringValue, getLanguage, hashCode
Methods inherited from class org.ametys.cms.search.query.AbstractOperatorQuery
getFieldName, getOperator, getValue, rewrite, valueForQuery
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.cms.search.query.Query
buildAsJson, toString
-
Constructor Details
-
StringQuery
Build a StringQuery testing the existence of the field.- Parameters:
fieldPath
- the field path
-
StringQuery
Build a string query.- Parameters:
fieldPath
- the field's pathvalue
- the value.
-
StringQuery
Build a string query.- Parameters:
fieldPath
- the field's pathvalue
- the value.language
- the query language (can be null).
-
StringQuery
Build a string query.- Parameters:
fieldPath
- the field's pathop
- the operator.value
- the value.language
- the query language (can be null).
-
StringQuery
public StringQuery(String fieldPath, Query.Operator op, String value, String language, boolean alreadyEscaped) Build a string query.- Parameters:
fieldPath
- the field's pathop
- the operator.value
- the value.language
- the query language (can be null).alreadyEscaped
- true if the value is already escaped and there is no need to escape again the value duringthe build of the query
.
-
-
Method Details
-
build
Description copied from interface:Query
Build the solr query string representing the Query object.- Specified by:
build
in interfaceQuery
- Overrides:
build
in classAbstractTextQuery
- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException
- if the query can't be built because of a syntax error.
-