Package org.ametys.cms.search.query
Class JoinQuery
- java.lang.Object
-
- org.ametys.cms.search.query.JoinQuery
-
- All Implemented Interfaces:
Query
- Direct Known Subclasses:
PageContentQuery
,ProgramSearchable.ProgramThroughProgramPartsQuery
public class JoinQuery extends Object implements Query
Represents aQuery
on a joined document.
-
-
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 Collection<JoinKey>
_joinKeys
The join keys (paths and optional nested queries)protected Query
_subQuery
The field path.
-
Constructor Summary
Constructors Constructor Description JoinQuery(Collection<JoinKey> joinKeys)
Build a join query.JoinQuery(JoinKey... joinKeys)
Build a join query.JoinQuery(Query subQuery, String... joinPaths)
Build a join query.JoinQuery(Query subQuery, Collection<String> joinPaths)
Build a join query.
-
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)
int
hashCode()
String
toString(int indent)
Gets a representation of thisQuery
, for pretty-printing for logging and debugging purposes
-
-
-
Field Detail
-
_joinKeys
protected Collection<JoinKey> _joinKeys
The join keys (paths and optional nested queries)
-
-
Constructor Detail
-
JoinQuery
public JoinQuery(Query subQuery, String... joinPaths)
Build a join query.- Parameters:
subQuery
- The sub query.joinPaths
- The field's join paths
-
JoinQuery
public JoinQuery(Query subQuery, Collection<String> joinPaths)
Build a join query.- Parameters:
subQuery
- The sub query.joinPaths
- The field's join paths
-
JoinQuery
public JoinQuery(JoinKey... joinKeys)
Build a join query.- Parameters:
joinKeys
- The join paths and optional nested queries
-
JoinQuery
public JoinQuery(Collection<JoinKey> joinKeys)
Build a join query.- Parameters:
joinKeys
- The join paths and optional nested queries
-
-
Method Detail
-
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
-
-