public class ContentQuery extends AbstractFieldQuery
Query
testing a content field.Query.LogicalOperator, Query.Operator
Modifier and Type | Field and Description |
---|---|
protected ContentHelper |
_contentHelper
The extension point.
|
protected boolean |
_isAndMultipleOperand
true if the query should be executed with an AndQuery. |
protected HierarchicalReferenceTablesHelper |
_refTableHelper
The helper to resolve the reference tables.
|
protected boolean |
_resolveChildren
true if the query should be executed by resolving the children. |
protected AmetysObjectResolver |
_resolver
The resolver to resolve the results.
|
protected Object |
_value
The value to test.
|
_fieldPath
Constructor and Description |
---|
ContentQuery(String fieldPath,
Object value,
AmetysObjectResolver resolver,
ContentHelper contentHelper)
Build a content query.
|
ContentQuery(String fieldPath,
Object value,
AmetysObjectResolver resolver,
ContentHelper contentHelper,
boolean isAndMultipleOperand)
Build a content query by testing the operand.
|
ContentQuery(String fieldPath,
Object value,
AmetysObjectResolver resolver,
ContentHelper contentHelper,
HierarchicalReferenceTablesHelper refTableHelper,
boolean resolveChildren)
Build a content query by testing if the ancestors should be resolved.
|
ContentQuery(String fieldPath,
Object value,
AmetysObjectResolver resolver,
ContentHelper contentHelper,
HierarchicalReferenceTablesHelper refTableHelper,
boolean resolveChildren,
boolean isAndMultipleOperand)
Build a content query by testing the operand and if the ancestors should be resolved.
|
Modifier and Type | Method and Description |
---|---|
private Query |
_createQueryString(Object value) |
private Query |
_createRefParentsQuery(Collection<String> values)
Create a subQuery in order to create the join query
|
private Set<String> |
_getChildrenOrSelf(String id) |
private Query |
_getChildrenOrSelfQuery(Collection<String> values) |
String |
build()
Build the solr query string representing the Query object.
|
boolean |
equals(Object obj) |
Object |
getValue()
Get the value.
|
int |
hashCode() |
getFieldPath
protected AmetysObjectResolver _resolver
protected ContentHelper _contentHelper
protected boolean _isAndMultipleOperand
true
if the query should be executed with an AndQuery.protected HierarchicalReferenceTablesHelper _refTableHelper
protected boolean _resolveChildren
true
if the query should be executed by resolving the children.public ContentQuery(String fieldPath, Object value, AmetysObjectResolver resolver, ContentHelper contentHelper)
fieldPath
- the field's pathvalue
- the valueresolver
- the resolvercontentHelper
- the content helperpublic ContentQuery(String fieldPath, Object value, AmetysObjectResolver resolver, ContentHelper contentHelper, boolean isAndMultipleOperand)
fieldPath
- the field's pathvalue
- the valueresolver
- the resolvercontentHelper
- the content helperisAndMultipleOperand
- 'true' to execute an AndQuery, OrQuery otherwisepublic ContentQuery(String fieldPath, Object value, AmetysObjectResolver resolver, ContentHelper contentHelper, HierarchicalReferenceTablesHelper refTableHelper, boolean resolveChildren)
fieldPath
- the field's pathvalue
- the valueresolver
- the resolvercontentHelper
- the content helperrefTableHelper
- The helper to resolve the ancestorsresolveChildren
- 'true' to execute an OrQuery on the ancestors and itself, 'false' will execute a join requestpublic ContentQuery(String fieldPath, Object value, AmetysObjectResolver resolver, ContentHelper contentHelper, HierarchicalReferenceTablesHelper refTableHelper, boolean resolveChildren, boolean isAndMultipleOperand)
fieldPath
- the field's pathvalue
- the valueresolver
- the resolvercontentHelper
- the content helperrefTableHelper
- The helper to resolve the ancestorsresolveChildren
- 'true' to execute an OrQuery on the ancestors and itself, 'false' will execute a join requestisAndMultipleOperand
- 'true' to execute an AndQuery, OrQuery otherwisepublic String build() throws QuerySyntaxException
Query
QuerySyntaxException
- if the query can't be built because of a syntax error.private Query _getChildrenOrSelfQuery(Collection<String> values)
private Set<String> _getChildrenOrSelf(String id)
private Query _createQueryString(Object value)
private Query _createRefParentsQuery(Collection<String> values)
values
- the values to add in the querypublic int hashCode()
hashCode
in class AbstractFieldQuery
public boolean equals(Object obj)
equals
in class AbstractFieldQuery