001
014
015 package com.liferay.portlet.ratings.service.base;
016
017 import com.liferay.portal.kernel.bean.BeanReference;
018 import com.liferay.portal.kernel.bean.IdentifiableBean;
019 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
021 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
022 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
023 import com.liferay.portal.kernel.dao.orm.Projection;
024 import com.liferay.portal.kernel.exception.PortalException;
025 import com.liferay.portal.kernel.exception.SystemException;
026 import com.liferay.portal.kernel.search.Indexable;
027 import com.liferay.portal.kernel.search.IndexableType;
028 import com.liferay.portal.kernel.util.OrderByComparator;
029 import com.liferay.portal.model.PersistedModel;
030 import com.liferay.portal.service.BaseLocalServiceImpl;
031 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
032 import com.liferay.portal.service.persistence.UserFinder;
033 import com.liferay.portal.service.persistence.UserPersistence;
034
035 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
036 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
037 import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
038 import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
039 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
040 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
041 import com.liferay.portlet.ratings.model.RatingsEntry;
042 import com.liferay.portlet.ratings.service.RatingsEntryLocalService;
043 import com.liferay.portlet.ratings.service.persistence.RatingsEntryFinder;
044 import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence;
045 import com.liferay.portlet.ratings.service.persistence.RatingsStatsFinder;
046 import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
047 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
048 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
049
050 import java.io.Serializable;
051
052 import java.util.List;
053
054 import javax.sql.DataSource;
055
056
068 public abstract class RatingsEntryLocalServiceBaseImpl
069 extends BaseLocalServiceImpl implements RatingsEntryLocalService,
070 IdentifiableBean {
071
076
077
084 @Indexable(type = IndexableType.REINDEX)
085 @Override
086 public RatingsEntry addRatingsEntry(RatingsEntry ratingsEntry)
087 throws SystemException {
088 ratingsEntry.setNew(true);
089
090 return ratingsEntryPersistence.update(ratingsEntry);
091 }
092
093
099 @Override
100 public RatingsEntry createRatingsEntry(long entryId) {
101 return ratingsEntryPersistence.create(entryId);
102 }
103
104
112 @Indexable(type = IndexableType.DELETE)
113 @Override
114 public RatingsEntry deleteRatingsEntry(long entryId)
115 throws PortalException, SystemException {
116 return ratingsEntryPersistence.remove(entryId);
117 }
118
119
126 @Indexable(type = IndexableType.DELETE)
127 @Override
128 public RatingsEntry deleteRatingsEntry(RatingsEntry ratingsEntry)
129 throws SystemException {
130 return ratingsEntryPersistence.remove(ratingsEntry);
131 }
132
133 @Override
134 public DynamicQuery dynamicQuery() {
135 Class<?> clazz = getClass();
136
137 return DynamicQueryFactoryUtil.forClass(RatingsEntry.class,
138 clazz.getClassLoader());
139 }
140
141
148 @Override
149 @SuppressWarnings("rawtypes")
150 public List dynamicQuery(DynamicQuery dynamicQuery)
151 throws SystemException {
152 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery);
153 }
154
155
168 @Override
169 @SuppressWarnings("rawtypes")
170 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
171 throws SystemException {
172 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
173 start, end);
174 }
175
176
190 @Override
191 @SuppressWarnings("rawtypes")
192 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
193 OrderByComparator orderByComparator) throws SystemException {
194 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
195 start, end, orderByComparator);
196 }
197
198
205 @Override
206 public long dynamicQueryCount(DynamicQuery dynamicQuery)
207 throws SystemException {
208 return ratingsEntryPersistence.countWithDynamicQuery(dynamicQuery);
209 }
210
211
219 @Override
220 public long dynamicQueryCount(DynamicQuery dynamicQuery,
221 Projection projection) throws SystemException {
222 return ratingsEntryPersistence.countWithDynamicQuery(dynamicQuery,
223 projection);
224 }
225
226 @Override
227 public RatingsEntry fetchRatingsEntry(long entryId)
228 throws SystemException {
229 return ratingsEntryPersistence.fetchByPrimaryKey(entryId);
230 }
231
232
240 @Override
241 public RatingsEntry getRatingsEntry(long entryId)
242 throws PortalException, SystemException {
243 return ratingsEntryPersistence.findByPrimaryKey(entryId);
244 }
245
246 @Override
247 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
248 throws PortalException, SystemException {
249 return ratingsEntryPersistence.findByPrimaryKey(primaryKeyObj);
250 }
251
252
264 @Override
265 public List<RatingsEntry> getRatingsEntries(int start, int end)
266 throws SystemException {
267 return ratingsEntryPersistence.findAll(start, end);
268 }
269
270
276 @Override
277 public int getRatingsEntriesCount() throws SystemException {
278 return ratingsEntryPersistence.countAll();
279 }
280
281
288 @Indexable(type = IndexableType.REINDEX)
289 @Override
290 public RatingsEntry updateRatingsEntry(RatingsEntry ratingsEntry)
291 throws SystemException {
292 return ratingsEntryPersistence.update(ratingsEntry);
293 }
294
295
300 public com.liferay.portlet.ratings.service.RatingsEntryLocalService getRatingsEntryLocalService() {
301 return ratingsEntryLocalService;
302 }
303
304
309 public void setRatingsEntryLocalService(
310 com.liferay.portlet.ratings.service.RatingsEntryLocalService ratingsEntryLocalService) {
311 this.ratingsEntryLocalService = ratingsEntryLocalService;
312 }
313
314
319 public com.liferay.portlet.ratings.service.RatingsEntryService getRatingsEntryService() {
320 return ratingsEntryService;
321 }
322
323
328 public void setRatingsEntryService(
329 com.liferay.portlet.ratings.service.RatingsEntryService ratingsEntryService) {
330 this.ratingsEntryService = ratingsEntryService;
331 }
332
333
338 public RatingsEntryPersistence getRatingsEntryPersistence() {
339 return ratingsEntryPersistence;
340 }
341
342
347 public void setRatingsEntryPersistence(
348 RatingsEntryPersistence ratingsEntryPersistence) {
349 this.ratingsEntryPersistence = ratingsEntryPersistence;
350 }
351
352
357 public RatingsEntryFinder getRatingsEntryFinder() {
358 return ratingsEntryFinder;
359 }
360
361
366 public void setRatingsEntryFinder(RatingsEntryFinder ratingsEntryFinder) {
367 this.ratingsEntryFinder = ratingsEntryFinder;
368 }
369
370
375 public com.liferay.portlet.ratings.service.RatingsStatsLocalService getRatingsStatsLocalService() {
376 return ratingsStatsLocalService;
377 }
378
379
384 public void setRatingsStatsLocalService(
385 com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService) {
386 this.ratingsStatsLocalService = ratingsStatsLocalService;
387 }
388
389
394 public RatingsStatsPersistence getRatingsStatsPersistence() {
395 return ratingsStatsPersistence;
396 }
397
398
403 public void setRatingsStatsPersistence(
404 RatingsStatsPersistence ratingsStatsPersistence) {
405 this.ratingsStatsPersistence = ratingsStatsPersistence;
406 }
407
408
413 public RatingsStatsFinder getRatingsStatsFinder() {
414 return ratingsStatsFinder;
415 }
416
417
422 public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
423 this.ratingsStatsFinder = ratingsStatsFinder;
424 }
425
426
431 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
432 return counterLocalService;
433 }
434
435
440 public void setCounterLocalService(
441 com.liferay.counter.service.CounterLocalService counterLocalService) {
442 this.counterLocalService = counterLocalService;
443 }
444
445
450 public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
451 return resourceLocalService;
452 }
453
454
459 public void setResourceLocalService(
460 com.liferay.portal.service.ResourceLocalService resourceLocalService) {
461 this.resourceLocalService = resourceLocalService;
462 }
463
464
469 public com.liferay.portal.service.UserLocalService getUserLocalService() {
470 return userLocalService;
471 }
472
473
478 public void setUserLocalService(
479 com.liferay.portal.service.UserLocalService userLocalService) {
480 this.userLocalService = userLocalService;
481 }
482
483
488 public com.liferay.portal.service.UserService getUserService() {
489 return userService;
490 }
491
492
497 public void setUserService(
498 com.liferay.portal.service.UserService userService) {
499 this.userService = userService;
500 }
501
502
507 public UserPersistence getUserPersistence() {
508 return userPersistence;
509 }
510
511
516 public void setUserPersistence(UserPersistence userPersistence) {
517 this.userPersistence = userPersistence;
518 }
519
520
525 public UserFinder getUserFinder() {
526 return userFinder;
527 }
528
529
534 public void setUserFinder(UserFinder userFinder) {
535 this.userFinder = userFinder;
536 }
537
538
543 public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
544 return assetEntryLocalService;
545 }
546
547
552 public void setAssetEntryLocalService(
553 com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
554 this.assetEntryLocalService = assetEntryLocalService;
555 }
556
557
562 public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
563 return assetEntryService;
564 }
565
566
571 public void setAssetEntryService(
572 com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
573 this.assetEntryService = assetEntryService;
574 }
575
576
581 public AssetEntryPersistence getAssetEntryPersistence() {
582 return assetEntryPersistence;
583 }
584
585
590 public void setAssetEntryPersistence(
591 AssetEntryPersistence assetEntryPersistence) {
592 this.assetEntryPersistence = assetEntryPersistence;
593 }
594
595
600 public AssetEntryFinder getAssetEntryFinder() {
601 return assetEntryFinder;
602 }
603
604
609 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
610 this.assetEntryFinder = assetEntryFinder;
611 }
612
613
618 public com.liferay.portlet.blogs.service.BlogsEntryLocalService getBlogsEntryLocalService() {
619 return blogsEntryLocalService;
620 }
621
622
627 public void setBlogsEntryLocalService(
628 com.liferay.portlet.blogs.service.BlogsEntryLocalService blogsEntryLocalService) {
629 this.blogsEntryLocalService = blogsEntryLocalService;
630 }
631
632
637 public com.liferay.portlet.blogs.service.BlogsEntryService getBlogsEntryService() {
638 return blogsEntryService;
639 }
640
641
646 public void setBlogsEntryService(
647 com.liferay.portlet.blogs.service.BlogsEntryService blogsEntryService) {
648 this.blogsEntryService = blogsEntryService;
649 }
650
651
656 public BlogsEntryPersistence getBlogsEntryPersistence() {
657 return blogsEntryPersistence;
658 }
659
660
665 public void setBlogsEntryPersistence(
666 BlogsEntryPersistence blogsEntryPersistence) {
667 this.blogsEntryPersistence = blogsEntryPersistence;
668 }
669
670
675 public BlogsEntryFinder getBlogsEntryFinder() {
676 return blogsEntryFinder;
677 }
678
679
684 public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
685 this.blogsEntryFinder = blogsEntryFinder;
686 }
687
688
693 public com.liferay.portlet.blogs.service.BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
694 return blogsStatsUserLocalService;
695 }
696
697
702 public void setBlogsStatsUserLocalService(
703 com.liferay.portlet.blogs.service.BlogsStatsUserLocalService blogsStatsUserLocalService) {
704 this.blogsStatsUserLocalService = blogsStatsUserLocalService;
705 }
706
707
712 public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
713 return blogsStatsUserPersistence;
714 }
715
716
721 public void setBlogsStatsUserPersistence(
722 BlogsStatsUserPersistence blogsStatsUserPersistence) {
723 this.blogsStatsUserPersistence = blogsStatsUserPersistence;
724 }
725
726
731 public BlogsStatsUserFinder getBlogsStatsUserFinder() {
732 return blogsStatsUserFinder;
733 }
734
735
740 public void setBlogsStatsUserFinder(
741 BlogsStatsUserFinder blogsStatsUserFinder) {
742 this.blogsStatsUserFinder = blogsStatsUserFinder;
743 }
744
745
750 public com.liferay.portlet.social.service.SocialActivityLocalService getSocialActivityLocalService() {
751 return socialActivityLocalService;
752 }
753
754
759 public void setSocialActivityLocalService(
760 com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService) {
761 this.socialActivityLocalService = socialActivityLocalService;
762 }
763
764
769 public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() {
770 return socialActivityService;
771 }
772
773
778 public void setSocialActivityService(
779 com.liferay.portlet.social.service.SocialActivityService socialActivityService) {
780 this.socialActivityService = socialActivityService;
781 }
782
783
788 public SocialActivityPersistence getSocialActivityPersistence() {
789 return socialActivityPersistence;
790 }
791
792
797 public void setSocialActivityPersistence(
798 SocialActivityPersistence socialActivityPersistence) {
799 this.socialActivityPersistence = socialActivityPersistence;
800 }
801
802
807 public SocialActivityFinder getSocialActivityFinder() {
808 return socialActivityFinder;
809 }
810
811
816 public void setSocialActivityFinder(
817 SocialActivityFinder socialActivityFinder) {
818 this.socialActivityFinder = socialActivityFinder;
819 }
820
821 public void afterPropertiesSet() {
822 persistedModelLocalServiceRegistry.register("com.liferay.portlet.ratings.model.RatingsEntry",
823 ratingsEntryLocalService);
824 }
825
826 public void destroy() {
827 persistedModelLocalServiceRegistry.unregister(
828 "com.liferay.portlet.ratings.model.RatingsEntry");
829 }
830
831
836 @Override
837 public String getBeanIdentifier() {
838 return _beanIdentifier;
839 }
840
841
846 @Override
847 public void setBeanIdentifier(String beanIdentifier) {
848 _beanIdentifier = beanIdentifier;
849 }
850
851 protected Class<?> getModelClass() {
852 return RatingsEntry.class;
853 }
854
855 protected String getModelClassName() {
856 return RatingsEntry.class.getName();
857 }
858
859
864 protected void runSQL(String sql) throws SystemException {
865 try {
866 DataSource dataSource = ratingsEntryPersistence.getDataSource();
867
868 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
869 sql, new int[0]);
870
871 sqlUpdate.update();
872 }
873 catch (Exception e) {
874 throw new SystemException(e);
875 }
876 }
877
878 @BeanReference(type = com.liferay.portlet.ratings.service.RatingsEntryLocalService.class)
879 protected com.liferay.portlet.ratings.service.RatingsEntryLocalService ratingsEntryLocalService;
880 @BeanReference(type = com.liferay.portlet.ratings.service.RatingsEntryService.class)
881 protected com.liferay.portlet.ratings.service.RatingsEntryService ratingsEntryService;
882 @BeanReference(type = RatingsEntryPersistence.class)
883 protected RatingsEntryPersistence ratingsEntryPersistence;
884 @BeanReference(type = RatingsEntryFinder.class)
885 protected RatingsEntryFinder ratingsEntryFinder;
886 @BeanReference(type = com.liferay.portlet.ratings.service.RatingsStatsLocalService.class)
887 protected com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService;
888 @BeanReference(type = RatingsStatsPersistence.class)
889 protected RatingsStatsPersistence ratingsStatsPersistence;
890 @BeanReference(type = RatingsStatsFinder.class)
891 protected RatingsStatsFinder ratingsStatsFinder;
892 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
893 protected com.liferay.counter.service.CounterLocalService counterLocalService;
894 @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
895 protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
896 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
897 protected com.liferay.portal.service.UserLocalService userLocalService;
898 @BeanReference(type = com.liferay.portal.service.UserService.class)
899 protected com.liferay.portal.service.UserService userService;
900 @BeanReference(type = UserPersistence.class)
901 protected UserPersistence userPersistence;
902 @BeanReference(type = UserFinder.class)
903 protected UserFinder userFinder;
904 @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
905 protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
906 @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
907 protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
908 @BeanReference(type = AssetEntryPersistence.class)
909 protected AssetEntryPersistence assetEntryPersistence;
910 @BeanReference(type = AssetEntryFinder.class)
911 protected AssetEntryFinder assetEntryFinder;
912 @BeanReference(type = com.liferay.portlet.blogs.service.BlogsEntryLocalService.class)
913 protected com.liferay.portlet.blogs.service.BlogsEntryLocalService blogsEntryLocalService;
914 @BeanReference(type = com.liferay.portlet.blogs.service.BlogsEntryService.class)
915 protected com.liferay.portlet.blogs.service.BlogsEntryService blogsEntryService;
916 @BeanReference(type = BlogsEntryPersistence.class)
917 protected BlogsEntryPersistence blogsEntryPersistence;
918 @BeanReference(type = BlogsEntryFinder.class)
919 protected BlogsEntryFinder blogsEntryFinder;
920 @BeanReference(type = com.liferay.portlet.blogs.service.BlogsStatsUserLocalService.class)
921 protected com.liferay.portlet.blogs.service.BlogsStatsUserLocalService blogsStatsUserLocalService;
922 @BeanReference(type = BlogsStatsUserPersistence.class)
923 protected BlogsStatsUserPersistence blogsStatsUserPersistence;
924 @BeanReference(type = BlogsStatsUserFinder.class)
925 protected BlogsStatsUserFinder blogsStatsUserFinder;
926 @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class)
927 protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService;
928 @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class)
929 protected com.liferay.portlet.social.service.SocialActivityService socialActivityService;
930 @BeanReference(type = SocialActivityPersistence.class)
931 protected SocialActivityPersistence socialActivityPersistence;
932 @BeanReference(type = SocialActivityFinder.class)
933 protected SocialActivityFinder socialActivityFinder;
934 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
935 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
936 private String _beanIdentifier;
937 }