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 String
build()
Build the solr query string representing the Query object.boolean
equals(Object obj)
List<String>
getNames()
Get the site names.Query.Operator
getOperator()
Get the operator.int
hashCode()
-
-
-
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: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.
-
-