org.springframework.data.jpa.repository.support
Class JpaRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
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>
- Type Parameters:
T - the type of the repository
- All Implemented Interfaces:
- Aware, BeanFactoryAware, FactoryBean<T>, InitializingBean, org.springframework.data.repository.core.support.RepositoryFactoryInformation<S,ID>
public class JpaRepositoryFactoryBean<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
- extends org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport<T,S,ID>
Special adapter for Springs FactoryBean interface to allow easy setup of
repository factories via Spring configuration.
- Author:
- Oliver Gierke, Eberhard Wolff
|
Method Summary |
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. |
| Methods inherited from class org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport |
createRepositoryFactory, setBeanFactory, setTransactionManager |
| Methods inherited from class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport |
getEntityInformation, getObject, getObjectType, getQueryMethods, getRepositoryInformation, isSingleton, setCustomImplementation, setNamedQueries, setQueryLookupStrategyKey, setRepositoryInterface |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JpaRepositoryFactoryBean
public JpaRepositoryFactoryBean()
setEntityManager
public void setEntityManager(javax.persistence.EntityManager entityManager)
- The
EntityManager to be used.
- Parameters:
entityManager - the entityManager to set
doCreateRepositoryFactory
protected org.springframework.data.repository.core.support.RepositoryFactorySupport doCreateRepositoryFactory()
- Specified by:
doCreateRepositoryFactory in class org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
createRepositoryFactory
protected org.springframework.data.repository.core.support.RepositoryFactorySupport createRepositoryFactory(javax.persistence.EntityManager entityManager)
- Returns a
RepositoryFactorySupport.
- Parameters:
entityManager -
- Returns:
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet in interface InitializingBean- Overrides:
afterPropertiesSet in class org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T extends org.springframework.data.repository.Repository<S,ID>,S,ID extends Serializable>
Copyright © 2011-2012-2013 SpringSource. All Rights Reserved.