001
014
015 package com.liferay.portlet.tasks.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.service.SocialActivityLocalService;
036 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
037 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
038 import com.liferay.portlet.tasks.model.TasksReview;
039 import com.liferay.portlet.tasks.service.TasksProposalLocalService;
040 import com.liferay.portlet.tasks.service.TasksProposalService;
041 import com.liferay.portlet.tasks.service.TasksReviewLocalService;
042 import com.liferay.portlet.tasks.service.TasksReviewService;
043 import com.liferay.portlet.tasks.service.persistence.TasksProposalFinder;
044 import com.liferay.portlet.tasks.service.persistence.TasksProposalPersistence;
045 import com.liferay.portlet.tasks.service.persistence.TasksReviewPersistence;
046
047 import java.util.List;
048
049 import javax.sql.DataSource;
050
051
067 public abstract class TasksReviewLocalServiceBaseImpl
068 implements TasksReviewLocalService {
069
076 public TasksReview addTasksReview(TasksReview tasksReview)
077 throws SystemException {
078 tasksReview.setNew(true);
079
080 return tasksReviewPersistence.update(tasksReview, false);
081 }
082
083
089 public TasksReview createTasksReview(long reviewId) {
090 return tasksReviewPersistence.create(reviewId);
091 }
092
093
100 public void deleteTasksReview(long reviewId)
101 throws PortalException, SystemException {
102 tasksReviewPersistence.remove(reviewId);
103 }
104
105
111 public void deleteTasksReview(TasksReview tasksReview)
112 throws SystemException {
113 tasksReviewPersistence.remove(tasksReview);
114 }
115
116
123 @SuppressWarnings("rawtypes")
124 public List dynamicQuery(DynamicQuery dynamicQuery)
125 throws SystemException {
126 return tasksReviewPersistence.findWithDynamicQuery(dynamicQuery);
127 }
128
129
142 @SuppressWarnings("rawtypes")
143 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
144 throws SystemException {
145 return tasksReviewPersistence.findWithDynamicQuery(dynamicQuery, start,
146 end);
147 }
148
149
163 @SuppressWarnings("rawtypes")
164 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
165 OrderByComparator orderByComparator) throws SystemException {
166 return tasksReviewPersistence.findWithDynamicQuery(dynamicQuery, start,
167 end, orderByComparator);
168 }
169
170
177 public long dynamicQueryCount(DynamicQuery dynamicQuery)
178 throws SystemException {
179 return tasksReviewPersistence.countWithDynamicQuery(dynamicQuery);
180 }
181
182
190 public TasksReview getTasksReview(long reviewId)
191 throws PortalException, SystemException {
192 return tasksReviewPersistence.findByPrimaryKey(reviewId);
193 }
194
195
207 public List<TasksReview> getTasksReviews(int start, int end)
208 throws SystemException {
209 return tasksReviewPersistence.findAll(start, end);
210 }
211
212
218 public int getTasksReviewsCount() throws SystemException {
219 return tasksReviewPersistence.countAll();
220 }
221
222
229 public TasksReview updateTasksReview(TasksReview tasksReview)
230 throws SystemException {
231 tasksReview.setNew(false);
232
233 return tasksReviewPersistence.update(tasksReview, true);
234 }
235
236
244 public TasksReview updateTasksReview(TasksReview tasksReview, boolean merge)
245 throws SystemException {
246 tasksReview.setNew(false);
247
248 return tasksReviewPersistence.update(tasksReview, merge);
249 }
250
251
256 public TasksProposalLocalService getTasksProposalLocalService() {
257 return tasksProposalLocalService;
258 }
259
260
265 public void setTasksProposalLocalService(
266 TasksProposalLocalService tasksProposalLocalService) {
267 this.tasksProposalLocalService = tasksProposalLocalService;
268 }
269
270
275 public TasksProposalService getTasksProposalService() {
276 return tasksProposalService;
277 }
278
279
284 public void setTasksProposalService(
285 TasksProposalService tasksProposalService) {
286 this.tasksProposalService = tasksProposalService;
287 }
288
289
294 public TasksProposalPersistence getTasksProposalPersistence() {
295 return tasksProposalPersistence;
296 }
297
298
303 public void setTasksProposalPersistence(
304 TasksProposalPersistence tasksProposalPersistence) {
305 this.tasksProposalPersistence = tasksProposalPersistence;
306 }
307
308
313 public TasksProposalFinder getTasksProposalFinder() {
314 return tasksProposalFinder;
315 }
316
317
322 public void setTasksProposalFinder(TasksProposalFinder tasksProposalFinder) {
323 this.tasksProposalFinder = tasksProposalFinder;
324 }
325
326
331 public TasksReviewLocalService getTasksReviewLocalService() {
332 return tasksReviewLocalService;
333 }
334
335
340 public void setTasksReviewLocalService(
341 TasksReviewLocalService tasksReviewLocalService) {
342 this.tasksReviewLocalService = tasksReviewLocalService;
343 }
344
345
350 public TasksReviewService getTasksReviewService() {
351 return tasksReviewService;
352 }
353
354
359 public void setTasksReviewService(TasksReviewService tasksReviewService) {
360 this.tasksReviewService = tasksReviewService;
361 }
362
363
368 public TasksReviewPersistence getTasksReviewPersistence() {
369 return tasksReviewPersistence;
370 }
371
372
377 public void setTasksReviewPersistence(
378 TasksReviewPersistence tasksReviewPersistence) {
379 this.tasksReviewPersistence = tasksReviewPersistence;
380 }
381
382
387 public CounterLocalService getCounterLocalService() {
388 return counterLocalService;
389 }
390
391
396 public void setCounterLocalService(CounterLocalService counterLocalService) {
397 this.counterLocalService = counterLocalService;
398 }
399
400
405 public ResourceLocalService getResourceLocalService() {
406 return resourceLocalService;
407 }
408
409
414 public void setResourceLocalService(
415 ResourceLocalService resourceLocalService) {
416 this.resourceLocalService = resourceLocalService;
417 }
418
419
424 public ResourceService getResourceService() {
425 return resourceService;
426 }
427
428
433 public void setResourceService(ResourceService resourceService) {
434 this.resourceService = resourceService;
435 }
436
437
442 public ResourcePersistence getResourcePersistence() {
443 return resourcePersistence;
444 }
445
446
451 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
452 this.resourcePersistence = resourcePersistence;
453 }
454
455
460 public ResourceFinder getResourceFinder() {
461 return resourceFinder;
462 }
463
464
469 public void setResourceFinder(ResourceFinder resourceFinder) {
470 this.resourceFinder = resourceFinder;
471 }
472
473
478 public UserLocalService getUserLocalService() {
479 return userLocalService;
480 }
481
482
487 public void setUserLocalService(UserLocalService userLocalService) {
488 this.userLocalService = userLocalService;
489 }
490
491
496 public UserService getUserService() {
497 return userService;
498 }
499
500
505 public void setUserService(UserService userService) {
506 this.userService = userService;
507 }
508
509
514 public UserPersistence getUserPersistence() {
515 return userPersistence;
516 }
517
518
523 public void setUserPersistence(UserPersistence userPersistence) {
524 this.userPersistence = userPersistence;
525 }
526
527
532 public UserFinder getUserFinder() {
533 return userFinder;
534 }
535
536
541 public void setUserFinder(UserFinder userFinder) {
542 this.userFinder = userFinder;
543 }
544
545
550 public SocialActivityLocalService getSocialActivityLocalService() {
551 return socialActivityLocalService;
552 }
553
554
559 public void setSocialActivityLocalService(
560 SocialActivityLocalService socialActivityLocalService) {
561 this.socialActivityLocalService = socialActivityLocalService;
562 }
563
564
569 public SocialActivityPersistence getSocialActivityPersistence() {
570 return socialActivityPersistence;
571 }
572
573
578 public void setSocialActivityPersistence(
579 SocialActivityPersistence socialActivityPersistence) {
580 this.socialActivityPersistence = socialActivityPersistence;
581 }
582
583
588 public SocialActivityFinder getSocialActivityFinder() {
589 return socialActivityFinder;
590 }
591
592
597 public void setSocialActivityFinder(
598 SocialActivityFinder socialActivityFinder) {
599 this.socialActivityFinder = socialActivityFinder;
600 }
601
602
607 protected void runSQL(String sql) throws SystemException {
608 try {
609 DataSource dataSource = tasksReviewPersistence.getDataSource();
610
611 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
612 sql, new int[0]);
613
614 sqlUpdate.update();
615 }
616 catch (Exception e) {
617 throw new SystemException(e);
618 }
619 }
620
621 @BeanReference(type = TasksProposalLocalService.class)
622 protected TasksProposalLocalService tasksProposalLocalService;
623 @BeanReference(type = TasksProposalService.class)
624 protected TasksProposalService tasksProposalService;
625 @BeanReference(type = TasksProposalPersistence.class)
626 protected TasksProposalPersistence tasksProposalPersistence;
627 @BeanReference(type = TasksProposalFinder.class)
628 protected TasksProposalFinder tasksProposalFinder;
629 @BeanReference(type = TasksReviewLocalService.class)
630 protected TasksReviewLocalService tasksReviewLocalService;
631 @BeanReference(type = TasksReviewService.class)
632 protected TasksReviewService tasksReviewService;
633 @BeanReference(type = TasksReviewPersistence.class)
634 protected TasksReviewPersistence tasksReviewPersistence;
635 @BeanReference(type = CounterLocalService.class)
636 protected CounterLocalService counterLocalService;
637 @BeanReference(type = ResourceLocalService.class)
638 protected ResourceLocalService resourceLocalService;
639 @BeanReference(type = ResourceService.class)
640 protected ResourceService resourceService;
641 @BeanReference(type = ResourcePersistence.class)
642 protected ResourcePersistence resourcePersistence;
643 @BeanReference(type = ResourceFinder.class)
644 protected ResourceFinder resourceFinder;
645 @BeanReference(type = UserLocalService.class)
646 protected UserLocalService userLocalService;
647 @BeanReference(type = UserService.class)
648 protected UserService userService;
649 @BeanReference(type = UserPersistence.class)
650 protected UserPersistence userPersistence;
651 @BeanReference(type = UserFinder.class)
652 protected UserFinder userFinder;
653 @BeanReference(type = SocialActivityLocalService.class)
654 protected SocialActivityLocalService socialActivityLocalService;
655 @BeanReference(type = SocialActivityPersistence.class)
656 protected SocialActivityPersistence socialActivityPersistence;
657 @BeanReference(type = SocialActivityFinder.class)
658 protected SocialActivityFinder socialActivityFinder;
659 }