|
||||||||||
| 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.
| 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()
|
|
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 |
| 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.InitializingBeanpublic void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||