T - the type of the repositorypublic class JpaRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>
extends org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport<T,S,ID>
FactoryBean interface to allow easy setup of
repository factories via Spring configuration.OBJECT_TYPE_ATTRIBUTE| Constructor and Description |
|---|
JpaRepositoryFactoryBean(Class<? extends T> repositoryInterface)
Creates a new
JpaRepositoryFactoryBean for the given repository interface. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected org.springframework.data.repository.core.support.RepositoryFactorySupport |
createRepositoryFactory(javax.persistence.EntityManager entityManager)
Returns a
RepositoryFactorySupport. |
protected org.springframework.data.repository.core.support.RepositoryFactorySupport |
doCreateRepositoryFactory() |
void |
setEntityManager(javax.persistence.EntityManager entityManager)
The
EntityManager to be used. |
void |
setEntityPathResolver(ObjectProvider<org.springframework.data.querydsl.EntityPathResolver> resolver)
Configures the
EntityPathResolver to be used. |
void |
setEscapeCharacter(char escapeCharacter) |
void |
setMappingContext(org.springframework.data.mapping.context.MappingContext<?,?> mappingContext) |
void |
setQueryMethodFactory(JpaQueryMethodFactory factory)
Configures the
JpaQueryMethodFactory to be used. |
createRepositoryFactory, setBeanFactory, setEnableDefaultTransactions, setTransactionManageraddRepositoryFactoryCustomizer, createDefaultQueryMethodEvaluationContextProvider, getEntityInformation, getObject, getObjectType, getPersistentEntity, getQueryMethods, getRepositoryInformation, isSingleton, setApplicationEventPublisher, setBeanClassLoader, setCustomImplementation, setEvaluationContextProvider, setLazyInit, setNamedQueries, setQueryLookupStrategyKey, setRepositoryBaseClass, setRepositoryFragmentspublic JpaRepositoryFactoryBean(Class<? extends T> repositoryInterface)
JpaRepositoryFactoryBean for the given repository interface.repositoryInterface - must not be null.public void setEntityManager(javax.persistence.EntityManager entityManager)
EntityManager to be used.entityManager - the entityManager to setpublic void setMappingContext(org.springframework.data.mapping.context.MappingContext<?,?> mappingContext)
@Autowired public void setEntityPathResolver(ObjectProvider<org.springframework.data.querydsl.EntityPathResolver> resolver)
EntityPathResolver to be used. Will expect a canonical bean to be present but fallback to
SimpleEntityPathResolver.INSTANCE in case none is available.resolver - must not be null.@Autowired public void setQueryMethodFactory(@Nullable JpaQueryMethodFactory factory)
JpaQueryMethodFactory to be used. Will expect a canonical bean to be present but will
fallback to DefaultJpaQueryMethodFactory in case none is
available.factory - may be null.protected org.springframework.data.repository.core.support.RepositoryFactorySupport doCreateRepositoryFactory()
protected org.springframework.data.repository.core.support.RepositoryFactorySupport createRepositoryFactory(javax.persistence.EntityManager entityManager)
RepositoryFactorySupport.public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID>public void setEscapeCharacter(char escapeCharacter)
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.