public class HibernateDaoContext extends Object implements DaoContext
Constructor and Description |
---|
HibernateDaoContext() |
Modifier and Type | Method and Description |
---|---|
static void |
addEntityClass(List<Class<?>> additionalEntities) |
<T> void |
addEntityListener(Class<T> clazz,
EntityListener<T> listener) |
void |
addTransactionListener(TransactionListener listener) |
void |
beginTransaction() |
void |
commitTransaction() |
void |
fireUpdate(Serializable id,
Object entity,
String[] modifiedFields) |
long |
generateSequence() |
org.hibernate.Session |
getSession() |
int |
getTransactionNestCount() |
<T> T |
loadEntity(Class<T> clazz,
Serializable id) |
void |
mergeEntity(Object entity) |
void |
refreshEntity(Object entity) |
<T> void |
removeEntityListener(Class<T> clazz,
EntityListener<T> listener) |
void |
removeTransactionListener(TransactionListener listener) |
void |
rollbackTransaction() |
void |
updateEntity(Object entity) |
public <T> void addEntityListener(Class<T> clazz, EntityListener<T> listener)
addEntityListener
in interface DaoContext
public <T> void removeEntityListener(Class<T> clazz, EntityListener<T> listener)
removeEntityListener
in interface DaoContext
public void fireUpdate(Serializable id, Object entity, String[] modifiedFields)
public void addTransactionListener(TransactionListener listener)
addTransactionListener
in interface DaoContext
public void removeTransactionListener(TransactionListener listener)
removeTransactionListener
in interface DaoContext
public void beginTransaction() throws ConnectException, DaoException
beginTransaction
in interface DaoContext
ConnectException
DaoException
public void commitTransaction() throws DaoException
commitTransaction
in interface DaoContext
DaoException
public void rollbackTransaction() throws DaoException
rollbackTransaction
in interface DaoContext
DaoException
public int getTransactionNestCount()
getTransactionNestCount
in interface DaoContext
public <T> T loadEntity(Class<T> clazz, Serializable id) throws DaoException
loadEntity
in interface DaoContext
DaoException
public void mergeEntity(Object entity) throws DaoException
mergeEntity
in interface DaoContext
DaoException
public void refreshEntity(Object entity) throws DaoException
refreshEntity
in interface DaoContext
DaoException
public void updateEntity(Object entity) throws DaoException
updateEntity
in interface DaoContext
DaoException
public long generateSequence() throws DaoException
DaoException
public org.hibernate.Session getSession()
public static void addEntityClass(List<Class<?>> additionalEntities) throws DaoException
DaoException