Class HibernateCommonDao<T>
- java.lang.Object
-
- org.sakaiproject.contentreview.dao.HibernateCommonDao<T>
-
- Direct Known Subclasses:
ContentReviewItemDao
public abstract class HibernateCommonDao<T> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<T>persistentClassprotected org.hibernate.SessionFactorysessionFactory
-
Constructor Summary
Constructors Constructor Description HibernateCommonDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(T t)Persists the object tvoiddelete(long id)Delete the object with idvoiddelete(T t)Delete the objectOptional<T>get(long id)Get the object with idvoidsave(T t)Saves any changes made to object t
-
-
-
Method Detail
-
create
public void create(T t)
Persists the object t- Parameters:
t-
-
save
public void save(T t)
Saves any changes made to object t- Parameters:
t-
-
get
public Optional<T> get(long id)
Get the object with id- Parameters:
id-- Returns:
- object of type T
-
delete
public void delete(T t)
Delete the object- Parameters:
t-
-
delete
public void delete(long id)
Delete the object with id- Parameters:
id-
-
-