Class TrackableJpaQueryLookupStrategy.CreateIfNotFoundQueryLookupStrategy
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.jpa.filtering.narrow.dynamic.TrackableJpaQueryLookupStrategy.AbstractQueryLookupStrategy
-
- com.broadleafcommerce.data.tracking.jpa.filtering.narrow.dynamic.TrackableJpaQueryLookupStrategy.CreateIfNotFoundQueryLookupStrategy
-
- All Implemented Interfaces:
org.springframework.data.repository.query.QueryLookupStrategy
- Enclosing class:
- TrackableJpaQueryLookupStrategy
public static class TrackableJpaQueryLookupStrategy.CreateIfNotFoundQueryLookupStrategy extends TrackableJpaQueryLookupStrategy.AbstractQueryLookupStrategy
QueryLookupStrategy
to try to detect a declared query first (Query
, JPA named query). In case none is found we fall back on query creation.- Author:
- Oliver Gierke, Thomas Darimont
-
-
Constructor Summary
Constructors Constructor Description CreateIfNotFoundQueryLookupStrategy(javax.persistence.EntityManager em, org.springframework.data.jpa.provider.QueryExtractor extractor, TrackableJpaQueryLookupStrategy.CreateQueryLookupStrategy createStrategy, TrackableJpaQueryLookupStrategy.DeclaredQueryLookupStrategy lookupStrategy)
Creates a new JpaQueryLookupStrategy.CreateIfNotFoundQueryLookupStrategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.data.repository.query.RepositoryQuery
resolveQuery(org.springframework.data.jpa.repository.query.JpaQueryMethod method, javax.persistence.EntityManager em, org.springframework.data.repository.core.NamedQueries namedQueries, org.springframework.data.repository.core.RepositoryMetadata metadata)
-
Methods inherited from class com.broadleafcommerce.data.tracking.jpa.filtering.narrow.dynamic.TrackableJpaQueryLookupStrategy.AbstractQueryLookupStrategy
resolveQuery
-
-
-
-
Constructor Detail
-
CreateIfNotFoundQueryLookupStrategy
public CreateIfNotFoundQueryLookupStrategy(javax.persistence.EntityManager em, org.springframework.data.jpa.provider.QueryExtractor extractor, TrackableJpaQueryLookupStrategy.CreateQueryLookupStrategy createStrategy, TrackableJpaQueryLookupStrategy.DeclaredQueryLookupStrategy lookupStrategy)
Creates a new JpaQueryLookupStrategy.CreateIfNotFoundQueryLookupStrategy.- Parameters:
em
-extractor
-createStrategy
-lookupStrategy
-
-
-
Method Detail
-
resolveQuery
protected org.springframework.data.repository.query.RepositoryQuery resolveQuery(org.springframework.data.jpa.repository.query.JpaQueryMethod method, javax.persistence.EntityManager em, org.springframework.data.repository.core.NamedQueries namedQueries, org.springframework.data.repository.core.RepositoryMetadata metadata)
- Specified by:
resolveQuery
in classTrackableJpaQueryLookupStrategy.AbstractQueryLookupStrategy
-
-