|
||||||||||
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 | |
---|---|
Object |
get(Class<?> clazz,
Serializable id)
Generic method to get an object based on class and identifier. |
List<?> |
getAll(Class<?> clazz)
Generic method used to get a all objects of a particular type. |
void |
remove(Class<?> clazz,
Serializable id)
Generic method to delete an object based on class and id |
Object |
save(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 Object get(Class<?> clazz, Serializable id)
get
in interface UniversalManager
clazz
- model class to lookupid
- the identifier (primary key) of the class
ObjectRetrievalFailureException
public List<?> getAll(Class<?> clazz)
getAll
in interface UniversalManager
clazz
- the type of objects
public void remove(Class<?> clazz, Serializable id)
remove
in interface UniversalManager
clazz
- model class to lookupid
- the identifier of the classpublic Object save(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 |