|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.derquinsej.hib3.AbstractDAOImpl
net.sf.derquinsej.hib3.GeneralDAOImpl
public class GeneralDAOImpl
Implementation of the General DAO.
| Constructor Summary | |
|---|---|
GeneralDAOImpl()
Constructs the DAO |
|
GeneralDAOImpl(org.hibernate.SessionFactory sessionFactory)
Constructs the DAO |
|
| Method Summary | ||
|---|---|---|
void |
delete(java.lang.Object entity)
Deletes an entity instance. |
|
|
deleteById(java.lang.Class<T> type,
java.io.Serializable id)
Deletes an entity instance. |
|
|
findAll(java.lang.Class<T> type)
Returns all entities of the persistent type. |
|
protected
|
findByCriteria(java.lang.Class<T> type,
org.hibernate.criterion.Criterion... criterion)
Returns the list of entity instances that matches the provided crtieria. |
|
|
findById(java.lang.Class<T> type,
java.io.Serializable id,
boolean lock)
Finds an entity by ID. |
|
protected org.hibernate.Criteria |
newCriteria(java.lang.Class<?> type)
Returns a new criteria object. |
|
void |
save(java.lang.Object entity)
Saves an entity. |
|
void |
saveOrUpdate(java.lang.Object entity)
Saves or updates an entity, depending upon resolution of the unsaved-value checks. |
|
void |
update(java.lang.Object entity)
Updates an entity. |
|
| Methods inherited from class net.sf.derquinsej.hib3.AbstractDAOImpl |
|---|
clear, evict, first, flush, getNamedQuery, getSession, list, list, setSessionFactory, sync, unique, unique |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.derquinsej.hib3.DAO |
|---|
clear, flush, sync |
| Constructor Detail |
|---|
public GeneralDAOImpl(org.hibernate.SessionFactory sessionFactory)
sessionFactory - Hibernate Session factory.public GeneralDAOImpl()
| Method Detail |
|---|
protected final org.hibernate.Criteria newCriteria(java.lang.Class<?> type)
type - Entity type.
protected final <T> java.util.List<T> findByCriteria(java.lang.Class<T> type,
org.hibernate.criterion.Criterion... criterion)
type - Entity type.criterion - Search criteria.
public void delete(java.lang.Object entity)
GeneralDAO
delete in interface GeneralDAOentity - Instance to delete.
public <T> void deleteById(java.lang.Class<T> type,
java.io.Serializable id)
GeneralDAO
deleteById in interface GeneralDAOtype - Entity type.id - Id of the instance to delete.public <T> java.util.List<T> findAll(java.lang.Class<T> type)
GeneralDAO
findAll in interface GeneralDAOtype - Entity type.
public <T> T findById(java.lang.Class<T> type,
java.io.Serializable id,
boolean lock)
GeneralDAO
findById in interface GeneralDAOtype - Entity type.id - ID.lock - If the entity shall be locked.
null if it is not found.public void save(java.lang.Object entity)
GeneralDAO
save in interface GeneralDAOentity - Entity to save.public void saveOrUpdate(java.lang.Object entity)
GeneralDAO
saveOrUpdate in interface GeneralDAOentity - Entity to persist.public void update(java.lang.Object entity)
GeneralDAO
update in interface GeneralDAOentity - Entity to update.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||