|
Anyframe Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectanyframe.core.query.AbstractDAO
anyframe.core.basis.dao.query.GenericDaoQuery<T,PK>
T - a type variablePK - the primary key for that typepublic class GenericDaoQuery<T,PK extends Serializable>
This class serves as the Base class for all other DAOs - namely to hold common CRUD methods that they might all use. You should only need to extend this class when your require custom CRUD logic.
| Field Summary | |
|---|---|
protected Log |
log
Log variable for all child classes. |
| Constructor Summary | |
|---|---|
GenericDaoQuery(Class<T> persistentClass)
Constructor that takes in a class to see which type of entity to persist. |
|
| Method Summary | |
|---|---|
boolean |
exists(PK id)
Checks for existence of an object of type T using the id arg. |
T |
get(PK id)
Generic method to get an object based on class and identifier. |
Page |
getList(SearchVO searchVO)
Generic method to get object list based on search condition and search keyword |
Class<T> |
getPersistentClass()
|
IPropertiesService |
getPropertiesService()
|
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. |
void |
setPropertiesService(IPropertiesService propertiesService)
Sets the propertiesService to use. |
| Methods inherited from class anyframe.core.query.AbstractDAO |
|---|
create, create, create, create, create, findByPk, findByPk, findByPk, findByPk, findList, findList, findList, findList, findList, findList, findList, findListWithPaging, findListWithPaging, findListWithPaging, findListWithPaging, findListWithPaging, findListWithPaging, findListWithPaging, findListWithPaging, getQueryService, remove, remove, remove, remove, remove, setCreateId, setFindByPkPostfix, setFindListPostfix, setFindPrefix, setQueryService, setRemoveId, setUpdateId, setVariableName, update, update, update, update, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Log log
| Constructor Detail |
|---|
public GenericDaoQuery(Class<T> persistentClass)
persistentClass - the class type you'd like to persist| Method Detail |
|---|
public Class<T> getPersistentClass()
public IPropertiesService getPropertiesService()
public void setPropertiesService(IPropertiesService propertiesService)
propertiesService - The propertiesService to set
public T get(PK id)
throws Exception
get in interface GenericDao<T,PK extends Serializable>id - the identifier (primary key) of the
object to get
ExceptionObjectRetrievalFailureException
public boolean exists(PK id)
throws Exception
exists in interface GenericDao<T,PK extends Serializable>id - the id of the entity
Exception
public T save(T object)
throws Exception
save in interface GenericDao<T,PK extends Serializable>object - the object to save
Exception
public void remove(PK id)
throws Exception
remove in interface GenericDao<T,PK extends Serializable>id - the identifier (primary key) of the
object to remove
Exception
public Page getList(SearchVO searchVO)
throws Exception
GenericDao
getList in interface GenericDao<T,PK extends Serializable>searchVO - search condition and search keyword
Exception
|
Anyframe Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||