Package org.ametys.cms.search.query
Class JoinQuery
- java.lang.Object
-
- org.ametys.cms.search.query.JoinQuery
-
- All Implemented Interfaces:
Query
- Direct Known Subclasses:
FrontODFSearch.SubProgramPageContentQuery
,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 private String
_buildQuery(Query query)
private void
_checkJoinParams()
private void
_checkValidPathNames()
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
-
_checkValidPathNames
private void _checkValidPathNames()
-
_checkJoinParams
private void _checkJoinParams()
-
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.
-
_buildQuery
private String _buildQuery(Query query) throws QuerySyntaxException
- Throws:
QuerySyntaxException
-
toString
public String toString(int indent)
Description copied from interface:Query
Gets a representation of thisQuery
, for pretty-printing for logging and debugging purposes
-
-