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.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.blogs.service.BlogsEntryLocalService;
036 import com.liferay.portlet.blogs.service.BlogsEntryService;
037 import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
038 import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
039 import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
040 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
041 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
042 import com.liferay.portlet.ratings.model.RatingsEntry;
043 import com.liferay.portlet.ratings.service.RatingsEntryLocalService;
044 import com.liferay.portlet.ratings.service.RatingsEntryService;
045 import com.liferay.portlet.ratings.service.RatingsStatsLocalService;
046 import com.liferay.portlet.ratings.service.persistence.RatingsEntryFinder;
047 import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence;
048 import com.liferay.portlet.ratings.service.persistence.RatingsStatsFinder;
049 import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
050 import com.liferay.portlet.social.service.SocialEquityLogLocalService;
051 import com.liferay.portlet.social.service.persistence.SocialEquityLogPersistence;
052
053 import java.util.List;
054
055 import javax.sql.DataSource;
056
057
073 public abstract class RatingsEntryLocalServiceBaseImpl
074 implements RatingsEntryLocalService {
075
082 public RatingsEntry addRatingsEntry(RatingsEntry ratingsEntry)
083 throws SystemException {
084 ratingsEntry.setNew(true);
085
086 return ratingsEntryPersistence.update(ratingsEntry, false);
087 }
088
089
095 public RatingsEntry createRatingsEntry(long entryId) {
096 return ratingsEntryPersistence.create(entryId);
097 }
098
099
106 public void deleteRatingsEntry(long entryId)
107 throws PortalException, SystemException {
108 ratingsEntryPersistence.remove(entryId);
109 }
110
111
117 public void deleteRatingsEntry(RatingsEntry ratingsEntry)
118 throws SystemException {
119 ratingsEntryPersistence.remove(ratingsEntry);
120 }
121
122
129 @SuppressWarnings("rawtypes")
130 public List dynamicQuery(DynamicQuery dynamicQuery)
131 throws SystemException {
132 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery);
133 }
134
135
148 @SuppressWarnings("rawtypes")
149 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
150 throws SystemException {
151 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
152 start, end);
153 }
154
155
169 @SuppressWarnings("rawtypes")
170 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
171 OrderByComparator orderByComparator) throws SystemException {
172 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
173 start, end, orderByComparator);
174 }
175
176
183 public long dynamicQueryCount(DynamicQuery dynamicQuery)
184 throws SystemException {
185 return ratingsEntryPersistence.countWithDynamicQuery(dynamicQuery);
186 }
187
188
196 public RatingsEntry getRatingsEntry(long entryId)
197 throws PortalException, SystemException {
198 return ratingsEntryPersistence.findByPrimaryKey(entryId);
199 }
200
201
213 public List<RatingsEntry> getRatingsEntries(int start, int end)
214 throws SystemException {
215 return ratingsEntryPersistence.findAll(start, end);
216 }
217
218
224 public int getRatingsEntriesCount() throws SystemException {
225 return ratingsEntryPersistence.countAll();
226 }
227
228
235 public RatingsEntry updateRatingsEntry(RatingsEntry ratingsEntry)
236 throws SystemException {
237 ratingsEntry.setNew(false);
238
239 return ratingsEntryPersistence.update(ratingsEntry, true);
240 }
241
242
250 public RatingsEntry updateRatingsEntry(RatingsEntry ratingsEntry,
251 boolean merge) throws SystemException {
252 ratingsEntry.setNew(false);
253
254 return ratingsEntryPersistence.update(ratingsEntry, merge);
255 }
256
257
262 public RatingsEntryLocalService getRatingsEntryLocalService() {
263 return ratingsEntryLocalService;
264 }
265
266
271 public void setRatingsEntryLocalService(
272 RatingsEntryLocalService ratingsEntryLocalService) {
273 this.ratingsEntryLocalService = ratingsEntryLocalService;
274 }
275
276
281 public RatingsEntryService getRatingsEntryService() {
282 return ratingsEntryService;
283 }
284
285
290 public void setRatingsEntryService(RatingsEntryService ratingsEntryService) {
291 this.ratingsEntryService = ratingsEntryService;
292 }
293
294
299 public RatingsEntryPersistence getRatingsEntryPersistence() {
300 return ratingsEntryPersistence;
301 }
302
303
308 public void setRatingsEntryPersistence(
309 RatingsEntryPersistence ratingsEntryPersistence) {
310 this.ratingsEntryPersistence = ratingsEntryPersistence;
311 }
312
313
318 public RatingsEntryFinder getRatingsEntryFinder() {
319 return ratingsEntryFinder;
320 }
321
322
327 public void setRatingsEntryFinder(RatingsEntryFinder ratingsEntryFinder) {
328 this.ratingsEntryFinder = ratingsEntryFinder;
329 }
330
331
336 public RatingsStatsLocalService getRatingsStatsLocalService() {
337 return ratingsStatsLocalService;
338 }
339
340
345 public void setRatingsStatsLocalService(
346 RatingsStatsLocalService ratingsStatsLocalService) {
347 this.ratingsStatsLocalService = ratingsStatsLocalService;
348 }
349
350
355 public RatingsStatsPersistence getRatingsStatsPersistence() {
356 return ratingsStatsPersistence;
357 }
358
359
364 public void setRatingsStatsPersistence(
365 RatingsStatsPersistence ratingsStatsPersistence) {
366 this.ratingsStatsPersistence = ratingsStatsPersistence;
367 }
368
369
374 public RatingsStatsFinder getRatingsStatsFinder() {
375 return ratingsStatsFinder;
376 }
377
378
383 public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
384 this.ratingsStatsFinder = ratingsStatsFinder;
385 }
386
387
392 public CounterLocalService getCounterLocalService() {
393 return counterLocalService;
394 }
395
396
401 public void setCounterLocalService(CounterLocalService counterLocalService) {
402 this.counterLocalService = counterLocalService;
403 }
404
405
410 public ResourceLocalService getResourceLocalService() {
411 return resourceLocalService;
412 }
413
414
419 public void setResourceLocalService(
420 ResourceLocalService resourceLocalService) {
421 this.resourceLocalService = resourceLocalService;
422 }
423
424
429 public ResourceService getResourceService() {
430 return resourceService;
431 }
432
433
438 public void setResourceService(ResourceService resourceService) {
439 this.resourceService = resourceService;
440 }
441
442
447 public ResourcePersistence getResourcePersistence() {
448 return resourcePersistence;
449 }
450
451
456 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
457 this.resourcePersistence = resourcePersistence;
458 }
459
460
465 public ResourceFinder getResourceFinder() {
466 return resourceFinder;
467 }
468
469
474 public void setResourceFinder(ResourceFinder resourceFinder) {
475 this.resourceFinder = resourceFinder;
476 }
477
478
483 public UserLocalService getUserLocalService() {
484 return userLocalService;
485 }
486
487
492 public void setUserLocalService(UserLocalService userLocalService) {
493 this.userLocalService = userLocalService;
494 }
495
496
501 public UserService getUserService() {
502 return userService;
503 }
504
505
510 public void setUserService(UserService userService) {
511 this.userService = userService;
512 }
513
514
519 public UserPersistence getUserPersistence() {
520 return userPersistence;
521 }
522
523
528 public void setUserPersistence(UserPersistence userPersistence) {
529 this.userPersistence = userPersistence;
530 }
531
532
537 public UserFinder getUserFinder() {
538 return userFinder;
539 }
540
541
546 public void setUserFinder(UserFinder userFinder) {
547 this.userFinder = userFinder;
548 }
549
550
555 public BlogsEntryLocalService getBlogsEntryLocalService() {
556 return blogsEntryLocalService;
557 }
558
559
564 public void setBlogsEntryLocalService(
565 BlogsEntryLocalService blogsEntryLocalService) {
566 this.blogsEntryLocalService = blogsEntryLocalService;
567 }
568
569
574 public BlogsEntryService getBlogsEntryService() {
575 return blogsEntryService;
576 }
577
578
583 public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
584 this.blogsEntryService = blogsEntryService;
585 }
586
587
592 public BlogsEntryPersistence getBlogsEntryPersistence() {
593 return blogsEntryPersistence;
594 }
595
596
601 public void setBlogsEntryPersistence(
602 BlogsEntryPersistence blogsEntryPersistence) {
603 this.blogsEntryPersistence = blogsEntryPersistence;
604 }
605
606
611 public BlogsEntryFinder getBlogsEntryFinder() {
612 return blogsEntryFinder;
613 }
614
615
620 public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
621 this.blogsEntryFinder = blogsEntryFinder;
622 }
623
624
629 public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
630 return blogsStatsUserLocalService;
631 }
632
633
638 public void setBlogsStatsUserLocalService(
639 BlogsStatsUserLocalService blogsStatsUserLocalService) {
640 this.blogsStatsUserLocalService = blogsStatsUserLocalService;
641 }
642
643
648 public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
649 return blogsStatsUserPersistence;
650 }
651
652
657 public void setBlogsStatsUserPersistence(
658 BlogsStatsUserPersistence blogsStatsUserPersistence) {
659 this.blogsStatsUserPersistence = blogsStatsUserPersistence;
660 }
661
662
667 public BlogsStatsUserFinder getBlogsStatsUserFinder() {
668 return blogsStatsUserFinder;
669 }
670
671
676 public void setBlogsStatsUserFinder(
677 BlogsStatsUserFinder blogsStatsUserFinder) {
678 this.blogsStatsUserFinder = blogsStatsUserFinder;
679 }
680
681
686 public SocialEquityLogLocalService getSocialEquityLogLocalService() {
687 return socialEquityLogLocalService;
688 }
689
690
695 public void setSocialEquityLogLocalService(
696 SocialEquityLogLocalService socialEquityLogLocalService) {
697 this.socialEquityLogLocalService = socialEquityLogLocalService;
698 }
699
700
705 public SocialEquityLogPersistence getSocialEquityLogPersistence() {
706 return socialEquityLogPersistence;
707 }
708
709
714 public void setSocialEquityLogPersistence(
715 SocialEquityLogPersistence socialEquityLogPersistence) {
716 this.socialEquityLogPersistence = socialEquityLogPersistence;
717 }
718
719
724 protected void runSQL(String sql) throws SystemException {
725 try {
726 DataSource dataSource = ratingsEntryPersistence.getDataSource();
727
728 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
729 sql, new int[0]);
730
731 sqlUpdate.update();
732 }
733 catch (Exception e) {
734 throw new SystemException(e);
735 }
736 }
737
738 @BeanReference(type = RatingsEntryLocalService.class)
739 protected RatingsEntryLocalService ratingsEntryLocalService;
740 @BeanReference(type = RatingsEntryService.class)
741 protected RatingsEntryService ratingsEntryService;
742 @BeanReference(type = RatingsEntryPersistence.class)
743 protected RatingsEntryPersistence ratingsEntryPersistence;
744 @BeanReference(type = RatingsEntryFinder.class)
745 protected RatingsEntryFinder ratingsEntryFinder;
746 @BeanReference(type = RatingsStatsLocalService.class)
747 protected RatingsStatsLocalService ratingsStatsLocalService;
748 @BeanReference(type = RatingsStatsPersistence.class)
749 protected RatingsStatsPersistence ratingsStatsPersistence;
750 @BeanReference(type = RatingsStatsFinder.class)
751 protected RatingsStatsFinder ratingsStatsFinder;
752 @BeanReference(type = CounterLocalService.class)
753 protected CounterLocalService counterLocalService;
754 @BeanReference(type = ResourceLocalService.class)
755 protected ResourceLocalService resourceLocalService;
756 @BeanReference(type = ResourceService.class)
757 protected ResourceService resourceService;
758 @BeanReference(type = ResourcePersistence.class)
759 protected ResourcePersistence resourcePersistence;
760 @BeanReference(type = ResourceFinder.class)
761 protected ResourceFinder resourceFinder;
762 @BeanReference(type = UserLocalService.class)
763 protected UserLocalService userLocalService;
764 @BeanReference(type = UserService.class)
765 protected UserService userService;
766 @BeanReference(type = UserPersistence.class)
767 protected UserPersistence userPersistence;
768 @BeanReference(type = UserFinder.class)
769 protected UserFinder userFinder;
770 @BeanReference(type = BlogsEntryLocalService.class)
771 protected BlogsEntryLocalService blogsEntryLocalService;
772 @BeanReference(type = BlogsEntryService.class)
773 protected BlogsEntryService blogsEntryService;
774 @BeanReference(type = BlogsEntryPersistence.class)
775 protected BlogsEntryPersistence blogsEntryPersistence;
776 @BeanReference(type = BlogsEntryFinder.class)
777 protected BlogsEntryFinder blogsEntryFinder;
778 @BeanReference(type = BlogsStatsUserLocalService.class)
779 protected BlogsStatsUserLocalService blogsStatsUserLocalService;
780 @BeanReference(type = BlogsStatsUserPersistence.class)
781 protected BlogsStatsUserPersistence blogsStatsUserPersistence;
782 @BeanReference(type = BlogsStatsUserFinder.class)
783 protected BlogsStatsUserFinder blogsStatsUserFinder;
784 @BeanReference(type = SocialEquityLogLocalService.class)
785 protected SocialEquityLogLocalService socialEquityLogLocalService;
786 @BeanReference(type = SocialEquityLogPersistence.class)
787 protected SocialEquityLogPersistence socialEquityLogPersistence;
788 }