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 WorkflowDefinitionLink. This utility wraps
024     * {@link com.liferay.portal.service.impl.WorkflowDefinitionLinkLocalServiceImpl} 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 WorkflowDefinitionLinkLocalService
032     * @see com.liferay.portal.service.base.WorkflowDefinitionLinkLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.WorkflowDefinitionLinkLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class WorkflowDefinitionLinkLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.WorkflowDefinitionLinkLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the workflow definition link to the database. Also notifies the appropriate model listeners.
046            *
047            * @param workflowDefinitionLink the workflow definition link
048            * @return the workflow definition link that was added
049            * @throws SystemException if a system exception occurred
050            */
051            public static com.liferay.portal.model.WorkflowDefinitionLink addWorkflowDefinitionLink(
052                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getService().addWorkflowDefinitionLink(workflowDefinitionLink);
055            }
056    
057            /**
058            * Creates a new workflow definition link with the primary key. Does not add the workflow definition link to the database.
059            *
060            * @param workflowDefinitionLinkId the primary key for the new workflow definition link
061            * @return the new workflow definition link
062            */
063            public static com.liferay.portal.model.WorkflowDefinitionLink createWorkflowDefinitionLink(
064                    long workflowDefinitionLinkId) {
065                    return getService()
066                                       .createWorkflowDefinitionLink(workflowDefinitionLinkId);
067            }
068    
069            /**
070            * Deletes the workflow definition link with the primary key from the database. Also notifies the appropriate model listeners.
071            *
072            * @param workflowDefinitionLinkId the primary key of the workflow definition link
073            * @return the workflow definition link that was removed
074            * @throws PortalException if a workflow definition link with the primary key could not be found
075            * @throws SystemException if a system exception occurred
076            */
077            public static com.liferay.portal.model.WorkflowDefinitionLink deleteWorkflowDefinitionLink(
078                    long workflowDefinitionLinkId)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException {
081                    return getService()
082                                       .deleteWorkflowDefinitionLink(workflowDefinitionLinkId);
083            }
084    
085            /**
086            * Deletes the workflow definition link from the database. Also notifies the appropriate model listeners.
087            *
088            * @param workflowDefinitionLink the workflow definition link
089            * @return the workflow definition link that was removed
090            * @throws SystemException if a system exception occurred
091            */
092            public static com.liferay.portal.model.WorkflowDefinitionLink deleteWorkflowDefinitionLink(
093                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink)
094                    throws com.liferay.portal.kernel.exception.SystemException {
095                    return getService().deleteWorkflowDefinitionLink(workflowDefinitionLink);
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.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.
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.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.
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.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
189                    long workflowDefinitionLinkId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getService().fetchWorkflowDefinitionLink(workflowDefinitionLinkId);
192            }
193    
194            /**
195            * Returns the workflow definition link with the primary key.
196            *
197            * @param workflowDefinitionLinkId the primary key of the workflow definition link
198            * @return the workflow definition link
199            * @throws PortalException if a workflow definition 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.WorkflowDefinitionLink getWorkflowDefinitionLink(
203                    long workflowDefinitionLinkId)
204                    throws com.liferay.portal.kernel.exception.PortalException,
205                            com.liferay.portal.kernel.exception.SystemException {
206                    return getService().getWorkflowDefinitionLink(workflowDefinitionLinkId);
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 definition 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.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.
221            * </p>
222            *
223            * @param start the lower bound of the range of workflow definition links
224            * @param end the upper bound of the range of workflow definition links (not inclusive)
225            * @return the range of workflow definition links
226            * @throws SystemException if a system exception occurred
227            */
228            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> getWorkflowDefinitionLinks(
229                    int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getService().getWorkflowDefinitionLinks(start, end);
232            }
233    
234            /**
235            * Returns the number of workflow definition links.
236            *
237            * @return the number of workflow definition links
238            * @throws SystemException if a system exception occurred
239            */
240            public static int getWorkflowDefinitionLinksCount()
241                    throws com.liferay.portal.kernel.exception.SystemException {
242                    return getService().getWorkflowDefinitionLinksCount();
243            }
244    
245            /**
246            * Updates the workflow definition link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
247            *
248            * @param workflowDefinitionLink the workflow definition link
249            * @return the workflow definition link that was updated
250            * @throws SystemException if a system exception occurred
251            */
252            public static com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
253                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink)
254                    throws com.liferay.portal.kernel.exception.SystemException {
255                    return getService().updateWorkflowDefinitionLink(workflowDefinitionLink);
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.WorkflowDefinitionLink addWorkflowDefinitionLink(
277                    long userId, long companyId, long groupId, java.lang.String className,
278                    long classPK, long typePK, java.lang.String workflowDefinitionName,
279                    int workflowDefinitionVersion)
280                    throws com.liferay.portal.kernel.exception.PortalException,
281                            com.liferay.portal.kernel.exception.SystemException {
282                    return getService()
283                                       .addWorkflowDefinitionLink(userId, companyId, groupId,
284                            className, classPK, typePK, workflowDefinitionName,
285                            workflowDefinitionVersion);
286            }
287    
288            public static void deleteWorkflowDefinitionLink(long companyId,
289                    long groupId, java.lang.String className, long classPK, long typePK)
290                    throws com.liferay.portal.kernel.exception.PortalException,
291                            com.liferay.portal.kernel.exception.SystemException {
292                    getService()
293                            .deleteWorkflowDefinitionLink(companyId, groupId, className,
294                            classPK, typePK);
295            }
296    
297            public static com.liferay.portal.model.WorkflowDefinitionLink fetchDefaultWorkflowDefinitionLink(
298                    long companyId, java.lang.String className, long classPK, long typePK)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    return getService()
301                                       .fetchDefaultWorkflowDefinitionLink(companyId, className,
302                            classPK, typePK);
303            }
304    
305            public static com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
306                    long companyId, long groupId, java.lang.String className, long classPK,
307                    long typePK)
308                    throws com.liferay.portal.kernel.exception.PortalException,
309                            com.liferay.portal.kernel.exception.SystemException {
310                    return getService()
311                                       .fetchWorkflowDefinitionLink(companyId, groupId, className,
312                            classPK, typePK);
313            }
314    
315            public static com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
316                    long companyId, long groupId, java.lang.String className, long classPK,
317                    long typePK, boolean strict)
318                    throws com.liferay.portal.kernel.exception.PortalException,
319                            com.liferay.portal.kernel.exception.SystemException {
320                    return getService()
321                                       .fetchWorkflowDefinitionLink(companyId, groupId, className,
322                            classPK, typePK, strict);
323            }
324    
325            public static com.liferay.portal.model.WorkflowDefinitionLink getDefaultWorkflowDefinitionLink(
326                    long companyId, java.lang.String className, long classPK, long typePK)
327                    throws com.liferay.portal.kernel.exception.PortalException,
328                            com.liferay.portal.kernel.exception.SystemException {
329                    return getService()
330                                       .getDefaultWorkflowDefinitionLink(companyId, className,
331                            classPK, typePK);
332            }
333    
334            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
335                    long companyId, long groupId, java.lang.String className, long classPK,
336                    long typePK)
337                    throws com.liferay.portal.kernel.exception.PortalException,
338                            com.liferay.portal.kernel.exception.SystemException {
339                    return getService()
340                                       .getWorkflowDefinitionLink(companyId, groupId, className,
341                            classPK, typePK);
342            }
343    
344            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
345                    long companyId, long groupId, java.lang.String className, long classPK,
346                    long typePK, boolean strict)
347                    throws com.liferay.portal.kernel.exception.PortalException,
348                            com.liferay.portal.kernel.exception.SystemException {
349                    return getService()
350                                       .getWorkflowDefinitionLink(companyId, groupId, className,
351                            classPK, typePK, strict);
352            }
353    
354            public static int getWorkflowDefinitionLinksCount(long companyId,
355                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion)
356                    throws com.liferay.portal.kernel.exception.SystemException {
357                    return getService()
358                                       .getWorkflowDefinitionLinksCount(companyId,
359                            workflowDefinitionName, workflowDefinitionVersion);
360            }
361    
362            public static boolean hasWorkflowDefinitionLink(long companyId,
363                    long groupId, java.lang.String className)
364                    throws com.liferay.portal.kernel.exception.PortalException,
365                            com.liferay.portal.kernel.exception.SystemException {
366                    return getService()
367                                       .hasWorkflowDefinitionLink(companyId, groupId, className);
368            }
369    
370            public static boolean hasWorkflowDefinitionLink(long companyId,
371                    long groupId, java.lang.String className, long classPK)
372                    throws com.liferay.portal.kernel.exception.PortalException,
373                            com.liferay.portal.kernel.exception.SystemException {
374                    return getService()
375                                       .hasWorkflowDefinitionLink(companyId, groupId, className,
376                            classPK);
377            }
378    
379            public static boolean hasWorkflowDefinitionLink(long companyId,
380                    long groupId, java.lang.String className, long classPK, long typePK)
381                    throws com.liferay.portal.kernel.exception.PortalException,
382                            com.liferay.portal.kernel.exception.SystemException {
383                    return getService()
384                                       .hasWorkflowDefinitionLink(companyId, groupId, className,
385                            classPK, typePK);
386            }
387    
388            public static void updateWorkflowDefinitionLink(long userId,
389                    long companyId, long groupId, java.lang.String className, long classPK,
390                    long typePK, java.lang.String workflowDefinition)
391                    throws com.liferay.portal.kernel.exception.PortalException,
392                            com.liferay.portal.kernel.exception.SystemException {
393                    getService()
394                            .updateWorkflowDefinitionLink(userId, companyId, groupId,
395                            className, classPK, typePK, workflowDefinition);
396            }
397    
398            public static com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
399                    long userId, long companyId, long groupId, java.lang.String className,
400                    long classPK, long typePK, java.lang.String workflowDefinitionName,
401                    int workflowDefinitionVersion)
402                    throws com.liferay.portal.kernel.exception.PortalException,
403                            com.liferay.portal.kernel.exception.SystemException {
404                    return getService()
405                                       .updateWorkflowDefinitionLink(userId, companyId, groupId,
406                            className, classPK, typePK, workflowDefinitionName,
407                            workflowDefinitionVersion);
408            }
409    
410            public static void updateWorkflowDefinitionLinks(long userId,
411                    long companyId, long groupId, java.lang.String className, long classPK,
412                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.Long, java.lang.String>> workflowDefinitionOVPs)
413                    throws com.liferay.portal.kernel.exception.PortalException,
414                            com.liferay.portal.kernel.exception.SystemException {
415                    getService()
416                            .updateWorkflowDefinitionLinks(userId, companyId, groupId,
417                            className, classPK, workflowDefinitionOVPs);
418            }
419    
420            public static WorkflowDefinitionLinkLocalService getService() {
421                    if (_service == null) {
422                            _service = (WorkflowDefinitionLinkLocalService)PortalBeanLocatorUtil.locate(WorkflowDefinitionLinkLocalService.class.getName());
423    
424                            ReferenceRegistry.registerReference(WorkflowDefinitionLinkLocalServiceUtil.class,
425                                    "_service");
426                    }
427    
428                    return _service;
429            }
430    
431            /**
432             * @deprecated As of 6.2.0
433             */
434            public void setService(WorkflowDefinitionLinkLocalService service) {
435            }
436    
437            private static WorkflowDefinitionLinkLocalService _service;
438    }