|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.upgrade.upgradetask.DataAccessUtils
public abstract class DataAccessUtils
Provides access to several underlying Hibernate and JDBC data access objects, which are commonly used in database-related upgrade tasks.
Method Summary | |
---|---|
static void |
flush(net.sf.hibernate.Session session)
Flushes the session. |
static void |
flushAndClear(net.sf.hibernate.Session session)
Flushes and clears the session. |
static Connection |
getConnection(net.sf.hibernate.Session session)
Returns the JDBC connection for the session. |
static org.springframework.jdbc.core.JdbcTemplate |
getJdbcTemplate(net.sf.hibernate.Session session)
Returns a JDBC template for the provided Hibernate session. |
static org.springframework.jdbc.core.JdbcTemplate |
getJdbcTemplate(net.sf.hibernate.SessionFactory sessionFactory)
Returns a JDBC template for the active Hibernate session. |
static net.sf.hibernate.Session |
getSession(net.sf.hibernate.SessionFactory sessionFactory)
Returns the current session or creates one if one does not exist. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static net.sf.hibernate.Session getSession(net.sf.hibernate.SessionFactory sessionFactory)
SessionFactoryUtils.getSession(net.sf.hibernate.SessionFactory, boolean)
public static void flush(net.sf.hibernate.Session session) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
- if the connection cannot be retrievedpublic static void flushAndClear(net.sf.hibernate.Session session) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
- if the connection cannot be retrievedpublic static org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate(net.sf.hibernate.Session session)
public static org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate(net.sf.hibernate.SessionFactory sessionFactory)
getSession(SessionFactory)
,
getJdbcTemplate(Session)
public static Connection getConnection(net.sf.hibernate.Session session) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException
- if the connection cannot be retrieved
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |