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