1 PackageOrg.guangsoft.dao;2 3 Importjava.util.List;4 ImportJava.util.Set;5 /**6 * Public DAO function7 * @param<K> primary key type to manipulate, implemented by child interface8 * @param<V> Pojo type to manipulate, implemented by sub-interface9 * @authorGuangheTen */ One Public InterfaceCommdao<k,v> A { - //Add Data - PublicBoolean docreate (V pojo)throwsException; the //Delete Data - PublicBoolean DoDelete (V pojo)throwsException; - //Modifying Data - PublicBoolean doupdate (V pojo)throwsException; + //Querying all data - PublicList<v> FindAll ()throwsException; + //get data by ID A PublicV FindByID (K ID)throwsException; at //get data by name - PublicV findbyname (String name)throwsException; - //Bulk delete data by ID - PublicBoolean Doremovebatch (set<k> IDs)throwsException; - // - PublicInteger Getallcount (String column,string KeyWord)throwsException; in //Paging query Data - PublicList<v> findallsplit (Integer currentpage,integer linesize,string column,string KeyWord)throwsException; to}
Common data Access Object interface Commdao