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