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.SocialActivityAchievement;
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 SocialActivityAchievementLocalServiceBaseImpl
086 extends BaseLocalServiceImpl
087 implements SocialActivityAchievementLocalService, IdentifiableBean {
088
093
094
101 @Indexable(type = IndexableType.REINDEX)
102 public SocialActivityAchievement addSocialActivityAchievement(
103 SocialActivityAchievement socialActivityAchievement)
104 throws SystemException {
105 socialActivityAchievement.setNew(true);
106
107 return socialActivityAchievementPersistence.update(socialActivityAchievement,
108 false);
109 }
110
111
117 public SocialActivityAchievement createSocialActivityAchievement(
118 long activityAchievementId) {
119 return socialActivityAchievementPersistence.create(activityAchievementId);
120 }
121
122
130 @Indexable(type = IndexableType.DELETE)
131 public SocialActivityAchievement deleteSocialActivityAchievement(
132 long activityAchievementId) throws PortalException, SystemException {
133 return socialActivityAchievementPersistence.remove(activityAchievementId);
134 }
135
136
143 @Indexable(type = IndexableType.DELETE)
144 public SocialActivityAchievement deleteSocialActivityAchievement(
145 SocialActivityAchievement socialActivityAchievement)
146 throws SystemException {
147 return socialActivityAchievementPersistence.remove(socialActivityAchievement);
148 }
149
150 public DynamicQuery dynamicQuery() {
151 Class<?> clazz = getClass();
152
153 return DynamicQueryFactoryUtil.forClass(SocialActivityAchievement.class,
154 clazz.getClassLoader());
155 }
156
157
164 @SuppressWarnings("rawtypes")
165 public List dynamicQuery(DynamicQuery dynamicQuery)
166 throws SystemException {
167 return socialActivityAchievementPersistence.findWithDynamicQuery(dynamicQuery);
168 }
169
170
183 @SuppressWarnings("rawtypes")
184 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
185 throws SystemException {
186 return socialActivityAchievementPersistence.findWithDynamicQuery(dynamicQuery,
187 start, end);
188 }
189
190
204 @SuppressWarnings("rawtypes")
205 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
206 OrderByComparator orderByComparator) throws SystemException {
207 return socialActivityAchievementPersistence.findWithDynamicQuery(dynamicQuery,
208 start, end, orderByComparator);
209 }
210
211
218 public long dynamicQueryCount(DynamicQuery dynamicQuery)
219 throws SystemException {
220 return socialActivityAchievementPersistence.countWithDynamicQuery(dynamicQuery);
221 }
222
223 public SocialActivityAchievement fetchSocialActivityAchievement(
224 long activityAchievementId) throws SystemException {
225 return socialActivityAchievementPersistence.fetchByPrimaryKey(activityAchievementId);
226 }
227
228
236 public SocialActivityAchievement getSocialActivityAchievement(
237 long activityAchievementId) throws PortalException, SystemException {
238 return socialActivityAchievementPersistence.findByPrimaryKey(activityAchievementId);
239 }
240
241 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
242 throws PortalException, SystemException {
243 return socialActivityAchievementPersistence.findByPrimaryKey(primaryKeyObj);
244 }
245
246
258 public List<SocialActivityAchievement> getSocialActivityAchievements(
259 int start, int end) throws SystemException {
260 return socialActivityAchievementPersistence.findAll(start, end);
261 }
262
263
269 public int getSocialActivityAchievementsCount() throws SystemException {
270 return socialActivityAchievementPersistence.countAll();
271 }
272
273
280 @Indexable(type = IndexableType.REINDEX)
281 public SocialActivityAchievement updateSocialActivityAchievement(
282 SocialActivityAchievement socialActivityAchievement)
283 throws SystemException {
284 return updateSocialActivityAchievement(socialActivityAchievement, true);
285 }
286
287
295 @Indexable(type = IndexableType.REINDEX)
296 public SocialActivityAchievement updateSocialActivityAchievement(
297 SocialActivityAchievement socialActivityAchievement, boolean merge)
298 throws SystemException {
299 socialActivityAchievement.setNew(false);
300
301 return socialActivityAchievementPersistence.update(socialActivityAchievement,
302 merge);
303 }
304
305
310 public SocialActivityLocalService getSocialActivityLocalService() {
311 return socialActivityLocalService;
312 }
313
314
319 public void setSocialActivityLocalService(
320 SocialActivityLocalService socialActivityLocalService) {
321 this.socialActivityLocalService = socialActivityLocalService;
322 }
323
324
329 public SocialActivityPersistence getSocialActivityPersistence() {
330 return socialActivityPersistence;
331 }
332
333
338 public void setSocialActivityPersistence(
339 SocialActivityPersistence socialActivityPersistence) {
340 this.socialActivityPersistence = socialActivityPersistence;
341 }
342
343
348 public SocialActivityFinder getSocialActivityFinder() {
349 return socialActivityFinder;
350 }
351
352
357 public void setSocialActivityFinder(
358 SocialActivityFinder socialActivityFinder) {
359 this.socialActivityFinder = socialActivityFinder;
360 }
361
362
367 public SocialActivityAchievementLocalService getSocialActivityAchievementLocalService() {
368 return socialActivityAchievementLocalService;
369 }
370
371
376 public void setSocialActivityAchievementLocalService(
377 SocialActivityAchievementLocalService socialActivityAchievementLocalService) {
378 this.socialActivityAchievementLocalService = socialActivityAchievementLocalService;
379 }
380
381
386 public SocialActivityAchievementPersistence getSocialActivityAchievementPersistence() {
387 return socialActivityAchievementPersistence;
388 }
389
390
395 public void setSocialActivityAchievementPersistence(
396 SocialActivityAchievementPersistence socialActivityAchievementPersistence) {
397 this.socialActivityAchievementPersistence = socialActivityAchievementPersistence;
398 }
399
400
405 public SocialActivityCounterLocalService getSocialActivityCounterLocalService() {
406 return socialActivityCounterLocalService;
407 }
408
409
414 public void setSocialActivityCounterLocalService(
415 SocialActivityCounterLocalService socialActivityCounterLocalService) {
416 this.socialActivityCounterLocalService = socialActivityCounterLocalService;
417 }
418
419
424 public SocialActivityCounterPersistence getSocialActivityCounterPersistence() {
425 return socialActivityCounterPersistence;
426 }
427
428
433 public void setSocialActivityCounterPersistence(
434 SocialActivityCounterPersistence socialActivityCounterPersistence) {
435 this.socialActivityCounterPersistence = socialActivityCounterPersistence;
436 }
437
438
443 public SocialActivityCounterFinder getSocialActivityCounterFinder() {
444 return socialActivityCounterFinder;
445 }
446
447
452 public void setSocialActivityCounterFinder(
453 SocialActivityCounterFinder socialActivityCounterFinder) {
454 this.socialActivityCounterFinder = socialActivityCounterFinder;
455 }
456
457
462 public SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
463 return socialActivityInterpreterLocalService;
464 }
465
466
471 public void setSocialActivityInterpreterLocalService(
472 SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
473 this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
474 }
475
476
481 public SocialActivityLimitLocalService getSocialActivityLimitLocalService() {
482 return socialActivityLimitLocalService;
483 }
484
485
490 public void setSocialActivityLimitLocalService(
491 SocialActivityLimitLocalService socialActivityLimitLocalService) {
492 this.socialActivityLimitLocalService = socialActivityLimitLocalService;
493 }
494
495
500 public SocialActivityLimitPersistence getSocialActivityLimitPersistence() {
501 return socialActivityLimitPersistence;
502 }
503
504
509 public void setSocialActivityLimitPersistence(
510 SocialActivityLimitPersistence socialActivityLimitPersistence) {
511 this.socialActivityLimitPersistence = socialActivityLimitPersistence;
512 }
513
514
519 public SocialActivitySettingLocalService getSocialActivitySettingLocalService() {
520 return socialActivitySettingLocalService;
521 }
522
523
528 public void setSocialActivitySettingLocalService(
529 SocialActivitySettingLocalService socialActivitySettingLocalService) {
530 this.socialActivitySettingLocalService = socialActivitySettingLocalService;
531 }
532
533
538 public SocialActivitySettingService getSocialActivitySettingService() {
539 return socialActivitySettingService;
540 }
541
542
547 public void setSocialActivitySettingService(
548 SocialActivitySettingService socialActivitySettingService) {
549 this.socialActivitySettingService = socialActivitySettingService;
550 }
551
552
557 public SocialActivitySettingPersistence getSocialActivitySettingPersistence() {
558 return socialActivitySettingPersistence;
559 }
560
561
566 public void setSocialActivitySettingPersistence(
567 SocialActivitySettingPersistence socialActivitySettingPersistence) {
568 this.socialActivitySettingPersistence = socialActivitySettingPersistence;
569 }
570
571
576 public SocialRelationLocalService getSocialRelationLocalService() {
577 return socialRelationLocalService;
578 }
579
580
585 public void setSocialRelationLocalService(
586 SocialRelationLocalService socialRelationLocalService) {
587 this.socialRelationLocalService = socialRelationLocalService;
588 }
589
590
595 public SocialRelationPersistence getSocialRelationPersistence() {
596 return socialRelationPersistence;
597 }
598
599
604 public void setSocialRelationPersistence(
605 SocialRelationPersistence socialRelationPersistence) {
606 this.socialRelationPersistence = socialRelationPersistence;
607 }
608
609
614 public SocialRequestLocalService getSocialRequestLocalService() {
615 return socialRequestLocalService;
616 }
617
618
623 public void setSocialRequestLocalService(
624 SocialRequestLocalService socialRequestLocalService) {
625 this.socialRequestLocalService = socialRequestLocalService;
626 }
627
628
633 public SocialRequestPersistence getSocialRequestPersistence() {
634 return socialRequestPersistence;
635 }
636
637
642 public void setSocialRequestPersistence(
643 SocialRequestPersistence socialRequestPersistence) {
644 this.socialRequestPersistence = socialRequestPersistence;
645 }
646
647
652 public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
653 return socialRequestInterpreterLocalService;
654 }
655
656
661 public void setSocialRequestInterpreterLocalService(
662 SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
663 this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
664 }
665
666
671 public CounterLocalService getCounterLocalService() {
672 return counterLocalService;
673 }
674
675
680 public void setCounterLocalService(CounterLocalService counterLocalService) {
681 this.counterLocalService = counterLocalService;
682 }
683
684
689 public GroupLocalService getGroupLocalService() {
690 return groupLocalService;
691 }
692
693
698 public void setGroupLocalService(GroupLocalService groupLocalService) {
699 this.groupLocalService = groupLocalService;
700 }
701
702
707 public GroupService getGroupService() {
708 return groupService;
709 }
710
711
716 public void setGroupService(GroupService groupService) {
717 this.groupService = groupService;
718 }
719
720
725 public GroupPersistence getGroupPersistence() {
726 return groupPersistence;
727 }
728
729
734 public void setGroupPersistence(GroupPersistence groupPersistence) {
735 this.groupPersistence = groupPersistence;
736 }
737
738
743 public GroupFinder getGroupFinder() {
744 return groupFinder;
745 }
746
747
752 public void setGroupFinder(GroupFinder groupFinder) {
753 this.groupFinder = groupFinder;
754 }
755
756
761 public ResourceLocalService getResourceLocalService() {
762 return resourceLocalService;
763 }
764
765
770 public void setResourceLocalService(
771 ResourceLocalService resourceLocalService) {
772 this.resourceLocalService = resourceLocalService;
773 }
774
775
780 public ResourceService getResourceService() {
781 return resourceService;
782 }
783
784
789 public void setResourceService(ResourceService resourceService) {
790 this.resourceService = resourceService;
791 }
792
793
798 public ResourcePersistence getResourcePersistence() {
799 return resourcePersistence;
800 }
801
802
807 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
808 this.resourcePersistence = resourcePersistence;
809 }
810
811
816 public ResourceFinder getResourceFinder() {
817 return resourceFinder;
818 }
819
820
825 public void setResourceFinder(ResourceFinder resourceFinder) {
826 this.resourceFinder = resourceFinder;
827 }
828
829
834 public UserLocalService getUserLocalService() {
835 return userLocalService;
836 }
837
838
843 public void setUserLocalService(UserLocalService userLocalService) {
844 this.userLocalService = userLocalService;
845 }
846
847
852 public UserService getUserService() {
853 return userService;
854 }
855
856
861 public void setUserService(UserService userService) {
862 this.userService = userService;
863 }
864
865
870 public UserPersistence getUserPersistence() {
871 return userPersistence;
872 }
873
874
879 public void setUserPersistence(UserPersistence userPersistence) {
880 this.userPersistence = userPersistence;
881 }
882
883
888 public UserFinder getUserFinder() {
889 return userFinder;
890 }
891
892
897 public void setUserFinder(UserFinder userFinder) {
898 this.userFinder = userFinder;
899 }
900
901 public void afterPropertiesSet() {
902 persistedModelLocalServiceRegistry.register("com.liferay.portlet.social.model.SocialActivityAchievement",
903 socialActivityAchievementLocalService);
904 }
905
906 public void destroy() {
907 persistedModelLocalServiceRegistry.unregister(
908 "com.liferay.portlet.social.model.SocialActivityAchievement");
909 }
910
911
916 public String getBeanIdentifier() {
917 return _beanIdentifier;
918 }
919
920
925 public void setBeanIdentifier(String beanIdentifier) {
926 _beanIdentifier = beanIdentifier;
927 }
928
929 protected Class<?> getModelClass() {
930 return SocialActivityAchievement.class;
931 }
932
933 protected String getModelClassName() {
934 return SocialActivityAchievement.class.getName();
935 }
936
937
942 protected void runSQL(String sql) throws SystemException {
943 try {
944 DataSource dataSource = socialActivityAchievementPersistence.getDataSource();
945
946 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
947 sql, new int[0]);
948
949 sqlUpdate.update();
950 }
951 catch (Exception e) {
952 throw new SystemException(e);
953 }
954 }
955
956 @BeanReference(type = SocialActivityLocalService.class)
957 protected SocialActivityLocalService socialActivityLocalService;
958 @BeanReference(type = SocialActivityPersistence.class)
959 protected SocialActivityPersistence socialActivityPersistence;
960 @BeanReference(type = SocialActivityFinder.class)
961 protected SocialActivityFinder socialActivityFinder;
962 @BeanReference(type = SocialActivityAchievementLocalService.class)
963 protected SocialActivityAchievementLocalService socialActivityAchievementLocalService;
964 @BeanReference(type = SocialActivityAchievementPersistence.class)
965 protected SocialActivityAchievementPersistence socialActivityAchievementPersistence;
966 @BeanReference(type = SocialActivityCounterLocalService.class)
967 protected SocialActivityCounterLocalService socialActivityCounterLocalService;
968 @BeanReference(type = SocialActivityCounterPersistence.class)
969 protected SocialActivityCounterPersistence socialActivityCounterPersistence;
970 @BeanReference(type = SocialActivityCounterFinder.class)
971 protected SocialActivityCounterFinder socialActivityCounterFinder;
972 @BeanReference(type = SocialActivityInterpreterLocalService.class)
973 protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
974 @BeanReference(type = SocialActivityLimitLocalService.class)
975 protected SocialActivityLimitLocalService socialActivityLimitLocalService;
976 @BeanReference(type = SocialActivityLimitPersistence.class)
977 protected SocialActivityLimitPersistence socialActivityLimitPersistence;
978 @BeanReference(type = SocialActivitySettingLocalService.class)
979 protected SocialActivitySettingLocalService socialActivitySettingLocalService;
980 @BeanReference(type = SocialActivitySettingService.class)
981 protected SocialActivitySettingService socialActivitySettingService;
982 @BeanReference(type = SocialActivitySettingPersistence.class)
983 protected SocialActivitySettingPersistence socialActivitySettingPersistence;
984 @BeanReference(type = SocialRelationLocalService.class)
985 protected SocialRelationLocalService socialRelationLocalService;
986 @BeanReference(type = SocialRelationPersistence.class)
987 protected SocialRelationPersistence socialRelationPersistence;
988 @BeanReference(type = SocialRequestLocalService.class)
989 protected SocialRequestLocalService socialRequestLocalService;
990 @BeanReference(type = SocialRequestPersistence.class)
991 protected SocialRequestPersistence socialRequestPersistence;
992 @BeanReference(type = SocialRequestInterpreterLocalService.class)
993 protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
994 @BeanReference(type = CounterLocalService.class)
995 protected CounterLocalService counterLocalService;
996 @BeanReference(type = GroupLocalService.class)
997 protected GroupLocalService groupLocalService;
998 @BeanReference(type = GroupService.class)
999 protected GroupService groupService;
1000 @BeanReference(type = GroupPersistence.class)
1001 protected GroupPersistence groupPersistence;
1002 @BeanReference(type = GroupFinder.class)
1003 protected GroupFinder groupFinder;
1004 @BeanReference(type = ResourceLocalService.class)
1005 protected ResourceLocalService resourceLocalService;
1006 @BeanReference(type = ResourceService.class)
1007 protected ResourceService resourceService;
1008 @BeanReference(type = ResourcePersistence.class)
1009 protected ResourcePersistence resourcePersistence;
1010 @BeanReference(type = ResourceFinder.class)
1011 protected ResourceFinder resourceFinder;
1012 @BeanReference(type = UserLocalService.class)
1013 protected UserLocalService userLocalService;
1014 @BeanReference(type = UserService.class)
1015 protected UserService userService;
1016 @BeanReference(type = UserPersistence.class)
1017 protected UserPersistence userPersistence;
1018 @BeanReference(type = UserFinder.class)
1019 protected UserFinder userFinder;
1020 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1021 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1022 private String _beanIdentifier;
1023 }