|
||||||||||
| 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(Object entity)
Deletes an entity instance. |
|
|
deleteById(Class<T> type,
Serializable id)
Deletes an entity instance. |
|
|
findAll(Class<T> type)
Returns all entities of the persistent type. |
|
protected
|
findByCriteria(Class<T> type,
org.hibernate.criterion.Criterion... criterion)
Returns the list of entity instances that matches the provided crtieria. |
|
|
findById(Class<T> type,
Serializable id,
boolean lock)
Finds an entity by ID. |
|
protected org.hibernate.Criteria |
newCriteria(Class<?> type)
Returns a new criteria object. |
|
void |
save(Object entity)
Saves an entity. |
|
void |
saveOrUpdate(Object entity)
Saves or updates an entity, depending upon resolution of the unsaved-value checks. |
|
void |
update(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(Class<?> type)
type - Entity type.
protected final <T> List<T> findByCriteria(Class<T> type,
org.hibernate.criterion.Criterion... criterion)
type - Entity type.criterion - Search criteria.
public void delete(Object entity)
GeneralDAO
delete in interface GeneralDAOentity - Instance to delete.
public <T> void deleteById(Class<T> type,
Serializable id)
GeneralDAO
deleteById in interface GeneralDAOtype - Entity type.id - Id of the instance to delete.public <T> List<T> findAll(Class<T> type)
GeneralDAO
findAll in interface GeneralDAOtype - Entity type.
public <T> T findById(Class<T> type,
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(Object entity)
GeneralDAO
save in interface GeneralDAOentity - Entity to save.public void saveOrUpdate(Object entity)
GeneralDAO
saveOrUpdate in interface GeneralDAOentity - Entity to persist.public void update(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 | |||||||||