Class DynamicJpaRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>

java.lang.Object
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>
org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport<T,S,ID>
org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean<T,S,ID>
com.joutvhu.dynamic.jpa.support.DynamicJpaRepositoryFactoryBean<T,S,ID>
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.FactoryBean<T>, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationEventPublisherAware, org.springframework.data.repository.core.support.RepositoryFactoryInformation<S,ID>

public class DynamicJpaRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID> extends org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean<T,S,ID> implements org.springframework.context.ApplicationContextAware
Special adapter for Springs DynamicJpaRepositoryFactoryBean interface to allow easy setup of repository factories via Spring configuration.
Since:
2.x.1
  • Field Summary

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
    DynamicJpaRepositoryFactoryBean(Class<? extends T> repositoryInterface)
    Creates a new DynamicJpaRepositoryFactoryBean for the given repository interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.data.repository.core.support.RepositoryFactorySupport
    createRepositoryFactory(jakarta.persistence.EntityManager entityManager)
     
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     
    void
    setEntityPathResolver(org.springframework.beans.factory.ObjectProvider<org.springframework.data.querydsl.EntityPathResolver> resolver)
     
    void
    setEscapeCharacter(char escapeCharacter)
     
    void
    setQueryMethodFactory(org.springframework.data.jpa.repository.query.JpaQueryMethodFactory factory)
     

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

    afterPropertiesSet, doCreateRepositoryFactory, setEntityManager, setMappingContext

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

    createRepositoryFactory, setBeanFactory, setEnableDefaultTransactions, setTransactionManager

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

    addRepositoryFactoryCustomizer, createDefaultQueryMethodEvaluationContextProvider, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setApplicationEventPublisher, setBeanClassLoader, setCustomImplementation, setEvaluationContextProvider, setLazyInit, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragments

    Methods inherited from class java.lang.Object

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

    • DynamicJpaRepositoryFactoryBean

      public DynamicJpaRepositoryFactoryBean(Class<? extends T> repositoryInterface)
      Creates a new DynamicJpaRepositoryFactoryBean for the given repository interface.
      Parameters:
      repositoryInterface - must not be null.
  • Method Details

    • createRepositoryFactory

      protected org.springframework.data.repository.core.support.RepositoryFactorySupport createRepositoryFactory(jakarta.persistence.EntityManager entityManager)
      Overrides:
      createRepositoryFactory in class org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>
    • setEntityPathResolver

      @Autowired public void setEntityPathResolver(org.springframework.beans.factory.ObjectProvider<org.springframework.data.querydsl.EntityPathResolver> resolver)
      Overrides:
      setEntityPathResolver in class org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>
    • setQueryMethodFactory

      @Autowired public void setQueryMethodFactory(@Nullable org.springframework.data.jpa.repository.query.JpaQueryMethodFactory factory)
      Overrides:
      setQueryMethodFactory in class org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>
    • setEscapeCharacter

      public void setEscapeCharacter(char escapeCharacter)
      Overrides:
      setEscapeCharacter in class org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException