1
14
15 package com.liferay.portlet.expando.service.base;
16
17 import com.liferay.counter.service.CounterLocalService;
18
19 import com.liferay.portal.kernel.annotation.BeanReference;
20 import com.liferay.portal.kernel.dao.db.DB;
21 import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
22 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
23 import com.liferay.portal.kernel.exception.PortalException;
24 import com.liferay.portal.kernel.exception.SystemException;
25 import com.liferay.portal.kernel.util.OrderByComparator;
26 import com.liferay.portal.service.ResourceLocalService;
27 import com.liferay.portal.service.ResourceService;
28 import com.liferay.portal.service.UserLocalService;
29 import com.liferay.portal.service.UserService;
30 import com.liferay.portal.service.persistence.ResourceFinder;
31 import com.liferay.portal.service.persistence.ResourcePersistence;
32 import com.liferay.portal.service.persistence.UserFinder;
33 import com.liferay.portal.service.persistence.UserPersistence;
34
35 import com.liferay.portlet.expando.model.ExpandoTable;
36 import com.liferay.portlet.expando.service.ExpandoColumnLocalService;
37 import com.liferay.portlet.expando.service.ExpandoColumnService;
38 import com.liferay.portlet.expando.service.ExpandoRowLocalService;
39 import com.liferay.portlet.expando.service.ExpandoTableLocalService;
40 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
41 import com.liferay.portlet.expando.service.ExpandoValueService;
42 import com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence;
43 import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
44 import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence;
45 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
46
47 import java.util.List;
48
49
55 public abstract class ExpandoTableLocalServiceBaseImpl
56 implements ExpandoTableLocalService {
57 public ExpandoTable addExpandoTable(ExpandoTable expandoTable)
58 throws SystemException {
59 expandoTable.setNew(true);
60
61 return expandoTablePersistence.update(expandoTable, false);
62 }
63
64 public ExpandoTable createExpandoTable(long tableId) {
65 return expandoTablePersistence.create(tableId);
66 }
67
68 public void deleteExpandoTable(long tableId)
69 throws PortalException, SystemException {
70 expandoTablePersistence.remove(tableId);
71 }
72
73 public void deleteExpandoTable(ExpandoTable expandoTable)
74 throws SystemException {
75 expandoTablePersistence.remove(expandoTable);
76 }
77
78 public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
79 throws SystemException {
80 return expandoTablePersistence.findWithDynamicQuery(dynamicQuery);
81 }
82
83 public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
84 int end) throws SystemException {
85 return expandoTablePersistence.findWithDynamicQuery(dynamicQuery,
86 start, end);
87 }
88
89 public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
90 int end, OrderByComparator orderByComparator) throws SystemException {
91 return expandoTablePersistence.findWithDynamicQuery(dynamicQuery,
92 start, end, orderByComparator);
93 }
94
95 public int dynamicQueryCount(DynamicQuery dynamicQuery)
96 throws SystemException {
97 return expandoTablePersistence.countWithDynamicQuery(dynamicQuery);
98 }
99
100 public ExpandoTable getExpandoTable(long tableId)
101 throws PortalException, SystemException {
102 return expandoTablePersistence.findByPrimaryKey(tableId);
103 }
104
105 public List<ExpandoTable> getExpandoTables(int start, int end)
106 throws SystemException {
107 return expandoTablePersistence.findAll(start, end);
108 }
109
110 public int getExpandoTablesCount() throws SystemException {
111 return expandoTablePersistence.countAll();
112 }
113
114 public ExpandoTable updateExpandoTable(ExpandoTable expandoTable)
115 throws SystemException {
116 expandoTable.setNew(false);
117
118 return expandoTablePersistence.update(expandoTable, true);
119 }
120
121 public ExpandoTable updateExpandoTable(ExpandoTable expandoTable,
122 boolean merge) throws SystemException {
123 expandoTable.setNew(false);
124
125 return expandoTablePersistence.update(expandoTable, merge);
126 }
127
128 public ExpandoColumnLocalService getExpandoColumnLocalService() {
129 return expandoColumnLocalService;
130 }
131
132 public void setExpandoColumnLocalService(
133 ExpandoColumnLocalService expandoColumnLocalService) {
134 this.expandoColumnLocalService = expandoColumnLocalService;
135 }
136
137 public ExpandoColumnService getExpandoColumnService() {
138 return expandoColumnService;
139 }
140
141 public void setExpandoColumnService(
142 ExpandoColumnService expandoColumnService) {
143 this.expandoColumnService = expandoColumnService;
144 }
145
146 public ExpandoColumnPersistence getExpandoColumnPersistence() {
147 return expandoColumnPersistence;
148 }
149
150 public void setExpandoColumnPersistence(
151 ExpandoColumnPersistence expandoColumnPersistence) {
152 this.expandoColumnPersistence = expandoColumnPersistence;
153 }
154
155 public ExpandoRowLocalService getExpandoRowLocalService() {
156 return expandoRowLocalService;
157 }
158
159 public void setExpandoRowLocalService(
160 ExpandoRowLocalService expandoRowLocalService) {
161 this.expandoRowLocalService = expandoRowLocalService;
162 }
163
164 public ExpandoRowPersistence getExpandoRowPersistence() {
165 return expandoRowPersistence;
166 }
167
168 public void setExpandoRowPersistence(
169 ExpandoRowPersistence expandoRowPersistence) {
170 this.expandoRowPersistence = expandoRowPersistence;
171 }
172
173 public ExpandoTableLocalService getExpandoTableLocalService() {
174 return expandoTableLocalService;
175 }
176
177 public void setExpandoTableLocalService(
178 ExpandoTableLocalService expandoTableLocalService) {
179 this.expandoTableLocalService = expandoTableLocalService;
180 }
181
182 public ExpandoTablePersistence getExpandoTablePersistence() {
183 return expandoTablePersistence;
184 }
185
186 public void setExpandoTablePersistence(
187 ExpandoTablePersistence expandoTablePersistence) {
188 this.expandoTablePersistence = expandoTablePersistence;
189 }
190
191 public ExpandoValueLocalService getExpandoValueLocalService() {
192 return expandoValueLocalService;
193 }
194
195 public void setExpandoValueLocalService(
196 ExpandoValueLocalService expandoValueLocalService) {
197 this.expandoValueLocalService = expandoValueLocalService;
198 }
199
200 public ExpandoValueService getExpandoValueService() {
201 return expandoValueService;
202 }
203
204 public void setExpandoValueService(ExpandoValueService expandoValueService) {
205 this.expandoValueService = expandoValueService;
206 }
207
208 public ExpandoValuePersistence getExpandoValuePersistence() {
209 return expandoValuePersistence;
210 }
211
212 public void setExpandoValuePersistence(
213 ExpandoValuePersistence expandoValuePersistence) {
214 this.expandoValuePersistence = expandoValuePersistence;
215 }
216
217 public CounterLocalService getCounterLocalService() {
218 return counterLocalService;
219 }
220
221 public void setCounterLocalService(CounterLocalService counterLocalService) {
222 this.counterLocalService = counterLocalService;
223 }
224
225 public ResourceLocalService getResourceLocalService() {
226 return resourceLocalService;
227 }
228
229 public void setResourceLocalService(
230 ResourceLocalService resourceLocalService) {
231 this.resourceLocalService = resourceLocalService;
232 }
233
234 public ResourceService getResourceService() {
235 return resourceService;
236 }
237
238 public void setResourceService(ResourceService resourceService) {
239 this.resourceService = resourceService;
240 }
241
242 public ResourcePersistence getResourcePersistence() {
243 return resourcePersistence;
244 }
245
246 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
247 this.resourcePersistence = resourcePersistence;
248 }
249
250 public ResourceFinder getResourceFinder() {
251 return resourceFinder;
252 }
253
254 public void setResourceFinder(ResourceFinder resourceFinder) {
255 this.resourceFinder = resourceFinder;
256 }
257
258 public UserLocalService getUserLocalService() {
259 return userLocalService;
260 }
261
262 public void setUserLocalService(UserLocalService userLocalService) {
263 this.userLocalService = userLocalService;
264 }
265
266 public UserService getUserService() {
267 return userService;
268 }
269
270 public void setUserService(UserService userService) {
271 this.userService = userService;
272 }
273
274 public UserPersistence getUserPersistence() {
275 return userPersistence;
276 }
277
278 public void setUserPersistence(UserPersistence userPersistence) {
279 this.userPersistence = userPersistence;
280 }
281
282 public UserFinder getUserFinder() {
283 return userFinder;
284 }
285
286 public void setUserFinder(UserFinder userFinder) {
287 this.userFinder = userFinder;
288 }
289
290 protected void runSQL(String sql) throws SystemException {
291 try {
292 DB db = DBFactoryUtil.getDB();
293
294 db.runSQL(sql);
295 }
296 catch (Exception e) {
297 throw new SystemException(e);
298 }
299 }
300
301 @BeanReference(type = ExpandoColumnLocalService.class)
302 protected ExpandoColumnLocalService expandoColumnLocalService;
303 @BeanReference(type = ExpandoColumnService.class)
304 protected ExpandoColumnService expandoColumnService;
305 @BeanReference(type = ExpandoColumnPersistence.class)
306 protected ExpandoColumnPersistence expandoColumnPersistence;
307 @BeanReference(type = ExpandoRowLocalService.class)
308 protected ExpandoRowLocalService expandoRowLocalService;
309 @BeanReference(type = ExpandoRowPersistence.class)
310 protected ExpandoRowPersistence expandoRowPersistence;
311 @BeanReference(type = ExpandoTableLocalService.class)
312 protected ExpandoTableLocalService expandoTableLocalService;
313 @BeanReference(type = ExpandoTablePersistence.class)
314 protected ExpandoTablePersistence expandoTablePersistence;
315 @BeanReference(type = ExpandoValueLocalService.class)
316 protected ExpandoValueLocalService expandoValueLocalService;
317 @BeanReference(type = ExpandoValueService.class)
318 protected ExpandoValueService expandoValueService;
319 @BeanReference(type = ExpandoValuePersistence.class)
320 protected ExpandoValuePersistence expandoValuePersistence;
321 @BeanReference(type = CounterLocalService.class)
322 protected CounterLocalService counterLocalService;
323 @BeanReference(type = ResourceLocalService.class)
324 protected ResourceLocalService resourceLocalService;
325 @BeanReference(type = ResourceService.class)
326 protected ResourceService resourceService;
327 @BeanReference(type = ResourcePersistence.class)
328 protected ResourcePersistence resourcePersistence;
329 @BeanReference(type = ResourceFinder.class)
330 protected ResourceFinder resourceFinder;
331 @BeanReference(type = UserLocalService.class)
332 protected UserLocalService userLocalService;
333 @BeanReference(type = UserService.class)
334 protected UserService userService;
335 @BeanReference(type = UserPersistence.class)
336 protected UserPersistence userPersistence;
337 @BeanReference(type = UserFinder.class)
338 protected UserFinder userFinder;
339 }