public abstract class GenericDAO<T,ID extends Serializable> extends Object
| Constructor and Description |
|---|
GenericDAO() |
| Modifier and Type | Method and Description |
|---|---|
ID |
create(T t)
Create
|
void |
delete(ID id)
Delete
|
List<T> |
findAll()
Find by primary key
|
T |
findByPk(ID id)
Find by primary key
|
Class<T> |
getPersistentClass() |
protected org.hibernate.Session |
getSession() |
void |
setSession(org.hibernate.Session session) |
void |
update(T t)
Update
|
public void setSession(org.hibernate.Session session)
protected org.hibernate.Session getSession()
public ID create(T t) throws DatabaseException
DatabaseExceptionpublic void update(T t) throws DatabaseException
DatabaseExceptionpublic void delete(ID id) throws DatabaseException
DatabaseExceptionpublic T findByPk(ID id) throws DatabaseException
DatabaseExceptionpublic List<T> findAll() throws DatabaseException
DatabaseExceptionCopyright © 2017 Open Knowledge Management System S.L.. All rights reserved.