1
14
15 package com.liferay.portlet.calendar.service.base;
16
17 import com.liferay.counter.service.CounterLocalService;
18
19 import com.liferay.mail.service.MailService;
20
21 import com.liferay.portal.kernel.annotation.BeanReference;
22 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
23 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
24 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
25 import com.liferay.portal.kernel.exception.PortalException;
26 import com.liferay.portal.kernel.exception.SystemException;
27 import com.liferay.portal.kernel.util.OrderByComparator;
28 import com.liferay.portal.service.CompanyLocalService;
29 import com.liferay.portal.service.CompanyService;
30 import com.liferay.portal.service.GroupLocalService;
31 import com.liferay.portal.service.GroupService;
32 import com.liferay.portal.service.PortletPreferencesLocalService;
33 import com.liferay.portal.service.PortletPreferencesService;
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.CompanyPersistence;
39 import com.liferay.portal.service.persistence.GroupFinder;
40 import com.liferay.portal.service.persistence.GroupPersistence;
41 import com.liferay.portal.service.persistence.PortletPreferencesFinder;
42 import com.liferay.portal.service.persistence.PortletPreferencesPersistence;
43 import com.liferay.portal.service.persistence.ResourceFinder;
44 import com.liferay.portal.service.persistence.ResourcePersistence;
45 import com.liferay.portal.service.persistence.UserFinder;
46 import com.liferay.portal.service.persistence.UserPersistence;
47
48 import com.liferay.portlet.asset.service.AssetEntryLocalService;
49 import com.liferay.portlet.asset.service.AssetEntryService;
50 import com.liferay.portlet.asset.service.AssetTagLocalService;
51 import com.liferay.portlet.asset.service.AssetTagService;
52 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
53 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
54 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
55 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
56 import com.liferay.portlet.calendar.model.CalEvent;
57 import com.liferay.portlet.calendar.service.CalEventLocalService;
58 import com.liferay.portlet.calendar.service.CalEventService;
59 import com.liferay.portlet.calendar.service.persistence.CalEventFinder;
60 import com.liferay.portlet.calendar.service.persistence.CalEventPersistence;
61 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
62 import com.liferay.portlet.expando.service.ExpandoValueService;
63 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
64 import com.liferay.portlet.social.service.SocialActivityLocalService;
65 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
66 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
67
68 import java.util.List;
69
70 import javax.sql.DataSource;
71
72
78 public abstract class CalEventLocalServiceBaseImpl
79 implements CalEventLocalService {
80 public CalEvent addCalEvent(CalEvent calEvent) throws SystemException {
81 calEvent.setNew(true);
82
83 return calEventPersistence.update(calEvent, false);
84 }
85
86 public CalEvent createCalEvent(long eventId) {
87 return calEventPersistence.create(eventId);
88 }
89
90 public void deleteCalEvent(long eventId)
91 throws PortalException, SystemException {
92 calEventPersistence.remove(eventId);
93 }
94
95 public void deleteCalEvent(CalEvent calEvent) throws SystemException {
96 calEventPersistence.remove(calEvent);
97 }
98
99 @SuppressWarnings("unchecked")
100 public List dynamicQuery(DynamicQuery dynamicQuery)
101 throws SystemException {
102 return calEventPersistence.findWithDynamicQuery(dynamicQuery);
103 }
104
105 @SuppressWarnings("unchecked")
106 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
107 throws SystemException {
108 return calEventPersistence.findWithDynamicQuery(dynamicQuery, start, end);
109 }
110
111 @SuppressWarnings("unchecked")
112 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
113 OrderByComparator orderByComparator) throws SystemException {
114 return calEventPersistence.findWithDynamicQuery(dynamicQuery, start,
115 end, orderByComparator);
116 }
117
118 public long dynamicQueryCount(DynamicQuery dynamicQuery)
119 throws SystemException {
120 return calEventPersistence.countWithDynamicQuery(dynamicQuery);
121 }
122
123 public CalEvent getCalEvent(long eventId)
124 throws PortalException, SystemException {
125 return calEventPersistence.findByPrimaryKey(eventId);
126 }
127
128 public CalEvent getCalEventByUuidAndGroupId(String uuid, long groupId)
129 throws PortalException, SystemException {
130 return calEventPersistence.findByUUID_G(uuid, groupId);
131 }
132
133 public List<CalEvent> getCalEvents(int start, int end)
134 throws SystemException {
135 return calEventPersistence.findAll(start, end);
136 }
137
138 public int getCalEventsCount() throws SystemException {
139 return calEventPersistence.countAll();
140 }
141
142 public CalEvent updateCalEvent(CalEvent calEvent) throws SystemException {
143 calEvent.setNew(false);
144
145 return calEventPersistence.update(calEvent, true);
146 }
147
148 public CalEvent updateCalEvent(CalEvent calEvent, boolean merge)
149 throws SystemException {
150 calEvent.setNew(false);
151
152 return calEventPersistence.update(calEvent, merge);
153 }
154
155 public CalEventLocalService getCalEventLocalService() {
156 return calEventLocalService;
157 }
158
159 public void setCalEventLocalService(
160 CalEventLocalService calEventLocalService) {
161 this.calEventLocalService = calEventLocalService;
162 }
163
164 public CalEventService getCalEventService() {
165 return calEventService;
166 }
167
168 public void setCalEventService(CalEventService calEventService) {
169 this.calEventService = calEventService;
170 }
171
172 public CalEventPersistence getCalEventPersistence() {
173 return calEventPersistence;
174 }
175
176 public void setCalEventPersistence(CalEventPersistence calEventPersistence) {
177 this.calEventPersistence = calEventPersistence;
178 }
179
180 public CalEventFinder getCalEventFinder() {
181 return calEventFinder;
182 }
183
184 public void setCalEventFinder(CalEventFinder calEventFinder) {
185 this.calEventFinder = calEventFinder;
186 }
187
188 public CounterLocalService getCounterLocalService() {
189 return counterLocalService;
190 }
191
192 public void setCounterLocalService(CounterLocalService counterLocalService) {
193 this.counterLocalService = counterLocalService;
194 }
195
196 public MailService getMailService() {
197 return mailService;
198 }
199
200 public void setMailService(MailService mailService) {
201 this.mailService = mailService;
202 }
203
204 public CompanyLocalService getCompanyLocalService() {
205 return companyLocalService;
206 }
207
208 public void setCompanyLocalService(CompanyLocalService companyLocalService) {
209 this.companyLocalService = companyLocalService;
210 }
211
212 public CompanyService getCompanyService() {
213 return companyService;
214 }
215
216 public void setCompanyService(CompanyService companyService) {
217 this.companyService = companyService;
218 }
219
220 public CompanyPersistence getCompanyPersistence() {
221 return companyPersistence;
222 }
223
224 public void setCompanyPersistence(CompanyPersistence companyPersistence) {
225 this.companyPersistence = companyPersistence;
226 }
227
228 public GroupLocalService getGroupLocalService() {
229 return groupLocalService;
230 }
231
232 public void setGroupLocalService(GroupLocalService groupLocalService) {
233 this.groupLocalService = groupLocalService;
234 }
235
236 public GroupService getGroupService() {
237 return groupService;
238 }
239
240 public void setGroupService(GroupService groupService) {
241 this.groupService = groupService;
242 }
243
244 public GroupPersistence getGroupPersistence() {
245 return groupPersistence;
246 }
247
248 public void setGroupPersistence(GroupPersistence groupPersistence) {
249 this.groupPersistence = groupPersistence;
250 }
251
252 public GroupFinder getGroupFinder() {
253 return groupFinder;
254 }
255
256 public void setGroupFinder(GroupFinder groupFinder) {
257 this.groupFinder = groupFinder;
258 }
259
260 public PortletPreferencesLocalService getPortletPreferencesLocalService() {
261 return portletPreferencesLocalService;
262 }
263
264 public void setPortletPreferencesLocalService(
265 PortletPreferencesLocalService portletPreferencesLocalService) {
266 this.portletPreferencesLocalService = portletPreferencesLocalService;
267 }
268
269 public PortletPreferencesService getPortletPreferencesService() {
270 return portletPreferencesService;
271 }
272
273 public void setPortletPreferencesService(
274 PortletPreferencesService portletPreferencesService) {
275 this.portletPreferencesService = portletPreferencesService;
276 }
277
278 public PortletPreferencesPersistence getPortletPreferencesPersistence() {
279 return portletPreferencesPersistence;
280 }
281
282 public void setPortletPreferencesPersistence(
283 PortletPreferencesPersistence portletPreferencesPersistence) {
284 this.portletPreferencesPersistence = portletPreferencesPersistence;
285 }
286
287 public PortletPreferencesFinder getPortletPreferencesFinder() {
288 return portletPreferencesFinder;
289 }
290
291 public void setPortletPreferencesFinder(
292 PortletPreferencesFinder portletPreferencesFinder) {
293 this.portletPreferencesFinder = portletPreferencesFinder;
294 }
295
296 public ResourceLocalService getResourceLocalService() {
297 return resourceLocalService;
298 }
299
300 public void setResourceLocalService(
301 ResourceLocalService resourceLocalService) {
302 this.resourceLocalService = resourceLocalService;
303 }
304
305 public ResourceService getResourceService() {
306 return resourceService;
307 }
308
309 public void setResourceService(ResourceService resourceService) {
310 this.resourceService = resourceService;
311 }
312
313 public ResourcePersistence getResourcePersistence() {
314 return resourcePersistence;
315 }
316
317 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
318 this.resourcePersistence = resourcePersistence;
319 }
320
321 public ResourceFinder getResourceFinder() {
322 return resourceFinder;
323 }
324
325 public void setResourceFinder(ResourceFinder resourceFinder) {
326 this.resourceFinder = resourceFinder;
327 }
328
329 public UserLocalService getUserLocalService() {
330 return userLocalService;
331 }
332
333 public void setUserLocalService(UserLocalService userLocalService) {
334 this.userLocalService = userLocalService;
335 }
336
337 public UserService getUserService() {
338 return userService;
339 }
340
341 public void setUserService(UserService userService) {
342 this.userService = userService;
343 }
344
345 public UserPersistence getUserPersistence() {
346 return userPersistence;
347 }
348
349 public void setUserPersistence(UserPersistence userPersistence) {
350 this.userPersistence = userPersistence;
351 }
352
353 public UserFinder getUserFinder() {
354 return userFinder;
355 }
356
357 public void setUserFinder(UserFinder userFinder) {
358 this.userFinder = userFinder;
359 }
360
361 public AssetEntryLocalService getAssetEntryLocalService() {
362 return assetEntryLocalService;
363 }
364
365 public void setAssetEntryLocalService(
366 AssetEntryLocalService assetEntryLocalService) {
367 this.assetEntryLocalService = assetEntryLocalService;
368 }
369
370 public AssetEntryService getAssetEntryService() {
371 return assetEntryService;
372 }
373
374 public void setAssetEntryService(AssetEntryService assetEntryService) {
375 this.assetEntryService = assetEntryService;
376 }
377
378 public AssetEntryPersistence getAssetEntryPersistence() {
379 return assetEntryPersistence;
380 }
381
382 public void setAssetEntryPersistence(
383 AssetEntryPersistence assetEntryPersistence) {
384 this.assetEntryPersistence = assetEntryPersistence;
385 }
386
387 public AssetEntryFinder getAssetEntryFinder() {
388 return assetEntryFinder;
389 }
390
391 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
392 this.assetEntryFinder = assetEntryFinder;
393 }
394
395 public AssetTagLocalService getAssetTagLocalService() {
396 return assetTagLocalService;
397 }
398
399 public void setAssetTagLocalService(
400 AssetTagLocalService assetTagLocalService) {
401 this.assetTagLocalService = assetTagLocalService;
402 }
403
404 public AssetTagService getAssetTagService() {
405 return assetTagService;
406 }
407
408 public void setAssetTagService(AssetTagService assetTagService) {
409 this.assetTagService = assetTagService;
410 }
411
412 public AssetTagPersistence getAssetTagPersistence() {
413 return assetTagPersistence;
414 }
415
416 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
417 this.assetTagPersistence = assetTagPersistence;
418 }
419
420 public AssetTagFinder getAssetTagFinder() {
421 return assetTagFinder;
422 }
423
424 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
425 this.assetTagFinder = assetTagFinder;
426 }
427
428 public ExpandoValueLocalService getExpandoValueLocalService() {
429 return expandoValueLocalService;
430 }
431
432 public void setExpandoValueLocalService(
433 ExpandoValueLocalService expandoValueLocalService) {
434 this.expandoValueLocalService = expandoValueLocalService;
435 }
436
437 public ExpandoValueService getExpandoValueService() {
438 return expandoValueService;
439 }
440
441 public void setExpandoValueService(ExpandoValueService expandoValueService) {
442 this.expandoValueService = expandoValueService;
443 }
444
445 public ExpandoValuePersistence getExpandoValuePersistence() {
446 return expandoValuePersistence;
447 }
448
449 public void setExpandoValuePersistence(
450 ExpandoValuePersistence expandoValuePersistence) {
451 this.expandoValuePersistence = expandoValuePersistence;
452 }
453
454 public SocialActivityLocalService getSocialActivityLocalService() {
455 return socialActivityLocalService;
456 }
457
458 public void setSocialActivityLocalService(
459 SocialActivityLocalService socialActivityLocalService) {
460 this.socialActivityLocalService = socialActivityLocalService;
461 }
462
463 public SocialActivityPersistence getSocialActivityPersistence() {
464 return socialActivityPersistence;
465 }
466
467 public void setSocialActivityPersistence(
468 SocialActivityPersistence socialActivityPersistence) {
469 this.socialActivityPersistence = socialActivityPersistence;
470 }
471
472 public SocialActivityFinder getSocialActivityFinder() {
473 return socialActivityFinder;
474 }
475
476 public void setSocialActivityFinder(
477 SocialActivityFinder socialActivityFinder) {
478 this.socialActivityFinder = socialActivityFinder;
479 }
480
481 protected void runSQL(String sql) throws SystemException {
482 try {
483 DataSource dataSource = calEventPersistence.getDataSource();
484
485 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
486 sql, new int[0]);
487
488 sqlUpdate.update();
489 }
490 catch (Exception e) {
491 throw new SystemException(e);
492 }
493 }
494
495 @BeanReference(type = CalEventLocalService.class)
496 protected CalEventLocalService calEventLocalService;
497 @BeanReference(type = CalEventService.class)
498 protected CalEventService calEventService;
499 @BeanReference(type = CalEventPersistence.class)
500 protected CalEventPersistence calEventPersistence;
501 @BeanReference(type = CalEventFinder.class)
502 protected CalEventFinder calEventFinder;
503 @BeanReference(type = CounterLocalService.class)
504 protected CounterLocalService counterLocalService;
505 @BeanReference(type = MailService.class)
506 protected MailService mailService;
507 @BeanReference(type = CompanyLocalService.class)
508 protected CompanyLocalService companyLocalService;
509 @BeanReference(type = CompanyService.class)
510 protected CompanyService companyService;
511 @BeanReference(type = CompanyPersistence.class)
512 protected CompanyPersistence companyPersistence;
513 @BeanReference(type = GroupLocalService.class)
514 protected GroupLocalService groupLocalService;
515 @BeanReference(type = GroupService.class)
516 protected GroupService groupService;
517 @BeanReference(type = GroupPersistence.class)
518 protected GroupPersistence groupPersistence;
519 @BeanReference(type = GroupFinder.class)
520 protected GroupFinder groupFinder;
521 @BeanReference(type = PortletPreferencesLocalService.class)
522 protected PortletPreferencesLocalService portletPreferencesLocalService;
523 @BeanReference(type = PortletPreferencesService.class)
524 protected PortletPreferencesService portletPreferencesService;
525 @BeanReference(type = PortletPreferencesPersistence.class)
526 protected PortletPreferencesPersistence portletPreferencesPersistence;
527 @BeanReference(type = PortletPreferencesFinder.class)
528 protected PortletPreferencesFinder portletPreferencesFinder;
529 @BeanReference(type = ResourceLocalService.class)
530 protected ResourceLocalService resourceLocalService;
531 @BeanReference(type = ResourceService.class)
532 protected ResourceService resourceService;
533 @BeanReference(type = ResourcePersistence.class)
534 protected ResourcePersistence resourcePersistence;
535 @BeanReference(type = ResourceFinder.class)
536 protected ResourceFinder resourceFinder;
537 @BeanReference(type = UserLocalService.class)
538 protected UserLocalService userLocalService;
539 @BeanReference(type = UserService.class)
540 protected UserService userService;
541 @BeanReference(type = UserPersistence.class)
542 protected UserPersistence userPersistence;
543 @BeanReference(type = UserFinder.class)
544 protected UserFinder userFinder;
545 @BeanReference(type = AssetEntryLocalService.class)
546 protected AssetEntryLocalService assetEntryLocalService;
547 @BeanReference(type = AssetEntryService.class)
548 protected AssetEntryService assetEntryService;
549 @BeanReference(type = AssetEntryPersistence.class)
550 protected AssetEntryPersistence assetEntryPersistence;
551 @BeanReference(type = AssetEntryFinder.class)
552 protected AssetEntryFinder assetEntryFinder;
553 @BeanReference(type = AssetTagLocalService.class)
554 protected AssetTagLocalService assetTagLocalService;
555 @BeanReference(type = AssetTagService.class)
556 protected AssetTagService assetTagService;
557 @BeanReference(type = AssetTagPersistence.class)
558 protected AssetTagPersistence assetTagPersistence;
559 @BeanReference(type = AssetTagFinder.class)
560 protected AssetTagFinder assetTagFinder;
561 @BeanReference(type = ExpandoValueLocalService.class)
562 protected ExpandoValueLocalService expandoValueLocalService;
563 @BeanReference(type = ExpandoValueService.class)
564 protected ExpandoValueService expandoValueService;
565 @BeanReference(type = ExpandoValuePersistence.class)
566 protected ExpandoValuePersistence expandoValuePersistence;
567 @BeanReference(type = SocialActivityLocalService.class)
568 protected SocialActivityLocalService socialActivityLocalService;
569 @BeanReference(type = SocialActivityPersistence.class)
570 protected SocialActivityPersistence socialActivityPersistence;
571 @BeanReference(type = SocialActivityFinder.class)
572 protected SocialActivityFinder socialActivityFinder;
573 }