public abstract class AbstractJpaQuery extends Object implements RepositoryQuery
RepositoryQuery
s.Constructor and Description |
---|
AbstractJpaQuery(JpaQueryMethod method,
javax.persistence.EntityManager em)
Creates a new
AbstractJpaQuery from the given JpaQueryMethod . |
Modifier and Type | Method and Description |
---|---|
protected <T extends javax.persistence.Query> |
applyHints(T query,
JpaQueryMethod method)
Applies the declared query hints to the given query.
|
protected <T extends javax.persistence.Query> |
applyQueryHint(T query,
javax.persistence.QueryHint hint)
Protected to be able to customize in sub-classes.
|
protected ParameterBinder |
createBinder(Object[] values) |
protected javax.persistence.Query |
createCountQuery(Object[] values) |
protected javax.persistence.Query |
createQuery(Object[] values) |
protected abstract javax.persistence.Query |
doCreateCountQuery(Object[] values)
Creates a
TypedQuery for counting using the given values. |
protected abstract javax.persistence.Query |
doCreateQuery(Object[] values)
Creates a
Query instance for the given values. |
Object |
execute(Object[] parameters) |
protected javax.persistence.EntityManager |
getEntityManager()
Returns the
EntityManager . |
protected JpaQueryExecution |
getExecution() |
JpaQueryMethod |
getQueryMethod() |
public AbstractJpaQuery(JpaQueryMethod method, javax.persistence.EntityManager em)
AbstractJpaQuery
from the given JpaQueryMethod
.method
- resultFactory
- em
- public JpaQueryMethod getQueryMethod()
getQueryMethod
in interface RepositoryQuery
protected javax.persistence.EntityManager getEntityManager()
EntityManager
.public Object execute(Object[] parameters)
execute
in interface RepositoryQuery
protected JpaQueryExecution getExecution()
protected <T extends javax.persistence.Query> T applyHints(T query, JpaQueryMethod method)
query
- protected <T extends javax.persistence.Query> void applyQueryHint(T query, javax.persistence.QueryHint hint)
query
- must not be null.hint
- must not be null.protected ParameterBinder createBinder(Object[] values)
protected javax.persistence.Query createQuery(Object[] values)
protected javax.persistence.Query createCountQuery(Object[] values)
protected abstract javax.persistence.Query doCreateQuery(Object[] values)
Query
instance for the given values.values
- must not be null.protected abstract javax.persistence.Query doCreateCountQuery(Object[] values)
TypedQuery
for counting using the given values.values
- must not be null.Copyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.