public class JsonicDaoContext extends Object implements DaoContext
Constructor and Description |
---|
JsonicDaoContext() |
Modifier and Type | Method and Description |
---|---|
<T> void |
addEntityListener(Class<T> clazz,
EntityListener<T> listener) |
void |
addTransactionListener(TransactionListener listener) |
void |
beginTransaction() |
void |
commitTransaction() |
File |
getBaseDir() |
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() |
static void |
setContextDir(File contextDir) |
void |
updateEntity(Object entity) |
public File getBaseDir()
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 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 updateEntity(Object entity) throws DaoException
updateEntity
in interface DaoContext
DaoException
public void refreshEntity(Object entity) throws DaoException
refreshEntity
in interface DaoContext
DaoException
public static void setContextDir(File contextDir)