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.PersistedModelLocalServiceRegistry;
033 import com.liferay.portal.service.ResourceLocalService;
034 import com.liferay.portal.service.ResourceService;
035 import com.liferay.portal.service.UserLocalService;
036 import com.liferay.portal.service.UserService;
037 import com.liferay.portal.service.persistence.ResourceFinder;
038 import com.liferay.portal.service.persistence.ResourcePersistence;
039 import com.liferay.portal.service.persistence.UserFinder;
040 import com.liferay.portal.service.persistence.UserPersistence;
041
042 import com.liferay.portlet.social.model.SocialRequest;
043 import com.liferay.portlet.social.service.SocialActivityAchievementLocalService;
044 import com.liferay.portlet.social.service.SocialActivityCounterLocalService;
045 import com.liferay.portlet.social.service.SocialActivityInterpreterLocalService;
046 import com.liferay.portlet.social.service.SocialActivityLimitLocalService;
047 import com.liferay.portlet.social.service.SocialActivityLocalService;
048 import com.liferay.portlet.social.service.SocialActivitySettingLocalService;
049 import com.liferay.portlet.social.service.SocialActivitySettingService;
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.SocialActivityAchievementPersistence;
054 import com.liferay.portlet.social.service.persistence.SocialActivityCounterFinder;
055 import com.liferay.portlet.social.service.persistence.SocialActivityCounterPersistence;
056 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
057 import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence;
058 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
059 import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence;
060 import com.liferay.portlet.social.service.persistence.SocialRelationPersistence;
061 import com.liferay.portlet.social.service.persistence.SocialRequestPersistence;
062
063 import java.io.Serializable;
064
065 import java.util.List;
066
067 import javax.sql.DataSource;
068
069
081 public abstract class SocialRequestLocalServiceBaseImpl
082 extends BaseLocalServiceImpl implements SocialRequestLocalService,
083 IdentifiableBean {
084
089
090
097 @Indexable(type = IndexableType.REINDEX)
098 public SocialRequest addSocialRequest(SocialRequest socialRequest)
099 throws SystemException {
100 socialRequest.setNew(true);
101
102 return socialRequestPersistence.update(socialRequest, false);
103 }
104
105
111 public SocialRequest createSocialRequest(long requestId) {
112 return socialRequestPersistence.create(requestId);
113 }
114
115
123 @Indexable(type = IndexableType.DELETE)
124 public SocialRequest deleteSocialRequest(long requestId)
125 throws PortalException, SystemException {
126 return socialRequestPersistence.remove(requestId);
127 }
128
129
136 @Indexable(type = IndexableType.DELETE)
137 public SocialRequest deleteSocialRequest(SocialRequest socialRequest)
138 throws SystemException {
139 return socialRequestPersistence.remove(socialRequest);
140 }
141
142 public DynamicQuery dynamicQuery() {
143 Class<?> clazz = getClass();
144
145 return DynamicQueryFactoryUtil.forClass(SocialRequest.class,
146 clazz.getClassLoader());
147 }
148
149
156 @SuppressWarnings("rawtypes")
157 public List dynamicQuery(DynamicQuery dynamicQuery)
158 throws SystemException {
159 return socialRequestPersistence.findWithDynamicQuery(dynamicQuery);
160 }
161
162
175 @SuppressWarnings("rawtypes")
176 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
177 throws SystemException {
178 return socialRequestPersistence.findWithDynamicQuery(dynamicQuery,
179 start, end);
180 }
181
182
196 @SuppressWarnings("rawtypes")
197 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
198 OrderByComparator orderByComparator) throws SystemException {
199 return socialRequestPersistence.findWithDynamicQuery(dynamicQuery,
200 start, end, orderByComparator);
201 }
202
203
210 public long dynamicQueryCount(DynamicQuery dynamicQuery)
211 throws SystemException {
212 return socialRequestPersistence.countWithDynamicQuery(dynamicQuery);
213 }
214
215 public SocialRequest fetchSocialRequest(long requestId)
216 throws SystemException {
217 return socialRequestPersistence.fetchByPrimaryKey(requestId);
218 }
219
220
228 public SocialRequest getSocialRequest(long requestId)
229 throws PortalException, SystemException {
230 return socialRequestPersistence.findByPrimaryKey(requestId);
231 }
232
233 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
234 throws PortalException, SystemException {
235 return socialRequestPersistence.findByPrimaryKey(primaryKeyObj);
236 }
237
238
247 public SocialRequest getSocialRequestByUuidAndGroupId(String uuid,
248 long groupId) throws PortalException, SystemException {
249 return socialRequestPersistence.findByUUID_G(uuid, groupId);
250 }
251
252
264 public List<SocialRequest> getSocialRequests(int start, int end)
265 throws SystemException {
266 return socialRequestPersistence.findAll(start, end);
267 }
268
269
275 public int getSocialRequestsCount() throws SystemException {
276 return socialRequestPersistence.countAll();
277 }
278
279
286 @Indexable(type = IndexableType.REINDEX)
287 public SocialRequest updateSocialRequest(SocialRequest socialRequest)
288 throws SystemException {
289 return updateSocialRequest(socialRequest, true);
290 }
291
292
300 @Indexable(type = IndexableType.REINDEX)
301 public SocialRequest updateSocialRequest(SocialRequest socialRequest,
302 boolean merge) throws SystemException {
303 socialRequest.setNew(false);
304
305 return socialRequestPersistence.update(socialRequest, merge);
306 }
307
308
313 public SocialActivityLocalService getSocialActivityLocalService() {
314 return socialActivityLocalService;
315 }
316
317
322 public void setSocialActivityLocalService(
323 SocialActivityLocalService socialActivityLocalService) {
324 this.socialActivityLocalService = socialActivityLocalService;
325 }
326
327
332 public SocialActivityPersistence getSocialActivityPersistence() {
333 return socialActivityPersistence;
334 }
335
336
341 public void setSocialActivityPersistence(
342 SocialActivityPersistence socialActivityPersistence) {
343 this.socialActivityPersistence = socialActivityPersistence;
344 }
345
346
351 public SocialActivityFinder getSocialActivityFinder() {
352 return socialActivityFinder;
353 }
354
355
360 public void setSocialActivityFinder(
361 SocialActivityFinder socialActivityFinder) {
362 this.socialActivityFinder = socialActivityFinder;
363 }
364
365
370 public SocialActivityAchievementLocalService getSocialActivityAchievementLocalService() {
371 return socialActivityAchievementLocalService;
372 }
373
374
379 public void setSocialActivityAchievementLocalService(
380 SocialActivityAchievementLocalService socialActivityAchievementLocalService) {
381 this.socialActivityAchievementLocalService = socialActivityAchievementLocalService;
382 }
383
384
389 public SocialActivityAchievementPersistence getSocialActivityAchievementPersistence() {
390 return socialActivityAchievementPersistence;
391 }
392
393
398 public void setSocialActivityAchievementPersistence(
399 SocialActivityAchievementPersistence socialActivityAchievementPersistence) {
400 this.socialActivityAchievementPersistence = socialActivityAchievementPersistence;
401 }
402
403
408 public SocialActivityCounterLocalService getSocialActivityCounterLocalService() {
409 return socialActivityCounterLocalService;
410 }
411
412
417 public void setSocialActivityCounterLocalService(
418 SocialActivityCounterLocalService socialActivityCounterLocalService) {
419 this.socialActivityCounterLocalService = socialActivityCounterLocalService;
420 }
421
422
427 public SocialActivityCounterPersistence getSocialActivityCounterPersistence() {
428 return socialActivityCounterPersistence;
429 }
430
431
436 public void setSocialActivityCounterPersistence(
437 SocialActivityCounterPersistence socialActivityCounterPersistence) {
438 this.socialActivityCounterPersistence = socialActivityCounterPersistence;
439 }
440
441
446 public SocialActivityCounterFinder getSocialActivityCounterFinder() {
447 return socialActivityCounterFinder;
448 }
449
450
455 public void setSocialActivityCounterFinder(
456 SocialActivityCounterFinder socialActivityCounterFinder) {
457 this.socialActivityCounterFinder = socialActivityCounterFinder;
458 }
459
460
465 public SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
466 return socialActivityInterpreterLocalService;
467 }
468
469
474 public void setSocialActivityInterpreterLocalService(
475 SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
476 this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
477 }
478
479
484 public SocialActivityLimitLocalService getSocialActivityLimitLocalService() {
485 return socialActivityLimitLocalService;
486 }
487
488
493 public void setSocialActivityLimitLocalService(
494 SocialActivityLimitLocalService socialActivityLimitLocalService) {
495 this.socialActivityLimitLocalService = socialActivityLimitLocalService;
496 }
497
498
503 public SocialActivityLimitPersistence getSocialActivityLimitPersistence() {
504 return socialActivityLimitPersistence;
505 }
506
507
512 public void setSocialActivityLimitPersistence(
513 SocialActivityLimitPersistence socialActivityLimitPersistence) {
514 this.socialActivityLimitPersistence = socialActivityLimitPersistence;
515 }
516
517
522 public SocialActivitySettingLocalService getSocialActivitySettingLocalService() {
523 return socialActivitySettingLocalService;
524 }
525
526
531 public void setSocialActivitySettingLocalService(
532 SocialActivitySettingLocalService socialActivitySettingLocalService) {
533 this.socialActivitySettingLocalService = socialActivitySettingLocalService;
534 }
535
536
541 public SocialActivitySettingService getSocialActivitySettingService() {
542 return socialActivitySettingService;
543 }
544
545
550 public void setSocialActivitySettingService(
551 SocialActivitySettingService socialActivitySettingService) {
552 this.socialActivitySettingService = socialActivitySettingService;
553 }
554
555
560 public SocialActivitySettingPersistence getSocialActivitySettingPersistence() {
561 return socialActivitySettingPersistence;
562 }
563
564
569 public void setSocialActivitySettingPersistence(
570 SocialActivitySettingPersistence socialActivitySettingPersistence) {
571 this.socialActivitySettingPersistence = socialActivitySettingPersistence;
572 }
573
574
579 public SocialRelationLocalService getSocialRelationLocalService() {
580 return socialRelationLocalService;
581 }
582
583
588 public void setSocialRelationLocalService(
589 SocialRelationLocalService socialRelationLocalService) {
590 this.socialRelationLocalService = socialRelationLocalService;
591 }
592
593
598 public SocialRelationPersistence getSocialRelationPersistence() {
599 return socialRelationPersistence;
600 }
601
602
607 public void setSocialRelationPersistence(
608 SocialRelationPersistence socialRelationPersistence) {
609 this.socialRelationPersistence = socialRelationPersistence;
610 }
611
612
617 public SocialRequestLocalService getSocialRequestLocalService() {
618 return socialRequestLocalService;
619 }
620
621
626 public void setSocialRequestLocalService(
627 SocialRequestLocalService socialRequestLocalService) {
628 this.socialRequestLocalService = socialRequestLocalService;
629 }
630
631
636 public SocialRequestPersistence getSocialRequestPersistence() {
637 return socialRequestPersistence;
638 }
639
640
645 public void setSocialRequestPersistence(
646 SocialRequestPersistence socialRequestPersistence) {
647 this.socialRequestPersistence = socialRequestPersistence;
648 }
649
650
655 public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
656 return socialRequestInterpreterLocalService;
657 }
658
659
664 public void setSocialRequestInterpreterLocalService(
665 SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
666 this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
667 }
668
669
674 public CounterLocalService getCounterLocalService() {
675 return counterLocalService;
676 }
677
678
683 public void setCounterLocalService(CounterLocalService counterLocalService) {
684 this.counterLocalService = counterLocalService;
685 }
686
687
692 public ResourceLocalService getResourceLocalService() {
693 return resourceLocalService;
694 }
695
696
701 public void setResourceLocalService(
702 ResourceLocalService resourceLocalService) {
703 this.resourceLocalService = resourceLocalService;
704 }
705
706
711 public ResourceService getResourceService() {
712 return resourceService;
713 }
714
715
720 public void setResourceService(ResourceService resourceService) {
721 this.resourceService = resourceService;
722 }
723
724
729 public ResourcePersistence getResourcePersistence() {
730 return resourcePersistence;
731 }
732
733
738 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
739 this.resourcePersistence = resourcePersistence;
740 }
741
742
747 public ResourceFinder getResourceFinder() {
748 return resourceFinder;
749 }
750
751
756 public void setResourceFinder(ResourceFinder resourceFinder) {
757 this.resourceFinder = resourceFinder;
758 }
759
760
765 public UserLocalService getUserLocalService() {
766 return userLocalService;
767 }
768
769
774 public void setUserLocalService(UserLocalService userLocalService) {
775 this.userLocalService = userLocalService;
776 }
777
778
783 public UserService getUserService() {
784 return userService;
785 }
786
787
792 public void setUserService(UserService userService) {
793 this.userService = userService;
794 }
795
796
801 public UserPersistence getUserPersistence() {
802 return userPersistence;
803 }
804
805
810 public void setUserPersistence(UserPersistence userPersistence) {
811 this.userPersistence = userPersistence;
812 }
813
814
819 public UserFinder getUserFinder() {
820 return userFinder;
821 }
822
823
828 public void setUserFinder(UserFinder userFinder) {
829 this.userFinder = userFinder;
830 }
831
832 public void afterPropertiesSet() {
833 persistedModelLocalServiceRegistry.register("com.liferay.portlet.social.model.SocialRequest",
834 socialRequestLocalService);
835 }
836
837 public void destroy() {
838 persistedModelLocalServiceRegistry.unregister(
839 "com.liferay.portlet.social.model.SocialRequest");
840 }
841
842
847 public String getBeanIdentifier() {
848 return _beanIdentifier;
849 }
850
851
856 public void setBeanIdentifier(String beanIdentifier) {
857 _beanIdentifier = beanIdentifier;
858 }
859
860 protected Class<?> getModelClass() {
861 return SocialRequest.class;
862 }
863
864 protected String getModelClassName() {
865 return SocialRequest.class.getName();
866 }
867
868
873 protected void runSQL(String sql) throws SystemException {
874 try {
875 DataSource dataSource = socialRequestPersistence.getDataSource();
876
877 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
878 sql, new int[0]);
879
880 sqlUpdate.update();
881 }
882 catch (Exception e) {
883 throw new SystemException(e);
884 }
885 }
886
887 @BeanReference(type = SocialActivityLocalService.class)
888 protected SocialActivityLocalService socialActivityLocalService;
889 @BeanReference(type = SocialActivityPersistence.class)
890 protected SocialActivityPersistence socialActivityPersistence;
891 @BeanReference(type = SocialActivityFinder.class)
892 protected SocialActivityFinder socialActivityFinder;
893 @BeanReference(type = SocialActivityAchievementLocalService.class)
894 protected SocialActivityAchievementLocalService socialActivityAchievementLocalService;
895 @BeanReference(type = SocialActivityAchievementPersistence.class)
896 protected SocialActivityAchievementPersistence socialActivityAchievementPersistence;
897 @BeanReference(type = SocialActivityCounterLocalService.class)
898 protected SocialActivityCounterLocalService socialActivityCounterLocalService;
899 @BeanReference(type = SocialActivityCounterPersistence.class)
900 protected SocialActivityCounterPersistence socialActivityCounterPersistence;
901 @BeanReference(type = SocialActivityCounterFinder.class)
902 protected SocialActivityCounterFinder socialActivityCounterFinder;
903 @BeanReference(type = SocialActivityInterpreterLocalService.class)
904 protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
905 @BeanReference(type = SocialActivityLimitLocalService.class)
906 protected SocialActivityLimitLocalService socialActivityLimitLocalService;
907 @BeanReference(type = SocialActivityLimitPersistence.class)
908 protected SocialActivityLimitPersistence socialActivityLimitPersistence;
909 @BeanReference(type = SocialActivitySettingLocalService.class)
910 protected SocialActivitySettingLocalService socialActivitySettingLocalService;
911 @BeanReference(type = SocialActivitySettingService.class)
912 protected SocialActivitySettingService socialActivitySettingService;
913 @BeanReference(type = SocialActivitySettingPersistence.class)
914 protected SocialActivitySettingPersistence socialActivitySettingPersistence;
915 @BeanReference(type = SocialRelationLocalService.class)
916 protected SocialRelationLocalService socialRelationLocalService;
917 @BeanReference(type = SocialRelationPersistence.class)
918 protected SocialRelationPersistence socialRelationPersistence;
919 @BeanReference(type = SocialRequestLocalService.class)
920 protected SocialRequestLocalService socialRequestLocalService;
921 @BeanReference(type = SocialRequestPersistence.class)
922 protected SocialRequestPersistence socialRequestPersistence;
923 @BeanReference(type = SocialRequestInterpreterLocalService.class)
924 protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
925 @BeanReference(type = CounterLocalService.class)
926 protected CounterLocalService counterLocalService;
927 @BeanReference(type = ResourceLocalService.class)
928 protected ResourceLocalService resourceLocalService;
929 @BeanReference(type = ResourceService.class)
930 protected ResourceService resourceService;
931 @BeanReference(type = ResourcePersistence.class)
932 protected ResourcePersistence resourcePersistence;
933 @BeanReference(type = ResourceFinder.class)
934 protected ResourceFinder resourceFinder;
935 @BeanReference(type = UserLocalService.class)
936 protected UserLocalService userLocalService;
937 @BeanReference(type = UserService.class)
938 protected UserService userService;
939 @BeanReference(type = UserPersistence.class)
940 protected UserPersistence userPersistence;
941 @BeanReference(type = UserFinder.class)
942 protected UserFinder userFinder;
943 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
944 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
945 private String _beanIdentifier;
946 }