Package org.ametys.web.search.query
Class SiteQuery
- java.lang.Object
-
- org.ametys.web.search.query.SiteQuery
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator
-
-
Constructor Summary
Constructors Constructor Description SiteQuery()Build a SiteQuery to test if the site property existsSiteQuery(String... names)Build a SiteQuery to test if the site property is equals to one of the given site namesSiteQuery(Collection<String> names)Build a SiteQuery to test if the site property is equals to one of the given site namesSiteQuery(Query.Operator operator, String... names)Build a SiteQuery to test if the site property is equals or different to one of the given site namesSiteQuery(Query.Operator operator, Collection<String> names)Build a SiteQuery.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringbuild()Build the solr query string representing the Query object.booleanequals(Object obj)List<String>getNames()Get the site names.Query.OperatorgetOperator()Get the operator.inthashCode()
-
-
-
Constructor Detail
-
SiteQuery
public SiteQuery()
Build a SiteQuery to test if the site property exists
-
SiteQuery
public SiteQuery(String... names)
Build a SiteQuery to test if the site property is equals to one of the given site names- Parameters:
names- the site names.
-
SiteQuery
public SiteQuery(Collection<String> names)
Build a SiteQuery to test if the site property is equals to one of the given site names- Parameters:
names- the site names.
-
SiteQuery
public SiteQuery(Query.Operator operator, String... names)
Build a SiteQuery to test if the site property is equals or different to one of the given site names- Parameters:
operator- the operator (equals ot not-equals)names- the site names.
-
SiteQuery
public SiteQuery(Query.Operator operator, Collection<String> names)
Build a SiteQuery.- Parameters:
operator- the operator.names- the site names.
-
-
Method Detail
-
getOperator
public Query.Operator getOperator()
Get the operator.- Returns:
- the operator
-
build
public String build() throws QuerySyntaxException
Description copied from interface:QueryBuild the solr query string representing the Query object.- Specified by:
buildin interfaceQuery- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException- if the query can't be built because of a syntax error.
-
-