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.messageboards.service.MBMessageLocalService;
036 import com.liferay.portlet.messageboards.service.MBMessageService;
037 import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
038 import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
039 import com.liferay.portlet.social.service.SocialActivityLocalService;
040 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
041 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
042 import com.liferay.portlet.tasks.model.TasksProposal;
043 import com.liferay.portlet.tasks.service.TasksProposalLocalService;
044 import com.liferay.portlet.tasks.service.TasksProposalService;
045 import com.liferay.portlet.tasks.service.TasksReviewLocalService;
046 import com.liferay.portlet.tasks.service.TasksReviewService;
047 import com.liferay.portlet.tasks.service.persistence.TasksProposalFinder;
048 import com.liferay.portlet.tasks.service.persistence.TasksProposalPersistence;
049 import com.liferay.portlet.tasks.service.persistence.TasksReviewPersistence;
050
051 import java.util.List;
052
053 import javax.sql.DataSource;
054
055
071 public abstract class TasksProposalLocalServiceBaseImpl
072 implements TasksProposalLocalService {
073
080 public TasksProposal addTasksProposal(TasksProposal tasksProposal)
081 throws SystemException {
082 tasksProposal.setNew(true);
083
084 return tasksProposalPersistence.update(tasksProposal, false);
085 }
086
087
093 public TasksProposal createTasksProposal(long proposalId) {
094 return tasksProposalPersistence.create(proposalId);
095 }
096
097
104 public void deleteTasksProposal(long proposalId)
105 throws PortalException, SystemException {
106 tasksProposalPersistence.remove(proposalId);
107 }
108
109
115 public void deleteTasksProposal(TasksProposal tasksProposal)
116 throws SystemException {
117 tasksProposalPersistence.remove(tasksProposal);
118 }
119
120
127 @SuppressWarnings("rawtypes")
128 public List dynamicQuery(DynamicQuery dynamicQuery)
129 throws SystemException {
130 return tasksProposalPersistence.findWithDynamicQuery(dynamicQuery);
131 }
132
133
146 @SuppressWarnings("rawtypes")
147 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
148 throws SystemException {
149 return tasksProposalPersistence.findWithDynamicQuery(dynamicQuery,
150 start, end);
151 }
152
153
167 @SuppressWarnings("rawtypes")
168 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
169 OrderByComparator orderByComparator) throws SystemException {
170 return tasksProposalPersistence.findWithDynamicQuery(dynamicQuery,
171 start, end, orderByComparator);
172 }
173
174
181 public long dynamicQueryCount(DynamicQuery dynamicQuery)
182 throws SystemException {
183 return tasksProposalPersistence.countWithDynamicQuery(dynamicQuery);
184 }
185
186
194 public TasksProposal getTasksProposal(long proposalId)
195 throws PortalException, SystemException {
196 return tasksProposalPersistence.findByPrimaryKey(proposalId);
197 }
198
199
211 public List<TasksProposal> getTasksProposals(int start, int end)
212 throws SystemException {
213 return tasksProposalPersistence.findAll(start, end);
214 }
215
216
222 public int getTasksProposalsCount() throws SystemException {
223 return tasksProposalPersistence.countAll();
224 }
225
226
233 public TasksProposal updateTasksProposal(TasksProposal tasksProposal)
234 throws SystemException {
235 tasksProposal.setNew(false);
236
237 return tasksProposalPersistence.update(tasksProposal, true);
238 }
239
240
248 public TasksProposal updateTasksProposal(TasksProposal tasksProposal,
249 boolean merge) throws SystemException {
250 tasksProposal.setNew(false);
251
252 return tasksProposalPersistence.update(tasksProposal, merge);
253 }
254
255
260 public TasksProposalLocalService getTasksProposalLocalService() {
261 return tasksProposalLocalService;
262 }
263
264
269 public void setTasksProposalLocalService(
270 TasksProposalLocalService tasksProposalLocalService) {
271 this.tasksProposalLocalService = tasksProposalLocalService;
272 }
273
274
279 public TasksProposalService getTasksProposalService() {
280 return tasksProposalService;
281 }
282
283
288 public void setTasksProposalService(
289 TasksProposalService tasksProposalService) {
290 this.tasksProposalService = tasksProposalService;
291 }
292
293
298 public TasksProposalPersistence getTasksProposalPersistence() {
299 return tasksProposalPersistence;
300 }
301
302
307 public void setTasksProposalPersistence(
308 TasksProposalPersistence tasksProposalPersistence) {
309 this.tasksProposalPersistence = tasksProposalPersistence;
310 }
311
312
317 public TasksProposalFinder getTasksProposalFinder() {
318 return tasksProposalFinder;
319 }
320
321
326 public void setTasksProposalFinder(TasksProposalFinder tasksProposalFinder) {
327 this.tasksProposalFinder = tasksProposalFinder;
328 }
329
330
335 public TasksReviewLocalService getTasksReviewLocalService() {
336 return tasksReviewLocalService;
337 }
338
339
344 public void setTasksReviewLocalService(
345 TasksReviewLocalService tasksReviewLocalService) {
346 this.tasksReviewLocalService = tasksReviewLocalService;
347 }
348
349
354 public TasksReviewService getTasksReviewService() {
355 return tasksReviewService;
356 }
357
358
363 public void setTasksReviewService(TasksReviewService tasksReviewService) {
364 this.tasksReviewService = tasksReviewService;
365 }
366
367
372 public TasksReviewPersistence getTasksReviewPersistence() {
373 return tasksReviewPersistence;
374 }
375
376
381 public void setTasksReviewPersistence(
382 TasksReviewPersistence tasksReviewPersistence) {
383 this.tasksReviewPersistence = tasksReviewPersistence;
384 }
385
386
391 public CounterLocalService getCounterLocalService() {
392 return counterLocalService;
393 }
394
395
400 public void setCounterLocalService(CounterLocalService counterLocalService) {
401 this.counterLocalService = counterLocalService;
402 }
403
404
409 public ResourceLocalService getResourceLocalService() {
410 return resourceLocalService;
411 }
412
413
418 public void setResourceLocalService(
419 ResourceLocalService resourceLocalService) {
420 this.resourceLocalService = resourceLocalService;
421 }
422
423
428 public ResourceService getResourceService() {
429 return resourceService;
430 }
431
432
437 public void setResourceService(ResourceService resourceService) {
438 this.resourceService = resourceService;
439 }
440
441
446 public ResourcePersistence getResourcePersistence() {
447 return resourcePersistence;
448 }
449
450
455 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
456 this.resourcePersistence = resourcePersistence;
457 }
458
459
464 public ResourceFinder getResourceFinder() {
465 return resourceFinder;
466 }
467
468
473 public void setResourceFinder(ResourceFinder resourceFinder) {
474 this.resourceFinder = resourceFinder;
475 }
476
477
482 public UserLocalService getUserLocalService() {
483 return userLocalService;
484 }
485
486
491 public void setUserLocalService(UserLocalService userLocalService) {
492 this.userLocalService = userLocalService;
493 }
494
495
500 public UserService getUserService() {
501 return userService;
502 }
503
504
509 public void setUserService(UserService userService) {
510 this.userService = userService;
511 }
512
513
518 public UserPersistence getUserPersistence() {
519 return userPersistence;
520 }
521
522
527 public void setUserPersistence(UserPersistence userPersistence) {
528 this.userPersistence = userPersistence;
529 }
530
531
536 public UserFinder getUserFinder() {
537 return userFinder;
538 }
539
540
545 public void setUserFinder(UserFinder userFinder) {
546 this.userFinder = userFinder;
547 }
548
549
554 public MBMessageLocalService getMBMessageLocalService() {
555 return mbMessageLocalService;
556 }
557
558
563 public void setMBMessageLocalService(
564 MBMessageLocalService mbMessageLocalService) {
565 this.mbMessageLocalService = mbMessageLocalService;
566 }
567
568
573 public MBMessageService getMBMessageService() {
574 return mbMessageService;
575 }
576
577
582 public void setMBMessageService(MBMessageService mbMessageService) {
583 this.mbMessageService = mbMessageService;
584 }
585
586
591 public MBMessagePersistence getMBMessagePersistence() {
592 return mbMessagePersistence;
593 }
594
595
600 public void setMBMessagePersistence(
601 MBMessagePersistence mbMessagePersistence) {
602 this.mbMessagePersistence = mbMessagePersistence;
603 }
604
605
610 public MBMessageFinder getMBMessageFinder() {
611 return mbMessageFinder;
612 }
613
614
619 public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
620 this.mbMessageFinder = mbMessageFinder;
621 }
622
623
628 public SocialActivityLocalService getSocialActivityLocalService() {
629 return socialActivityLocalService;
630 }
631
632
637 public void setSocialActivityLocalService(
638 SocialActivityLocalService socialActivityLocalService) {
639 this.socialActivityLocalService = socialActivityLocalService;
640 }
641
642
647 public SocialActivityPersistence getSocialActivityPersistence() {
648 return socialActivityPersistence;
649 }
650
651
656 public void setSocialActivityPersistence(
657 SocialActivityPersistence socialActivityPersistence) {
658 this.socialActivityPersistence = socialActivityPersistence;
659 }
660
661
666 public SocialActivityFinder getSocialActivityFinder() {
667 return socialActivityFinder;
668 }
669
670
675 public void setSocialActivityFinder(
676 SocialActivityFinder socialActivityFinder) {
677 this.socialActivityFinder = socialActivityFinder;
678 }
679
680
685 protected void runSQL(String sql) throws SystemException {
686 try {
687 DataSource dataSource = tasksProposalPersistence.getDataSource();
688
689 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
690 sql, new int[0]);
691
692 sqlUpdate.update();
693 }
694 catch (Exception e) {
695 throw new SystemException(e);
696 }
697 }
698
699 @BeanReference(type = TasksProposalLocalService.class)
700 protected TasksProposalLocalService tasksProposalLocalService;
701 @BeanReference(type = TasksProposalService.class)
702 protected TasksProposalService tasksProposalService;
703 @BeanReference(type = TasksProposalPersistence.class)
704 protected TasksProposalPersistence tasksProposalPersistence;
705 @BeanReference(type = TasksProposalFinder.class)
706 protected TasksProposalFinder tasksProposalFinder;
707 @BeanReference(type = TasksReviewLocalService.class)
708 protected TasksReviewLocalService tasksReviewLocalService;
709 @BeanReference(type = TasksReviewService.class)
710 protected TasksReviewService tasksReviewService;
711 @BeanReference(type = TasksReviewPersistence.class)
712 protected TasksReviewPersistence tasksReviewPersistence;
713 @BeanReference(type = CounterLocalService.class)
714 protected CounterLocalService counterLocalService;
715 @BeanReference(type = ResourceLocalService.class)
716 protected ResourceLocalService resourceLocalService;
717 @BeanReference(type = ResourceService.class)
718 protected ResourceService resourceService;
719 @BeanReference(type = ResourcePersistence.class)
720 protected ResourcePersistence resourcePersistence;
721 @BeanReference(type = ResourceFinder.class)
722 protected ResourceFinder resourceFinder;
723 @BeanReference(type = UserLocalService.class)
724 protected UserLocalService userLocalService;
725 @BeanReference(type = UserService.class)
726 protected UserService userService;
727 @BeanReference(type = UserPersistence.class)
728 protected UserPersistence userPersistence;
729 @BeanReference(type = UserFinder.class)
730 protected UserFinder userFinder;
731 @BeanReference(type = MBMessageLocalService.class)
732 protected MBMessageLocalService mbMessageLocalService;
733 @BeanReference(type = MBMessageService.class)
734 protected MBMessageService mbMessageService;
735 @BeanReference(type = MBMessagePersistence.class)
736 protected MBMessagePersistence mbMessagePersistence;
737 @BeanReference(type = MBMessageFinder.class)
738 protected MBMessageFinder mbMessageFinder;
739 @BeanReference(type = SocialActivityLocalService.class)
740 protected SocialActivityLocalService socialActivityLocalService;
741 @BeanReference(type = SocialActivityPersistence.class)
742 protected SocialActivityPersistence socialActivityPersistence;
743 @BeanReference(type = SocialActivityFinder.class)
744 protected SocialActivityFinder socialActivityFinder;
745 }