3importjava.util.Collection;
4importjava.util.List;
5importnet.sf.hibernate.Criteria;
6importnet.sf.hibernate.Query;
7importnet.sf.hibernate.Session;
8importlimq.exception.DaoException;
9
10publicinterfaceIBaseDao{
11
12publicSessionopenSession();
13
14publicintgetTotalCount(Stringhql)throwsException;
15
16publicQuerygetQuery(Stringsql)throwsException;
17
18publicCriteriagetCriteria(Classclazz)throwsException;
19
20publicintgetTotalPage(inttotalCount,intpageSize);
21
22publicvoidcreate(Objectentity);
23
24publicvoidupdate(Objectentity);
25
26publicvoiddelete(Objectentity)throwsDaoException;
27
28publicvoiddeleteAll(Classclazz)throwsDaoException;
29
30publicvoiddeleteAll(Collectionentities)throwsDaoException;
31
32publicObjectloadByKey(Classclazz,StringkeyName,ObjectkeyValue);
33
34publicListfind(StringqueryString)throwsDaoException;
35
36publicListfind(StringqueryString,Objectparam)throwsDaoException;
37
38publicListfind(StringqueryString,Object[]params)throwsDaoException;