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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * Provides the local service utility for WorkflowDefinitionLink. This utility wraps
022     * {@link com.liferay.portal.service.impl.WorkflowDefinitionLinkLocalServiceImpl} and is the
023     * primary access point for service operations in application layer code running
024     * on the local server. Methods of this service will not have security checks
025     * based on the propagated JAAS credentials because this service can only be
026     * accessed from within the same VM.
027     *
028     * @author Brian Wing Shun Chan
029     * @see WorkflowDefinitionLinkLocalService
030     * @see com.liferay.portal.service.base.WorkflowDefinitionLinkLocalServiceBaseImpl
031     * @see com.liferay.portal.service.impl.WorkflowDefinitionLinkLocalServiceImpl
032     * @generated
033     */
034    public class WorkflowDefinitionLinkLocalServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.WorkflowDefinitionLinkLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Adds the workflow definition link to the database. Also notifies the appropriate model listeners.
043            *
044            * @param workflowDefinitionLink the workflow definition link
045            * @return the workflow definition link that was added
046            * @throws SystemException if a system exception occurred
047            */
048            public static com.liferay.portal.model.WorkflowDefinitionLink addWorkflowDefinitionLink(
049                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink)
050                    throws com.liferay.portal.kernel.exception.SystemException {
051                    return getService().addWorkflowDefinitionLink(workflowDefinitionLink);
052            }
053    
054            /**
055            * Creates a new workflow definition link with the primary key. Does not add the workflow definition link to the database.
056            *
057            * @param workflowDefinitionLinkId the primary key for the new workflow definition link
058            * @return the new workflow definition link
059            */
060            public static com.liferay.portal.model.WorkflowDefinitionLink createWorkflowDefinitionLink(
061                    long workflowDefinitionLinkId) {
062                    return getService()
063                                       .createWorkflowDefinitionLink(workflowDefinitionLinkId);
064            }
065    
066            /**
067            * Deletes the workflow definition link with the primary key from the database. Also notifies the appropriate model listeners.
068            *
069            * @param workflowDefinitionLinkId the primary key of the workflow definition link
070            * @return the workflow definition link that was removed
071            * @throws PortalException if a workflow definition link with the primary key could not be found
072            * @throws SystemException if a system exception occurred
073            */
074            public static com.liferay.portal.model.WorkflowDefinitionLink deleteWorkflowDefinitionLink(
075                    long workflowDefinitionLinkId)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    return getService()
079                                       .deleteWorkflowDefinitionLink(workflowDefinitionLinkId);
080            }
081    
082            /**
083            * Deletes the workflow definition link from the database. Also notifies the appropriate model listeners.
084            *
085            * @param workflowDefinitionLink the workflow definition link
086            * @return the workflow definition link that was removed
087            * @throws SystemException if a system exception occurred
088            */
089            public static com.liferay.portal.model.WorkflowDefinitionLink deleteWorkflowDefinitionLink(
090                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink)
091                    throws com.liferay.portal.kernel.exception.SystemException {
092                    return getService().deleteWorkflowDefinitionLink(workflowDefinitionLink);
093            }
094    
095            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
096                    return getService().dynamicQuery();
097            }
098    
099            /**
100            * Performs a dynamic query on the database and returns the matching rows.
101            *
102            * @param dynamicQuery the dynamic query
103            * @return the matching rows
104            * @throws SystemException if a system exception occurred
105            */
106            @SuppressWarnings("rawtypes")
107            public static java.util.List dynamicQuery(
108                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
109                    throws com.liferay.portal.kernel.exception.SystemException {
110                    return getService().dynamicQuery(dynamicQuery);
111            }
112    
113            /**
114            * Performs a dynamic query on the database and returns a range of the matching rows.
115            *
116            * <p>
117            * 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.WorkflowDefinitionLinkModelImpl}. 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.
118            * </p>
119            *
120            * @param dynamicQuery the dynamic query
121            * @param start the lower bound of the range of model instances
122            * @param end the upper bound of the range of model instances (not inclusive)
123            * @return the range of matching rows
124            * @throws SystemException if a system exception occurred
125            */
126            @SuppressWarnings("rawtypes")
127            public static java.util.List dynamicQuery(
128                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
129                    int end) throws com.liferay.portal.kernel.exception.SystemException {
130                    return getService().dynamicQuery(dynamicQuery, start, end);
131            }
132    
133            /**
134            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
135            *
136            * <p>
137            * 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.WorkflowDefinitionLinkModelImpl}. 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.
138            * </p>
139            *
140            * @param dynamicQuery the dynamic query
141            * @param start the lower bound of the range of model instances
142            * @param end the upper bound of the range of model instances (not inclusive)
143            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
144            * @return the ordered range of matching rows
145            * @throws SystemException if a system exception occurred
146            */
147            @SuppressWarnings("rawtypes")
148            public static java.util.List dynamicQuery(
149                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
150                    int end,
151                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152                    throws com.liferay.portal.kernel.exception.SystemException {
153                    return getService()
154                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
155            }
156    
157            /**
158            * Returns the number of rows that match the dynamic query.
159            *
160            * @param dynamicQuery the dynamic query
161            * @return the number of rows that match the dynamic query
162            * @throws SystemException if a system exception occurred
163            */
164            public static long dynamicQueryCount(
165                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
166                    throws com.liferay.portal.kernel.exception.SystemException {
167                    return getService().dynamicQueryCount(dynamicQuery);
168            }
169    
170            /**
171            * Returns the number of rows that match the dynamic query.
172            *
173            * @param dynamicQuery the dynamic query
174            * @param projection the projection to apply to the query
175            * @return the number of rows that match the dynamic query
176            * @throws SystemException if a system exception occurred
177            */
178            public static long dynamicQueryCount(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
180                    com.liferay.portal.kernel.dao.orm.Projection projection)
181                    throws com.liferay.portal.kernel.exception.SystemException {
182                    return getService().dynamicQueryCount(dynamicQuery, projection);
183            }
184    
185            public static com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
186                    long workflowDefinitionLinkId)
187                    throws com.liferay.portal.kernel.exception.SystemException {
188                    return getService().fetchWorkflowDefinitionLink(workflowDefinitionLinkId);
189            }
190    
191            /**
192            * Returns the workflow definition link with the primary key.
193            *
194            * @param workflowDefinitionLinkId the primary key of the workflow definition link
195            * @return the workflow definition link
196            * @throws PortalException if a workflow definition link with the primary key could not be found
197            * @throws SystemException if a system exception occurred
198            */
199            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
200                    long workflowDefinitionLinkId)
201                    throws com.liferay.portal.kernel.exception.PortalException,
202                            com.liferay.portal.kernel.exception.SystemException {
203                    return getService().getWorkflowDefinitionLink(workflowDefinitionLinkId);
204            }
205    
206            public static com.liferay.portal.model.PersistedModel getPersistedModel(
207                    java.io.Serializable primaryKeyObj)
208                    throws com.liferay.portal.kernel.exception.PortalException,
209                            com.liferay.portal.kernel.exception.SystemException {
210                    return getService().getPersistedModel(primaryKeyObj);
211            }
212    
213            /**
214            * Returns a range of all the workflow definition links.
215            *
216            * <p>
217            * 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.WorkflowDefinitionLinkModelImpl}. 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.
218            * </p>
219            *
220            * @param start the lower bound of the range of workflow definition links
221            * @param end the upper bound of the range of workflow definition links (not inclusive)
222            * @return the range of workflow definition links
223            * @throws SystemException if a system exception occurred
224            */
225            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> getWorkflowDefinitionLinks(
226                    int start, int end)
227                    throws com.liferay.portal.kernel.exception.SystemException {
228                    return getService().getWorkflowDefinitionLinks(start, end);
229            }
230    
231            /**
232            * Returns the number of workflow definition links.
233            *
234            * @return the number of workflow definition links
235            * @throws SystemException if a system exception occurred
236            */
237            public static int getWorkflowDefinitionLinksCount()
238                    throws com.liferay.portal.kernel.exception.SystemException {
239                    return getService().getWorkflowDefinitionLinksCount();
240            }
241    
242            /**
243            * Updates the workflow definition link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
244            *
245            * @param workflowDefinitionLink the workflow definition link
246            * @return the workflow definition link that was updated
247            * @throws SystemException if a system exception occurred
248            */
249            public static com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
250                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink)
251                    throws com.liferay.portal.kernel.exception.SystemException {
252                    return getService().updateWorkflowDefinitionLink(workflowDefinitionLink);
253            }
254    
255            /**
256            * Returns the Spring bean ID for this bean.
257            *
258            * @return the Spring bean ID for this bean
259            */
260            public static java.lang.String getBeanIdentifier() {
261                    return getService().getBeanIdentifier();
262            }
263    
264            /**
265            * Sets the Spring bean ID for this bean.
266            *
267            * @param beanIdentifier the Spring bean ID for this bean
268            */
269            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
270                    getService().setBeanIdentifier(beanIdentifier);
271            }
272    
273            public static com.liferay.portal.model.WorkflowDefinitionLink addWorkflowDefinitionLink(
274                    long userId, long companyId, long groupId, java.lang.String className,
275                    long classPK, long typePK, java.lang.String workflowDefinitionName,
276                    int workflowDefinitionVersion)
277                    throws com.liferay.portal.kernel.exception.PortalException,
278                            com.liferay.portal.kernel.exception.SystemException {
279                    return getService()
280                                       .addWorkflowDefinitionLink(userId, companyId, groupId,
281                            className, classPK, typePK, workflowDefinitionName,
282                            workflowDefinitionVersion);
283            }
284    
285            public static void deleteWorkflowDefinitionLink(long companyId,
286                    long groupId, java.lang.String className, long classPK, long typePK)
287                    throws com.liferay.portal.kernel.exception.PortalException,
288                            com.liferay.portal.kernel.exception.SystemException {
289                    getService()
290                            .deleteWorkflowDefinitionLink(companyId, groupId, className,
291                            classPK, typePK);
292            }
293    
294            public static com.liferay.portal.model.WorkflowDefinitionLink fetchDefaultWorkflowDefinitionLink(
295                    long companyId, java.lang.String className, long classPK, long typePK)
296                    throws com.liferay.portal.kernel.exception.SystemException {
297                    return getService()
298                                       .fetchDefaultWorkflowDefinitionLink(companyId, className,
299                            classPK, typePK);
300            }
301    
302            public static com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
303                    long companyId, long groupId, java.lang.String className, long classPK,
304                    long typePK)
305                    throws com.liferay.portal.kernel.exception.PortalException,
306                            com.liferay.portal.kernel.exception.SystemException {
307                    return getService()
308                                       .fetchWorkflowDefinitionLink(companyId, groupId, className,
309                            classPK, typePK);
310            }
311    
312            public static com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
313                    long companyId, long groupId, java.lang.String className, long classPK,
314                    long typePK, boolean strict)
315                    throws com.liferay.portal.kernel.exception.PortalException,
316                            com.liferay.portal.kernel.exception.SystemException {
317                    return getService()
318                                       .fetchWorkflowDefinitionLink(companyId, groupId, className,
319                            classPK, typePK, strict);
320            }
321    
322            public static com.liferay.portal.model.WorkflowDefinitionLink getDefaultWorkflowDefinitionLink(
323                    long companyId, java.lang.String className, long classPK, long typePK)
324                    throws com.liferay.portal.kernel.exception.PortalException,
325                            com.liferay.portal.kernel.exception.SystemException {
326                    return getService()
327                                       .getDefaultWorkflowDefinitionLink(companyId, className,
328                            classPK, typePK);
329            }
330    
331            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
332                    long companyId, long groupId, java.lang.String className, long classPK,
333                    long typePK)
334                    throws com.liferay.portal.kernel.exception.PortalException,
335                            com.liferay.portal.kernel.exception.SystemException {
336                    return getService()
337                                       .getWorkflowDefinitionLink(companyId, groupId, className,
338                            classPK, typePK);
339            }
340    
341            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
342                    long companyId, long groupId, java.lang.String className, long classPK,
343                    long typePK, boolean strict)
344                    throws com.liferay.portal.kernel.exception.PortalException,
345                            com.liferay.portal.kernel.exception.SystemException {
346                    return getService()
347                                       .getWorkflowDefinitionLink(companyId, groupId, className,
348                            classPK, typePK, strict);
349            }
350    
351            public static int getWorkflowDefinitionLinksCount(long companyId,
352                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion)
353                    throws com.liferay.portal.kernel.exception.SystemException {
354                    return getService()
355                                       .getWorkflowDefinitionLinksCount(companyId,
356                            workflowDefinitionName, workflowDefinitionVersion);
357            }
358    
359            public static boolean hasWorkflowDefinitionLink(long companyId,
360                    long groupId, java.lang.String className)
361                    throws com.liferay.portal.kernel.exception.PortalException,
362                            com.liferay.portal.kernel.exception.SystemException {
363                    return getService()
364                                       .hasWorkflowDefinitionLink(companyId, groupId, className);
365            }
366    
367            public static boolean hasWorkflowDefinitionLink(long companyId,
368                    long groupId, java.lang.String className, long classPK)
369                    throws com.liferay.portal.kernel.exception.PortalException,
370                            com.liferay.portal.kernel.exception.SystemException {
371                    return getService()
372                                       .hasWorkflowDefinitionLink(companyId, groupId, className,
373                            classPK);
374            }
375    
376            public static boolean hasWorkflowDefinitionLink(long companyId,
377                    long groupId, java.lang.String className, long classPK, long typePK)
378                    throws com.liferay.portal.kernel.exception.PortalException,
379                            com.liferay.portal.kernel.exception.SystemException {
380                    return getService()
381                                       .hasWorkflowDefinitionLink(companyId, groupId, className,
382                            classPK, typePK);
383            }
384    
385            public static void updateWorkflowDefinitionLink(long userId,
386                    long companyId, long groupId, java.lang.String className, long classPK,
387                    long typePK, java.lang.String workflowDefinition)
388                    throws com.liferay.portal.kernel.exception.PortalException,
389                            com.liferay.portal.kernel.exception.SystemException {
390                    getService()
391                            .updateWorkflowDefinitionLink(userId, companyId, groupId,
392                            className, classPK, typePK, workflowDefinition);
393            }
394    
395            public static com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
396                    long userId, long companyId, long groupId, java.lang.String className,
397                    long classPK, long typePK, java.lang.String workflowDefinitionName,
398                    int workflowDefinitionVersion)
399                    throws com.liferay.portal.kernel.exception.PortalException,
400                            com.liferay.portal.kernel.exception.SystemException {
401                    return getService()
402                                       .updateWorkflowDefinitionLink(userId, companyId, groupId,
403                            className, classPK, typePK, workflowDefinitionName,
404                            workflowDefinitionVersion);
405            }
406    
407            public static void updateWorkflowDefinitionLinks(long userId,
408                    long companyId, long groupId, java.lang.String className, long classPK,
409                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.Long, java.lang.String>> workflowDefinitionOVPs)
410                    throws com.liferay.portal.kernel.exception.PortalException,
411                            com.liferay.portal.kernel.exception.SystemException {
412                    getService()
413                            .updateWorkflowDefinitionLinks(userId, companyId, groupId,
414                            className, classPK, workflowDefinitionOVPs);
415            }
416    
417            public static WorkflowDefinitionLinkLocalService getService() {
418                    if (_service == null) {
419                            _service = (WorkflowDefinitionLinkLocalService)PortalBeanLocatorUtil.locate(WorkflowDefinitionLinkLocalService.class.getName());
420    
421                            ReferenceRegistry.registerReference(WorkflowDefinitionLinkLocalServiceUtil.class,
422                                    "_service");
423                    }
424    
425                    return _service;
426            }
427    
428            /**
429             * @deprecated As of 6.2.0
430             */
431            public void setService(WorkflowDefinitionLinkLocalService service) {
432            }
433    
434            private static WorkflowDefinitionLinkLocalService _service;
435    }