1
2
3
4 package gboat2.base.core.dao;
5
6 import java.io.Serializable;
7 import java.util.List;
8 import java.util.Map;
9
10 import org.hibernate.SessionFactory;
11
12
13
14
15 public interface IBaseDAO {
16
17
18
19
20
21
22
23 public String save(Object object);
24
25
26
27
28
29 public void update(Object object);
30
31
32
33
34
35
36 public void updateByQuery(final String queryString, final Map<String, Object> params);
37
38
39
40
41
42 public void delete(Object object);
43
44
45
46
47
48
49 public void delete(Class<?> clazz, Serializable id);
50
51
52
53
54
55
56
57 public Integer deleteByQuery(final String queryString, final Map<String, Object> parameters);
58
59
60
61
62
63
64
65
66
67
68 public Object get(Class<?> clazz, Serializable id);
69
70
71
72
73
74
75
76 public Object get(String queryString, Map<String, Object> params);
77
78
79
80
81
82
83 public Object get(String[][] params);
84
85
86
87
88
89
90 public Object get(Map<String, Object> params);
91
92
93
94
95
96
97
98
99
100
101 public Page<?> getPage(String hql, int page, int pagesize, Map<String, Object> params);
102
103
104
105
106
107
108
109 public Page<?> getPage(Map<String, Object> queryParams);
110
111
112
113
114
115
116
117 public Page<?> getPage(String[][] queryParams);
118
119 public List<?> queryListByHql(String hsql, Map<String, Object> params);
120
121 public List<?> queryListBySql(String sql, Map<String, Object> params);
122
123
124
125
126
127
128 public List<?> queryList(Map<String, Object> queryParams);
129
130
131
132
133
134
135 public List<?> queryList(String[][] queryParams);
136
137 public void addSessionFactory(SessionFactory sessionFactory);
138 public void setDefaultSessionFactory(SessionFactory sessionFactory);
139 public SessionFactory getDefaultSessionFactory();
140
141
142
143
144
145 public void evict (Object object);
146
147
148
149
150
151
152 public void saveOrUpdate (Object object);
153
154
155
156
157
158
159 public int executeUpdateSql(String sql,final Map<String, Object> params);
160
161
162
163
164
165
166
167
168 public Page<?> getPageByHql(String hql, Map<String, Object> params);
169 }