001
014
015 package com.liferay.portlet.ratings.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.UserLocalService;
035 import com.liferay.portal.service.UserService;
036 import com.liferay.portal.service.persistence.UserFinder;
037 import com.liferay.portal.service.persistence.UserPersistence;
038
039 import com.liferay.portlet.asset.service.AssetEntryLocalService;
040 import com.liferay.portlet.asset.service.AssetEntryService;
041 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
042 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
043 import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
044 import com.liferay.portlet.blogs.service.BlogsEntryService;
045 import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
046 import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
047 import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
048 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
049 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
050 import com.liferay.portlet.ratings.model.RatingsEntry;
051 import com.liferay.portlet.ratings.service.RatingsEntryLocalService;
052 import com.liferay.portlet.ratings.service.RatingsEntryService;
053 import com.liferay.portlet.ratings.service.RatingsStatsLocalService;
054 import com.liferay.portlet.ratings.service.persistence.RatingsEntryFinder;
055 import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence;
056 import com.liferay.portlet.ratings.service.persistence.RatingsStatsFinder;
057 import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
058 import com.liferay.portlet.social.service.SocialActivityLocalService;
059 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
060 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
061
062 import java.io.Serializable;
063
064 import java.util.List;
065
066 import javax.sql.DataSource;
067
068
080 public abstract class RatingsEntryLocalServiceBaseImpl
081 extends BaseLocalServiceImpl implements RatingsEntryLocalService,
082 IdentifiableBean {
083
088
089
096 @Indexable(type = IndexableType.REINDEX)
097 public RatingsEntry addRatingsEntry(RatingsEntry ratingsEntry)
098 throws SystemException {
099 ratingsEntry.setNew(true);
100
101 return ratingsEntryPersistence.update(ratingsEntry);
102 }
103
104
110 public RatingsEntry createRatingsEntry(long entryId) {
111 return ratingsEntryPersistence.create(entryId);
112 }
113
114
122 @Indexable(type = IndexableType.DELETE)
123 public RatingsEntry deleteRatingsEntry(long entryId)
124 throws PortalException, SystemException {
125 return ratingsEntryPersistence.remove(entryId);
126 }
127
128
135 @Indexable(type = IndexableType.DELETE)
136 public RatingsEntry deleteRatingsEntry(RatingsEntry ratingsEntry)
137 throws SystemException {
138 return ratingsEntryPersistence.remove(ratingsEntry);
139 }
140
141 public DynamicQuery dynamicQuery() {
142 Class<?> clazz = getClass();
143
144 return DynamicQueryFactoryUtil.forClass(RatingsEntry.class,
145 clazz.getClassLoader());
146 }
147
148
155 @SuppressWarnings("rawtypes")
156 public List dynamicQuery(DynamicQuery dynamicQuery)
157 throws SystemException {
158 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery);
159 }
160
161
174 @SuppressWarnings("rawtypes")
175 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
176 throws SystemException {
177 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
178 start, end);
179 }
180
181
195 @SuppressWarnings("rawtypes")
196 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
197 OrderByComparator orderByComparator) throws SystemException {
198 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
199 start, end, orderByComparator);
200 }
201
202
209 public long dynamicQueryCount(DynamicQuery dynamicQuery)
210 throws SystemException {
211 return ratingsEntryPersistence.countWithDynamicQuery(dynamicQuery);
212 }
213
214 public RatingsEntry fetchRatingsEntry(long entryId)
215 throws SystemException {
216 return ratingsEntryPersistence.fetchByPrimaryKey(entryId);
217 }
218
219
227 public RatingsEntry getRatingsEntry(long entryId)
228 throws PortalException, SystemException {
229 return ratingsEntryPersistence.findByPrimaryKey(entryId);
230 }
231
232 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
233 throws PortalException, SystemException {
234 return ratingsEntryPersistence.findByPrimaryKey(primaryKeyObj);
235 }
236
237
249 public List<RatingsEntry> getRatingsEntries(int start, int end)
250 throws SystemException {
251 return ratingsEntryPersistence.findAll(start, end);
252 }
253
254
260 public int getRatingsEntriesCount() throws SystemException {
261 return ratingsEntryPersistence.countAll();
262 }
263
264
271 @Indexable(type = IndexableType.REINDEX)
272 public RatingsEntry updateRatingsEntry(RatingsEntry ratingsEntry)
273 throws SystemException {
274 return ratingsEntryPersistence.update(ratingsEntry);
275 }
276
277
282 public RatingsEntryLocalService getRatingsEntryLocalService() {
283 return ratingsEntryLocalService;
284 }
285
286
291 public void setRatingsEntryLocalService(
292 RatingsEntryLocalService ratingsEntryLocalService) {
293 this.ratingsEntryLocalService = ratingsEntryLocalService;
294 }
295
296
301 public RatingsEntryService getRatingsEntryService() {
302 return ratingsEntryService;
303 }
304
305
310 public void setRatingsEntryService(RatingsEntryService ratingsEntryService) {
311 this.ratingsEntryService = ratingsEntryService;
312 }
313
314
319 public RatingsEntryPersistence getRatingsEntryPersistence() {
320 return ratingsEntryPersistence;
321 }
322
323
328 public void setRatingsEntryPersistence(
329 RatingsEntryPersistence ratingsEntryPersistence) {
330 this.ratingsEntryPersistence = ratingsEntryPersistence;
331 }
332
333
338 public RatingsEntryFinder getRatingsEntryFinder() {
339 return ratingsEntryFinder;
340 }
341
342
347 public void setRatingsEntryFinder(RatingsEntryFinder ratingsEntryFinder) {
348 this.ratingsEntryFinder = ratingsEntryFinder;
349 }
350
351
356 public RatingsStatsLocalService getRatingsStatsLocalService() {
357 return ratingsStatsLocalService;
358 }
359
360
365 public void setRatingsStatsLocalService(
366 RatingsStatsLocalService ratingsStatsLocalService) {
367 this.ratingsStatsLocalService = ratingsStatsLocalService;
368 }
369
370
375 public RatingsStatsPersistence getRatingsStatsPersistence() {
376 return ratingsStatsPersistence;
377 }
378
379
384 public void setRatingsStatsPersistence(
385 RatingsStatsPersistence ratingsStatsPersistence) {
386 this.ratingsStatsPersistence = ratingsStatsPersistence;
387 }
388
389
394 public RatingsStatsFinder getRatingsStatsFinder() {
395 return ratingsStatsFinder;
396 }
397
398
403 public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
404 this.ratingsStatsFinder = ratingsStatsFinder;
405 }
406
407
412 public CounterLocalService getCounterLocalService() {
413 return counterLocalService;
414 }
415
416
421 public void setCounterLocalService(CounterLocalService counterLocalService) {
422 this.counterLocalService = counterLocalService;
423 }
424
425
430 public ResourceLocalService getResourceLocalService() {
431 return resourceLocalService;
432 }
433
434
439 public void setResourceLocalService(
440 ResourceLocalService resourceLocalService) {
441 this.resourceLocalService = resourceLocalService;
442 }
443
444
449 public UserLocalService getUserLocalService() {
450 return userLocalService;
451 }
452
453
458 public void setUserLocalService(UserLocalService userLocalService) {
459 this.userLocalService = userLocalService;
460 }
461
462
467 public UserService getUserService() {
468 return userService;
469 }
470
471
476 public void setUserService(UserService userService) {
477 this.userService = userService;
478 }
479
480
485 public UserPersistence getUserPersistence() {
486 return userPersistence;
487 }
488
489
494 public void setUserPersistence(UserPersistence userPersistence) {
495 this.userPersistence = userPersistence;
496 }
497
498
503 public UserFinder getUserFinder() {
504 return userFinder;
505 }
506
507
512 public void setUserFinder(UserFinder userFinder) {
513 this.userFinder = userFinder;
514 }
515
516
521 public AssetEntryLocalService getAssetEntryLocalService() {
522 return assetEntryLocalService;
523 }
524
525
530 public void setAssetEntryLocalService(
531 AssetEntryLocalService assetEntryLocalService) {
532 this.assetEntryLocalService = assetEntryLocalService;
533 }
534
535
540 public AssetEntryService getAssetEntryService() {
541 return assetEntryService;
542 }
543
544
549 public void setAssetEntryService(AssetEntryService assetEntryService) {
550 this.assetEntryService = assetEntryService;
551 }
552
553
558 public AssetEntryPersistence getAssetEntryPersistence() {
559 return assetEntryPersistence;
560 }
561
562
567 public void setAssetEntryPersistence(
568 AssetEntryPersistence assetEntryPersistence) {
569 this.assetEntryPersistence = assetEntryPersistence;
570 }
571
572
577 public AssetEntryFinder getAssetEntryFinder() {
578 return assetEntryFinder;
579 }
580
581
586 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
587 this.assetEntryFinder = assetEntryFinder;
588 }
589
590
595 public BlogsEntryLocalService getBlogsEntryLocalService() {
596 return blogsEntryLocalService;
597 }
598
599
604 public void setBlogsEntryLocalService(
605 BlogsEntryLocalService blogsEntryLocalService) {
606 this.blogsEntryLocalService = blogsEntryLocalService;
607 }
608
609
614 public BlogsEntryService getBlogsEntryService() {
615 return blogsEntryService;
616 }
617
618
623 public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
624 this.blogsEntryService = blogsEntryService;
625 }
626
627
632 public BlogsEntryPersistence getBlogsEntryPersistence() {
633 return blogsEntryPersistence;
634 }
635
636
641 public void setBlogsEntryPersistence(
642 BlogsEntryPersistence blogsEntryPersistence) {
643 this.blogsEntryPersistence = blogsEntryPersistence;
644 }
645
646
651 public BlogsEntryFinder getBlogsEntryFinder() {
652 return blogsEntryFinder;
653 }
654
655
660 public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
661 this.blogsEntryFinder = blogsEntryFinder;
662 }
663
664
669 public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
670 return blogsStatsUserLocalService;
671 }
672
673
678 public void setBlogsStatsUserLocalService(
679 BlogsStatsUserLocalService blogsStatsUserLocalService) {
680 this.blogsStatsUserLocalService = blogsStatsUserLocalService;
681 }
682
683
688 public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
689 return blogsStatsUserPersistence;
690 }
691
692
697 public void setBlogsStatsUserPersistence(
698 BlogsStatsUserPersistence blogsStatsUserPersistence) {
699 this.blogsStatsUserPersistence = blogsStatsUserPersistence;
700 }
701
702
707 public BlogsStatsUserFinder getBlogsStatsUserFinder() {
708 return blogsStatsUserFinder;
709 }
710
711
716 public void setBlogsStatsUserFinder(
717 BlogsStatsUserFinder blogsStatsUserFinder) {
718 this.blogsStatsUserFinder = blogsStatsUserFinder;
719 }
720
721
726 public SocialActivityLocalService getSocialActivityLocalService() {
727 return socialActivityLocalService;
728 }
729
730
735 public void setSocialActivityLocalService(
736 SocialActivityLocalService socialActivityLocalService) {
737 this.socialActivityLocalService = socialActivityLocalService;
738 }
739
740
745 public SocialActivityPersistence getSocialActivityPersistence() {
746 return socialActivityPersistence;
747 }
748
749
754 public void setSocialActivityPersistence(
755 SocialActivityPersistence socialActivityPersistence) {
756 this.socialActivityPersistence = socialActivityPersistence;
757 }
758
759
764 public SocialActivityFinder getSocialActivityFinder() {
765 return socialActivityFinder;
766 }
767
768
773 public void setSocialActivityFinder(
774 SocialActivityFinder socialActivityFinder) {
775 this.socialActivityFinder = socialActivityFinder;
776 }
777
778 public void afterPropertiesSet() {
779 persistedModelLocalServiceRegistry.register("com.liferay.portlet.ratings.model.RatingsEntry",
780 ratingsEntryLocalService);
781 }
782
783 public void destroy() {
784 persistedModelLocalServiceRegistry.unregister(
785 "com.liferay.portlet.ratings.model.RatingsEntry");
786 }
787
788
793 public String getBeanIdentifier() {
794 return _beanIdentifier;
795 }
796
797
802 public void setBeanIdentifier(String beanIdentifier) {
803 _beanIdentifier = beanIdentifier;
804 }
805
806 protected Class<?> getModelClass() {
807 return RatingsEntry.class;
808 }
809
810 protected String getModelClassName() {
811 return RatingsEntry.class.getName();
812 }
813
814
819 protected void runSQL(String sql) throws SystemException {
820 try {
821 DataSource dataSource = ratingsEntryPersistence.getDataSource();
822
823 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
824 sql, new int[0]);
825
826 sqlUpdate.update();
827 }
828 catch (Exception e) {
829 throw new SystemException(e);
830 }
831 }
832
833 @BeanReference(type = RatingsEntryLocalService.class)
834 protected RatingsEntryLocalService ratingsEntryLocalService;
835 @BeanReference(type = RatingsEntryService.class)
836 protected RatingsEntryService ratingsEntryService;
837 @BeanReference(type = RatingsEntryPersistence.class)
838 protected RatingsEntryPersistence ratingsEntryPersistence;
839 @BeanReference(type = RatingsEntryFinder.class)
840 protected RatingsEntryFinder ratingsEntryFinder;
841 @BeanReference(type = RatingsStatsLocalService.class)
842 protected RatingsStatsLocalService ratingsStatsLocalService;
843 @BeanReference(type = RatingsStatsPersistence.class)
844 protected RatingsStatsPersistence ratingsStatsPersistence;
845 @BeanReference(type = RatingsStatsFinder.class)
846 protected RatingsStatsFinder ratingsStatsFinder;
847 @BeanReference(type = CounterLocalService.class)
848 protected CounterLocalService counterLocalService;
849 @BeanReference(type = ResourceLocalService.class)
850 protected ResourceLocalService resourceLocalService;
851 @BeanReference(type = UserLocalService.class)
852 protected UserLocalService userLocalService;
853 @BeanReference(type = UserService.class)
854 protected UserService userService;
855 @BeanReference(type = UserPersistence.class)
856 protected UserPersistence userPersistence;
857 @BeanReference(type = UserFinder.class)
858 protected UserFinder userFinder;
859 @BeanReference(type = AssetEntryLocalService.class)
860 protected AssetEntryLocalService assetEntryLocalService;
861 @BeanReference(type = AssetEntryService.class)
862 protected AssetEntryService assetEntryService;
863 @BeanReference(type = AssetEntryPersistence.class)
864 protected AssetEntryPersistence assetEntryPersistence;
865 @BeanReference(type = AssetEntryFinder.class)
866 protected AssetEntryFinder assetEntryFinder;
867 @BeanReference(type = BlogsEntryLocalService.class)
868 protected BlogsEntryLocalService blogsEntryLocalService;
869 @BeanReference(type = BlogsEntryService.class)
870 protected BlogsEntryService blogsEntryService;
871 @BeanReference(type = BlogsEntryPersistence.class)
872 protected BlogsEntryPersistence blogsEntryPersistence;
873 @BeanReference(type = BlogsEntryFinder.class)
874 protected BlogsEntryFinder blogsEntryFinder;
875 @BeanReference(type = BlogsStatsUserLocalService.class)
876 protected BlogsStatsUserLocalService blogsStatsUserLocalService;
877 @BeanReference(type = BlogsStatsUserPersistence.class)
878 protected BlogsStatsUserPersistence blogsStatsUserPersistence;
879 @BeanReference(type = BlogsStatsUserFinder.class)
880 protected BlogsStatsUserFinder blogsStatsUserFinder;
881 @BeanReference(type = SocialActivityLocalService.class)
882 protected SocialActivityLocalService socialActivityLocalService;
883 @BeanReference(type = SocialActivityPersistence.class)
884 protected SocialActivityPersistence socialActivityPersistence;
885 @BeanReference(type = SocialActivityFinder.class)
886 protected SocialActivityFinder socialActivityFinder;
887 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
888 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
889 private String _beanIdentifier;
890 }