|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gisgraphy.service.impl.UniversalManagerImpl
public class UniversalManagerImpl
Base class for Business Services - use this class for utility methods and generic CRUD methods.
Field Summary | |
---|---|
protected UniversalDao |
dao
UniversalDao instance, ready to charge forward and persist to the database |
protected org.apache.commons.logging.Log |
log
Log instance for all child classes. |
Constructor Summary | |
---|---|
UniversalManagerImpl()
|
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 a all objects of a particular type. |
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. |
void |
setDao(UniversalDao dao)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log log
protected UniversalDao dao
Constructor Detail |
---|
public UniversalManagerImpl()
Method Detail |
---|
public void setDao(UniversalDao dao)
public java.lang.Object get(java.lang.Class<?> clazz, java.io.Serializable id)
get
in interface UniversalManager
clazz
- model class to lookupid
- the identifier (primary key) of the class
ObjectRetrievalFailureException
public java.util.List<?> getAll(java.lang.Class<?> clazz)
getAll
in interface UniversalManager
clazz
- the type of objects
public void remove(java.lang.Class<?> clazz, java.io.Serializable id)
remove
in interface UniversalManager
clazz
- model class to lookupid
- the identifier of the classpublic java.lang.Object save(java.lang.Object o)
save
in interface UniversalManager
o
- the object to save
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |