Package org.ametys.web.search.query
Class SiteTypeQuery
- java.lang.Object
-
- org.ametys.web.search.query.SiteTypeQuery
-
- All Implemented Interfaces:
Query
public class SiteTypeQuery extends Object implements Query
Represents aQuery
testing the site type property.
-
-
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 private Query.Operator
_operator
private List<String>
_types
-
Constructor Summary
Constructors Constructor Description SiteTypeQuery()
Build a SiteTypeQuery to test if the site type property existsSiteTypeQuery(String... types)
Build a SiteTypeQuery to test if the site type property is equals to one of the given site typeSiteTypeQuery(Collection<String> types)
Build a SiteTypeQuery to test if the site type property is equals to one of the given site typesSiteTypeQuery(Query.Operator operator, String... types)
Build a SiteTypeQuery to test if the site type property is equals or different to one of the given site typesSiteTypeQuery(Query.Operator operator, Collection<String> types)
Build a SiteTypeQuery.
-
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)
Query.Operator
getOperator()
Get the operator.List<String>
getTypes()
Get the site types.int
hashCode()
-
-
-
Field Detail
-
_operator
private Query.Operator _operator
-
-
Constructor Detail
-
SiteTypeQuery
public SiteTypeQuery()
Build a SiteTypeQuery to test if the site type property exists
-
SiteTypeQuery
public SiteTypeQuery(String... types)
Build a SiteTypeQuery to test if the site type property is equals to one of the given site type- Parameters:
types
- the site type.
-
SiteTypeQuery
public SiteTypeQuery(Collection<String> types)
Build a SiteTypeQuery to test if the site type property is equals to one of the given site types- Parameters:
types
- the site types.
-
SiteTypeQuery
public SiteTypeQuery(Query.Operator operator, String... types)
Build a SiteTypeQuery to test if the site type property is equals or different to one of the given site types- Parameters:
operator
- the operator (equals ot not-equals)types
- the site types.
-
SiteTypeQuery
public SiteTypeQuery(Query.Operator operator, Collection<String> types)
Build a SiteTypeQuery.- Parameters:
operator
- the operator.types
- the site types.
-
-
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.
-
-