001
014
015 package com.liferay.portlet.social.service.base;
016
017 import com.liferay.counter.service.CounterLocalService;
018
019 import com.liferay.portal.kernel.annotation.BeanReference;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023 import com.liferay.portal.kernel.exception.PortalException;
024 import com.liferay.portal.kernel.exception.SystemException;
025 import com.liferay.portal.kernel.util.OrderByComparator;
026 import com.liferay.portal.service.GroupLocalService;
027 import com.liferay.portal.service.GroupService;
028 import com.liferay.portal.service.LayoutLocalService;
029 import com.liferay.portal.service.LayoutService;
030 import com.liferay.portal.service.ResourceLocalService;
031 import com.liferay.portal.service.ResourceService;
032 import com.liferay.portal.service.UserLocalService;
033 import com.liferay.portal.service.UserService;
034 import com.liferay.portal.service.persistence.GroupFinder;
035 import com.liferay.portal.service.persistence.GroupPersistence;
036 import com.liferay.portal.service.persistence.LayoutFinder;
037 import com.liferay.portal.service.persistence.LayoutPersistence;
038 import com.liferay.portal.service.persistence.ResourceFinder;
039 import com.liferay.portal.service.persistence.ResourcePersistence;
040 import com.liferay.portal.service.persistence.UserFinder;
041 import com.liferay.portal.service.persistence.UserPersistence;
042
043 import com.liferay.portlet.social.model.SocialActivity;
044 import com.liferay.portlet.social.service.SocialActivityInterpreterLocalService;
045 import com.liferay.portlet.social.service.SocialActivityLocalService;
046 import com.liferay.portlet.social.service.SocialEquityHistoryLocalService;
047 import com.liferay.portlet.social.service.SocialEquityLogLocalService;
048 import com.liferay.portlet.social.service.SocialEquitySettingLocalService;
049 import com.liferay.portlet.social.service.SocialEquityUserLocalService;
050 import com.liferay.portlet.social.service.SocialRelationLocalService;
051 import com.liferay.portlet.social.service.SocialRequestInterpreterLocalService;
052 import com.liferay.portlet.social.service.SocialRequestLocalService;
053 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
054 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
055 import com.liferay.portlet.social.service.persistence.SocialEquityAssetEntryPersistence;
056 import com.liferay.portlet.social.service.persistence.SocialEquityHistoryPersistence;
057 import com.liferay.portlet.social.service.persistence.SocialEquityLogPersistence;
058 import com.liferay.portlet.social.service.persistence.SocialEquitySettingPersistence;
059 import com.liferay.portlet.social.service.persistence.SocialEquityUserPersistence;
060 import com.liferay.portlet.social.service.persistence.SocialRelationPersistence;
061 import com.liferay.portlet.social.service.persistence.SocialRequestPersistence;
062
063 import java.util.List;
064
065 import javax.sql.DataSource;
066
067
083 public abstract class SocialActivityLocalServiceBaseImpl
084 implements SocialActivityLocalService {
085
092 public SocialActivity addSocialActivity(SocialActivity socialActivity)
093 throws SystemException {
094 socialActivity.setNew(true);
095
096 return socialActivityPersistence.update(socialActivity, false);
097 }
098
099
105 public SocialActivity createSocialActivity(long activityId) {
106 return socialActivityPersistence.create(activityId);
107 }
108
109
116 public void deleteSocialActivity(long activityId)
117 throws PortalException, SystemException {
118 socialActivityPersistence.remove(activityId);
119 }
120
121
127 public void deleteSocialActivity(SocialActivity socialActivity)
128 throws SystemException {
129 socialActivityPersistence.remove(socialActivity);
130 }
131
132
139 @SuppressWarnings("rawtypes")
140 public List dynamicQuery(DynamicQuery dynamicQuery)
141 throws SystemException {
142 return socialActivityPersistence.findWithDynamicQuery(dynamicQuery);
143 }
144
145
158 @SuppressWarnings("rawtypes")
159 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
160 throws SystemException {
161 return socialActivityPersistence.findWithDynamicQuery(dynamicQuery,
162 start, end);
163 }
164
165
179 @SuppressWarnings("rawtypes")
180 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
181 OrderByComparator orderByComparator) throws SystemException {
182 return socialActivityPersistence.findWithDynamicQuery(dynamicQuery,
183 start, end, orderByComparator);
184 }
185
186
193 public long dynamicQueryCount(DynamicQuery dynamicQuery)
194 throws SystemException {
195 return socialActivityPersistence.countWithDynamicQuery(dynamicQuery);
196 }
197
198
206 public SocialActivity getSocialActivity(long activityId)
207 throws PortalException, SystemException {
208 return socialActivityPersistence.findByPrimaryKey(activityId);
209 }
210
211
223 public List<SocialActivity> getSocialActivities(int start, int end)
224 throws SystemException {
225 return socialActivityPersistence.findAll(start, end);
226 }
227
228
234 public int getSocialActivitiesCount() throws SystemException {
235 return socialActivityPersistence.countAll();
236 }
237
238
245 public SocialActivity updateSocialActivity(SocialActivity socialActivity)
246 throws SystemException {
247 socialActivity.setNew(false);
248
249 return socialActivityPersistence.update(socialActivity, true);
250 }
251
252
260 public SocialActivity updateSocialActivity(SocialActivity socialActivity,
261 boolean merge) throws SystemException {
262 socialActivity.setNew(false);
263
264 return socialActivityPersistence.update(socialActivity, merge);
265 }
266
267
272 public SocialActivityLocalService getSocialActivityLocalService() {
273 return socialActivityLocalService;
274 }
275
276
281 public void setSocialActivityLocalService(
282 SocialActivityLocalService socialActivityLocalService) {
283 this.socialActivityLocalService = socialActivityLocalService;
284 }
285
286
291 public SocialActivityPersistence getSocialActivityPersistence() {
292 return socialActivityPersistence;
293 }
294
295
300 public void setSocialActivityPersistence(
301 SocialActivityPersistence socialActivityPersistence) {
302 this.socialActivityPersistence = socialActivityPersistence;
303 }
304
305
310 public SocialActivityFinder getSocialActivityFinder() {
311 return socialActivityFinder;
312 }
313
314
319 public void setSocialActivityFinder(
320 SocialActivityFinder socialActivityFinder) {
321 this.socialActivityFinder = socialActivityFinder;
322 }
323
324
329 public SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
330 return socialActivityInterpreterLocalService;
331 }
332
333
338 public void setSocialActivityInterpreterLocalService(
339 SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
340 this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
341 }
342
343
348 public SocialEquityAssetEntryPersistence getSocialEquityAssetEntryPersistence() {
349 return socialEquityAssetEntryPersistence;
350 }
351
352
357 public void setSocialEquityAssetEntryPersistence(
358 SocialEquityAssetEntryPersistence socialEquityAssetEntryPersistence) {
359 this.socialEquityAssetEntryPersistence = socialEquityAssetEntryPersistence;
360 }
361
362
367 public SocialEquityHistoryLocalService getSocialEquityHistoryLocalService() {
368 return socialEquityHistoryLocalService;
369 }
370
371
376 public void setSocialEquityHistoryLocalService(
377 SocialEquityHistoryLocalService socialEquityHistoryLocalService) {
378 this.socialEquityHistoryLocalService = socialEquityHistoryLocalService;
379 }
380
381
386 public SocialEquityHistoryPersistence getSocialEquityHistoryPersistence() {
387 return socialEquityHistoryPersistence;
388 }
389
390
395 public void setSocialEquityHistoryPersistence(
396 SocialEquityHistoryPersistence socialEquityHistoryPersistence) {
397 this.socialEquityHistoryPersistence = socialEquityHistoryPersistence;
398 }
399
400
405 public SocialEquityLogLocalService getSocialEquityLogLocalService() {
406 return socialEquityLogLocalService;
407 }
408
409
414 public void setSocialEquityLogLocalService(
415 SocialEquityLogLocalService socialEquityLogLocalService) {
416 this.socialEquityLogLocalService = socialEquityLogLocalService;
417 }
418
419
424 public SocialEquityLogPersistence getSocialEquityLogPersistence() {
425 return socialEquityLogPersistence;
426 }
427
428
433 public void setSocialEquityLogPersistence(
434 SocialEquityLogPersistence socialEquityLogPersistence) {
435 this.socialEquityLogPersistence = socialEquityLogPersistence;
436 }
437
438
443 public SocialEquitySettingLocalService getSocialEquitySettingLocalService() {
444 return socialEquitySettingLocalService;
445 }
446
447
452 public void setSocialEquitySettingLocalService(
453 SocialEquitySettingLocalService socialEquitySettingLocalService) {
454 this.socialEquitySettingLocalService = socialEquitySettingLocalService;
455 }
456
457
462 public SocialEquitySettingPersistence getSocialEquitySettingPersistence() {
463 return socialEquitySettingPersistence;
464 }
465
466
471 public void setSocialEquitySettingPersistence(
472 SocialEquitySettingPersistence socialEquitySettingPersistence) {
473 this.socialEquitySettingPersistence = socialEquitySettingPersistence;
474 }
475
476
481 public SocialEquityUserLocalService getSocialEquityUserLocalService() {
482 return socialEquityUserLocalService;
483 }
484
485
490 public void setSocialEquityUserLocalService(
491 SocialEquityUserLocalService socialEquityUserLocalService) {
492 this.socialEquityUserLocalService = socialEquityUserLocalService;
493 }
494
495
500 public SocialEquityUserPersistence getSocialEquityUserPersistence() {
501 return socialEquityUserPersistence;
502 }
503
504
509 public void setSocialEquityUserPersistence(
510 SocialEquityUserPersistence socialEquityUserPersistence) {
511 this.socialEquityUserPersistence = socialEquityUserPersistence;
512 }
513
514
519 public SocialRelationLocalService getSocialRelationLocalService() {
520 return socialRelationLocalService;
521 }
522
523
528 public void setSocialRelationLocalService(
529 SocialRelationLocalService socialRelationLocalService) {
530 this.socialRelationLocalService = socialRelationLocalService;
531 }
532
533
538 public SocialRelationPersistence getSocialRelationPersistence() {
539 return socialRelationPersistence;
540 }
541
542
547 public void setSocialRelationPersistence(
548 SocialRelationPersistence socialRelationPersistence) {
549 this.socialRelationPersistence = socialRelationPersistence;
550 }
551
552
557 public SocialRequestLocalService getSocialRequestLocalService() {
558 return socialRequestLocalService;
559 }
560
561
566 public void setSocialRequestLocalService(
567 SocialRequestLocalService socialRequestLocalService) {
568 this.socialRequestLocalService = socialRequestLocalService;
569 }
570
571
576 public SocialRequestPersistence getSocialRequestPersistence() {
577 return socialRequestPersistence;
578 }
579
580
585 public void setSocialRequestPersistence(
586 SocialRequestPersistence socialRequestPersistence) {
587 this.socialRequestPersistence = socialRequestPersistence;
588 }
589
590
595 public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
596 return socialRequestInterpreterLocalService;
597 }
598
599
604 public void setSocialRequestInterpreterLocalService(
605 SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
606 this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
607 }
608
609
614 public CounterLocalService getCounterLocalService() {
615 return counterLocalService;
616 }
617
618
623 public void setCounterLocalService(CounterLocalService counterLocalService) {
624 this.counterLocalService = counterLocalService;
625 }
626
627
632 public GroupLocalService getGroupLocalService() {
633 return groupLocalService;
634 }
635
636
641 public void setGroupLocalService(GroupLocalService groupLocalService) {
642 this.groupLocalService = groupLocalService;
643 }
644
645
650 public GroupService getGroupService() {
651 return groupService;
652 }
653
654
659 public void setGroupService(GroupService groupService) {
660 this.groupService = groupService;
661 }
662
663
668 public GroupPersistence getGroupPersistence() {
669 return groupPersistence;
670 }
671
672
677 public void setGroupPersistence(GroupPersistence groupPersistence) {
678 this.groupPersistence = groupPersistence;
679 }
680
681
686 public GroupFinder getGroupFinder() {
687 return groupFinder;
688 }
689
690
695 public void setGroupFinder(GroupFinder groupFinder) {
696 this.groupFinder = groupFinder;
697 }
698
699
704 public LayoutLocalService getLayoutLocalService() {
705 return layoutLocalService;
706 }
707
708
713 public void setLayoutLocalService(LayoutLocalService layoutLocalService) {
714 this.layoutLocalService = layoutLocalService;
715 }
716
717
722 public LayoutService getLayoutService() {
723 return layoutService;
724 }
725
726
731 public void setLayoutService(LayoutService layoutService) {
732 this.layoutService = layoutService;
733 }
734
735
740 public LayoutPersistence getLayoutPersistence() {
741 return layoutPersistence;
742 }
743
744
749 public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
750 this.layoutPersistence = layoutPersistence;
751 }
752
753
758 public LayoutFinder getLayoutFinder() {
759 return layoutFinder;
760 }
761
762
767 public void setLayoutFinder(LayoutFinder layoutFinder) {
768 this.layoutFinder = layoutFinder;
769 }
770
771
776 public ResourceLocalService getResourceLocalService() {
777 return resourceLocalService;
778 }
779
780
785 public void setResourceLocalService(
786 ResourceLocalService resourceLocalService) {
787 this.resourceLocalService = resourceLocalService;
788 }
789
790
795 public ResourceService getResourceService() {
796 return resourceService;
797 }
798
799
804 public void setResourceService(ResourceService resourceService) {
805 this.resourceService = resourceService;
806 }
807
808
813 public ResourcePersistence getResourcePersistence() {
814 return resourcePersistence;
815 }
816
817
822 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
823 this.resourcePersistence = resourcePersistence;
824 }
825
826
831 public ResourceFinder getResourceFinder() {
832 return resourceFinder;
833 }
834
835
840 public void setResourceFinder(ResourceFinder resourceFinder) {
841 this.resourceFinder = resourceFinder;
842 }
843
844
849 public UserLocalService getUserLocalService() {
850 return userLocalService;
851 }
852
853
858 public void setUserLocalService(UserLocalService userLocalService) {
859 this.userLocalService = userLocalService;
860 }
861
862
867 public UserService getUserService() {
868 return userService;
869 }
870
871
876 public void setUserService(UserService userService) {
877 this.userService = userService;
878 }
879
880
885 public UserPersistence getUserPersistence() {
886 return userPersistence;
887 }
888
889
894 public void setUserPersistence(UserPersistence userPersistence) {
895 this.userPersistence = userPersistence;
896 }
897
898
903 public UserFinder getUserFinder() {
904 return userFinder;
905 }
906
907
912 public void setUserFinder(UserFinder userFinder) {
913 this.userFinder = userFinder;
914 }
915
916
921 protected void runSQL(String sql) throws SystemException {
922 try {
923 DataSource dataSource = socialActivityPersistence.getDataSource();
924
925 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
926 sql, new int[0]);
927
928 sqlUpdate.update();
929 }
930 catch (Exception e) {
931 throw new SystemException(e);
932 }
933 }
934
935 @BeanReference(type = SocialActivityLocalService.class)
936 protected SocialActivityLocalService socialActivityLocalService;
937 @BeanReference(type = SocialActivityPersistence.class)
938 protected SocialActivityPersistence socialActivityPersistence;
939 @BeanReference(type = SocialActivityFinder.class)
940 protected SocialActivityFinder socialActivityFinder;
941 @BeanReference(type = SocialActivityInterpreterLocalService.class)
942 protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
943 @BeanReference(type = SocialEquityAssetEntryPersistence.class)
944 protected SocialEquityAssetEntryPersistence socialEquityAssetEntryPersistence;
945 @BeanReference(type = SocialEquityHistoryLocalService.class)
946 protected SocialEquityHistoryLocalService socialEquityHistoryLocalService;
947 @BeanReference(type = SocialEquityHistoryPersistence.class)
948 protected SocialEquityHistoryPersistence socialEquityHistoryPersistence;
949 @BeanReference(type = SocialEquityLogLocalService.class)
950 protected SocialEquityLogLocalService socialEquityLogLocalService;
951 @BeanReference(type = SocialEquityLogPersistence.class)
952 protected SocialEquityLogPersistence socialEquityLogPersistence;
953 @BeanReference(type = SocialEquitySettingLocalService.class)
954 protected SocialEquitySettingLocalService socialEquitySettingLocalService;
955 @BeanReference(type = SocialEquitySettingPersistence.class)
956 protected SocialEquitySettingPersistence socialEquitySettingPersistence;
957 @BeanReference(type = SocialEquityUserLocalService.class)
958 protected SocialEquityUserLocalService socialEquityUserLocalService;
959 @BeanReference(type = SocialEquityUserPersistence.class)
960 protected SocialEquityUserPersistence socialEquityUserPersistence;
961 @BeanReference(type = SocialRelationLocalService.class)
962 protected SocialRelationLocalService socialRelationLocalService;
963 @BeanReference(type = SocialRelationPersistence.class)
964 protected SocialRelationPersistence socialRelationPersistence;
965 @BeanReference(type = SocialRequestLocalService.class)
966 protected SocialRequestLocalService socialRequestLocalService;
967 @BeanReference(type = SocialRequestPersistence.class)
968 protected SocialRequestPersistence socialRequestPersistence;
969 @BeanReference(type = SocialRequestInterpreterLocalService.class)
970 protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
971 @BeanReference(type = CounterLocalService.class)
972 protected CounterLocalService counterLocalService;
973 @BeanReference(type = GroupLocalService.class)
974 protected GroupLocalService groupLocalService;
975 @BeanReference(type = GroupService.class)
976 protected GroupService groupService;
977 @BeanReference(type = GroupPersistence.class)
978 protected GroupPersistence groupPersistence;
979 @BeanReference(type = GroupFinder.class)
980 protected GroupFinder groupFinder;
981 @BeanReference(type = LayoutLocalService.class)
982 protected LayoutLocalService layoutLocalService;
983 @BeanReference(type = LayoutService.class)
984 protected LayoutService layoutService;
985 @BeanReference(type = LayoutPersistence.class)
986 protected LayoutPersistence layoutPersistence;
987 @BeanReference(type = LayoutFinder.class)
988 protected LayoutFinder layoutFinder;
989 @BeanReference(type = ResourceLocalService.class)
990 protected ResourceLocalService resourceLocalService;
991 @BeanReference(type = ResourceService.class)
992 protected ResourceService resourceService;
993 @BeanReference(type = ResourcePersistence.class)
994 protected ResourcePersistence resourcePersistence;
995 @BeanReference(type = ResourceFinder.class)
996 protected ResourceFinder resourceFinder;
997 @BeanReference(type = UserLocalService.class)
998 protected UserLocalService userLocalService;
999 @BeanReference(type = UserService.class)
1000 protected UserService userService;
1001 @BeanReference(type = UserPersistence.class)
1002 protected UserPersistence userPersistence;
1003 @BeanReference(type = UserFinder.class)
1004 protected UserFinder userFinder;
1005 }