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 SocialActivityPersistence getSocialActivityPersistence() {
770 return socialActivityPersistence;
771 }
772
773
778 public void setSocialActivityPersistence(
779 SocialActivityPersistence socialActivityPersistence) {
780 this.socialActivityPersistence = socialActivityPersistence;
781 }
782
783
788 public SocialActivityFinder getSocialActivityFinder() {
789 return socialActivityFinder;
790 }
791
792
797 public void setSocialActivityFinder(
798 SocialActivityFinder socialActivityFinder) {
799 this.socialActivityFinder = socialActivityFinder;
800 }
801
802 public void afterPropertiesSet() {
803 persistedModelLocalServiceRegistry.register("com.liferay.portlet.ratings.model.RatingsEntry",
804 ratingsEntryLocalService);
805 }
806
807 public void destroy() {
808 persistedModelLocalServiceRegistry.unregister(
809 "com.liferay.portlet.ratings.model.RatingsEntry");
810 }
811
812
817 @Override
818 public String getBeanIdentifier() {
819 return _beanIdentifier;
820 }
821
822
827 @Override
828 public void setBeanIdentifier(String beanIdentifier) {
829 _beanIdentifier = beanIdentifier;
830 }
831
832 protected Class<?> getModelClass() {
833 return RatingsEntry.class;
834 }
835
836 protected String getModelClassName() {
837 return RatingsEntry.class.getName();
838 }
839
840
845 protected void runSQL(String sql) throws SystemException {
846 try {
847 DataSource dataSource = ratingsEntryPersistence.getDataSource();
848
849 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
850 sql, new int[0]);
851
852 sqlUpdate.update();
853 }
854 catch (Exception e) {
855 throw new SystemException(e);
856 }
857 }
858
859 @BeanReference(type = com.liferay.portlet.ratings.service.RatingsEntryLocalService.class)
860 protected com.liferay.portlet.ratings.service.RatingsEntryLocalService ratingsEntryLocalService;
861 @BeanReference(type = com.liferay.portlet.ratings.service.RatingsEntryService.class)
862 protected com.liferay.portlet.ratings.service.RatingsEntryService ratingsEntryService;
863 @BeanReference(type = RatingsEntryPersistence.class)
864 protected RatingsEntryPersistence ratingsEntryPersistence;
865 @BeanReference(type = RatingsEntryFinder.class)
866 protected RatingsEntryFinder ratingsEntryFinder;
867 @BeanReference(type = com.liferay.portlet.ratings.service.RatingsStatsLocalService.class)
868 protected com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService;
869 @BeanReference(type = RatingsStatsPersistence.class)
870 protected RatingsStatsPersistence ratingsStatsPersistence;
871 @BeanReference(type = RatingsStatsFinder.class)
872 protected RatingsStatsFinder ratingsStatsFinder;
873 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
874 protected com.liferay.counter.service.CounterLocalService counterLocalService;
875 @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
876 protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
877 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
878 protected com.liferay.portal.service.UserLocalService userLocalService;
879 @BeanReference(type = com.liferay.portal.service.UserService.class)
880 protected com.liferay.portal.service.UserService userService;
881 @BeanReference(type = UserPersistence.class)
882 protected UserPersistence userPersistence;
883 @BeanReference(type = UserFinder.class)
884 protected UserFinder userFinder;
885 @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
886 protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
887 @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
888 protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
889 @BeanReference(type = AssetEntryPersistence.class)
890 protected AssetEntryPersistence assetEntryPersistence;
891 @BeanReference(type = AssetEntryFinder.class)
892 protected AssetEntryFinder assetEntryFinder;
893 @BeanReference(type = com.liferay.portlet.blogs.service.BlogsEntryLocalService.class)
894 protected com.liferay.portlet.blogs.service.BlogsEntryLocalService blogsEntryLocalService;
895 @BeanReference(type = com.liferay.portlet.blogs.service.BlogsEntryService.class)
896 protected com.liferay.portlet.blogs.service.BlogsEntryService blogsEntryService;
897 @BeanReference(type = BlogsEntryPersistence.class)
898 protected BlogsEntryPersistence blogsEntryPersistence;
899 @BeanReference(type = BlogsEntryFinder.class)
900 protected BlogsEntryFinder blogsEntryFinder;
901 @BeanReference(type = com.liferay.portlet.blogs.service.BlogsStatsUserLocalService.class)
902 protected com.liferay.portlet.blogs.service.BlogsStatsUserLocalService blogsStatsUserLocalService;
903 @BeanReference(type = BlogsStatsUserPersistence.class)
904 protected BlogsStatsUserPersistence blogsStatsUserPersistence;
905 @BeanReference(type = BlogsStatsUserFinder.class)
906 protected BlogsStatsUserFinder blogsStatsUserFinder;
907 @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class)
908 protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService;
909 @BeanReference(type = SocialActivityPersistence.class)
910 protected SocialActivityPersistence socialActivityPersistence;
911 @BeanReference(type = SocialActivityFinder.class)
912 protected SocialActivityFinder socialActivityFinder;
913 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
914 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
915 private String _beanIdentifier;
916 }