public class DynamicJpaRepositoryQuery
extends org.springframework.data.jpa.repository.query.AbstractJpaQuery
RepositoryQuery implementation that inspects a DynamicJpaQueryMethod
for the existence of an DynamicQuery annotation and creates a JPA DynamicQuery from it.| Constructor and Description |
|---|
DynamicJpaRepositoryQuery(DynamicJpaQueryMethod method,
javax.persistence.EntityManager em,
org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider)
Creates a new
DynamicJpaRepositoryQuery from the given AbstractJpaQuery. |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
buildQuery(freemarker.template.Template template,
org.springframework.data.jpa.repository.query.JpaParametersParameterAccessor accessor) |
protected org.springframework.data.jpa.repository.query.ParameterBinder |
createBinder() |
protected javax.persistence.Query |
createJpaQuery(java.lang.String queryString,
org.springframework.data.repository.query.ReturnedType returnedType)
Creates an appropriate JPA query from an
EntityManager according to the current DynamicJpaRepositoryQuery
type. |
protected javax.persistence.Query |
doCreateCountQuery(org.springframework.data.jpa.repository.query.JpaParametersParameterAccessor accessor) |
protected javax.persistence.Query |
doCreateQuery(org.springframework.data.jpa.repository.query.JpaParametersParameterAccessor accessor) |
protected DynamicBasedStringQuery |
setAccessor(org.springframework.data.jpa.repository.query.JpaParametersParameterAccessor accessor) |
public DynamicJpaRepositoryQuery(DynamicJpaQueryMethod method, javax.persistence.EntityManager em, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider)
DynamicJpaRepositoryQuery from the given AbstractJpaQuery.method - DynamicJpaQueryMethodem - EntityManagerevaluationContextProvider - QueryMethodEvaluationContextProviderprotected java.lang.String buildQuery(freemarker.template.Template template,
org.springframework.data.jpa.repository.query.JpaParametersParameterAccessor accessor)
protected org.springframework.data.jpa.repository.query.ParameterBinder createBinder()
createBinder in class org.springframework.data.jpa.repository.query.AbstractJpaQueryprotected DynamicBasedStringQuery setAccessor(org.springframework.data.jpa.repository.query.JpaParametersParameterAccessor accessor)
protected javax.persistence.Query doCreateQuery(org.springframework.data.jpa.repository.query.JpaParametersParameterAccessor accessor)
doCreateQuery in class org.springframework.data.jpa.repository.query.AbstractJpaQueryprotected javax.persistence.Query doCreateCountQuery(org.springframework.data.jpa.repository.query.JpaParametersParameterAccessor accessor)
doCreateCountQuery in class org.springframework.data.jpa.repository.query.AbstractJpaQueryprotected javax.persistence.Query createJpaQuery(java.lang.String queryString,
org.springframework.data.repository.query.ReturnedType returnedType)
EntityManager according to the current DynamicJpaRepositoryQuery
type.queryString - is queryreturnedType - of methodQuery