| Constructor and Description |
|---|
SimpleUnitDao() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the session, ie. remove all entities from memory cache.
|
void |
delete(Object object)
Deletes an entity from database.
|
void |
deleteAll(Class clazz)
Deletes all entities of given mapping.
|
void |
execute(String sqlQuery)
Executes a SQL query against the database.
|
void |
flush()
Flushes the session, ie. synchronize the underlying database with persistable state held in memory.
|
void |
flushAndClear()
Flushes and clears the session.
|
<T> List<T> |
getAll(Class<T> clazz)
Returns a list of stored entities.
|
Set<String> |
getKnownMappings()
Gets Hibernate's known mappings.
|
<T> T |
getOne(Class<T> clazz,
Serializable id)
Returns one stored entity.
|
org.hibernate.Session |
getSession()
Returns the currently used session.
|
org.hibernate.SessionFactory |
getSessionFactory()
Returns the current session factory
|
boolean |
isSessionOpen()
Returns
true if the session is open. |
void |
save(Object object)
Saves an entitity to database.
|
void |
setSession(org.hibernate.Session session)
Sets the session to use.
|
public <T> List<T> getAll(Class<T> clazz)
UnitDaopublic <T> T getOne(Class<T> clazz, Serializable id)
UnitDaopublic void save(Object object)
UnitDaopublic void delete(Object object)
UnitDaopublic void deleteAll(Class clazz)
UnitDaopublic void execute(String sqlQuery)
UnitDaopublic void flush()
UnitDaopublic void clear()
UnitDaopublic void flushAndClear()
UnitDaoflushAndClear in interface UnitDaoUnitDao.flush(),
UnitDao.clear()public void setSession(org.hibernate.Session session)
UnitDaosetSession in interface UnitDaosession - the session to use.public org.hibernate.Session getSession()
UnitDaogetSession in interface UnitDaopublic boolean isSessionOpen()
UnitDaotrue if the session is open.isSessionOpen in interface UnitDaotrue if the session is open.public org.hibernate.SessionFactory getSessionFactory()
UnitDaogetSessionFactory in interface UnitDaoSessionFactorypublic Set<String> getKnownMappings()
UnitDaogetKnownMappings in interface UnitDaoCopyright © 2014. All Rights Reserved.