commn dao
[aramzamzam-commons.git] / aramzamzam-commons / commons-hibernate / src / main / java / net / aramzamzam / commons / hibernate / dao / GenericDAO.java
blobef7fadbf564c037103a9faa659e7b2ee827daff4
1 package ru.rentdom.dao;
3 import java.io.Serializable;
4 import java.util.List;
5 /** DAO pattern from "Generic Data Access Objects": http://www.hibernate.org/328.html*/
6 public interface GenericDAO<T, ID extends Serializable> {
8 T findById(ID id);
10 List<T> findAll();
12 List<T> findByExample(T exampleInstance);
14 T makePersistent(T entity);
16 void makeTransient(T entity);