Package org.ametys.cms.search.query
Class AndQuery
- java.lang.Object
-
- org.ametys.cms.search.query.AndQuery
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
_ignoreEmptyQueries
If a query is empty should just ignore it, or return an empty AndQueryprotected List<Query>
_queries
The list of queries.
-
Constructor Summary
Constructors Constructor Description AndQuery(boolean ignoreEmptyQueries, Collection<Query> queries)
Build an AndQuery object.AndQuery(boolean ignoreEmptyQueries, Query... queries)
Build an AndQuery object.AndQuery(Collection<Query> queries)
Build an AndQuery object.AndQuery(Query... queries)
Build an AndQuery object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
build()
Build the solr query string representing the Query object.static Collector<Query,?,AndQuery>
collector()
boolean
equals(Object obj)
List<Query>
getQueries()
Get the list of queries in this "and".int
hashCode()
String
toString(int indent)
Gets a representation of thisQuery
, for pretty-printing for logging and debugging purposes
-
-
-
Field Detail
-
_ignoreEmptyQueries
protected boolean _ignoreEmptyQueries
If a query is empty should just ignore it, or return an empty AndQuery
-
-
Constructor Detail
-
AndQuery
public AndQuery(Query... queries)
Build an AndQuery object.- Parameters:
queries
- the queries.
-
AndQuery
public AndQuery(boolean ignoreEmptyQueries, Query... queries)
Build an AndQuery object.- Parameters:
ignoreEmptyQueries
- If a query is empty should just ignore it, or return an empty AndQueryqueries
- the queries.
-
AndQuery
public AndQuery(Collection<Query> queries)
Build an AndQuery object.- Parameters:
queries
- the queries as a Collection.
-
AndQuery
public AndQuery(boolean ignoreEmptyQueries, Collection<Query> queries)
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 Detail
-
getQueries
public List<Query> getQueries()
Get the list of queries in this "and".- Returns:
- the list of queries.
-
build
public String build() throws QuerySyntaxException
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
public String toString(int indent)
Description copied from interface:Query
Gets a representation of thisQuery
, for pretty-printing for logging and debugging purposes
-
-