|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.synyx.hades.dao.orm.GenericDaoFactory
org.synyx.hades.dao.orm.GenericDaoFactoryBean<T>
T - the type of the DAOpublic class GenericDaoFactoryBean<T extends GenericDao<?,?>>
Special GenericDaoFactory adapter for Springs FactoryBean
interface to allow easy setup of DAO factories via Spring configuration.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_TRANSACTION_MANAGER
|
| Constructor Summary | |
|---|---|
GenericDaoFactoryBean()
|
|
| Method Summary | ||
|---|---|---|
void |
afterPropertiesSet()
|
|
static
|
create(java.lang.Class<T> daoInterface,
javax.persistence.EntityManager em)
Creates a new GenericDaoFactoryBean. |
|
T |
getObject()
|
|
java.lang.Class<? extends T> |
getObjectType()
|
|
boolean |
isSingleton()
|
|
protected void |
prepare(org.springframework.aop.framework.ProxyFactory factory)
Callback method to prepare the given ProxyFactory to e.g. add
further interceptors. |
|
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
|
|
void |
setCustomDaoImplementation(java.lang.Object customDaoImplementation)
Setter to inject a custom DAO implementation. |
|
void |
setDaoInterface(java.lang.Class<T> daoInterface)
Setter to inject the dao interface to implement. |
|
void |
setTransactionManager(java.lang.String transactionManager)
Setter to configure which transaction manager to be used. |
|
| Methods inherited from class org.synyx.hades.dao.orm.GenericDaoFactory |
|---|
create, getDao, getDao, getDaoClass, getEntityManager, setEntityManager, setQueryLookupStrategy, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_TRANSACTION_MANAGER
| Constructor Detail |
|---|
public GenericDaoFactoryBean()
| Method Detail |
|---|
public static <T extends GenericDao<?,?>> GenericDaoFactoryBean<T> create(java.lang.Class<T> daoInterface,
javax.persistence.EntityManager em)
GenericDaoFactoryBean.
T - daoInterface - em -
public void setDaoInterface(java.lang.Class<T> daoInterface)
GenericDao.
daoInterface - the daoInterface to setpublic void setTransactionManager(java.lang.String transactionManager)
Transactional
annotation is used. By explicitly defining the transaction manager bean
name we favour let this one be the default one chosen.
transactionManager - public void setCustomDaoImplementation(java.lang.Object customDaoImplementation)
customDaoImplementation - the customDaoImplementation to setpublic T getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<T extends GenericDao<?,?>>public java.lang.Class<? extends T> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<T extends GenericDao<?,?>>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<T extends GenericDao<?,?>>public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionprotected void prepare(org.springframework.aop.framework.ProxyFactory factory)
GenericDaoFactoryProxyFactory to e.g. add
further interceptors. The QueryExecuterMethodInterceptor will be
added after this method was called, so all interceptors or
advisors added in this method will kick in before it.
prepare in class GenericDaoFactoryprepare(ProxyFactory)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||