package cn.com.lemon.framework;

import java.util.List;

import cn.com.lemon.framework.model.BaseEntity;

/**
 * The <code>Dao</code> interface is the basic data persistence api.
 * <p>
 * Support the third utilities(e.g.<code>Mybatis</code>) implement this
 * interface
 * 
 * @see List
 * @author shellpo shih
 * @version 1.0
 */
public abstract interface Dao<T extends BaseEntity> {

	/* =========search========== */
	public abstract T find(int id);

	public abstract List<T> find(String... values);

	public abstract List<T> find(int start, int end, String... values);

	public abstract List<T> findAll();

	/* =========insert========== */
	public abstract int insert(T t);

	public abstract void inset(T t);

	public abstract void batchInsert(List<T> t);

	/* =========delete========== */
	public abstract boolean delete(int id);

	public abstract boolean delete(T t);

	public abstract boolean batchDelete(List<T> t);

	/* =========update========== */
	public abstract boolean update(T t);

	public abstract boolean batchUpdate(List<T> t);

}

@@ -325,32 +325,16 @@
 1.0%0A */%0A
-public abstract 
 interfac
@@ -402,66 +402,33 @@
 */%0A%09
-public abstract T find(int id);%0A%0A%09public abstract 
+T get(int id);%0A%0A%09
 List%3CT%3E 
 find
@@ -423,20 +423,20 @@
 List%3CT%3E 
-find
+list
 (String.
@@ -453,36 +453,45 @@
 ;%0A%0A%09
-public abstract List%3CT%3E find
+List%3CT%3E listAll();%0A%0A%09List%3CT%3E listPage
 (int
@@ -502,19 +502,20 @@
 rt, int 
-end
+size
 , String
@@ -532,45 +532,8 @@
 );%0A%0A
-%09public abstract List%3CT%3E findAll();%0A%0A
 %09/* 
@@ -541,22 +541,22 @@
 ========
-insert
+count=
 ========
@@ -566,118 +566,82 @@
 */%0A%09
-public abstract int insert(T t);%0A%0A%09public abstract void inset(T t);%0A%0A%09public abstract void batchInsert(List%3CT%3E
+int count(String... values);%0A%0A%09/* =========insert========== */%0A%09int save(T
  t);
@@ -676,32 +676,16 @@
 === */%0A%09
-public abstract 
 boolean 
@@ -705,97 +705,8 @@
 );%0A%0A
-%09public abstract boolean delete(T t);%0A%0A%09public abstract boolean batchDelete(List%3CT%3E t);%0A%0A
 %09/* 
@@ -735,32 +735,16 @@
 === */%0A%09
-public abstract 
 boolean 
@@ -760,57 +760,6 @@
 t);%0A
-%0A%09public abstract boolean batchUpdate(List%3CT%3E t);%0A%0A
 %7D%0A

update dao