1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.tasks.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="TasksReviewLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link TasksReviewLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       TasksReviewLocalService
39   * @generated
40   */
41  public class TasksReviewLocalServiceUtil {
42      public static com.liferay.portlet.tasks.model.TasksReview addTasksReview(
43          com.liferay.portlet.tasks.model.TasksReview tasksReview)
44          throws com.liferay.portal.SystemException {
45          return getService().addTasksReview(tasksReview);
46      }
47  
48      public static com.liferay.portlet.tasks.model.TasksReview createTasksReview(
49          long reviewId) {
50          return getService().createTasksReview(reviewId);
51      }
52  
53      public static void deleteTasksReview(long reviewId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteTasksReview(reviewId);
57      }
58  
59      public static void deleteTasksReview(
60          com.liferay.portlet.tasks.model.TasksReview tasksReview)
61          throws com.liferay.portal.SystemException {
62          getService().deleteTasksReview(tasksReview);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portlet.tasks.model.TasksReview getTasksReview(
96          long reviewId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getTasksReview(reviewId);
100     }
101 
102     public static java.util.List<com.liferay.portlet.tasks.model.TasksReview> getTasksReviews(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getTasksReviews(start, end);
105     }
106 
107     public static int getTasksReviewsCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getTasksReviewsCount();
110     }
111 
112     public static com.liferay.portlet.tasks.model.TasksReview updateTasksReview(
113         com.liferay.portlet.tasks.model.TasksReview tasksReview)
114         throws com.liferay.portal.SystemException {
115         return getService().updateTasksReview(tasksReview);
116     }
117 
118     public static com.liferay.portlet.tasks.model.TasksReview updateTasksReview(
119         com.liferay.portlet.tasks.model.TasksReview tasksReview, boolean merge)
120         throws com.liferay.portal.SystemException {
121         return getService().updateTasksReview(tasksReview, merge);
122     }
123 
124     public static com.liferay.portlet.tasks.model.TasksReview addReview(
125         long userId, long proposalId, long assignedByUserId, int stage)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         return getService()
129                    .addReview(userId, proposalId, assignedByUserId, stage);
130     }
131 
132     public static com.liferay.portlet.tasks.model.TasksReview approveReview(
133         long userId, long proposalId, int stage)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException {
136         return getService().approveReview(userId, proposalId, stage);
137     }
138 
139     public static void deleteReview(long reviewId)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         getService().deleteReview(reviewId);
143     }
144 
145     public static void deleteReview(
146         com.liferay.portlet.tasks.model.TasksReview review)
147         throws com.liferay.portal.SystemException {
148         getService().deleteReview(review);
149     }
150 
151     public static void deleteReviews(long proposalId)
152         throws com.liferay.portal.SystemException {
153         getService().deleteReviews(proposalId);
154     }
155 
156     public static com.liferay.portlet.tasks.model.TasksReview getReview(
157         long reviewId)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException {
160         return getService().getReview(reviewId);
161     }
162 
163     public static com.liferay.portlet.tasks.model.TasksReview getReview(
164         long userId, long proposalId)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         return getService().getReview(userId, proposalId);
168     }
169 
170     public static java.util.List<com.liferay.portlet.tasks.model.TasksReview> getReviews(
171         long proposalId) throws com.liferay.portal.SystemException {
172         return getService().getReviews(proposalId);
173     }
174 
175     public static java.util.List<com.liferay.portlet.tasks.model.TasksReview> getReviews(
176         long proposalId, int stage) throws com.liferay.portal.SystemException {
177         return getService().getReviews(proposalId, stage);
178     }
179 
180     public static java.util.List<com.liferay.portlet.tasks.model.TasksReview> getReviews(
181         long proposalId, int stage, boolean completed)
182         throws com.liferay.portal.SystemException {
183         return getService().getReviews(proposalId, stage, completed);
184     }
185 
186     public static java.util.List<com.liferay.portlet.tasks.model.TasksReview> getReviews(
187         long proposalId, int stage, boolean completed, boolean rejected)
188         throws com.liferay.portal.SystemException {
189         return getService().getReviews(proposalId, stage, completed, rejected);
190     }
191 
192     public static com.liferay.portlet.tasks.model.TasksReview rejectReview(
193         long userId, long proposalId, int stage)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException {
196         return getService().rejectReview(userId, proposalId, stage);
197     }
198 
199     public static void updateReviews(long proposalId, long assignedByUserId,
200         long[][] userIdsPerStage)
201         throws com.liferay.portal.PortalException,
202             com.liferay.portal.SystemException {
203         getService().updateReviews(proposalId, assignedByUserId, userIdsPerStage);
204     }
205 
206     public static TasksReviewLocalService getService() {
207         if (_service == null) {
208             _service = (TasksReviewLocalService)PortalBeanLocatorUtil.locate(TasksReviewLocalService.class.getName());
209 
210             ReferenceRegistry.registerReference(TasksReviewLocalServiceUtil.class,
211                 "_service");
212             MethodCache.remove(TasksReviewLocalService.class);
213         }
214 
215         return _service;
216     }
217 
218     public void setService(TasksReviewLocalService service) {
219         MethodCache.remove(TasksReviewLocalService.class);
220 
221         _service = service;
222 
223         ReferenceRegistry.registerReference(TasksReviewLocalServiceUtil.class,
224             "_service");
225         MethodCache.remove(TasksReviewLocalService.class);
226     }
227 
228     private static TasksReviewLocalService _service;
229 }