public class UniversalDaoHibernate extends org.springframework.orm.hibernate3.support.HibernateDaoSupport implements UniversalDao
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
log
Log variable for all child classes.
|
| Constructor and Description |
|---|
UniversalDaoHibernate() |
| Modifier and Type | Method and Description |
|---|---|
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 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 - handles both update and insert.
|
protected final org.apache.commons.logging.Log log
public Object save(Object o)
save in interface UniversalDaoo - the object to savepublic Object get(Class<?> clazz, Serializable id)
get in interface UniversalDaoclazz - model class to lookupid - the identifier (primary key) of the classObjectRetrievalFailureExceptionpublic List<?> getAll(Class<?> clazz)
getAll in interface UniversalDaoclazz - the type of objects (a.k.a. while table) to get data frompublic void remove(Class<?> clazz, Serializable id)
remove in interface UniversalDaoclazz - model class to lookupid - the identifier (primary key) of the classCopyright © 2015. All rights reserved.