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="TasksProposalLocalServiceUtil.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 TasksProposalLocalService} 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       TasksProposalLocalService
39   * @generated
40   */
41  public class TasksProposalLocalServiceUtil {
42      public static com.liferay.portlet.tasks.model.TasksProposal addTasksProposal(
43          com.liferay.portlet.tasks.model.TasksProposal tasksProposal)
44          throws com.liferay.portal.SystemException {
45          return getService().addTasksProposal(tasksProposal);
46      }
47  
48      public static com.liferay.portlet.tasks.model.TasksProposal createTasksProposal(
49          long proposalId) {
50          return getService().createTasksProposal(proposalId);
51      }
52  
53      public static void deleteTasksProposal(long proposalId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteTasksProposal(proposalId);
57      }
58  
59      public static void deleteTasksProposal(
60          com.liferay.portlet.tasks.model.TasksProposal tasksProposal)
61          throws com.liferay.portal.SystemException {
62          getService().deleteTasksProposal(tasksProposal);
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.TasksProposal getTasksProposal(
96          long proposalId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getTasksProposal(proposalId);
100     }
101 
102     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> getTasksProposals(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getTasksProposals(start, end);
105     }
106 
107     public static int getTasksProposalsCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getTasksProposalsCount();
110     }
111 
112     public static com.liferay.portlet.tasks.model.TasksProposal updateTasksProposal(
113         com.liferay.portlet.tasks.model.TasksProposal tasksProposal)
114         throws com.liferay.portal.SystemException {
115         return getService().updateTasksProposal(tasksProposal);
116     }
117 
118     public static com.liferay.portlet.tasks.model.TasksProposal updateTasksProposal(
119         com.liferay.portlet.tasks.model.TasksProposal tasksProposal,
120         boolean merge) throws com.liferay.portal.SystemException {
121         return getService().updateTasksProposal(tasksProposal, merge);
122     }
123 
124     public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
125         long userId, long groupId, java.lang.String className,
126         java.lang.String classPK, java.lang.String name,
127         java.lang.String description, long reviewUserId,
128         boolean addCommunityPermissions, boolean addGuestPermissions)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException {
131         return getService()
132                    .addProposal(userId, groupId, className, classPK, name,
133             description, reviewUserId, addCommunityPermissions,
134             addGuestPermissions);
135     }
136 
137     public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
138         long userId, long groupId, java.lang.String className,
139         java.lang.String classPK, java.lang.String name,
140         java.lang.String description, long reviewUserId,
141         java.lang.Boolean addCommunityPermissions,
142         java.lang.Boolean addGuestPermissions,
143         java.lang.String[] communityPermissions,
144         java.lang.String[] guestPermissions)
145         throws com.liferay.portal.PortalException,
146             com.liferay.portal.SystemException {
147         return getService()
148                    .addProposal(userId, groupId, className, classPK, name,
149             description, reviewUserId, addCommunityPermissions,
150             addGuestPermissions, communityPermissions, guestPermissions);
151     }
152 
153     public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
154         long userId, long groupId, java.lang.String className,
155         java.lang.String classPK, java.lang.String name,
156         java.lang.String description, long reviewUserId,
157         java.lang.String[] communityPermissions,
158         java.lang.String[] guestPermissions)
159         throws com.liferay.portal.PortalException,
160             com.liferay.portal.SystemException {
161         return getService()
162                    .addProposal(userId, groupId, className, classPK, name,
163             description, reviewUserId, communityPermissions, guestPermissions);
164     }
165 
166     public static void addProposalResources(long proposalId,
167         boolean addCommunityPermissions, boolean addGuestPermissions)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException {
170         getService()
171             .addProposalResources(proposalId, addCommunityPermissions,
172             addGuestPermissions);
173     }
174 
175     public static void addProposalResources(long proposalId,
176         java.lang.String[] communityPermissions,
177         java.lang.String[] guestPermissions)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException {
180         getService()
181             .addProposalResources(proposalId, communityPermissions,
182             guestPermissions);
183     }
184 
185     public static void addProposalResources(
186         com.liferay.portlet.tasks.model.TasksProposal proposal,
187         boolean addCommunityPermissions, boolean addGuestPermissions)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException {
190         getService()
191             .addProposalResources(proposal, addCommunityPermissions,
192             addGuestPermissions);
193     }
194 
195     public static void addProposalResources(
196         com.liferay.portlet.tasks.model.TasksProposal proposal,
197         java.lang.String[] communityPermissions,
198         java.lang.String[] guestPermissions)
199         throws com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException {
201         getService()
202             .addProposalResources(proposal, communityPermissions,
203             guestPermissions);
204     }
205 
206     public static void deleteProposal(long proposalId)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException {
209         getService().deleteProposal(proposalId);
210     }
211 
212     public static void deleteProposal(long classNameId, java.lang.String classPK)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException {
215         getService().deleteProposal(classNameId, classPK);
216     }
217 
218     public static void deleteProposal(java.lang.String className,
219         java.lang.String classPK)
220         throws com.liferay.portal.PortalException,
221             com.liferay.portal.SystemException {
222         getService().deleteProposal(className, classPK);
223     }
224 
225     public static void deleteProposal(
226         com.liferay.portlet.tasks.model.TasksProposal proposal)
227         throws com.liferay.portal.PortalException,
228             com.liferay.portal.SystemException {
229         getService().deleteProposal(proposal);
230     }
231 
232     public static void deleteProposals(long groupId)
233         throws com.liferay.portal.PortalException,
234             com.liferay.portal.SystemException {
235         getService().deleteProposals(groupId);
236     }
237 
238     public static com.liferay.portlet.tasks.model.TasksProposal getProposal(
239         long proposalId)
240         throws com.liferay.portal.PortalException,
241             com.liferay.portal.SystemException {
242         return getService().getProposal(proposalId);
243     }
244 
245     public static com.liferay.portlet.tasks.model.TasksProposal getProposal(
246         long classNameId, java.lang.String classPK)
247         throws com.liferay.portal.PortalException,
248             com.liferay.portal.SystemException {
249         return getService().getProposal(classNameId, classPK);
250     }
251 
252     public static com.liferay.portlet.tasks.model.TasksProposal getProposal(
253         java.lang.String className, java.lang.String classPK)
254         throws com.liferay.portal.PortalException,
255             com.liferay.portal.SystemException {
256         return getService().getProposal(className, classPK);
257     }
258 
259     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> getProposals(
260         long groupId, int start, int end)
261         throws com.liferay.portal.SystemException {
262         return getService().getProposals(groupId, start, end);
263     }
264 
265     public static int getProposalsCount(long groupId)
266         throws com.liferay.portal.SystemException {
267         return getService().getProposalsCount(groupId);
268     }
269 
270     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> getReviewProposals(
271         long groupId, long userId, int start, int end)
272         throws com.liferay.portal.SystemException {
273         return getService().getReviewProposals(groupId, userId, start, end);
274     }
275 
276     public static int getReviewProposalsCount(long groupId, long userId)
277         throws com.liferay.portal.SystemException {
278         return getService().getReviewProposalsCount(groupId, userId);
279     }
280 
281     public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> getUserProposals(
282         long groupId, long userId, int start, int end)
283         throws com.liferay.portal.SystemException {
284         return getService().getUserProposals(groupId, userId, start, end);
285     }
286 
287     public static int getUserProposalsCount(long groupId, long userId)
288         throws com.liferay.portal.SystemException {
289         return getService().getUserProposalsCount(groupId, userId);
290     }
291 
292     public static com.liferay.portlet.tasks.model.TasksProposal updateProposal(
293         long userId, long proposalId, java.lang.String description,
294         int dueDateMonth, int dueDateDay, int dueDateYear, int dueDateHour,
295         int dueDateMinute)
296         throws com.liferay.portal.PortalException,
297             com.liferay.portal.SystemException {
298         return getService()
299                    .updateProposal(userId, proposalId, description,
300             dueDateMonth, dueDateDay, dueDateYear, dueDateHour, dueDateMinute);
301     }
302 
303     public static TasksProposalLocalService getService() {
304         if (_service == null) {
305             _service = (TasksProposalLocalService)PortalBeanLocatorUtil.locate(TasksProposalLocalService.class.getName());
306 
307             ReferenceRegistry.registerReference(TasksProposalLocalServiceUtil.class,
308                 "_service");
309             MethodCache.remove(TasksProposalLocalService.class);
310         }
311 
312         return _service;
313     }
314 
315     public void setService(TasksProposalLocalService service) {
316         MethodCache.remove(TasksProposalLocalService.class);
317 
318         _service = service;
319 
320         ReferenceRegistry.registerReference(TasksProposalLocalServiceUtil.class,
321             "_service");
322         MethodCache.remove(TasksProposalLocalService.class);
323     }
324 
325     private static TasksProposalLocalService _service;
326 }