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