|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
org.ow2.dragon.persistence.dao.UniversalHibernateDAOImpl
public class UniversalHibernateDAOImpl
This class serves as the a class that can CRUD any object witout any Spring configuration. The only downside is it does require casting from Object to the object class.
| Field Summary |
|---|
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
UniversalHibernateDAOImpl()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
get(java.lang.Class clazz,
java.io.Serializable id)
Generic method to get an object based on class and identifier. |
java.util.List |
getAll(java.lang.Class clazz)
Generic method used to get all objects of a particular type. |
java.util.List |
getAll(java.lang.Class clazz,
java.util.List ids)
Retrieve a List of entities matching given ids |
java.util.List |
getAll(java.lang.Class clazz,
java.util.List ids,
RequestOptions requestOptions)
Retrieve a List of entities matching given ids, sorted and
paginated according to the given request options |
java.util.List |
getAll(java.lang.Class clazz,
RequestOptions requestOptions)
Generic method used to get all objects of a particular type, sorted and paginated according to the given request options. |
void |
remove(java.lang.Class clazz,
java.io.Serializable id)
Generic method to delete an object based on class and id |
java.lang.Object |
save(java.lang.Object o)
Generic method to save an object - handles both update and insert. |
java.util.List |
searchEquals(java.lang.Class clazz,
java.lang.String[] criteria,
java.lang.String[] properties,
RequestOptions requestOptions)
This method allows to search Objects on String properties, fitting search criteria. |
java.util.List |
searchLike(java.lang.Class clazz,
java.lang.String[] criteria,
java.lang.String[] properties,
RequestOptions requestOptions)
This method allows to search Objects on String properties, fitting search criteria. |
| Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
|---|
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
|---|
afterPropertiesSet, initDao |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UniversalHibernateDAOImpl()
| Method Detail |
|---|
public java.lang.Object save(java.lang.Object o)
save in interface UniversalORMDAOo - the object to save
public java.lang.Object get(java.lang.Class clazz,
java.io.Serializable id)
get in interface UniversalORMDAOclazz - model class to lookupid - the identifier (primary key) of the class
ObjectRetrievalFailureExceptionpublic java.util.List getAll(java.lang.Class clazz)
getAll in interface UniversalORMDAOclazz - the type of objects (a.k.a. while table) to get data from
public void remove(java.lang.Class clazz,
java.io.Serializable id)
remove in interface UniversalORMDAOclazz - model class to lookupid - the identifier (primary key) of the class
public java.util.List getAll(java.lang.Class clazz,
java.util.List ids)
List of entities matching given ids
getAll in interface UniversalORMDAOclazz - model class to lookupids - a List of ids
List of entities matching ids, must be non null, could
be empty
public java.util.List getAll(java.lang.Class clazz,
java.util.List ids,
RequestOptions requestOptions)
List of entities matching given ids, sorted and
paginated according to the given request options
getAll in interface UniversalORMDAOclazz - model class to lookupids - a List of idsrequestOptions - include sort order and pagination information
List of entities matching ids, must be
non null, could be empty
public java.util.List getAll(java.lang.Class clazz,
RequestOptions requestOptions)
getAll in interface UniversalORMDAOclazz - model class to lookuprequestOptions - include sort order and pagination information
public java.util.List searchEquals(java.lang.Class clazz,
java.lang.String[] criteria,
java.lang.String[] properties,
RequestOptions requestOptions)
searchEquals in interface UniversalORMDAOclazz - model class to lookupcriteria - the search criteriaproperties - the searched propertiesrequestOptions - include sort order and pagination information
public java.util.List searchLike(java.lang.Class clazz,
java.lang.String[] criteria,
java.lang.String[] properties,
RequestOptions requestOptions)
searchLike in interface UniversalORMDAOclazz - model class to lookupcriteria - the search criteriaproperties - the searched propertiesrequestOptions - include sort order and pagination information
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||