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
DatabaseException
public void update(T t) throws DatabaseException
DatabaseException
public void delete(ID id) throws DatabaseException
DatabaseException
public T findByPk(ID id) throws DatabaseException
DatabaseException
public List<T> findAll() throws DatabaseException
DatabaseException
Copyright © 2016. All rights reserved.