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.ResourceLocalService;
027 import com.liferay.portal.service.ResourceService;
028 import com.liferay.portal.service.UserLocalService;
029 import com.liferay.portal.service.UserService;
030 import com.liferay.portal.service.persistence.ResourceFinder;
031 import com.liferay.portal.service.persistence.ResourcePersistence;
032 import com.liferay.portal.service.persistence.UserFinder;
033 import com.liferay.portal.service.persistence.UserPersistence;
034
035 import com.liferay.portlet.social.model.SocialRelation;
036 import com.liferay.portlet.social.service.SocialActivityInterpreterLocalService;
037 import com.liferay.portlet.social.service.SocialActivityLocalService;
038 import com.liferay.portlet.social.service.SocialEquityHistoryLocalService;
039 import com.liferay.portlet.social.service.SocialEquityLogLocalService;
040 import com.liferay.portlet.social.service.SocialEquitySettingLocalService;
041 import com.liferay.portlet.social.service.SocialEquityUserLocalService;
042 import com.liferay.portlet.social.service.SocialRelationLocalService;
043 import com.liferay.portlet.social.service.SocialRequestInterpreterLocalService;
044 import com.liferay.portlet.social.service.SocialRequestLocalService;
045 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
046 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
047 import com.liferay.portlet.social.service.persistence.SocialEquityAssetEntryPersistence;
048 import com.liferay.portlet.social.service.persistence.SocialEquityHistoryPersistence;
049 import com.liferay.portlet.social.service.persistence.SocialEquityLogPersistence;
050 import com.liferay.portlet.social.service.persistence.SocialEquitySettingPersistence;
051 import com.liferay.portlet.social.service.persistence.SocialEquityUserPersistence;
052 import com.liferay.portlet.social.service.persistence.SocialRelationPersistence;
053 import com.liferay.portlet.social.service.persistence.SocialRequestPersistence;
054
055 import java.util.List;
056
057 import javax.sql.DataSource;
058
059
075 public abstract class SocialRelationLocalServiceBaseImpl
076 implements SocialRelationLocalService {
077
084 public SocialRelation addSocialRelation(SocialRelation socialRelation)
085 throws SystemException {
086 socialRelation.setNew(true);
087
088 return socialRelationPersistence.update(socialRelation, false);
089 }
090
091
097 public SocialRelation createSocialRelation(long relationId) {
098 return socialRelationPersistence.create(relationId);
099 }
100
101
108 public void deleteSocialRelation(long relationId)
109 throws PortalException, SystemException {
110 socialRelationPersistence.remove(relationId);
111 }
112
113
119 public void deleteSocialRelation(SocialRelation socialRelation)
120 throws SystemException {
121 socialRelationPersistence.remove(socialRelation);
122 }
123
124
131 @SuppressWarnings("rawtypes")
132 public List dynamicQuery(DynamicQuery dynamicQuery)
133 throws SystemException {
134 return socialRelationPersistence.findWithDynamicQuery(dynamicQuery);
135 }
136
137
150 @SuppressWarnings("rawtypes")
151 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
152 throws SystemException {
153 return socialRelationPersistence.findWithDynamicQuery(dynamicQuery,
154 start, end);
155 }
156
157
171 @SuppressWarnings("rawtypes")
172 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
173 OrderByComparator orderByComparator) throws SystemException {
174 return socialRelationPersistence.findWithDynamicQuery(dynamicQuery,
175 start, end, orderByComparator);
176 }
177
178
185 public long dynamicQueryCount(DynamicQuery dynamicQuery)
186 throws SystemException {
187 return socialRelationPersistence.countWithDynamicQuery(dynamicQuery);
188 }
189
190
198 public SocialRelation getSocialRelation(long relationId)
199 throws PortalException, SystemException {
200 return socialRelationPersistence.findByPrimaryKey(relationId);
201 }
202
203
215 public List<SocialRelation> getSocialRelations(int start, int end)
216 throws SystemException {
217 return socialRelationPersistence.findAll(start, end);
218 }
219
220
226 public int getSocialRelationsCount() throws SystemException {
227 return socialRelationPersistence.countAll();
228 }
229
230
237 public SocialRelation updateSocialRelation(SocialRelation socialRelation)
238 throws SystemException {
239 socialRelation.setNew(false);
240
241 return socialRelationPersistence.update(socialRelation, true);
242 }
243
244
252 public SocialRelation updateSocialRelation(SocialRelation socialRelation,
253 boolean merge) throws SystemException {
254 socialRelation.setNew(false);
255
256 return socialRelationPersistence.update(socialRelation, merge);
257 }
258
259
264 public SocialActivityLocalService getSocialActivityLocalService() {
265 return socialActivityLocalService;
266 }
267
268
273 public void setSocialActivityLocalService(
274 SocialActivityLocalService socialActivityLocalService) {
275 this.socialActivityLocalService = socialActivityLocalService;
276 }
277
278
283 public SocialActivityPersistence getSocialActivityPersistence() {
284 return socialActivityPersistence;
285 }
286
287
292 public void setSocialActivityPersistence(
293 SocialActivityPersistence socialActivityPersistence) {
294 this.socialActivityPersistence = socialActivityPersistence;
295 }
296
297
302 public SocialActivityFinder getSocialActivityFinder() {
303 return socialActivityFinder;
304 }
305
306
311 public void setSocialActivityFinder(
312 SocialActivityFinder socialActivityFinder) {
313 this.socialActivityFinder = socialActivityFinder;
314 }
315
316
321 public SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
322 return socialActivityInterpreterLocalService;
323 }
324
325
330 public void setSocialActivityInterpreterLocalService(
331 SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
332 this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
333 }
334
335
340 public SocialEquityAssetEntryPersistence getSocialEquityAssetEntryPersistence() {
341 return socialEquityAssetEntryPersistence;
342 }
343
344
349 public void setSocialEquityAssetEntryPersistence(
350 SocialEquityAssetEntryPersistence socialEquityAssetEntryPersistence) {
351 this.socialEquityAssetEntryPersistence = socialEquityAssetEntryPersistence;
352 }
353
354
359 public SocialEquityHistoryLocalService getSocialEquityHistoryLocalService() {
360 return socialEquityHistoryLocalService;
361 }
362
363
368 public void setSocialEquityHistoryLocalService(
369 SocialEquityHistoryLocalService socialEquityHistoryLocalService) {
370 this.socialEquityHistoryLocalService = socialEquityHistoryLocalService;
371 }
372
373
378 public SocialEquityHistoryPersistence getSocialEquityHistoryPersistence() {
379 return socialEquityHistoryPersistence;
380 }
381
382
387 public void setSocialEquityHistoryPersistence(
388 SocialEquityHistoryPersistence socialEquityHistoryPersistence) {
389 this.socialEquityHistoryPersistence = socialEquityHistoryPersistence;
390 }
391
392
397 public SocialEquityLogLocalService getSocialEquityLogLocalService() {
398 return socialEquityLogLocalService;
399 }
400
401
406 public void setSocialEquityLogLocalService(
407 SocialEquityLogLocalService socialEquityLogLocalService) {
408 this.socialEquityLogLocalService = socialEquityLogLocalService;
409 }
410
411
416 public SocialEquityLogPersistence getSocialEquityLogPersistence() {
417 return socialEquityLogPersistence;
418 }
419
420
425 public void setSocialEquityLogPersistence(
426 SocialEquityLogPersistence socialEquityLogPersistence) {
427 this.socialEquityLogPersistence = socialEquityLogPersistence;
428 }
429
430
435 public SocialEquitySettingLocalService getSocialEquitySettingLocalService() {
436 return socialEquitySettingLocalService;
437 }
438
439
444 public void setSocialEquitySettingLocalService(
445 SocialEquitySettingLocalService socialEquitySettingLocalService) {
446 this.socialEquitySettingLocalService = socialEquitySettingLocalService;
447 }
448
449
454 public SocialEquitySettingPersistence getSocialEquitySettingPersistence() {
455 return socialEquitySettingPersistence;
456 }
457
458
463 public void setSocialEquitySettingPersistence(
464 SocialEquitySettingPersistence socialEquitySettingPersistence) {
465 this.socialEquitySettingPersistence = socialEquitySettingPersistence;
466 }
467
468
473 public SocialEquityUserLocalService getSocialEquityUserLocalService() {
474 return socialEquityUserLocalService;
475 }
476
477
482 public void setSocialEquityUserLocalService(
483 SocialEquityUserLocalService socialEquityUserLocalService) {
484 this.socialEquityUserLocalService = socialEquityUserLocalService;
485 }
486
487
492 public SocialEquityUserPersistence getSocialEquityUserPersistence() {
493 return socialEquityUserPersistence;
494 }
495
496
501 public void setSocialEquityUserPersistence(
502 SocialEquityUserPersistence socialEquityUserPersistence) {
503 this.socialEquityUserPersistence = socialEquityUserPersistence;
504 }
505
506
511 public SocialRelationLocalService getSocialRelationLocalService() {
512 return socialRelationLocalService;
513 }
514
515
520 public void setSocialRelationLocalService(
521 SocialRelationLocalService socialRelationLocalService) {
522 this.socialRelationLocalService = socialRelationLocalService;
523 }
524
525
530 public SocialRelationPersistence getSocialRelationPersistence() {
531 return socialRelationPersistence;
532 }
533
534
539 public void setSocialRelationPersistence(
540 SocialRelationPersistence socialRelationPersistence) {
541 this.socialRelationPersistence = socialRelationPersistence;
542 }
543
544
549 public SocialRequestLocalService getSocialRequestLocalService() {
550 return socialRequestLocalService;
551 }
552
553
558 public void setSocialRequestLocalService(
559 SocialRequestLocalService socialRequestLocalService) {
560 this.socialRequestLocalService = socialRequestLocalService;
561 }
562
563
568 public SocialRequestPersistence getSocialRequestPersistence() {
569 return socialRequestPersistence;
570 }
571
572
577 public void setSocialRequestPersistence(
578 SocialRequestPersistence socialRequestPersistence) {
579 this.socialRequestPersistence = socialRequestPersistence;
580 }
581
582
587 public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
588 return socialRequestInterpreterLocalService;
589 }
590
591
596 public void setSocialRequestInterpreterLocalService(
597 SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
598 this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
599 }
600
601
606 public CounterLocalService getCounterLocalService() {
607 return counterLocalService;
608 }
609
610
615 public void setCounterLocalService(CounterLocalService counterLocalService) {
616 this.counterLocalService = counterLocalService;
617 }
618
619
624 public ResourceLocalService getResourceLocalService() {
625 return resourceLocalService;
626 }
627
628
633 public void setResourceLocalService(
634 ResourceLocalService resourceLocalService) {
635 this.resourceLocalService = resourceLocalService;
636 }
637
638
643 public ResourceService getResourceService() {
644 return resourceService;
645 }
646
647
652 public void setResourceService(ResourceService resourceService) {
653 this.resourceService = resourceService;
654 }
655
656
661 public ResourcePersistence getResourcePersistence() {
662 return resourcePersistence;
663 }
664
665
670 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
671 this.resourcePersistence = resourcePersistence;
672 }
673
674
679 public ResourceFinder getResourceFinder() {
680 return resourceFinder;
681 }
682
683
688 public void setResourceFinder(ResourceFinder resourceFinder) {
689 this.resourceFinder = resourceFinder;
690 }
691
692
697 public UserLocalService getUserLocalService() {
698 return userLocalService;
699 }
700
701
706 public void setUserLocalService(UserLocalService userLocalService) {
707 this.userLocalService = userLocalService;
708 }
709
710
715 public UserService getUserService() {
716 return userService;
717 }
718
719
724 public void setUserService(UserService userService) {
725 this.userService = userService;
726 }
727
728
733 public UserPersistence getUserPersistence() {
734 return userPersistence;
735 }
736
737
742 public void setUserPersistence(UserPersistence userPersistence) {
743 this.userPersistence = userPersistence;
744 }
745
746
751 public UserFinder getUserFinder() {
752 return userFinder;
753 }
754
755
760 public void setUserFinder(UserFinder userFinder) {
761 this.userFinder = userFinder;
762 }
763
764
769 protected void runSQL(String sql) throws SystemException {
770 try {
771 DataSource dataSource = socialRelationPersistence.getDataSource();
772
773 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
774 sql, new int[0]);
775
776 sqlUpdate.update();
777 }
778 catch (Exception e) {
779 throw new SystemException(e);
780 }
781 }
782
783 @BeanReference(type = SocialActivityLocalService.class)
784 protected SocialActivityLocalService socialActivityLocalService;
785 @BeanReference(type = SocialActivityPersistence.class)
786 protected SocialActivityPersistence socialActivityPersistence;
787 @BeanReference(type = SocialActivityFinder.class)
788 protected SocialActivityFinder socialActivityFinder;
789 @BeanReference(type = SocialActivityInterpreterLocalService.class)
790 protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
791 @BeanReference(type = SocialEquityAssetEntryPersistence.class)
792 protected SocialEquityAssetEntryPersistence socialEquityAssetEntryPersistence;
793 @BeanReference(type = SocialEquityHistoryLocalService.class)
794 protected SocialEquityHistoryLocalService socialEquityHistoryLocalService;
795 @BeanReference(type = SocialEquityHistoryPersistence.class)
796 protected SocialEquityHistoryPersistence socialEquityHistoryPersistence;
797 @BeanReference(type = SocialEquityLogLocalService.class)
798 protected SocialEquityLogLocalService socialEquityLogLocalService;
799 @BeanReference(type = SocialEquityLogPersistence.class)
800 protected SocialEquityLogPersistence socialEquityLogPersistence;
801 @BeanReference(type = SocialEquitySettingLocalService.class)
802 protected SocialEquitySettingLocalService socialEquitySettingLocalService;
803 @BeanReference(type = SocialEquitySettingPersistence.class)
804 protected SocialEquitySettingPersistence socialEquitySettingPersistence;
805 @BeanReference(type = SocialEquityUserLocalService.class)
806 protected SocialEquityUserLocalService socialEquityUserLocalService;
807 @BeanReference(type = SocialEquityUserPersistence.class)
808 protected SocialEquityUserPersistence socialEquityUserPersistence;
809 @BeanReference(type = SocialRelationLocalService.class)
810 protected SocialRelationLocalService socialRelationLocalService;
811 @BeanReference(type = SocialRelationPersistence.class)
812 protected SocialRelationPersistence socialRelationPersistence;
813 @BeanReference(type = SocialRequestLocalService.class)
814 protected SocialRequestLocalService socialRequestLocalService;
815 @BeanReference(type = SocialRequestPersistence.class)
816 protected SocialRequestPersistence socialRequestPersistence;
817 @BeanReference(type = SocialRequestInterpreterLocalService.class)
818 protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
819 @BeanReference(type = CounterLocalService.class)
820 protected CounterLocalService counterLocalService;
821 @BeanReference(type = ResourceLocalService.class)
822 protected ResourceLocalService resourceLocalService;
823 @BeanReference(type = ResourceService.class)
824 protected ResourceService resourceService;
825 @BeanReference(type = ResourcePersistence.class)
826 protected ResourcePersistence resourcePersistence;
827 @BeanReference(type = ResourceFinder.class)
828 protected ResourceFinder resourceFinder;
829 @BeanReference(type = UserLocalService.class)
830 protected UserLocalService userLocalService;
831 @BeanReference(type = UserService.class)
832 protected UserService userService;
833 @BeanReference(type = UserPersistence.class)
834 protected UserPersistence userPersistence;
835 @BeanReference(type = UserFinder.class)
836 protected UserFinder userFinder;
837 }