Package com.joutvhu.dynamic.jpa.support
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
ConstructorsConstructorDescriptionDynamicJpaRepositoryFactoryBean(Class<? extends T> repositoryInterface) Creates a newDynamicJpaRepositoryFactoryBeanfor the given repository interface. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.data.repository.core.support.RepositoryFactorySupportcreateRepositoryFactory(jakarta.persistence.EntityManager entityManager) voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetEntityPathResolver(org.springframework.beans.factory.ObjectProvider<org.springframework.data.querydsl.EntityPathResolver> resolver) voidsetEscapeCharacter(char escapeCharacter) voidsetQueryMethodFactory(org.springframework.data.jpa.repository.query.JpaQueryMethodFactory factory) Methods inherited from class org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean
afterPropertiesSet, doCreateRepositoryFactory, setEntityManager, setMappingContextMethods inherited from class org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport
createRepositoryFactory, setBeanFactory, setEnableDefaultTransactions, setTransactionManagerMethods 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
-
Constructor Details
-
DynamicJpaRepositoryFactoryBean
Creates a newDynamicJpaRepositoryFactoryBeanfor 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) -
setEntityPathResolver
@Autowired public void setEntityPathResolver(org.springframework.beans.factory.ObjectProvider<org.springframework.data.querydsl.EntityPathResolver> resolver) -
setQueryMethodFactory
@Autowired public void setQueryMethodFactory(@Nullable org.springframework.data.jpa.repository.query.JpaQueryMethodFactory factory) -
setEscapeCharacter
public void setEscapeCharacter(char escapeCharacter) -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-