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
088 public abstract class CalEventLocalServiceBaseImpl
089 implements CalEventLocalService {
090
097 public CalEvent addCalEvent(CalEvent calEvent) throws SystemException {
098 calEvent.setNew(true);
099
100 return calEventPersistence.update(calEvent, false);
101 }
102
103
109 public CalEvent createCalEvent(long eventId) {
110 return calEventPersistence.create(eventId);
111 }
112
113
120 public void deleteCalEvent(long eventId)
121 throws PortalException, SystemException {
122 calEventPersistence.remove(eventId);
123 }
124
125
131 public void deleteCalEvent(CalEvent calEvent) throws SystemException {
132 calEventPersistence.remove(calEvent);
133 }
134
135
142 @SuppressWarnings("rawtypes")
143 public List dynamicQuery(DynamicQuery dynamicQuery)
144 throws SystemException {
145 return calEventPersistence.findWithDynamicQuery(dynamicQuery);
146 }
147
148
161 @SuppressWarnings("rawtypes")
162 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
163 throws SystemException {
164 return calEventPersistence.findWithDynamicQuery(dynamicQuery, start, end);
165 }
166
167
181 @SuppressWarnings("rawtypes")
182 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
183 OrderByComparator orderByComparator) throws SystemException {
184 return calEventPersistence.findWithDynamicQuery(dynamicQuery, start,
185 end, orderByComparator);
186 }
187
188
195 public long dynamicQueryCount(DynamicQuery dynamicQuery)
196 throws SystemException {
197 return calEventPersistence.countWithDynamicQuery(dynamicQuery);
198 }
199
200
208 public CalEvent getCalEvent(long eventId)
209 throws PortalException, SystemException {
210 return calEventPersistence.findByPrimaryKey(eventId);
211 }
212
213
222 public CalEvent getCalEventByUuidAndGroupId(String uuid, long groupId)
223 throws PortalException, SystemException {
224 return calEventPersistence.findByUUID_G(uuid, groupId);
225 }
226
227
239 public List<CalEvent> getCalEvents(int start, int end)
240 throws SystemException {
241 return calEventPersistence.findAll(start, end);
242 }
243
244
250 public int getCalEventsCount() throws SystemException {
251 return calEventPersistence.countAll();
252 }
253
254
261 public CalEvent updateCalEvent(CalEvent calEvent) throws SystemException {
262 calEvent.setNew(false);
263
264 return calEventPersistence.update(calEvent, true);
265 }
266
267
275 public CalEvent updateCalEvent(CalEvent calEvent, boolean merge)
276 throws SystemException {
277 calEvent.setNew(false);
278
279 return calEventPersistence.update(calEvent, merge);
280 }
281
282
287 public CalEventLocalService getCalEventLocalService() {
288 return calEventLocalService;
289 }
290
291
296 public void setCalEventLocalService(
297 CalEventLocalService calEventLocalService) {
298 this.calEventLocalService = calEventLocalService;
299 }
300
301
306 public CalEventService getCalEventService() {
307 return calEventService;
308 }
309
310
315 public void setCalEventService(CalEventService calEventService) {
316 this.calEventService = calEventService;
317 }
318
319
324 public CalEventPersistence getCalEventPersistence() {
325 return calEventPersistence;
326 }
327
328
333 public void setCalEventPersistence(CalEventPersistence calEventPersistence) {
334 this.calEventPersistence = calEventPersistence;
335 }
336
337
342 public CalEventFinder getCalEventFinder() {
343 return calEventFinder;
344 }
345
346
351 public void setCalEventFinder(CalEventFinder calEventFinder) {
352 this.calEventFinder = calEventFinder;
353 }
354
355
360 public CounterLocalService getCounterLocalService() {
361 return counterLocalService;
362 }
363
364
369 public void setCounterLocalService(CounterLocalService counterLocalService) {
370 this.counterLocalService = counterLocalService;
371 }
372
373
378 public MailService getMailService() {
379 return mailService;
380 }
381
382
387 public void setMailService(MailService mailService) {
388 this.mailService = mailService;
389 }
390
391
396 public CompanyLocalService getCompanyLocalService() {
397 return companyLocalService;
398 }
399
400
405 public void setCompanyLocalService(CompanyLocalService companyLocalService) {
406 this.companyLocalService = companyLocalService;
407 }
408
409
414 public CompanyService getCompanyService() {
415 return companyService;
416 }
417
418
423 public void setCompanyService(CompanyService companyService) {
424 this.companyService = companyService;
425 }
426
427
432 public CompanyPersistence getCompanyPersistence() {
433 return companyPersistence;
434 }
435
436
441 public void setCompanyPersistence(CompanyPersistence companyPersistence) {
442 this.companyPersistence = companyPersistence;
443 }
444
445
450 public GroupLocalService getGroupLocalService() {
451 return groupLocalService;
452 }
453
454
459 public void setGroupLocalService(GroupLocalService groupLocalService) {
460 this.groupLocalService = groupLocalService;
461 }
462
463
468 public GroupService getGroupService() {
469 return groupService;
470 }
471
472
477 public void setGroupService(GroupService groupService) {
478 this.groupService = groupService;
479 }
480
481
486 public GroupPersistence getGroupPersistence() {
487 return groupPersistence;
488 }
489
490
495 public void setGroupPersistence(GroupPersistence groupPersistence) {
496 this.groupPersistence = groupPersistence;
497 }
498
499
504 public GroupFinder getGroupFinder() {
505 return groupFinder;
506 }
507
508
513 public void setGroupFinder(GroupFinder groupFinder) {
514 this.groupFinder = groupFinder;
515 }
516
517
522 public PortletPreferencesLocalService getPortletPreferencesLocalService() {
523 return portletPreferencesLocalService;
524 }
525
526
531 public void setPortletPreferencesLocalService(
532 PortletPreferencesLocalService portletPreferencesLocalService) {
533 this.portletPreferencesLocalService = portletPreferencesLocalService;
534 }
535
536
541 public PortletPreferencesService getPortletPreferencesService() {
542 return portletPreferencesService;
543 }
544
545
550 public void setPortletPreferencesService(
551 PortletPreferencesService portletPreferencesService) {
552 this.portletPreferencesService = portletPreferencesService;
553 }
554
555
560 public PortletPreferencesPersistence getPortletPreferencesPersistence() {
561 return portletPreferencesPersistence;
562 }
563
564
569 public void setPortletPreferencesPersistence(
570 PortletPreferencesPersistence portletPreferencesPersistence) {
571 this.portletPreferencesPersistence = portletPreferencesPersistence;
572 }
573
574
579 public PortletPreferencesFinder getPortletPreferencesFinder() {
580 return portletPreferencesFinder;
581 }
582
583
588 public void setPortletPreferencesFinder(
589 PortletPreferencesFinder portletPreferencesFinder) {
590 this.portletPreferencesFinder = portletPreferencesFinder;
591 }
592
593
598 public ResourceLocalService getResourceLocalService() {
599 return resourceLocalService;
600 }
601
602
607 public void setResourceLocalService(
608 ResourceLocalService resourceLocalService) {
609 this.resourceLocalService = resourceLocalService;
610 }
611
612
617 public ResourceService getResourceService() {
618 return resourceService;
619 }
620
621
626 public void setResourceService(ResourceService resourceService) {
627 this.resourceService = resourceService;
628 }
629
630
635 public ResourcePersistence getResourcePersistence() {
636 return resourcePersistence;
637 }
638
639
644 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
645 this.resourcePersistence = resourcePersistence;
646 }
647
648
653 public ResourceFinder getResourceFinder() {
654 return resourceFinder;
655 }
656
657
662 public void setResourceFinder(ResourceFinder resourceFinder) {
663 this.resourceFinder = resourceFinder;
664 }
665
666
671 public UserLocalService getUserLocalService() {
672 return userLocalService;
673 }
674
675
680 public void setUserLocalService(UserLocalService userLocalService) {
681 this.userLocalService = userLocalService;
682 }
683
684
689 public UserService getUserService() {
690 return userService;
691 }
692
693
698 public void setUserService(UserService userService) {
699 this.userService = userService;
700 }
701
702
707 public UserPersistence getUserPersistence() {
708 return userPersistence;
709 }
710
711
716 public void setUserPersistence(UserPersistence userPersistence) {
717 this.userPersistence = userPersistence;
718 }
719
720
725 public UserFinder getUserFinder() {
726 return userFinder;
727 }
728
729
734 public void setUserFinder(UserFinder userFinder) {
735 this.userFinder = userFinder;
736 }
737
738
743 public AssetEntryLocalService getAssetEntryLocalService() {
744 return assetEntryLocalService;
745 }
746
747
752 public void setAssetEntryLocalService(
753 AssetEntryLocalService assetEntryLocalService) {
754 this.assetEntryLocalService = assetEntryLocalService;
755 }
756
757
762 public AssetEntryService getAssetEntryService() {
763 return assetEntryService;
764 }
765
766
771 public void setAssetEntryService(AssetEntryService assetEntryService) {
772 this.assetEntryService = assetEntryService;
773 }
774
775
780 public AssetEntryPersistence getAssetEntryPersistence() {
781 return assetEntryPersistence;
782 }
783
784
789 public void setAssetEntryPersistence(
790 AssetEntryPersistence assetEntryPersistence) {
791 this.assetEntryPersistence = assetEntryPersistence;
792 }
793
794
799 public AssetEntryFinder getAssetEntryFinder() {
800 return assetEntryFinder;
801 }
802
803
808 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
809 this.assetEntryFinder = assetEntryFinder;
810 }
811
812
817 public AssetTagLocalService getAssetTagLocalService() {
818 return assetTagLocalService;
819 }
820
821
826 public void setAssetTagLocalService(
827 AssetTagLocalService assetTagLocalService) {
828 this.assetTagLocalService = assetTagLocalService;
829 }
830
831
836 public AssetTagService getAssetTagService() {
837 return assetTagService;
838 }
839
840
845 public void setAssetTagService(AssetTagService assetTagService) {
846 this.assetTagService = assetTagService;
847 }
848
849
854 public AssetTagPersistence getAssetTagPersistence() {
855 return assetTagPersistence;
856 }
857
858
863 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
864 this.assetTagPersistence = assetTagPersistence;
865 }
866
867
872 public AssetTagFinder getAssetTagFinder() {
873 return assetTagFinder;
874 }
875
876
881 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
882 this.assetTagFinder = assetTagFinder;
883 }
884
885
890 public ExpandoValueLocalService getExpandoValueLocalService() {
891 return expandoValueLocalService;
892 }
893
894
899 public void setExpandoValueLocalService(
900 ExpandoValueLocalService expandoValueLocalService) {
901 this.expandoValueLocalService = expandoValueLocalService;
902 }
903
904
909 public ExpandoValueService getExpandoValueService() {
910 return expandoValueService;
911 }
912
913
918 public void setExpandoValueService(ExpandoValueService expandoValueService) {
919 this.expandoValueService = expandoValueService;
920 }
921
922
927 public ExpandoValuePersistence getExpandoValuePersistence() {
928 return expandoValuePersistence;
929 }
930
931
936 public void setExpandoValuePersistence(
937 ExpandoValuePersistence expandoValuePersistence) {
938 this.expandoValuePersistence = expandoValuePersistence;
939 }
940
941
946 public SocialActivityLocalService getSocialActivityLocalService() {
947 return socialActivityLocalService;
948 }
949
950
955 public void setSocialActivityLocalService(
956 SocialActivityLocalService socialActivityLocalService) {
957 this.socialActivityLocalService = socialActivityLocalService;
958 }
959
960
965 public SocialActivityPersistence getSocialActivityPersistence() {
966 return socialActivityPersistence;
967 }
968
969
974 public void setSocialActivityPersistence(
975 SocialActivityPersistence socialActivityPersistence) {
976 this.socialActivityPersistence = socialActivityPersistence;
977 }
978
979
984 public SocialActivityFinder getSocialActivityFinder() {
985 return socialActivityFinder;
986 }
987
988
993 public void setSocialActivityFinder(
994 SocialActivityFinder socialActivityFinder) {
995 this.socialActivityFinder = socialActivityFinder;
996 }
997
998
1003 protected void runSQL(String sql) throws SystemException {
1004 try {
1005 DataSource dataSource = calEventPersistence.getDataSource();
1006
1007 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1008 sql, new int[0]);
1009
1010 sqlUpdate.update();
1011 }
1012 catch (Exception e) {
1013 throw new SystemException(e);
1014 }
1015 }
1016
1017 @BeanReference(type = CalEventLocalService.class)
1018 protected CalEventLocalService calEventLocalService;
1019 @BeanReference(type = CalEventService.class)
1020 protected CalEventService calEventService;
1021 @BeanReference(type = CalEventPersistence.class)
1022 protected CalEventPersistence calEventPersistence;
1023 @BeanReference(type = CalEventFinder.class)
1024 protected CalEventFinder calEventFinder;
1025 @BeanReference(type = CounterLocalService.class)
1026 protected CounterLocalService counterLocalService;
1027 @BeanReference(type = MailService.class)
1028 protected MailService mailService;
1029 @BeanReference(type = CompanyLocalService.class)
1030 protected CompanyLocalService companyLocalService;
1031 @BeanReference(type = CompanyService.class)
1032 protected CompanyService companyService;
1033 @BeanReference(type = CompanyPersistence.class)
1034 protected CompanyPersistence companyPersistence;
1035 @BeanReference(type = GroupLocalService.class)
1036 protected GroupLocalService groupLocalService;
1037 @BeanReference(type = GroupService.class)
1038 protected GroupService groupService;
1039 @BeanReference(type = GroupPersistence.class)
1040 protected GroupPersistence groupPersistence;
1041 @BeanReference(type = GroupFinder.class)
1042 protected GroupFinder groupFinder;
1043 @BeanReference(type = PortletPreferencesLocalService.class)
1044 protected PortletPreferencesLocalService portletPreferencesLocalService;
1045 @BeanReference(type = PortletPreferencesService.class)
1046 protected PortletPreferencesService portletPreferencesService;
1047 @BeanReference(type = PortletPreferencesPersistence.class)
1048 protected PortletPreferencesPersistence portletPreferencesPersistence;
1049 @BeanReference(type = PortletPreferencesFinder.class)
1050 protected PortletPreferencesFinder portletPreferencesFinder;
1051 @BeanReference(type = ResourceLocalService.class)
1052 protected ResourceLocalService resourceLocalService;
1053 @BeanReference(type = ResourceService.class)
1054 protected ResourceService resourceService;
1055 @BeanReference(type = ResourcePersistence.class)
1056 protected ResourcePersistence resourcePersistence;
1057 @BeanReference(type = ResourceFinder.class)
1058 protected ResourceFinder resourceFinder;
1059 @BeanReference(type = UserLocalService.class)
1060 protected UserLocalService userLocalService;
1061 @BeanReference(type = UserService.class)
1062 protected UserService userService;
1063 @BeanReference(type = UserPersistence.class)
1064 protected UserPersistence userPersistence;
1065 @BeanReference(type = UserFinder.class)
1066 protected UserFinder userFinder;
1067 @BeanReference(type = AssetEntryLocalService.class)
1068 protected AssetEntryLocalService assetEntryLocalService;
1069 @BeanReference(type = AssetEntryService.class)
1070 protected AssetEntryService assetEntryService;
1071 @BeanReference(type = AssetEntryPersistence.class)
1072 protected AssetEntryPersistence assetEntryPersistence;
1073 @BeanReference(type = AssetEntryFinder.class)
1074 protected AssetEntryFinder assetEntryFinder;
1075 @BeanReference(type = AssetTagLocalService.class)
1076 protected AssetTagLocalService assetTagLocalService;
1077 @BeanReference(type = AssetTagService.class)
1078 protected AssetTagService assetTagService;
1079 @BeanReference(type = AssetTagPersistence.class)
1080 protected AssetTagPersistence assetTagPersistence;
1081 @BeanReference(type = AssetTagFinder.class)
1082 protected AssetTagFinder assetTagFinder;
1083 @BeanReference(type = ExpandoValueLocalService.class)
1084 protected ExpandoValueLocalService expandoValueLocalService;
1085 @BeanReference(type = ExpandoValueService.class)
1086 protected ExpandoValueService expandoValueService;
1087 @BeanReference(type = ExpandoValuePersistence.class)
1088 protected ExpandoValuePersistence expandoValuePersistence;
1089 @BeanReference(type = SocialActivityLocalService.class)
1090 protected SocialActivityLocalService socialActivityLocalService;
1091 @BeanReference(type = SocialActivityPersistence.class)
1092 protected SocialActivityPersistence socialActivityPersistence;
1093 @BeanReference(type = SocialActivityFinder.class)
1094 protected SocialActivityFinder socialActivityFinder;
1095 }