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.SocialRequest;
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 SocialRequestLocalServiceBaseImpl
076 implements SocialRequestLocalService {
077
084 public SocialRequest addSocialRequest(SocialRequest socialRequest)
085 throws SystemException {
086 socialRequest.setNew(true);
087
088 return socialRequestPersistence.update(socialRequest, false);
089 }
090
091
097 public SocialRequest createSocialRequest(long requestId) {
098 return socialRequestPersistence.create(requestId);
099 }
100
101
108 public void deleteSocialRequest(long requestId)
109 throws PortalException, SystemException {
110 socialRequestPersistence.remove(requestId);
111 }
112
113
119 public void deleteSocialRequest(SocialRequest socialRequest)
120 throws SystemException {
121 socialRequestPersistence.remove(socialRequest);
122 }
123
124
131 @SuppressWarnings("rawtypes")
132 public List dynamicQuery(DynamicQuery dynamicQuery)
133 throws SystemException {
134 return socialRequestPersistence.findWithDynamicQuery(dynamicQuery);
135 }
136
137
150 @SuppressWarnings("rawtypes")
151 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
152 throws SystemException {
153 return socialRequestPersistence.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 socialRequestPersistence.findWithDynamicQuery(dynamicQuery,
175 start, end, orderByComparator);
176 }
177
178
185 public long dynamicQueryCount(DynamicQuery dynamicQuery)
186 throws SystemException {
187 return socialRequestPersistence.countWithDynamicQuery(dynamicQuery);
188 }
189
190
198 public SocialRequest getSocialRequest(long requestId)
199 throws PortalException, SystemException {
200 return socialRequestPersistence.findByPrimaryKey(requestId);
201 }
202
203
212 public SocialRequest getSocialRequestByUuidAndGroupId(String uuid,
213 long groupId) throws PortalException, SystemException {
214 return socialRequestPersistence.findByUUID_G(uuid, groupId);
215 }
216
217
229 public List<SocialRequest> getSocialRequests(int start, int end)
230 throws SystemException {
231 return socialRequestPersistence.findAll(start, end);
232 }
233
234
240 public int getSocialRequestsCount() throws SystemException {
241 return socialRequestPersistence.countAll();
242 }
243
244
251 public SocialRequest updateSocialRequest(SocialRequest socialRequest)
252 throws SystemException {
253 socialRequest.setNew(false);
254
255 return socialRequestPersistence.update(socialRequest, true);
256 }
257
258
266 public SocialRequest updateSocialRequest(SocialRequest socialRequest,
267 boolean merge) throws SystemException {
268 socialRequest.setNew(false);
269
270 return socialRequestPersistence.update(socialRequest, merge);
271 }
272
273
278 public SocialActivityLocalService getSocialActivityLocalService() {
279 return socialActivityLocalService;
280 }
281
282
287 public void setSocialActivityLocalService(
288 SocialActivityLocalService socialActivityLocalService) {
289 this.socialActivityLocalService = socialActivityLocalService;
290 }
291
292
297 public SocialActivityPersistence getSocialActivityPersistence() {
298 return socialActivityPersistence;
299 }
300
301
306 public void setSocialActivityPersistence(
307 SocialActivityPersistence socialActivityPersistence) {
308 this.socialActivityPersistence = socialActivityPersistence;
309 }
310
311
316 public SocialActivityFinder getSocialActivityFinder() {
317 return socialActivityFinder;
318 }
319
320
325 public void setSocialActivityFinder(
326 SocialActivityFinder socialActivityFinder) {
327 this.socialActivityFinder = socialActivityFinder;
328 }
329
330
335 public SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
336 return socialActivityInterpreterLocalService;
337 }
338
339
344 public void setSocialActivityInterpreterLocalService(
345 SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
346 this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
347 }
348
349
354 public SocialEquityAssetEntryPersistence getSocialEquityAssetEntryPersistence() {
355 return socialEquityAssetEntryPersistence;
356 }
357
358
363 public void setSocialEquityAssetEntryPersistence(
364 SocialEquityAssetEntryPersistence socialEquityAssetEntryPersistence) {
365 this.socialEquityAssetEntryPersistence = socialEquityAssetEntryPersistence;
366 }
367
368
373 public SocialEquityHistoryLocalService getSocialEquityHistoryLocalService() {
374 return socialEquityHistoryLocalService;
375 }
376
377
382 public void setSocialEquityHistoryLocalService(
383 SocialEquityHistoryLocalService socialEquityHistoryLocalService) {
384 this.socialEquityHistoryLocalService = socialEquityHistoryLocalService;
385 }
386
387
392 public SocialEquityHistoryPersistence getSocialEquityHistoryPersistence() {
393 return socialEquityHistoryPersistence;
394 }
395
396
401 public void setSocialEquityHistoryPersistence(
402 SocialEquityHistoryPersistence socialEquityHistoryPersistence) {
403 this.socialEquityHistoryPersistence = socialEquityHistoryPersistence;
404 }
405
406
411 public SocialEquityLogLocalService getSocialEquityLogLocalService() {
412 return socialEquityLogLocalService;
413 }
414
415
420 public void setSocialEquityLogLocalService(
421 SocialEquityLogLocalService socialEquityLogLocalService) {
422 this.socialEquityLogLocalService = socialEquityLogLocalService;
423 }
424
425
430 public SocialEquityLogPersistence getSocialEquityLogPersistence() {
431 return socialEquityLogPersistence;
432 }
433
434
439 public void setSocialEquityLogPersistence(
440 SocialEquityLogPersistence socialEquityLogPersistence) {
441 this.socialEquityLogPersistence = socialEquityLogPersistence;
442 }
443
444
449 public SocialEquitySettingLocalService getSocialEquitySettingLocalService() {
450 return socialEquitySettingLocalService;
451 }
452
453
458 public void setSocialEquitySettingLocalService(
459 SocialEquitySettingLocalService socialEquitySettingLocalService) {
460 this.socialEquitySettingLocalService = socialEquitySettingLocalService;
461 }
462
463
468 public SocialEquitySettingPersistence getSocialEquitySettingPersistence() {
469 return socialEquitySettingPersistence;
470 }
471
472
477 public void setSocialEquitySettingPersistence(
478 SocialEquitySettingPersistence socialEquitySettingPersistence) {
479 this.socialEquitySettingPersistence = socialEquitySettingPersistence;
480 }
481
482
487 public SocialEquityUserLocalService getSocialEquityUserLocalService() {
488 return socialEquityUserLocalService;
489 }
490
491
496 public void setSocialEquityUserLocalService(
497 SocialEquityUserLocalService socialEquityUserLocalService) {
498 this.socialEquityUserLocalService = socialEquityUserLocalService;
499 }
500
501
506 public SocialEquityUserPersistence getSocialEquityUserPersistence() {
507 return socialEquityUserPersistence;
508 }
509
510
515 public void setSocialEquityUserPersistence(
516 SocialEquityUserPersistence socialEquityUserPersistence) {
517 this.socialEquityUserPersistence = socialEquityUserPersistence;
518 }
519
520
525 public SocialRelationLocalService getSocialRelationLocalService() {
526 return socialRelationLocalService;
527 }
528
529
534 public void setSocialRelationLocalService(
535 SocialRelationLocalService socialRelationLocalService) {
536 this.socialRelationLocalService = socialRelationLocalService;
537 }
538
539
544 public SocialRelationPersistence getSocialRelationPersistence() {
545 return socialRelationPersistence;
546 }
547
548
553 public void setSocialRelationPersistence(
554 SocialRelationPersistence socialRelationPersistence) {
555 this.socialRelationPersistence = socialRelationPersistence;
556 }
557
558
563 public SocialRequestLocalService getSocialRequestLocalService() {
564 return socialRequestLocalService;
565 }
566
567
572 public void setSocialRequestLocalService(
573 SocialRequestLocalService socialRequestLocalService) {
574 this.socialRequestLocalService = socialRequestLocalService;
575 }
576
577
582 public SocialRequestPersistence getSocialRequestPersistence() {
583 return socialRequestPersistence;
584 }
585
586
591 public void setSocialRequestPersistence(
592 SocialRequestPersistence socialRequestPersistence) {
593 this.socialRequestPersistence = socialRequestPersistence;
594 }
595
596
601 public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
602 return socialRequestInterpreterLocalService;
603 }
604
605
610 public void setSocialRequestInterpreterLocalService(
611 SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
612 this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
613 }
614
615
620 public CounterLocalService getCounterLocalService() {
621 return counterLocalService;
622 }
623
624
629 public void setCounterLocalService(CounterLocalService counterLocalService) {
630 this.counterLocalService = counterLocalService;
631 }
632
633
638 public ResourceLocalService getResourceLocalService() {
639 return resourceLocalService;
640 }
641
642
647 public void setResourceLocalService(
648 ResourceLocalService resourceLocalService) {
649 this.resourceLocalService = resourceLocalService;
650 }
651
652
657 public ResourceService getResourceService() {
658 return resourceService;
659 }
660
661
666 public void setResourceService(ResourceService resourceService) {
667 this.resourceService = resourceService;
668 }
669
670
675 public ResourcePersistence getResourcePersistence() {
676 return resourcePersistence;
677 }
678
679
684 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
685 this.resourcePersistence = resourcePersistence;
686 }
687
688
693 public ResourceFinder getResourceFinder() {
694 return resourceFinder;
695 }
696
697
702 public void setResourceFinder(ResourceFinder resourceFinder) {
703 this.resourceFinder = resourceFinder;
704 }
705
706
711 public UserLocalService getUserLocalService() {
712 return userLocalService;
713 }
714
715
720 public void setUserLocalService(UserLocalService userLocalService) {
721 this.userLocalService = userLocalService;
722 }
723
724
729 public UserService getUserService() {
730 return userService;
731 }
732
733
738 public void setUserService(UserService userService) {
739 this.userService = userService;
740 }
741
742
747 public UserPersistence getUserPersistence() {
748 return userPersistence;
749 }
750
751
756 public void setUserPersistence(UserPersistence userPersistence) {
757 this.userPersistence = userPersistence;
758 }
759
760
765 public UserFinder getUserFinder() {
766 return userFinder;
767 }
768
769
774 public void setUserFinder(UserFinder userFinder) {
775 this.userFinder = userFinder;
776 }
777
778
783 protected void runSQL(String sql) throws SystemException {
784 try {
785 DataSource dataSource = socialRequestPersistence.getDataSource();
786
787 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
788 sql, new int[0]);
789
790 sqlUpdate.update();
791 }
792 catch (Exception e) {
793 throw new SystemException(e);
794 }
795 }
796
797 @BeanReference(type = SocialActivityLocalService.class)
798 protected SocialActivityLocalService socialActivityLocalService;
799 @BeanReference(type = SocialActivityPersistence.class)
800 protected SocialActivityPersistence socialActivityPersistence;
801 @BeanReference(type = SocialActivityFinder.class)
802 protected SocialActivityFinder socialActivityFinder;
803 @BeanReference(type = SocialActivityInterpreterLocalService.class)
804 protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
805 @BeanReference(type = SocialEquityAssetEntryPersistence.class)
806 protected SocialEquityAssetEntryPersistence socialEquityAssetEntryPersistence;
807 @BeanReference(type = SocialEquityHistoryLocalService.class)
808 protected SocialEquityHistoryLocalService socialEquityHistoryLocalService;
809 @BeanReference(type = SocialEquityHistoryPersistence.class)
810 protected SocialEquityHistoryPersistence socialEquityHistoryPersistence;
811 @BeanReference(type = SocialEquityLogLocalService.class)
812 protected SocialEquityLogLocalService socialEquityLogLocalService;
813 @BeanReference(type = SocialEquityLogPersistence.class)
814 protected SocialEquityLogPersistence socialEquityLogPersistence;
815 @BeanReference(type = SocialEquitySettingLocalService.class)
816 protected SocialEquitySettingLocalService socialEquitySettingLocalService;
817 @BeanReference(type = SocialEquitySettingPersistence.class)
818 protected SocialEquitySettingPersistence socialEquitySettingPersistence;
819 @BeanReference(type = SocialEquityUserLocalService.class)
820 protected SocialEquityUserLocalService socialEquityUserLocalService;
821 @BeanReference(type = SocialEquityUserPersistence.class)
822 protected SocialEquityUserPersistence socialEquityUserPersistence;
823 @BeanReference(type = SocialRelationLocalService.class)
824 protected SocialRelationLocalService socialRelationLocalService;
825 @BeanReference(type = SocialRelationPersistence.class)
826 protected SocialRelationPersistence socialRelationPersistence;
827 @BeanReference(type = SocialRequestLocalService.class)
828 protected SocialRequestLocalService socialRequestLocalService;
829 @BeanReference(type = SocialRequestPersistence.class)
830 protected SocialRequestPersistence socialRequestPersistence;
831 @BeanReference(type = SocialRequestInterpreterLocalService.class)
832 protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
833 @BeanReference(type = CounterLocalService.class)
834 protected CounterLocalService counterLocalService;
835 @BeanReference(type = ResourceLocalService.class)
836 protected ResourceLocalService resourceLocalService;
837 @BeanReference(type = ResourceService.class)
838 protected ResourceService resourceService;
839 @BeanReference(type = ResourcePersistence.class)
840 protected ResourcePersistence resourcePersistence;
841 @BeanReference(type = ResourceFinder.class)
842 protected ResourceFinder resourceFinder;
843 @BeanReference(type = UserLocalService.class)
844 protected UserLocalService userLocalService;
845 @BeanReference(type = UserService.class)
846 protected UserService userService;
847 @BeanReference(type = UserPersistence.class)
848 protected UserPersistence userPersistence;
849 @BeanReference(type = UserFinder.class)
850 protected UserFinder userFinder;
851 }