public class QueryFilter extends Object implements QueryFilter<SQLQuery.Transformer>, Serializable
FilterableQuery
.
This includes filtering on the BROWSE permission for the given principal, filtering on facets, and applying query transformers.
You can also include a limit and offset, to get a subset of the total.
Modifier and Type | Field and Description |
---|---|
static QueryFilter |
EMPTY |
protected FacetFilter |
facetFilter |
protected long |
limit |
protected long |
offset |
protected String[] |
permissions |
protected NuxeoPrincipal |
principal
The principal.
|
protected String[] |
principals |
protected Collection<SQLQuery.Transformer> |
queryTransformers |
Constructor and Description |
---|
QueryFilter(NuxeoPrincipal principal,
String[] principals,
String[] permissions,
FacetFilter facetFilter,
Collection<SQLQuery.Transformer> queryTransformers,
long limit,
long offset)
Constructs a query filter.
|
Modifier and Type | Method and Description |
---|---|
FacetFilter |
getFacetFilter() |
long |
getLimit() |
long |
getOffset() |
String[] |
getPermissions() |
NuxeoPrincipal |
getPrincipal() |
String[] |
getPrincipals() |
Collection<SQLQuery.Transformer> |
getQueryTransformers() |
String |
toString() |
static QueryFilter |
withoutLimitOffset(QueryFilter other) |
public static final QueryFilter EMPTY
protected final NuxeoPrincipal principal
Serializable
.protected final String[] principals
protected final String[] permissions
protected final FacetFilter facetFilter
protected final Collection<SQLQuery.Transformer> queryTransformers
protected final long limit
protected final long offset
public QueryFilter(NuxeoPrincipal principal, String[] principals, String[] permissions, FacetFilter facetFilter, Collection<SQLQuery.Transformer> queryTransformers, long limit, long offset)
Note that the principal MUST be Serializable
.
public static QueryFilter withoutLimitOffset(QueryFilter other)
public NuxeoPrincipal getPrincipal()
getPrincipal
in interface QueryFilter<SQLQuery.Transformer>
public String[] getPrincipals()
getPrincipals
in interface QueryFilter<SQLQuery.Transformer>
public String[] getPermissions()
getPermissions
in interface QueryFilter<SQLQuery.Transformer>
public FacetFilter getFacetFilter()
getFacetFilter
in interface QueryFilter<SQLQuery.Transformer>
public Collection<SQLQuery.Transformer> getQueryTransformers()
getQueryTransformers
in interface QueryFilter<SQLQuery.Transformer>
public long getLimit()
getLimit
in interface QueryFilter<SQLQuery.Transformer>
public long getOffset()
getOffset
in interface QueryFilter<SQLQuery.Transformer>
Copyright © 2019 Nuxeo. All rights reserved.