Class JpaMappableRepositoryFactory

java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactorySupport
org.springframework.data.jpa.repository.support.JpaRepositoryFactory
com.broadleafcommerce.data.tracking.jpa.filtering.narrow.factory.JpaMappableRepositoryFactory
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware

public class JpaMappableRepositoryFactory extends org.springframework.data.jpa.repository.support.JpaRepositoryFactory
Customized version of JpaRepositoryFactory to support an automatic repository fragment that includes RSQL find method support.
Author:
Jeff Fischer
See Also:
  • MappableRsqlFilterExecutor
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    JpaMappableRepositoryFactory(javax.persistence.EntityManager em, com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, RSQLVisitorHolder<?> rsqlVisitorHolder, JpaFiltersCriteriaBuilder catalogFiltersCriteriaBuilder, JpaProperties properties, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T, ID> org.springframework.data.jpa.repository.support.JpaEntityInformation<T,ID>
    getEntityInformation(Class<T> domainClass)
     
    protected Optional<org.springframework.data.repository.query.QueryLookupStrategy>
    getQueryLookupStrategy(org.springframework.data.repository.query.QueryLookupStrategy.Key key, org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider)
     
    <T> T
    getRepository(Class<T> repositoryInterface, org.springframework.data.repository.core.support.RepositoryComposition.RepositoryFragments fragments)
     
    protected org.springframework.data.repository.core.support.RepositoryComposition.RepositoryFragments
    getRepositoryFragments(org.springframework.data.repository.core.RepositoryMetadata metadata)
     
    void
    setEvaluationContextProvider(org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider)
     
    void
    setNamedQueries(org.springframework.data.repository.core.NamedQueries namedQueries)
     
    withFragmentContributions(List<com.broadleafcommerce.data.tracking.core.RepositoryContribution> contributions)
     

    Methods inherited from class org.springframework.data.jpa.repository.support.JpaRepositoryFactory

    getProjectionFactory, getRepositoryBaseClass, getRepositoryFragments, getTargetRepository, getTargetRepository, setBeanClassLoader, setEntityPathResolver, setEscapeCharacter, setQueryMethodFactory

    Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactorySupport

    addInvocationListener, addQueryCreationListener, addRepositoryProxyPostProcessor, getProjectionFactory, getQueryMethods, getRepository, getRepository, getRepositoryInformation, getRepositoryMetadata, getTargetRepositoryViaReflection, getTargetRepositoryViaReflection, instantiateClass, setBeanFactory, setQueryLookupStrategyKey, setRepositoryBaseClass, validate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • RSQL_PRESENT

      public static final boolean RSQL_PRESENT
  • Constructor Details

    • JpaMappableRepositoryFactory

      public JpaMappableRepositoryFactory(javax.persistence.EntityManager em, com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, @Nullable RSQLVisitorHolder<?> rsqlVisitorHolder, JpaFiltersCriteriaBuilder catalogFiltersCriteriaBuilder, JpaProperties properties, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager)
  • Method Details

    • withFragmentContributions

      public JpaMappableRepositoryFactory withFragmentContributions(List<com.broadleafcommerce.data.tracking.core.RepositoryContribution> contributions)
    • getRepository

      public <T> T getRepository(Class<T> repositoryInterface, org.springframework.data.repository.core.support.RepositoryComposition.RepositoryFragments fragments)
      Overrides:
      getRepository in class org.springframework.data.repository.core.support.RepositoryFactorySupport
    • setNamedQueries

      public void setNamedQueries(org.springframework.data.repository.core.NamedQueries namedQueries)
      Overrides:
      setNamedQueries in class org.springframework.data.repository.core.support.RepositoryFactorySupport
    • setEvaluationContextProvider

      public void setEvaluationContextProvider(org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider)
      Overrides:
      setEvaluationContextProvider in class org.springframework.data.repository.core.support.RepositoryFactorySupport
    • getQueryLookupStrategy

      @NonNull protected Optional<org.springframework.data.repository.query.QueryLookupStrategy> getQueryLookupStrategy(@Nullable org.springframework.data.repository.query.QueryLookupStrategy.Key key, @NonNull org.springframework.data.repository.query.QueryMethodEvaluationContextProvider evaluationContextProvider)
      Overrides:
      getQueryLookupStrategy in class org.springframework.data.jpa.repository.support.JpaRepositoryFactory
    • getRepositoryFragments

      protected org.springframework.data.repository.core.support.RepositoryComposition.RepositoryFragments getRepositoryFragments(org.springframework.data.repository.core.RepositoryMetadata metadata)
      Overrides:
      getRepositoryFragments in class org.springframework.data.jpa.repository.support.JpaRepositoryFactory
    • getEntityInformation

      @NonNull public <T, ID> org.springframework.data.jpa.repository.support.JpaEntityInformation<T,ID> getEntityInformation(@NonNull Class<T> domainClass)
      Overrides:
      getEntityInformation in class org.springframework.data.jpa.repository.support.JpaRepositoryFactory