| java.lang.Object org.springframework.dao.support.DaoSupport org.springframework.orm.hibernate3.support.HibernateDaoSupport
Method Summary | |
final protected void | checkDaoConfig() | final protected DataAccessException | convertHibernateAccessException(HibernateException ex) Convert the given HibernateException to an appropriate exception from the
org.springframework.dao hierarchy. | protected HibernateTemplate | createHibernateTemplate(SessionFactory sessionFactory) Create a HibernateTemplate for the given SessionFactory. | final public HibernateTemplate | getHibernateTemplate() Return the HibernateTemplate for this DAO,
pre-initialized with the SessionFactory or set explicitly. | final protected Session | getSession() Obtain a Hibernate Session, either from the current transaction or
a new one. | final protected Session | getSession(boolean allowCreate) Obtain a Hibernate Session, either from the current transaction or
a new one. | final public SessionFactory | getSessionFactory() Return the Hibernate SessionFactory used by this DAO. | final protected void | releaseSession(Session session) Close the given Hibernate Session, created via this DAO's SessionFactory,
if it isn't bound to the thread (i.e. | final public void | setHibernateTemplate(HibernateTemplate hibernateTemplate) Set the HibernateTemplate for this DAO explicitly,
as an alternative to specifying a SessionFactory. | final public void | setSessionFactory(SessionFactory sessionFactory) Set the Hibernate SessionFactory to be used by this DAO. |
checkDaoConfig | final protected void checkDaoConfig()(Code) | | |
createHibernateTemplate | protected HibernateTemplate createHibernateTemplate(SessionFactory sessionFactory)(Code) | | Create a HibernateTemplate for the given SessionFactory.
Only invoked if populating the DAO with a SessionFactory reference!
Can be overridden in subclasses to provide a HibernateTemplate instance
with different configuration, or a custom HibernateTemplate subclass.
Parameters: sessionFactory - the Hibernate SessionFactory to create a HibernateTemplate for the new HibernateTemplate instance See Also: HibernateDaoSupport.setSessionFactory |
getHibernateTemplate | final public HibernateTemplate getHibernateTemplate()(Code) | | Return the HibernateTemplate for this DAO,
pre-initialized with the SessionFactory or set explicitly.
Note: The returned HibernateTemplate is a shared instance.
You may introspect its configuration, but not modify the configuration
(other than from within an
HibernateDaoSupport.initDao implementation).
Consider creating a custom HibernateTemplate instance via
new HibernateTemplate(getSessionFactory()) , in which
case you're allowed to customize the settings on the resulting instance.
|
getSessionFactory | final public SessionFactory getSessionFactory()(Code) | | Return the Hibernate SessionFactory used by this DAO.
|
Fields inherited from org.springframework.dao.support.DaoSupport | final protected Log logger(Code)(Java Doc)
|
|
|