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