001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for WorkflowInstanceLink. This utility wraps
024     * {@link com.liferay.portal.service.impl.WorkflowInstanceLinkLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see WorkflowInstanceLinkLocalService
032     * @see com.liferay.portal.service.base.WorkflowInstanceLinkLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.WorkflowInstanceLinkLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class WorkflowInstanceLinkLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.WorkflowInstanceLinkLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the workflow instance link to the database. Also notifies the appropriate model listeners.
046            *
047            * @param workflowInstanceLink the workflow instance link
048            * @return the workflow instance link that was added
049            * @throws SystemException if a system exception occurred
050            */
051            public static com.liferay.portal.model.WorkflowInstanceLink addWorkflowInstanceLink(
052                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getService().addWorkflowInstanceLink(workflowInstanceLink);
055            }
056    
057            /**
058            * Creates a new workflow instance link with the primary key. Does not add the workflow instance link to the database.
059            *
060            * @param workflowInstanceLinkId the primary key for the new workflow instance link
061            * @return the new workflow instance link
062            */
063            public static com.liferay.portal.model.WorkflowInstanceLink createWorkflowInstanceLink(
064                    long workflowInstanceLinkId) {
065                    return getService().createWorkflowInstanceLink(workflowInstanceLinkId);
066            }
067    
068            /**
069            * Deletes the workflow instance link with the primary key from the database. Also notifies the appropriate model listeners.
070            *
071            * @param workflowInstanceLinkId the primary key of the workflow instance link
072            * @return the workflow instance link that was removed
073            * @throws PortalException if a workflow instance link with the primary key could not be found
074            * @throws SystemException if a system exception occurred
075            */
076            public static com.liferay.portal.model.WorkflowInstanceLink deleteWorkflowInstanceLink(
077                    long workflowInstanceLinkId)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    return getService().deleteWorkflowInstanceLink(workflowInstanceLinkId);
081            }
082    
083            /**
084            * Deletes the workflow instance link from the database. Also notifies the appropriate model listeners.
085            *
086            * @param workflowInstanceLink the workflow instance link
087            * @return the workflow instance link that was removed
088            * @throws PortalException
089            * @throws SystemException if a system exception occurred
090            */
091            public static com.liferay.portal.model.WorkflowInstanceLink deleteWorkflowInstanceLink(
092                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException {
095                    return getService().deleteWorkflowInstanceLink(workflowInstanceLink);
096            }
097    
098            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
099                    return getService().dynamicQuery();
100            }
101    
102            /**
103            * Performs a dynamic query on the database and returns the matching rows.
104            *
105            * @param dynamicQuery the dynamic query
106            * @return the matching rows
107            * @throws SystemException if a system exception occurred
108            */
109            @SuppressWarnings("rawtypes")
110            public static java.util.List dynamicQuery(
111                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getService().dynamicQuery(dynamicQuery);
114            }
115    
116            /**
117            * Performs a dynamic query on the database and returns a range of the matching rows.
118            *
119            * <p>
120            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.WorkflowInstanceLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
121            * </p>
122            *
123            * @param dynamicQuery the dynamic query
124            * @param start the lower bound of the range of model instances
125            * @param end the upper bound of the range of model instances (not inclusive)
126            * @return the range of matching rows
127            * @throws SystemException if a system exception occurred
128            */
129            @SuppressWarnings("rawtypes")
130            public static java.util.List dynamicQuery(
131                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
132                    int end) throws com.liferay.portal.kernel.exception.SystemException {
133                    return getService().dynamicQuery(dynamicQuery, start, end);
134            }
135    
136            /**
137            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
138            *
139            * <p>
140            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.WorkflowInstanceLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
141            * </p>
142            *
143            * @param dynamicQuery the dynamic query
144            * @param start the lower bound of the range of model instances
145            * @param end the upper bound of the range of model instances (not inclusive)
146            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
147            * @return the ordered range of matching rows
148            * @throws SystemException if a system exception occurred
149            */
150            @SuppressWarnings("rawtypes")
151            public static java.util.List dynamicQuery(
152                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
153                    int end,
154                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return getService()
157                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
158            }
159    
160            /**
161            * Returns the number of rows that match the dynamic query.
162            *
163            * @param dynamicQuery the dynamic query
164            * @return the number of rows that match the dynamic query
165            * @throws SystemException if a system exception occurred
166            */
167            public static long dynamicQueryCount(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
169                    throws com.liferay.portal.kernel.exception.SystemException {
170                    return getService().dynamicQueryCount(dynamicQuery);
171            }
172    
173            /**
174            * Returns the number of rows that match the dynamic query.
175            *
176            * @param dynamicQuery the dynamic query
177            * @param projection the projection to apply to the query
178            * @return the number of rows that match the dynamic query
179            * @throws SystemException if a system exception occurred
180            */
181            public static long dynamicQueryCount(
182                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
183                    com.liferay.portal.kernel.dao.orm.Projection projection)
184                    throws com.liferay.portal.kernel.exception.SystemException {
185                    return getService().dynamicQueryCount(dynamicQuery, projection);
186            }
187    
188            public static com.liferay.portal.model.WorkflowInstanceLink fetchWorkflowInstanceLink(
189                    long workflowInstanceLinkId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getService().fetchWorkflowInstanceLink(workflowInstanceLinkId);
192            }
193    
194            /**
195            * Returns the workflow instance link with the primary key.
196            *
197            * @param workflowInstanceLinkId the primary key of the workflow instance link
198            * @return the workflow instance link
199            * @throws PortalException if a workflow instance link with the primary key could not be found
200            * @throws SystemException if a system exception occurred
201            */
202            public static com.liferay.portal.model.WorkflowInstanceLink getWorkflowInstanceLink(
203                    long workflowInstanceLinkId)
204                    throws com.liferay.portal.kernel.exception.PortalException,
205                            com.liferay.portal.kernel.exception.SystemException {
206                    return getService().getWorkflowInstanceLink(workflowInstanceLinkId);
207            }
208    
209            public static com.liferay.portal.model.PersistedModel getPersistedModel(
210                    java.io.Serializable primaryKeyObj)
211                    throws com.liferay.portal.kernel.exception.PortalException,
212                            com.liferay.portal.kernel.exception.SystemException {
213                    return getService().getPersistedModel(primaryKeyObj);
214            }
215    
216            /**
217            * Returns a range of all the workflow instance links.
218            *
219            * <p>
220            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.WorkflowInstanceLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
221            * </p>
222            *
223            * @param start the lower bound of the range of workflow instance links
224            * @param end the upper bound of the range of workflow instance links (not inclusive)
225            * @return the range of workflow instance links
226            * @throws SystemException if a system exception occurred
227            */
228            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> getWorkflowInstanceLinks(
229                    int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getService().getWorkflowInstanceLinks(start, end);
232            }
233    
234            /**
235            * Returns the number of workflow instance links.
236            *
237            * @return the number of workflow instance links
238            * @throws SystemException if a system exception occurred
239            */
240            public static int getWorkflowInstanceLinksCount()
241                    throws com.liferay.portal.kernel.exception.SystemException {
242                    return getService().getWorkflowInstanceLinksCount();
243            }
244    
245            /**
246            * Updates the workflow instance link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
247            *
248            * @param workflowInstanceLink the workflow instance link
249            * @return the workflow instance link that was updated
250            * @throws SystemException if a system exception occurred
251            */
252            public static com.liferay.portal.model.WorkflowInstanceLink updateWorkflowInstanceLink(
253                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink)
254                    throws com.liferay.portal.kernel.exception.SystemException {
255                    return getService().updateWorkflowInstanceLink(workflowInstanceLink);
256            }
257    
258            /**
259            * Returns the Spring bean ID for this bean.
260            *
261            * @return the Spring bean ID for this bean
262            */
263            public static java.lang.String getBeanIdentifier() {
264                    return getService().getBeanIdentifier();
265            }
266    
267            /**
268            * Sets the Spring bean ID for this bean.
269            *
270            * @param beanIdentifier the Spring bean ID for this bean
271            */
272            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
273                    getService().setBeanIdentifier(beanIdentifier);
274            }
275    
276            public static com.liferay.portal.model.WorkflowInstanceLink addWorkflowInstanceLink(
277                    long userId, long companyId, long groupId, java.lang.String className,
278                    long classPK, long workflowInstanceId)
279                    throws com.liferay.portal.kernel.exception.PortalException,
280                            com.liferay.portal.kernel.exception.SystemException {
281                    return getService()
282                                       .addWorkflowInstanceLink(userId, companyId, groupId,
283                            className, classPK, workflowInstanceId);
284            }
285    
286            public static com.liferay.portal.model.WorkflowInstanceLink deleteWorkflowInstanceLink(
287                    long companyId, long groupId, java.lang.String className, long classPK)
288                    throws com.liferay.portal.kernel.exception.PortalException,
289                            com.liferay.portal.kernel.exception.SystemException {
290                    return getService()
291                                       .deleteWorkflowInstanceLink(companyId, groupId, className,
292                            classPK);
293            }
294    
295            public static void deleteWorkflowInstanceLinks(long companyId,
296                    long groupId, java.lang.String className, long classPK)
297                    throws com.liferay.portal.kernel.exception.PortalException,
298                            com.liferay.portal.kernel.exception.SystemException {
299                    getService()
300                            .deleteWorkflowInstanceLinks(companyId, groupId, className, classPK);
301            }
302    
303            public static com.liferay.portal.model.WorkflowInstanceLink fetchWorkflowInstanceLink(
304                    long companyId, long groupId, java.lang.String className, long classPK)
305                    throws com.liferay.portal.kernel.exception.SystemException {
306                    return getService()
307                                       .fetchWorkflowInstanceLink(companyId, groupId, className,
308                            classPK);
309            }
310    
311            public static java.lang.String getState(long companyId, long groupId,
312                    java.lang.String className, long classPK)
313                    throws com.liferay.portal.kernel.exception.PortalException,
314                            com.liferay.portal.kernel.exception.SystemException {
315                    return getService().getState(companyId, groupId, className, classPK);
316            }
317    
318            public static com.liferay.portal.model.WorkflowInstanceLink getWorkflowInstanceLink(
319                    long companyId, long groupId, java.lang.String className, long classPK)
320                    throws com.liferay.portal.kernel.exception.PortalException,
321                            com.liferay.portal.kernel.exception.SystemException {
322                    return getService()
323                                       .getWorkflowInstanceLink(companyId, groupId, className,
324                            classPK);
325            }
326    
327            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> getWorkflowInstanceLinks(
328                    long companyId, long groupId, java.lang.String className, long classPK)
329                    throws com.liferay.portal.kernel.exception.SystemException {
330                    return getService()
331                                       .getWorkflowInstanceLinks(companyId, groupId, className,
332                            classPK);
333            }
334    
335            public static boolean hasWorkflowInstanceLink(long companyId, long groupId,
336                    java.lang.String className, long classPK)
337                    throws com.liferay.portal.kernel.exception.SystemException {
338                    return getService()
339                                       .hasWorkflowInstanceLink(companyId, groupId, className,
340                            classPK);
341            }
342    
343            public static boolean isEnded(long companyId, long groupId,
344                    java.lang.String className, long classPK)
345                    throws com.liferay.portal.kernel.exception.PortalException,
346                            com.liferay.portal.kernel.exception.SystemException {
347                    return getService().isEnded(companyId, groupId, className, classPK);
348            }
349    
350            public static void startWorkflowInstance(long companyId, long groupId,
351                    long userId, java.lang.String className, long classPK,
352                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
353                    throws com.liferay.portal.kernel.exception.PortalException,
354                            com.liferay.portal.kernel.exception.SystemException {
355                    getService()
356                            .startWorkflowInstance(companyId, groupId, userId, className,
357                            classPK, workflowContext);
358            }
359    
360            public static void updateClassPK(long companyId, long groupId,
361                    java.lang.String className, long oldClassPK, long newClassPK)
362                    throws com.liferay.portal.kernel.exception.PortalException,
363                            com.liferay.portal.kernel.exception.SystemException {
364                    getService()
365                            .updateClassPK(companyId, groupId, className, oldClassPK, newClassPK);
366            }
367    
368            public static WorkflowInstanceLinkLocalService getService() {
369                    if (_service == null) {
370                            _service = (WorkflowInstanceLinkLocalService)PortalBeanLocatorUtil.locate(WorkflowInstanceLinkLocalService.class.getName());
371    
372                            ReferenceRegistry.registerReference(WorkflowInstanceLinkLocalServiceUtil.class,
373                                    "_service");
374                    }
375    
376                    return _service;
377            }
378    
379            /**
380             * @deprecated As of 6.2.0
381             */
382            public void setService(WorkflowInstanceLinkLocalService service) {
383            }
384    
385            private static WorkflowInstanceLinkLocalService _service;
386    }