|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UniversalORMDAO
Data Access Object (DAO) interface.
The only real difference between this DAO and GenericORMDAO is that
instances of java.lang.Class are passed into the methods in this class, and
they are part of the constructor in the GenericDao, hence you'll have to do
some casting if you use this one.
org.appfuse.dao.GenericDao| Method Summary | |
|---|---|
int |
count(java.lang.Class clazz,
com.trg.search.IMutableSearch search)
Returns the total number of results that would be returned using the given ISearch if there were no paging or maxResult limits. |
boolean |
exists(java.lang.Class clazz,
java.io.Serializable id)
Checks for existence of an object of type T using the id arg. |
java.util.List |
findByNamedQuery(java.lang.String queryName,
java.util.Map<java.lang.String,java.lang.Object> queryParams)
Find a list of records by using a named query |
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 requestOptionsTO)
Generic method used to get all objects of a particular type, sorted and paginated according to the given request options. |
java.lang.Object |
merge(java.lang.Object object)
|
java.lang.Object |
persist(java.lang.Object object)
|
void |
remove(java.lang.Class clazz,
java.io.Serializable id)
Generic method to delete an object based on class and id |
void |
removeAll(java.lang.Class clazz,
java.util.List ids)
Generic method to delete all object based on class and ids list |
void |
removeAll(java.util.List objects)
|
java.lang.Object |
save(java.lang.Object o)
Generic method to save an object - handles both update and insert. |
java.lang.Object |
saveOnly(java.lang.Object object)
|
java.util.List |
search(java.lang.Class clazz,
com.trg.search.IMutableSearch search)
Search for objects based on the search parameters in the specified ISearch object. |
com.trg.search.SearchResult |
searchAndCount(java.lang.Class clazz,
com.trg.search.IMutableSearch search)
Returns a SearchResult object that includes the list of
results like search() and the total length like
searchLength. |
java.util.List |
searchEquals(java.lang.Class clazz,
java.lang.String[] criteria,
java.lang.String[] properties,
RequestOptions requestOptionsTO)
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 requestOptionsTO)
This method allows to search Objects on String properties, fitting search criteria. |
java.lang.Object |
searchUnique(java.lang.Class clazz,
com.trg.search.IMutableSearch search)
Search for a single result using the given parameters. |
java.lang.Object |
updateOnly(java.lang.Object object)
|
| Method Detail |
|---|
java.util.List getAll(java.lang.Class clazz)
clazz - the type of objects (a.k.a. while table) to get data from
java.lang.Object get(java.lang.Class clazz,
java.io.Serializable id)
clazz - model class to lookupid - the identifier (primary key) of the class
java.lang.Object save(java.lang.Object o)
o - the object to save
boolean exists(java.lang.Class clazz,
java.io.Serializable id)
id - the id of the entity
void remove(java.lang.Class clazz,
java.io.Serializable id)
clazz - model class to lookupid - the identifier (primary key) of the class
void removeAll(java.lang.Class clazz,
java.util.List ids)
clazz - model class to lookupids - the identifiers (primary key) of object to deletevoid removeAll(java.util.List objects)
java.util.List getAll(java.lang.Class clazz,
java.util.List ids)
List of entities matching given ids
clazz - model class to lookupids - a List of ids
List of entities matching ids, must be non null, could
be empty
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
clazz - 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
java.util.List getAll(java.lang.Class clazz,
RequestOptions requestOptionsTO)
clazz - model class to lookuprequestOptionsTO - include sort order and pagination information
java.util.List searchLike(java.lang.Class clazz,
java.lang.String[] criteria,
java.lang.String[] properties,
RequestOptions requestOptionsTO)
clazz - model class to lookupcriteria - the search criteriaproperties - the searched propertiesrequestOptionsTO - include sort order and pagination information
java.util.List searchEquals(java.lang.Class clazz,
java.lang.String[] criteria,
java.lang.String[] properties,
RequestOptions requestOptionsTO)
clazz - model class to lookupcriteria - the search criteriaproperties - the searched propertiesrequestOptionsTO - include sort order and pagination information
java.util.List search(java.lang.Class clazz,
com.trg.search.IMutableSearch search)
ISearch object.
ISearch
int count(java.lang.Class clazz,
com.trg.search.IMutableSearch search)
ISearch if there were no paging or maxResult limits.
ISearch
com.trg.search.SearchResult searchAndCount(java.lang.Class clazz,
com.trg.search.IMutableSearch search)
SearchResult object that includes the list of
results like search() and the total length like
searchLength.
ISearch
java.lang.Object searchUnique(java.lang.Class clazz,
com.trg.search.IMutableSearch search)
throws org.hibernate.NonUniqueResultException
org.hibernate.NonUniqueResultException
java.util.List findByNamedQuery(java.lang.String queryName,
java.util.Map<java.lang.String,java.lang.Object> queryParams)
queryName - query name of the named queryqueryParams - a map of the query names and the values
java.lang.Object merge(java.lang.Object object)
java.lang.Object persist(java.lang.Object object)
java.lang.Object saveOnly(java.lang.Object object)
java.lang.Object updateOnly(java.lang.Object object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||