001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.tasks.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the tasks proposal local service. This utility wraps {@link com.liferay.portlet.tasks.service.impl.TasksProposalLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
023     *
024     * <p>
025     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see TasksProposalLocalService
030     * @see com.liferay.portlet.tasks.service.base.TasksProposalLocalServiceBaseImpl
031     * @see com.liferay.portlet.tasks.service.impl.TasksProposalLocalServiceImpl
032     * @generated
033     */
034    public class TasksProposalLocalServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.tasks.service.impl.TasksProposalLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Adds the tasks proposal to the database. Also notifies the appropriate model listeners.
043            *
044            * @param tasksProposal the tasks proposal
045            * @return the tasks proposal that was added
046            * @throws SystemException if a system exception occurred
047            */
048            public static com.liferay.portlet.tasks.model.TasksProposal addTasksProposal(
049                    com.liferay.portlet.tasks.model.TasksProposal tasksProposal)
050                    throws com.liferay.portal.kernel.exception.SystemException {
051                    return getService().addTasksProposal(tasksProposal);
052            }
053    
054            /**
055            * Creates a new tasks proposal with the primary key. Does not add the tasks proposal to the database.
056            *
057            * @param proposalId the primary key for the new tasks proposal
058            * @return the new tasks proposal
059            */
060            public static com.liferay.portlet.tasks.model.TasksProposal createTasksProposal(
061                    long proposalId) {
062                    return getService().createTasksProposal(proposalId);
063            }
064    
065            /**
066            * Deletes the tasks proposal with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param proposalId the primary key of the tasks proposal
069            * @throws PortalException if a tasks proposal with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public static void deleteTasksProposal(long proposalId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    getService().deleteTasksProposal(proposalId);
076            }
077    
078            /**
079            * Deletes the tasks proposal from the database. Also notifies the appropriate model listeners.
080            *
081            * @param tasksProposal the tasks proposal
082            * @throws SystemException if a system exception occurred
083            */
084            public static void deleteTasksProposal(
085                    com.liferay.portlet.tasks.model.TasksProposal tasksProposal)
086                    throws com.liferay.portal.kernel.exception.SystemException {
087                    getService().deleteTasksProposal(tasksProposal);
088            }
089    
090            /**
091            * Performs a dynamic query on the database and returns the matching rows.
092            *
093            * @param dynamicQuery the dynamic query
094            * @return the matching rows
095            * @throws SystemException if a system exception occurred
096            */
097            @SuppressWarnings("rawtypes")
098            public static java.util.List dynamicQuery(
099                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().dynamicQuery(dynamicQuery);
102            }
103    
104            /**
105            * Performs a dynamic query on the database and returns a range of the matching rows.
106            *
107            * <p>
108            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
109            * </p>
110            *
111            * @param dynamicQuery the dynamic query
112            * @param start the lower bound of the range of model instances
113            * @param end the upper bound of the range of model instances (not inclusive)
114            * @return the range of matching rows
115            * @throws SystemException if a system exception occurred
116            */
117            @SuppressWarnings("rawtypes")
118            public static java.util.List dynamicQuery(
119                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120                    int end) throws com.liferay.portal.kernel.exception.SystemException {
121                    return getService().dynamicQuery(dynamicQuery, start, end);
122            }
123    
124            /**
125            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
126            *
127            * <p>
128            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
129            * </p>
130            *
131            * @param dynamicQuery the dynamic query
132            * @param start the lower bound of the range of model instances
133            * @param end the upper bound of the range of model instances (not inclusive)
134            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
135            * @return the ordered range of matching rows
136            * @throws SystemException if a system exception occurred
137            */
138            @SuppressWarnings("rawtypes")
139            public static java.util.List dynamicQuery(
140                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141                    int end,
142                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    return getService()
145                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146            }
147    
148            /**
149            * Returns the number of rows that match the dynamic query.
150            *
151            * @param dynamicQuery the dynamic query
152            * @return the number of rows that match the dynamic query
153            * @throws SystemException if a system exception occurred
154            */
155            public static long dynamicQueryCount(
156                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157                    throws com.liferay.portal.kernel.exception.SystemException {
158                    return getService().dynamicQueryCount(dynamicQuery);
159            }
160    
161            /**
162            * Returns the tasks proposal with the primary key.
163            *
164            * @param proposalId the primary key of the tasks proposal
165            * @return the tasks proposal
166            * @throws PortalException if a tasks proposal with the primary key could not be found
167            * @throws SystemException if a system exception occurred
168            */
169            public static com.liferay.portlet.tasks.model.TasksProposal getTasksProposal(
170                    long proposalId)
171                    throws com.liferay.portal.kernel.exception.PortalException,
172                            com.liferay.portal.kernel.exception.SystemException {
173                    return getService().getTasksProposal(proposalId);
174            }
175    
176            public static com.liferay.portal.model.PersistedModel getPersistedModel(
177                    java.io.Serializable primaryKeyObj)
178                    throws com.liferay.portal.kernel.exception.PortalException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getService().getPersistedModel(primaryKeyObj);
181            }
182    
183            /**
184            * Returns a range of all the tasks proposals.
185            *
186            * <p>
187            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
188            * </p>
189            *
190            * @param start the lower bound of the range of tasks proposals
191            * @param end the upper bound of the range of tasks proposals (not inclusive)
192            * @return the range of tasks proposals
193            * @throws SystemException if a system exception occurred
194            */
195            public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> getTasksProposals(
196                    int start, int end)
197                    throws com.liferay.portal.kernel.exception.SystemException {
198                    return getService().getTasksProposals(start, end);
199            }
200    
201            /**
202            * Returns the number of tasks proposals.
203            *
204            * @return the number of tasks proposals
205            * @throws SystemException if a system exception occurred
206            */
207            public static int getTasksProposalsCount()
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    return getService().getTasksProposalsCount();
210            }
211    
212            /**
213            * Updates the tasks proposal in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
214            *
215            * @param tasksProposal the tasks proposal
216            * @return the tasks proposal that was updated
217            * @throws SystemException if a system exception occurred
218            */
219            public static com.liferay.portlet.tasks.model.TasksProposal updateTasksProposal(
220                    com.liferay.portlet.tasks.model.TasksProposal tasksProposal)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getService().updateTasksProposal(tasksProposal);
223            }
224    
225            /**
226            * Updates the tasks proposal in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
227            *
228            * @param tasksProposal the tasks proposal
229            * @param merge whether to merge the tasks proposal with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
230            * @return the tasks proposal that was updated
231            * @throws SystemException if a system exception occurred
232            */
233            public static com.liferay.portlet.tasks.model.TasksProposal updateTasksProposal(
234                    com.liferay.portlet.tasks.model.TasksProposal tasksProposal,
235                    boolean merge)
236                    throws com.liferay.portal.kernel.exception.SystemException {
237                    return getService().updateTasksProposal(tasksProposal, merge);
238            }
239    
240            /**
241            * Returns the Spring bean ID for this bean.
242            *
243            * @return the Spring bean ID for this bean
244            */
245            public static java.lang.String getBeanIdentifier() {
246                    return getService().getBeanIdentifier();
247            }
248    
249            /**
250            * Sets the Spring bean ID for this bean.
251            *
252            * @param beanIdentifier the Spring bean ID for this bean
253            */
254            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
255                    getService().setBeanIdentifier(beanIdentifier);
256            }
257    
258            public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
259                    long userId, long groupId, java.lang.String className,
260                    java.lang.String classPK, java.lang.String name,
261                    java.lang.String description, long reviewUserId,
262                    boolean addCommunityPermissions, boolean addGuestPermissions)
263                    throws com.liferay.portal.kernel.exception.PortalException,
264                            com.liferay.portal.kernel.exception.SystemException {
265                    return getService()
266                                       .addProposal(userId, groupId, className, classPK, name,
267                            description, reviewUserId, addCommunityPermissions,
268                            addGuestPermissions);
269            }
270    
271            public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
272                    long userId, long groupId, java.lang.String className,
273                    java.lang.String classPK, java.lang.String name,
274                    java.lang.String description, long reviewUserId,
275                    java.lang.Boolean addCommunityPermissions,
276                    java.lang.Boolean addGuestPermissions,
277                    java.lang.String[] communityPermissions,
278                    java.lang.String[] guestPermissions)
279                    throws com.liferay.portal.kernel.exception.PortalException,
280                            com.liferay.portal.kernel.exception.SystemException {
281                    return getService()
282                                       .addProposal(userId, groupId, className, classPK, name,
283                            description, reviewUserId, addCommunityPermissions,
284                            addGuestPermissions, communityPermissions, guestPermissions);
285            }
286    
287            public static com.liferay.portlet.tasks.model.TasksProposal addProposal(
288                    long userId, long groupId, java.lang.String className,
289                    java.lang.String classPK, java.lang.String name,
290                    java.lang.String description, long reviewUserId,
291                    java.lang.String[] communityPermissions,
292                    java.lang.String[] guestPermissions)
293                    throws com.liferay.portal.kernel.exception.PortalException,
294                            com.liferay.portal.kernel.exception.SystemException {
295                    return getService()
296                                       .addProposal(userId, groupId, className, classPK, name,
297                            description, reviewUserId, communityPermissions, guestPermissions);
298            }
299    
300            public static void addProposalResources(long proposalId,
301                    boolean addCommunityPermissions, boolean addGuestPermissions)
302                    throws com.liferay.portal.kernel.exception.PortalException,
303                            com.liferay.portal.kernel.exception.SystemException {
304                    getService()
305                            .addProposalResources(proposalId, addCommunityPermissions,
306                            addGuestPermissions);
307            }
308    
309            public static void addProposalResources(long proposalId,
310                    java.lang.String[] communityPermissions,
311                    java.lang.String[] guestPermissions)
312                    throws com.liferay.portal.kernel.exception.PortalException,
313                            com.liferay.portal.kernel.exception.SystemException {
314                    getService()
315                            .addProposalResources(proposalId, communityPermissions,
316                            guestPermissions);
317            }
318    
319            public static void addProposalResources(
320                    com.liferay.portlet.tasks.model.TasksProposal proposal,
321                    boolean addCommunityPermissions, boolean addGuestPermissions)
322                    throws com.liferay.portal.kernel.exception.PortalException,
323                            com.liferay.portal.kernel.exception.SystemException {
324                    getService()
325                            .addProposalResources(proposal, addCommunityPermissions,
326                            addGuestPermissions);
327            }
328    
329            public static void addProposalResources(
330                    com.liferay.portlet.tasks.model.TasksProposal proposal,
331                    java.lang.String[] communityPermissions,
332                    java.lang.String[] guestPermissions)
333                    throws com.liferay.portal.kernel.exception.PortalException,
334                            com.liferay.portal.kernel.exception.SystemException {
335                    getService()
336                            .addProposalResources(proposal, communityPermissions,
337                            guestPermissions);
338            }
339    
340            public static void deleteProposal(long proposalId)
341                    throws com.liferay.portal.kernel.exception.PortalException,
342                            com.liferay.portal.kernel.exception.SystemException {
343                    getService().deleteProposal(proposalId);
344            }
345    
346            public static void deleteProposal(long classNameId, java.lang.String classPK)
347                    throws com.liferay.portal.kernel.exception.PortalException,
348                            com.liferay.portal.kernel.exception.SystemException {
349                    getService().deleteProposal(classNameId, classPK);
350            }
351    
352            public static void deleteProposal(java.lang.String className,
353                    java.lang.String classPK)
354                    throws com.liferay.portal.kernel.exception.PortalException,
355                            com.liferay.portal.kernel.exception.SystemException {
356                    getService().deleteProposal(className, classPK);
357            }
358    
359            public static void deleteProposal(
360                    com.liferay.portlet.tasks.model.TasksProposal proposal)
361                    throws com.liferay.portal.kernel.exception.PortalException,
362                            com.liferay.portal.kernel.exception.SystemException {
363                    getService().deleteProposal(proposal);
364            }
365    
366            public static void deleteProposals(long groupId)
367                    throws com.liferay.portal.kernel.exception.PortalException,
368                            com.liferay.portal.kernel.exception.SystemException {
369                    getService().deleteProposals(groupId);
370            }
371    
372            public static com.liferay.portlet.tasks.model.TasksProposal getProposal(
373                    long proposalId)
374                    throws com.liferay.portal.kernel.exception.PortalException,
375                            com.liferay.portal.kernel.exception.SystemException {
376                    return getService().getProposal(proposalId);
377            }
378    
379            public static com.liferay.portlet.tasks.model.TasksProposal getProposal(
380                    long classNameId, java.lang.String classPK)
381                    throws com.liferay.portal.kernel.exception.PortalException,
382                            com.liferay.portal.kernel.exception.SystemException {
383                    return getService().getProposal(classNameId, classPK);
384            }
385    
386            public static com.liferay.portlet.tasks.model.TasksProposal getProposal(
387                    java.lang.String className, java.lang.String classPK)
388                    throws com.liferay.portal.kernel.exception.PortalException,
389                            com.liferay.portal.kernel.exception.SystemException {
390                    return getService().getProposal(className, classPK);
391            }
392    
393            public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> getProposals(
394                    long groupId, int start, int end)
395                    throws com.liferay.portal.kernel.exception.SystemException {
396                    return getService().getProposals(groupId, start, end);
397            }
398    
399            public static int getProposalsCount(long groupId)
400                    throws com.liferay.portal.kernel.exception.SystemException {
401                    return getService().getProposalsCount(groupId);
402            }
403    
404            public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> getReviewProposals(
405                    long groupId, long userId, int start, int end)
406                    throws com.liferay.portal.kernel.exception.SystemException {
407                    return getService().getReviewProposals(groupId, userId, start, end);
408            }
409    
410            public static int getReviewProposalsCount(long groupId, long userId)
411                    throws com.liferay.portal.kernel.exception.SystemException {
412                    return getService().getReviewProposalsCount(groupId, userId);
413            }
414    
415            public static java.util.List<com.liferay.portlet.tasks.model.TasksProposal> getUserProposals(
416                    long groupId, long userId, int start, int end)
417                    throws com.liferay.portal.kernel.exception.SystemException {
418                    return getService().getUserProposals(groupId, userId, start, end);
419            }
420    
421            public static int getUserProposalsCount(long groupId, long userId)
422                    throws com.liferay.portal.kernel.exception.SystemException {
423                    return getService().getUserProposalsCount(groupId, userId);
424            }
425    
426            public static com.liferay.portlet.tasks.model.TasksProposal updateProposal(
427                    long userId, long proposalId, java.lang.String description,
428                    int dueDateMonth, int dueDateDay, int dueDateYear, int dueDateHour,
429                    int dueDateMinute)
430                    throws com.liferay.portal.kernel.exception.PortalException,
431                            com.liferay.portal.kernel.exception.SystemException {
432                    return getService()
433                                       .updateProposal(userId, proposalId, description,
434                            dueDateMonth, dueDateDay, dueDateYear, dueDateHour, dueDateMinute);
435            }
436    
437            public static TasksProposalLocalService getService() {
438                    if (_service == null) {
439                            _service = (TasksProposalLocalService)PortalBeanLocatorUtil.locate(TasksProposalLocalService.class.getName());
440    
441                            ReferenceRegistry.registerReference(TasksProposalLocalServiceUtil.class,
442                                    "_service");
443                            MethodCache.remove(TasksProposalLocalService.class);
444                    }
445    
446                    return _service;
447            }
448    
449            public void setService(TasksProposalLocalService service) {
450                    MethodCache.remove(TasksProposalLocalService.class);
451    
452                    _service = service;
453    
454                    ReferenceRegistry.registerReference(TasksProposalLocalServiceUtil.class,
455                            "_service");
456                    MethodCache.remove(TasksProposalLocalService.class);
457            }
458    
459            private static TasksProposalLocalService _service;
460    }