|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.dragon.persistence.dao.GenericHibernateCompassDAOImpl<T,PK>
public class GenericHibernateCompassDAOImpl<T extends BaseObject,PK extends java.io.Serializable>
| Constructor Summary | |
|---|---|
GenericHibernateCompassDAOImpl()
|
|
| Method Summary | |
|---|---|
boolean |
exists(PK id)
Checks for existence of an object of type T using the id arg. |
java.util.List<T> |
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 |
T |
get(PK id)
Generic method to get an object based on class and identifier. |
java.util.List<T> |
getAll()
Generic method used to get all objects of a particular type. |
java.util.List<T> |
getAll(java.util.List<PK> ids)
Retrieve a List of entities matching given ids |
java.util.List<T> |
getAll(java.util.List<PK> ids,
RequestOptions requestOptions)
Retrieve a List of entities matching given ids, sorted and
paginated according to the given request options |
java.util.List<T> |
getAll(RequestOptions requestOptionsTO)
Generic method used to get all objects of a particular type, sorted and paginated according to the given request options. |
java.util.List<T> |
getAllDistinct()
Gets all records without duplicates. |
void |
remove(PK id)
Generic method to delete an object based on class and id |
T |
save(T object)
Generic method to save an object - handles both update and insert. |
java.util.List<T> |
search(java.lang.String query)
Return a List of entity managed by the Full Text Search Engine
(Compass etc.). |
java.util.List<T> |
searchEquals(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<T> |
searchLike(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<T> |
searchORMResult(java.lang.String query)
Process a research on Full Text Search Engine (Compass etc.) index and return a List of entity managed by the ORM engine (Hibernate,
iBatis etc.). |
java.util.List<T> |
searchORMResult(java.lang.String[] criteria,
java.lang.String[] searchedProperties)
This method allows to search Objects on String properties, fitting search criteria. |
java.util.List<T> |
searchORMResult(java.lang.String[] criteria,
java.lang.String[] searchedProperties,
RequestOptions requestOptions)
This method allows to search Objects on String properties, fitting search criteria. |
java.util.List<T> |
searchORMResult(java.lang.String query,
RequestOptions requestOptions)
Process a research on Full Text Search Engine (Compass etc.) index and return a List of entity managed by the ORM engine (Hibernate,
iBatis etc.), sorted and paginated according to the given request
options. |
void |
setGenericORMDAO(GenericORMDAO<T,PK> genericORMDAO)
|
void |
setGenericOSEMDAO(GenericOSEMDAO<T,PK> genericOSEMDAO)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericHibernateCompassDAOImpl()
| Method Detail |
|---|
public boolean exists(PK id)
exists in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>id - the id of the entity
public java.util.List<T> findByNamedQuery(java.lang.String queryName,
java.util.Map<java.lang.String,java.lang.Object> queryParams)
findByNamedQuery in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>queryName - query name of the named queryqueryParams - a map of the query names and the values
public T get(PK id)
get in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>id - the identifier (primary key) of the object to get
ObjectRetrievalFailureExceptionpublic java.util.List<T> getAll(RequestOptions requestOptionsTO)
getAll in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>requestOptionsTO - include sort order and pagination information
public java.util.List<T> getAll()
getAll in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>public java.util.List<T> getAllDistinct()
Note that if you use this method, it is imperative that your model classes correctly implement the hashcode/equals methods
getAllDistinct in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>public void remove(PK id)
remove in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>id - the identifier (primary key) of the object to removepublic T save(T object)
save in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>object - the object to save
public java.util.List<T> search(java.lang.String query)
List of entity managed by the Full Text Search Engine
(Compass etc.). Only the search engine managed attributes of these
entities are populated
search in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>query - a Lucene String query
List of entity managed by the Full Text Search Engine.
public java.util.List<T> searchEquals(java.lang.String[] criteria,
java.lang.String[] properties,
RequestOptions requestOptionsTO)
searchEquals in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>criteria - the search criteriaproperties - the searched propertiesrequestOptionsTO - include sort order and pagination information
public java.util.List<T> searchLike(java.lang.String[] criteria,
java.lang.String[] properties,
RequestOptions requestOptionsTO)
searchLike in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>criteria - the search criteriaproperties - the searched propertiesrequestOptionsTO - include sort order and pagination information
public java.util.List<T> searchORMResult(java.lang.String query)
List of entity managed by the ORM engine (Hibernate,
iBatis etc.). All ORM managed attributes of these entities are populated.
searchORMResult in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>query - a Lucene String query
List of entity managed by the ORM engine.
public java.util.List<T> searchORMResult(java.lang.String query,
RequestOptions requestOptions)
List of entity managed by the ORM engine (Hibernate,
iBatis etc.), sorted and paginated according to the given request
options. All ORM managed attributes of these entities are populated.
searchORMResult in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>query - a Lucene String queryrequestOptions - include sort order and pagination information
List of entity managed by the ORM engine.
public java.util.List<T> getAll(java.util.List<PK> ids,
RequestOptions requestOptions)
GenericUnifiedDAOList of entities matching given ids, sorted and
paginated according to the given request options
getAll in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>ids - a List of idsrequestOptions - include sort order and pagination information
List of entities matching ids, must be
non null, could be emptypublic java.util.List<T> getAll(java.util.List<PK> ids)
GenericUnifiedDAOList of entities matching given ids
getAll in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>ids - a List of ids
List of entities matching ids, must be non null, could
be empty
public java.util.List<T> searchORMResult(java.lang.String[] criteria,
java.lang.String[] searchedProperties)
List of entity managed by the ORM engine
(Hibernate, iBatis etc.). All ORM managed attributes of these entities
are populated.
searchORMResult in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>criteria - the search criteria
List of entity managed by the ORM engine.
public java.util.List<T> searchORMResult(java.lang.String[] criteria,
java.lang.String[] searchedProperties,
RequestOptions requestOptions)
List of entity managed by the ORM engine
(Hibernate, iBatis etc.), sorted and paginated according to the given
request options. All ORM managed attributes of these entities are
populated.
searchORMResult in interface GenericUnifiedDAO<T extends BaseObject,PK extends java.io.Serializable>criteria - the search criteriarequestOptions - include sort order and pagination information
List of entity managed by the ORM engine.public void setGenericOSEMDAO(GenericOSEMDAO<T,PK> genericOSEMDAO)
public void setGenericORMDAO(GenericORMDAO<T,PK> genericORMDAO)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||