001    /**
002     * Copyright (c) 2000-2010 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    
019    /**
020     * 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.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.WorkflowDefinitionLinkLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * 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.
028     * </p>
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    public class WorkflowDefinitionLinkLocalServiceUtil {
037            /**
038            * Adds the workflow definition link to the database. Also notifies the appropriate model listeners.
039            *
040            * @param workflowDefinitionLink the workflow definition link to add
041            * @return the workflow definition link that was added
042            * @throws SystemException if a system exception occurred
043            */
044            public static com.liferay.portal.model.WorkflowDefinitionLink addWorkflowDefinitionLink(
045                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink)
046                    throws com.liferay.portal.kernel.exception.SystemException {
047                    return getService().addWorkflowDefinitionLink(workflowDefinitionLink);
048            }
049    
050            /**
051            * Creates a new workflow definition link with the primary key. Does not add the workflow definition link to the database.
052            *
053            * @param workflowDefinitionLinkId the primary key for the new workflow definition link
054            * @return the new workflow definition link
055            */
056            public static com.liferay.portal.model.WorkflowDefinitionLink createWorkflowDefinitionLink(
057                    long workflowDefinitionLinkId) {
058                    return getService()
059                                       .createWorkflowDefinitionLink(workflowDefinitionLinkId);
060            }
061    
062            /**
063            * Deletes the workflow definition link with the primary key from the database. Also notifies the appropriate model listeners.
064            *
065            * @param workflowDefinitionLinkId the primary key of the workflow definition link to delete
066            * @throws PortalException if a workflow definition link with the primary key could not be found
067            * @throws SystemException if a system exception occurred
068            */
069            public static void deleteWorkflowDefinitionLink(
070                    long workflowDefinitionLinkId)
071                    throws com.liferay.portal.kernel.exception.PortalException,
072                            com.liferay.portal.kernel.exception.SystemException {
073                    getService().deleteWorkflowDefinitionLink(workflowDefinitionLinkId);
074            }
075    
076            /**
077            * Deletes the workflow definition link from the database. Also notifies the appropriate model listeners.
078            *
079            * @param workflowDefinitionLink the workflow definition link to delete
080            * @throws SystemException if a system exception occurred
081            */
082            public static void deleteWorkflowDefinitionLink(
083                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink)
084                    throws com.liferay.portal.kernel.exception.SystemException {
085                    getService().deleteWorkflowDefinitionLink(workflowDefinitionLink);
086            }
087    
088            /**
089            * Performs a dynamic query on the database and returns the matching rows.
090            *
091            * @param dynamicQuery the dynamic query to search with
092            * @return the matching rows
093            * @throws SystemException if a system exception occurred
094            */
095            @SuppressWarnings("rawtypes")
096            public static java.util.List dynamicQuery(
097                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
098                    throws com.liferay.portal.kernel.exception.SystemException {
099                    return getService().dynamicQuery(dynamicQuery);
100            }
101    
102            /**
103            * Performs a dynamic query on the database and returns a range of the matching rows.
104            *
105            * <p>
106            * 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.
107            * </p>
108            *
109            * @param dynamicQuery the dynamic query to search with
110            * @param start the lower bound of the range of model instances to return
111            * @param end the upper bound of the range of model instances to return (not inclusive)
112            * @return the range of matching rows
113            * @throws SystemException if a system exception occurred
114            */
115            @SuppressWarnings("rawtypes")
116            public static java.util.List dynamicQuery(
117                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
118                    int end) throws com.liferay.portal.kernel.exception.SystemException {
119                    return getService().dynamicQuery(dynamicQuery, start, end);
120            }
121    
122            /**
123            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
124            *
125            * <p>
126            * 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.
127            * </p>
128            *
129            * @param dynamicQuery the dynamic query to search with
130            * @param start the lower bound of the range of model instances to return
131            * @param end the upper bound of the range of model instances to return (not inclusive)
132            * @param orderByComparator the comparator to order the results by
133            * @return the ordered range of matching rows
134            * @throws SystemException if a system exception occurred
135            */
136            @SuppressWarnings("rawtypes")
137            public static java.util.List dynamicQuery(
138                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
139                    int end,
140                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141                    throws com.liferay.portal.kernel.exception.SystemException {
142                    return getService()
143                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
144            }
145    
146            /**
147            * Counts the number of rows that match the dynamic query.
148            *
149            * @param dynamicQuery the dynamic query to search with
150            * @return the number of rows that match the dynamic query
151            * @throws SystemException if a system exception occurred
152            */
153            public static long dynamicQueryCount(
154                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return getService().dynamicQueryCount(dynamicQuery);
157            }
158    
159            /**
160            * Gets the workflow definition link with the primary key.
161            *
162            * @param workflowDefinitionLinkId the primary key of the workflow definition link to get
163            * @return the workflow definition link
164            * @throws PortalException if a workflow definition link with the primary key could not be found
165            * @throws SystemException if a system exception occurred
166            */
167            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
168                    long workflowDefinitionLinkId)
169                    throws com.liferay.portal.kernel.exception.PortalException,
170                            com.liferay.portal.kernel.exception.SystemException {
171                    return getService().getWorkflowDefinitionLink(workflowDefinitionLinkId);
172            }
173    
174            /**
175            * Gets a range of all the workflow definition links.
176            *
177            * <p>
178            * 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.
179            * </p>
180            *
181            * @param start the lower bound of the range of workflow definition links to return
182            * @param end the upper bound of the range of workflow definition links to return (not inclusive)
183            * @return the range of workflow definition links
184            * @throws SystemException if a system exception occurred
185            */
186            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> getWorkflowDefinitionLinks(
187                    int start, int end)
188                    throws com.liferay.portal.kernel.exception.SystemException {
189                    return getService().getWorkflowDefinitionLinks(start, end);
190            }
191    
192            /**
193            * Gets the number of workflow definition links.
194            *
195            * @return the number of workflow definition links
196            * @throws SystemException if a system exception occurred
197            */
198            public static int getWorkflowDefinitionLinksCount()
199                    throws com.liferay.portal.kernel.exception.SystemException {
200                    return getService().getWorkflowDefinitionLinksCount();
201            }
202    
203            /**
204            * Updates the workflow definition link in the database. Also notifies the appropriate model listeners.
205            *
206            * @param workflowDefinitionLink the workflow definition link to update
207            * @return the workflow definition link that was updated
208            * @throws SystemException if a system exception occurred
209            */
210            public static com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
211                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink)
212                    throws com.liferay.portal.kernel.exception.SystemException {
213                    return getService().updateWorkflowDefinitionLink(workflowDefinitionLink);
214            }
215    
216            /**
217            * Updates the workflow definition link in the database. Also notifies the appropriate model listeners.
218            *
219            * @param workflowDefinitionLink the workflow definition link to update
220            * @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.
221            * @return the workflow definition link that was updated
222            * @throws SystemException if a system exception occurred
223            */
224            public static com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
225                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink,
226                    boolean merge)
227                    throws com.liferay.portal.kernel.exception.SystemException {
228                    return getService()
229                                       .updateWorkflowDefinitionLink(workflowDefinitionLink, merge);
230            }
231    
232            public static com.liferay.portal.model.WorkflowDefinitionLink addWorkflowDefinitionLink(
233                    long userId, long companyId, long groupId, java.lang.String className,
234                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion)
235                    throws com.liferay.portal.kernel.exception.PortalException,
236                            com.liferay.portal.kernel.exception.SystemException {
237                    return getService()
238                                       .addWorkflowDefinitionLink(userId, companyId, groupId,
239                            className, workflowDefinitionName, workflowDefinitionVersion);
240            }
241    
242            public static void deleteWorkflowDefinitionLink(long companyId,
243                    long groupId, java.lang.String className)
244                    throws com.liferay.portal.kernel.exception.PortalException,
245                            com.liferay.portal.kernel.exception.SystemException {
246                    getService().deleteWorkflowDefinitionLink(companyId, groupId, className);
247            }
248    
249            public static com.liferay.portal.model.WorkflowDefinitionLink getDefaultWorkflowDefinitionLink(
250                    long companyId, java.lang.String className)
251                    throws com.liferay.portal.kernel.exception.PortalException,
252                            com.liferay.portal.kernel.exception.SystemException {
253                    return getService()
254                                       .getDefaultWorkflowDefinitionLink(companyId, className);
255            }
256    
257            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
258                    long companyId, long groupId, java.lang.String className)
259                    throws com.liferay.portal.kernel.exception.PortalException,
260                            com.liferay.portal.kernel.exception.SystemException {
261                    return getService()
262                                       .getWorkflowDefinitionLink(companyId, groupId, className);
263            }
264    
265            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
266                    long companyId, long groupId, java.lang.String className, boolean strict)
267                    throws com.liferay.portal.kernel.exception.PortalException,
268                            com.liferay.portal.kernel.exception.SystemException {
269                    return getService()
270                                       .getWorkflowDefinitionLink(companyId, groupId, className,
271                            strict);
272            }
273    
274            public static int getWorkflowDefinitionLinksCount(long companyId,
275                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion)
276                    throws com.liferay.portal.kernel.exception.SystemException {
277                    return getService()
278                                       .getWorkflowDefinitionLinksCount(companyId,
279                            workflowDefinitionName, workflowDefinitionVersion);
280            }
281    
282            public static boolean hasWorkflowDefinitionLink(long companyId,
283                    long groupId, java.lang.String className)
284                    throws com.liferay.portal.kernel.exception.PortalException,
285                            com.liferay.portal.kernel.exception.SystemException {
286                    return getService()
287                                       .hasWorkflowDefinitionLink(companyId, groupId, className);
288            }
289    
290            public static com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
291                    long userId, long companyId, long groupId, java.lang.String className,
292                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion)
293                    throws com.liferay.portal.kernel.exception.PortalException,
294                            com.liferay.portal.kernel.exception.SystemException {
295                    return getService()
296                                       .updateWorkflowDefinitionLink(userId, companyId, groupId,
297                            className, workflowDefinitionName, workflowDefinitionVersion);
298            }
299    
300            public static WorkflowDefinitionLinkLocalService getService() {
301                    if (_service == null) {
302                            _service = (WorkflowDefinitionLinkLocalService)PortalBeanLocatorUtil.locate(WorkflowDefinitionLinkLocalService.class.getName());
303                    }
304    
305                    return _service;
306            }
307    
308            public void setService(WorkflowDefinitionLinkLocalService service) {
309                    _service = service;
310            }
311    
312            private static WorkflowDefinitionLinkLocalService _service;
313    }