public abstract class StandardQueryFactory<S extends Storable> extends java.lang.Object implements QueryFactory<S>
Modifier | Constructor and Description |
---|---|
protected |
StandardQueryFactory(java.lang.Class<S> type) |
protected |
StandardQueryFactory(java.lang.Class<S> type,
boolean lazySetExecutor) |
Modifier and Type | Method and Description |
---|---|
void |
clearExecutors()
For each cached query, calls
StandardQuery.clearExecutor() . |
protected abstract StandardQuery<S> |
createQuery(Filter<S> filter,
FilterValues<S> values,
OrderingList<S> ordering,
QueryHints hints)
Implement this method to return query implementations.
|
java.lang.Class<S> |
getStorableType() |
Query<S> |
query()
Returns a new or cached query that fetches everything.
|
Query<S> |
query(Filter<S> filter)
Returns a new or cached query for the given filter.
|
Query<S> |
query(Filter<S> filter,
FilterValues<S> values,
OrderingList<S> ordering)
Returns a new or cached query for the given query specification.
|
Query<S> |
query(Filter<S> filter,
FilterValues<S> values,
OrderingList<S> ordering,
QueryHints hints)
Returns a new or cached query for the given query specification.
|
Query<S> |
query(Filter<S> filter,
OrderingList<S> ordering)
Returns a new or cached query for the given query specification.
|
Query<S> |
query(Filter<S> filter,
OrderingList<S> ordering,
QueryHints hints)
Returns a new or cached query for the given query specification.
|
Query<S> |
query(java.lang.String filter)
Returns a new or cached query for the given filter.
|
void |
resetExecutors()
For each cached query, calls
StandardQuery.resetExecutor() . |
void |
setExecutors()
For each cached query, calls
StandardQuery.setExecutor() . |
protected StandardQueryFactory(java.lang.Class<S> type)
protected StandardQueryFactory(java.lang.Class<S> type, boolean lazySetExecutor)
lazySetExecutor
- by default, query executors are built and set
eagerly. Pass true to build and set executor on first query use.public java.lang.Class<S> getStorableType()
getStorableType
in interface QueryFactory<S extends Storable>
public Query<S> query() throws FetchException
FetchException
public Query<S> query(java.lang.String filter) throws FetchException
java.lang.IllegalArgumentException
- if filter is nullFetchException
public Query<S> query(Filter<S> filter) throws FetchException
java.lang.IllegalArgumentException
- if filter is nullFetchException
public Query<S> query(Filter<S> filter, OrderingList<S> ordering) throws FetchException
java.lang.IllegalArgumentException
- if filter is nullFetchException
public Query<S> query(Filter<S> filter, OrderingList<S> ordering, QueryHints hints) throws FetchException
java.lang.IllegalArgumentException
- if filter is nullFetchException
public Query<S> query(Filter<S> filter, FilterValues<S> values, OrderingList<S> ordering) throws FetchException
filter
- optional filter object, defaults to open filter if nullvalues
- optional values object, defaults to filter initial valuesordering
- optional order-by propertiesFetchException
public Query<S> query(Filter<S> filter, FilterValues<S> values, OrderingList<S> ordering, QueryHints hints) throws FetchException
query
in interface QueryFactory<S extends Storable>
filter
- optional filter object, defaults to open filter if nullvalues
- optional values object, defaults to filter initial valuesordering
- optional order-by propertieshints
- optional hintsFetchException
public void setExecutors() throws RepositoryException
StandardQuery.setExecutor()
.RepositoryException
public void resetExecutors() throws RepositoryException
StandardQuery.resetExecutor()
.
This call can be used to rebuild all cached query plans after the set of
available indexes has changed.RepositoryException
public void clearExecutors()
StandardQuery.clearExecutor()
.
This call can be used to clear all cached query plans after the set of
available indexes has changed.protected abstract StandardQuery<S> createQuery(Filter<S> filter, FilterValues<S> values, OrderingList<S> ordering, QueryHints hints) throws FetchException
filter
- optional filter object, defaults to open filter if nullvalues
- optional values object, defaults to filter initial valuesordering
- optional order-by propertieshints
- optional hintsFetchException
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.