Package org.ametys.cms.search.query
Class AndQuery
java.lang.Object
org.ametys.cms.search.query.AndQuery
- All Implemented Interfaces:
Query
Represents a search
Query
corresponding to the logical "and" between several other queries.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
If a query is empty should just ignore it, or return an empty AndQueryThe list of queries. -
Constructor Summary
ConstructorsConstructorDescriptionAndQuery
(boolean ignoreEmptyQueries, Collection<Query> queries) Build an AndQuery object.Build an AndQuery object.AndQuery
(Collection<Query> queries) Build an AndQuery object.Build an AndQuery object. -
Method Summary
-
Field Details
-
_queries
The list of queries. The queries on this list are distinct. -
_ignoreEmptyQueries
If a query is empty should just ignore it, or return an empty AndQuery
-
-
Constructor Details
-
AndQuery
Build an AndQuery object.- Parameters:
queries
- the queries.
-
AndQuery
Build an AndQuery object.- Parameters:
ignoreEmptyQueries
- If a query is empty should just ignore it, or return an empty AndQueryqueries
- the queries.
-
AndQuery
Build an AndQuery object.- Parameters:
queries
- the queries as a Collection.
-
AndQuery
Build an AndQuery object.- Parameters:
ignoreEmptyQueries
- If a query is empty should just ignore it, or return an empty AndQueryqueries
- the queries as a Collection.
-
-
Method Details
-
collector
-
getQueries
Get the list of queries in this "and".- Returns:
- the list of queries.
-
build
Description copied from interface:Query
Build the solr query string representing the Query object.- Specified by:
build
in interfaceQuery
- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException
- if the query can't be built because of a syntax error.
-
toString
Description copied from interface:Query
Gets a representation of thisQuery
, for pretty-printing for logging and debugging purposes -
hashCode
-
equals
-