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.bean.BeanReference;
020 import com.liferay.portal.kernel.bean.IdentifiableBean;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025 import com.liferay.portal.kernel.exception.PortalException;
026 import com.liferay.portal.kernel.exception.SystemException;
027 import com.liferay.portal.kernel.search.Indexable;
028 import com.liferay.portal.kernel.search.IndexableType;
029 import com.liferay.portal.kernel.util.OrderByComparator;
030 import com.liferay.portal.model.PersistedModel;
031 import com.liferay.portal.service.BaseLocalServiceImpl;
032 import com.liferay.portal.service.GroupLocalService;
033 import com.liferay.portal.service.GroupService;
034 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
035 import com.liferay.portal.service.ResourceLocalService;
036 import com.liferay.portal.service.ResourceService;
037 import com.liferay.portal.service.UserLocalService;
038 import com.liferay.portal.service.UserService;
039 import com.liferay.portal.service.persistence.GroupFinder;
040 import com.liferay.portal.service.persistence.GroupPersistence;
041 import com.liferay.portal.service.persistence.ResourceFinder;
042 import com.liferay.portal.service.persistence.ResourcePersistence;
043 import com.liferay.portal.service.persistence.UserFinder;
044 import com.liferay.portal.service.persistence.UserPersistence;
045
046 import com.liferay.portlet.social.model.SocialActivitySetting;
047 import com.liferay.portlet.social.service.SocialActivityAchievementLocalService;
048 import com.liferay.portlet.social.service.SocialActivityCounterLocalService;
049 import com.liferay.portlet.social.service.SocialActivityInterpreterLocalService;
050 import com.liferay.portlet.social.service.SocialActivityLimitLocalService;
051 import com.liferay.portlet.social.service.SocialActivityLocalService;
052 import com.liferay.portlet.social.service.SocialActivitySettingLocalService;
053 import com.liferay.portlet.social.service.SocialActivitySettingService;
054 import com.liferay.portlet.social.service.SocialRelationLocalService;
055 import com.liferay.portlet.social.service.SocialRequestInterpreterLocalService;
056 import com.liferay.portlet.social.service.SocialRequestLocalService;
057 import com.liferay.portlet.social.service.persistence.SocialActivityAchievementPersistence;
058 import com.liferay.portlet.social.service.persistence.SocialActivityCounterFinder;
059 import com.liferay.portlet.social.service.persistence.SocialActivityCounterPersistence;
060 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
061 import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence;
062 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
063 import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence;
064 import com.liferay.portlet.social.service.persistence.SocialRelationPersistence;
065 import com.liferay.portlet.social.service.persistence.SocialRequestPersistence;
066
067 import java.io.Serializable;
068
069 import java.util.List;
070
071 import javax.sql.DataSource;
072
073
085 public abstract class SocialActivitySettingLocalServiceBaseImpl
086 extends BaseLocalServiceImpl implements SocialActivitySettingLocalService,
087 IdentifiableBean {
088
093
094
101 @Indexable(type = IndexableType.REINDEX)
102 public SocialActivitySetting addSocialActivitySetting(
103 SocialActivitySetting socialActivitySetting) throws SystemException {
104 socialActivitySetting.setNew(true);
105
106 return socialActivitySettingPersistence.update(socialActivitySetting,
107 false);
108 }
109
110
116 public SocialActivitySetting createSocialActivitySetting(
117 long activitySettingId) {
118 return socialActivitySettingPersistence.create(activitySettingId);
119 }
120
121
129 @Indexable(type = IndexableType.DELETE)
130 public SocialActivitySetting deleteSocialActivitySetting(
131 long activitySettingId) throws PortalException, SystemException {
132 return socialActivitySettingPersistence.remove(activitySettingId);
133 }
134
135
142 @Indexable(type = IndexableType.DELETE)
143 public SocialActivitySetting deleteSocialActivitySetting(
144 SocialActivitySetting socialActivitySetting) throws SystemException {
145 return socialActivitySettingPersistence.remove(socialActivitySetting);
146 }
147
148 public DynamicQuery dynamicQuery() {
149 Class<?> clazz = getClass();
150
151 return DynamicQueryFactoryUtil.forClass(SocialActivitySetting.class,
152 clazz.getClassLoader());
153 }
154
155
162 @SuppressWarnings("rawtypes")
163 public List dynamicQuery(DynamicQuery dynamicQuery)
164 throws SystemException {
165 return socialActivitySettingPersistence.findWithDynamicQuery(dynamicQuery);
166 }
167
168
181 @SuppressWarnings("rawtypes")
182 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
183 throws SystemException {
184 return socialActivitySettingPersistence.findWithDynamicQuery(dynamicQuery,
185 start, end);
186 }
187
188
202 @SuppressWarnings("rawtypes")
203 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
204 OrderByComparator orderByComparator) throws SystemException {
205 return socialActivitySettingPersistence.findWithDynamicQuery(dynamicQuery,
206 start, end, orderByComparator);
207 }
208
209
216 public long dynamicQueryCount(DynamicQuery dynamicQuery)
217 throws SystemException {
218 return socialActivitySettingPersistence.countWithDynamicQuery(dynamicQuery);
219 }
220
221 public SocialActivitySetting fetchSocialActivitySetting(
222 long activitySettingId) throws SystemException {
223 return socialActivitySettingPersistence.fetchByPrimaryKey(activitySettingId);
224 }
225
226
234 public SocialActivitySetting getSocialActivitySetting(
235 long activitySettingId) throws PortalException, SystemException {
236 return socialActivitySettingPersistence.findByPrimaryKey(activitySettingId);
237 }
238
239 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
240 throws PortalException, SystemException {
241 return socialActivitySettingPersistence.findByPrimaryKey(primaryKeyObj);
242 }
243
244
256 public List<SocialActivitySetting> getSocialActivitySettings(int start,
257 int end) throws SystemException {
258 return socialActivitySettingPersistence.findAll(start, end);
259 }
260
261
267 public int getSocialActivitySettingsCount() throws SystemException {
268 return socialActivitySettingPersistence.countAll();
269 }
270
271
278 @Indexable(type = IndexableType.REINDEX)
279 public SocialActivitySetting updateSocialActivitySetting(
280 SocialActivitySetting socialActivitySetting) throws SystemException {
281 return updateSocialActivitySetting(socialActivitySetting, true);
282 }
283
284
292 @Indexable(type = IndexableType.REINDEX)
293 public SocialActivitySetting updateSocialActivitySetting(
294 SocialActivitySetting socialActivitySetting, boolean merge)
295 throws SystemException {
296 socialActivitySetting.setNew(false);
297
298 return socialActivitySettingPersistence.update(socialActivitySetting,
299 merge);
300 }
301
302
307 public SocialActivityLocalService getSocialActivityLocalService() {
308 return socialActivityLocalService;
309 }
310
311
316 public void setSocialActivityLocalService(
317 SocialActivityLocalService socialActivityLocalService) {
318 this.socialActivityLocalService = socialActivityLocalService;
319 }
320
321
326 public SocialActivityPersistence getSocialActivityPersistence() {
327 return socialActivityPersistence;
328 }
329
330
335 public void setSocialActivityPersistence(
336 SocialActivityPersistence socialActivityPersistence) {
337 this.socialActivityPersistence = socialActivityPersistence;
338 }
339
340
345 public SocialActivityFinder getSocialActivityFinder() {
346 return socialActivityFinder;
347 }
348
349
354 public void setSocialActivityFinder(
355 SocialActivityFinder socialActivityFinder) {
356 this.socialActivityFinder = socialActivityFinder;
357 }
358
359
364 public SocialActivityAchievementLocalService getSocialActivityAchievementLocalService() {
365 return socialActivityAchievementLocalService;
366 }
367
368
373 public void setSocialActivityAchievementLocalService(
374 SocialActivityAchievementLocalService socialActivityAchievementLocalService) {
375 this.socialActivityAchievementLocalService = socialActivityAchievementLocalService;
376 }
377
378
383 public SocialActivityAchievementPersistence getSocialActivityAchievementPersistence() {
384 return socialActivityAchievementPersistence;
385 }
386
387
392 public void setSocialActivityAchievementPersistence(
393 SocialActivityAchievementPersistence socialActivityAchievementPersistence) {
394 this.socialActivityAchievementPersistence = socialActivityAchievementPersistence;
395 }
396
397
402 public SocialActivityCounterLocalService getSocialActivityCounterLocalService() {
403 return socialActivityCounterLocalService;
404 }
405
406
411 public void setSocialActivityCounterLocalService(
412 SocialActivityCounterLocalService socialActivityCounterLocalService) {
413 this.socialActivityCounterLocalService = socialActivityCounterLocalService;
414 }
415
416
421 public SocialActivityCounterPersistence getSocialActivityCounterPersistence() {
422 return socialActivityCounterPersistence;
423 }
424
425
430 public void setSocialActivityCounterPersistence(
431 SocialActivityCounterPersistence socialActivityCounterPersistence) {
432 this.socialActivityCounterPersistence = socialActivityCounterPersistence;
433 }
434
435
440 public SocialActivityCounterFinder getSocialActivityCounterFinder() {
441 return socialActivityCounterFinder;
442 }
443
444
449 public void setSocialActivityCounterFinder(
450 SocialActivityCounterFinder socialActivityCounterFinder) {
451 this.socialActivityCounterFinder = socialActivityCounterFinder;
452 }
453
454
459 public SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
460 return socialActivityInterpreterLocalService;
461 }
462
463
468 public void setSocialActivityInterpreterLocalService(
469 SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
470 this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
471 }
472
473
478 public SocialActivityLimitLocalService getSocialActivityLimitLocalService() {
479 return socialActivityLimitLocalService;
480 }
481
482
487 public void setSocialActivityLimitLocalService(
488 SocialActivityLimitLocalService socialActivityLimitLocalService) {
489 this.socialActivityLimitLocalService = socialActivityLimitLocalService;
490 }
491
492
497 public SocialActivityLimitPersistence getSocialActivityLimitPersistence() {
498 return socialActivityLimitPersistence;
499 }
500
501
506 public void setSocialActivityLimitPersistence(
507 SocialActivityLimitPersistence socialActivityLimitPersistence) {
508 this.socialActivityLimitPersistence = socialActivityLimitPersistence;
509 }
510
511
516 public SocialActivitySettingLocalService getSocialActivitySettingLocalService() {
517 return socialActivitySettingLocalService;
518 }
519
520
525 public void setSocialActivitySettingLocalService(
526 SocialActivitySettingLocalService socialActivitySettingLocalService) {
527 this.socialActivitySettingLocalService = socialActivitySettingLocalService;
528 }
529
530
535 public SocialActivitySettingService getSocialActivitySettingService() {
536 return socialActivitySettingService;
537 }
538
539
544 public void setSocialActivitySettingService(
545 SocialActivitySettingService socialActivitySettingService) {
546 this.socialActivitySettingService = socialActivitySettingService;
547 }
548
549
554 public SocialActivitySettingPersistence getSocialActivitySettingPersistence() {
555 return socialActivitySettingPersistence;
556 }
557
558
563 public void setSocialActivitySettingPersistence(
564 SocialActivitySettingPersistence socialActivitySettingPersistence) {
565 this.socialActivitySettingPersistence = socialActivitySettingPersistence;
566 }
567
568
573 public SocialRelationLocalService getSocialRelationLocalService() {
574 return socialRelationLocalService;
575 }
576
577
582 public void setSocialRelationLocalService(
583 SocialRelationLocalService socialRelationLocalService) {
584 this.socialRelationLocalService = socialRelationLocalService;
585 }
586
587
592 public SocialRelationPersistence getSocialRelationPersistence() {
593 return socialRelationPersistence;
594 }
595
596
601 public void setSocialRelationPersistence(
602 SocialRelationPersistence socialRelationPersistence) {
603 this.socialRelationPersistence = socialRelationPersistence;
604 }
605
606
611 public SocialRequestLocalService getSocialRequestLocalService() {
612 return socialRequestLocalService;
613 }
614
615
620 public void setSocialRequestLocalService(
621 SocialRequestLocalService socialRequestLocalService) {
622 this.socialRequestLocalService = socialRequestLocalService;
623 }
624
625
630 public SocialRequestPersistence getSocialRequestPersistence() {
631 return socialRequestPersistence;
632 }
633
634
639 public void setSocialRequestPersistence(
640 SocialRequestPersistence socialRequestPersistence) {
641 this.socialRequestPersistence = socialRequestPersistence;
642 }
643
644
649 public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
650 return socialRequestInterpreterLocalService;
651 }
652
653
658 public void setSocialRequestInterpreterLocalService(
659 SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
660 this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
661 }
662
663
668 public CounterLocalService getCounterLocalService() {
669 return counterLocalService;
670 }
671
672
677 public void setCounterLocalService(CounterLocalService counterLocalService) {
678 this.counterLocalService = counterLocalService;
679 }
680
681
686 public GroupLocalService getGroupLocalService() {
687 return groupLocalService;
688 }
689
690
695 public void setGroupLocalService(GroupLocalService groupLocalService) {
696 this.groupLocalService = groupLocalService;
697 }
698
699
704 public GroupService getGroupService() {
705 return groupService;
706 }
707
708
713 public void setGroupService(GroupService groupService) {
714 this.groupService = groupService;
715 }
716
717
722 public GroupPersistence getGroupPersistence() {
723 return groupPersistence;
724 }
725
726
731 public void setGroupPersistence(GroupPersistence groupPersistence) {
732 this.groupPersistence = groupPersistence;
733 }
734
735
740 public GroupFinder getGroupFinder() {
741 return groupFinder;
742 }
743
744
749 public void setGroupFinder(GroupFinder groupFinder) {
750 this.groupFinder = groupFinder;
751 }
752
753
758 public ResourceLocalService getResourceLocalService() {
759 return resourceLocalService;
760 }
761
762
767 public void setResourceLocalService(
768 ResourceLocalService resourceLocalService) {
769 this.resourceLocalService = resourceLocalService;
770 }
771
772
777 public ResourceService getResourceService() {
778 return resourceService;
779 }
780
781
786 public void setResourceService(ResourceService resourceService) {
787 this.resourceService = resourceService;
788 }
789
790
795 public ResourcePersistence getResourcePersistence() {
796 return resourcePersistence;
797 }
798
799
804 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
805 this.resourcePersistence = resourcePersistence;
806 }
807
808
813 public ResourceFinder getResourceFinder() {
814 return resourceFinder;
815 }
816
817
822 public void setResourceFinder(ResourceFinder resourceFinder) {
823 this.resourceFinder = resourceFinder;
824 }
825
826
831 public UserLocalService getUserLocalService() {
832 return userLocalService;
833 }
834
835
840 public void setUserLocalService(UserLocalService userLocalService) {
841 this.userLocalService = userLocalService;
842 }
843
844
849 public UserService getUserService() {
850 return userService;
851 }
852
853
858 public void setUserService(UserService userService) {
859 this.userService = userService;
860 }
861
862
867 public UserPersistence getUserPersistence() {
868 return userPersistence;
869 }
870
871
876 public void setUserPersistence(UserPersistence userPersistence) {
877 this.userPersistence = userPersistence;
878 }
879
880
885 public UserFinder getUserFinder() {
886 return userFinder;
887 }
888
889
894 public void setUserFinder(UserFinder userFinder) {
895 this.userFinder = userFinder;
896 }
897
898 public void afterPropertiesSet() {
899 persistedModelLocalServiceRegistry.register("com.liferay.portlet.social.model.SocialActivitySetting",
900 socialActivitySettingLocalService);
901 }
902
903 public void destroy() {
904 persistedModelLocalServiceRegistry.unregister(
905 "com.liferay.portlet.social.model.SocialActivitySetting");
906 }
907
908
913 public String getBeanIdentifier() {
914 return _beanIdentifier;
915 }
916
917
922 public void setBeanIdentifier(String beanIdentifier) {
923 _beanIdentifier = beanIdentifier;
924 }
925
926 protected Class<?> getModelClass() {
927 return SocialActivitySetting.class;
928 }
929
930 protected String getModelClassName() {
931 return SocialActivitySetting.class.getName();
932 }
933
934
939 protected void runSQL(String sql) throws SystemException {
940 try {
941 DataSource dataSource = socialActivitySettingPersistence.getDataSource();
942
943 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
944 sql, new int[0]);
945
946 sqlUpdate.update();
947 }
948 catch (Exception e) {
949 throw new SystemException(e);
950 }
951 }
952
953 @BeanReference(type = SocialActivityLocalService.class)
954 protected SocialActivityLocalService socialActivityLocalService;
955 @BeanReference(type = SocialActivityPersistence.class)
956 protected SocialActivityPersistence socialActivityPersistence;
957 @BeanReference(type = SocialActivityFinder.class)
958 protected SocialActivityFinder socialActivityFinder;
959 @BeanReference(type = SocialActivityAchievementLocalService.class)
960 protected SocialActivityAchievementLocalService socialActivityAchievementLocalService;
961 @BeanReference(type = SocialActivityAchievementPersistence.class)
962 protected SocialActivityAchievementPersistence socialActivityAchievementPersistence;
963 @BeanReference(type = SocialActivityCounterLocalService.class)
964 protected SocialActivityCounterLocalService socialActivityCounterLocalService;
965 @BeanReference(type = SocialActivityCounterPersistence.class)
966 protected SocialActivityCounterPersistence socialActivityCounterPersistence;
967 @BeanReference(type = SocialActivityCounterFinder.class)
968 protected SocialActivityCounterFinder socialActivityCounterFinder;
969 @BeanReference(type = SocialActivityInterpreterLocalService.class)
970 protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
971 @BeanReference(type = SocialActivityLimitLocalService.class)
972 protected SocialActivityLimitLocalService socialActivityLimitLocalService;
973 @BeanReference(type = SocialActivityLimitPersistence.class)
974 protected SocialActivityLimitPersistence socialActivityLimitPersistence;
975 @BeanReference(type = SocialActivitySettingLocalService.class)
976 protected SocialActivitySettingLocalService socialActivitySettingLocalService;
977 @BeanReference(type = SocialActivitySettingService.class)
978 protected SocialActivitySettingService socialActivitySettingService;
979 @BeanReference(type = SocialActivitySettingPersistence.class)
980 protected SocialActivitySettingPersistence socialActivitySettingPersistence;
981 @BeanReference(type = SocialRelationLocalService.class)
982 protected SocialRelationLocalService socialRelationLocalService;
983 @BeanReference(type = SocialRelationPersistence.class)
984 protected SocialRelationPersistence socialRelationPersistence;
985 @BeanReference(type = SocialRequestLocalService.class)
986 protected SocialRequestLocalService socialRequestLocalService;
987 @BeanReference(type = SocialRequestPersistence.class)
988 protected SocialRequestPersistence socialRequestPersistence;
989 @BeanReference(type = SocialRequestInterpreterLocalService.class)
990 protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
991 @BeanReference(type = CounterLocalService.class)
992 protected CounterLocalService counterLocalService;
993 @BeanReference(type = GroupLocalService.class)
994 protected GroupLocalService groupLocalService;
995 @BeanReference(type = GroupService.class)
996 protected GroupService groupService;
997 @BeanReference(type = GroupPersistence.class)
998 protected GroupPersistence groupPersistence;
999 @BeanReference(type = GroupFinder.class)
1000 protected GroupFinder groupFinder;
1001 @BeanReference(type = ResourceLocalService.class)
1002 protected ResourceLocalService resourceLocalService;
1003 @BeanReference(type = ResourceService.class)
1004 protected ResourceService resourceService;
1005 @BeanReference(type = ResourcePersistence.class)
1006 protected ResourcePersistence resourcePersistence;
1007 @BeanReference(type = ResourceFinder.class)
1008 protected ResourceFinder resourceFinder;
1009 @BeanReference(type = UserLocalService.class)
1010 protected UserLocalService userLocalService;
1011 @BeanReference(type = UserService.class)
1012 protected UserService userService;
1013 @BeanReference(type = UserPersistence.class)
1014 protected UserPersistence userPersistence;
1015 @BeanReference(type = UserFinder.class)
1016 protected UserFinder userFinder;
1017 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1018 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1019 private String _beanIdentifier;
1020 }