public abstract class AbstractQueryExecutorImpl<T> extends java.lang.Object implements JpaQueryExecutor<T>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cached |
protected javax.persistence.EntityManager |
em |
protected java.util.Set<io.crnk.meta.model.MetaAttributePath> |
fetchPaths |
protected int |
limit |
protected io.crnk.meta.model.MetaDataObject |
meta |
protected int |
numAutoSelections |
protected int |
offset |
protected java.util.Map<java.lang.String,java.lang.Integer> |
selectionBindings |
| Constructor and Description |
|---|
AbstractQueryExecutorImpl(javax.persistence.EntityManager em,
io.crnk.meta.model.MetaDataObject meta,
int numAutoSelections,
java.util.Map<java.lang.String,java.lang.Integer> selectionBindings) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyFetchPaths(javax.persistence.Query criteriaQuery) |
protected static java.util.List<java.lang.Object[]> |
enforceDistinct(java.util.List<?> list) |
java.util.List<T> |
executeQuery() |
JpaQueryExecutor<T> |
fetch(java.util.List<java.lang.String> attrPath) |
java.lang.Class<T> |
getEntityClass() |
io.crnk.meta.model.MetaDataObject |
getMeta() |
java.util.List<T> |
getResultList() |
abstract javax.persistence.Query |
getTypedQuery() |
T |
getUniqueResult(boolean nullable) |
protected abstract boolean |
hasManyRootsFetchesOrJoins() |
protected abstract boolean |
isCompoundSelection() |
protected abstract boolean |
isDistinct() |
JpaQueryExecutor<T> |
setCached(boolean cached) |
JpaQueryExecutor<T> |
setLimit(int limit) |
JpaQueryExecutor<T> |
setOffset(int offset) |
protected javax.persistence.Query |
setupQuery(javax.persistence.Query typedQuery) |
JpaQueryExecutor<T> |
setWindow(int offset,
int limit) |
protected java.util.List<java.lang.Object> |
truncateTuples(java.util.List<?> list,
int numToRemove) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResultTuples, getTotalRowCountprotected int offset
protected int limit
protected boolean cached
protected javax.persistence.EntityManager em
protected int numAutoSelections
protected java.util.Set<io.crnk.meta.model.MetaAttributePath> fetchPaths
protected io.crnk.meta.model.MetaDataObject meta
protected java.util.Map<java.lang.String,java.lang.Integer> selectionBindings
public AbstractQueryExecutorImpl(javax.persistence.EntityManager em,
io.crnk.meta.model.MetaDataObject meta,
int numAutoSelections,
java.util.Map<java.lang.String,java.lang.Integer> selectionBindings)
protected static java.util.List<java.lang.Object[]> enforceDistinct(java.util.List<?> list)
public io.crnk.meta.model.MetaDataObject getMeta()
public JpaQueryExecutor<T> fetch(java.util.List<java.lang.String> attrPath)
fetch in interface JpaQueryExecutor<T>public JpaQueryExecutor<T> setCached(boolean cached)
setCached in interface JpaQueryExecutor<T>public JpaQueryExecutor<T> setOffset(int offset)
setOffset in interface JpaQueryExecutor<T>public JpaQueryExecutor<T> setLimit(int limit)
setLimit in interface JpaQueryExecutor<T>public JpaQueryExecutor<T> setWindow(int offset, int limit)
setWindow in interface JpaQueryExecutor<T>public java.util.List<T> getResultList()
getResultList in interface JpaQueryExecutor<T>protected abstract boolean isCompoundSelection()
public T getUniqueResult(boolean nullable)
getUniqueResult in interface JpaQueryExecutor<T>protected java.util.List<java.lang.Object> truncateTuples(java.util.List<?> list,
int numToRemove)
public java.lang.Class<T> getEntityClass()
getEntityClass in interface JpaQueryExecutor<T>protected void applyFetchPaths(javax.persistence.Query criteriaQuery)
public abstract javax.persistence.Query getTypedQuery()
protected javax.persistence.Query setupQuery(javax.persistence.Query typedQuery)
public java.util.List<T> executeQuery()
protected abstract boolean hasManyRootsFetchesOrJoins()
protected abstract boolean isDistinct()