001    /**
002     * Copyright (c) 2000-present 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            public static com.liferay.portal.model.WorkflowDefinitionLink addWorkflowDefinitionLink(
044                    long userId, long companyId, long groupId, java.lang.String className,
045                    long classPK, long typePK, java.lang.String workflowDefinitionName,
046                    int workflowDefinitionVersion)
047                    throws com.liferay.portal.kernel.exception.PortalException {
048                    return getService()
049                                       .addWorkflowDefinitionLink(userId, companyId, groupId,
050                            className, classPK, typePK, workflowDefinitionName,
051                            workflowDefinitionVersion);
052            }
053    
054            /**
055            * Adds the workflow definition link to the database. Also notifies the appropriate model listeners.
056            *
057            * @param workflowDefinitionLink the workflow definition link
058            * @return the workflow definition link that was added
059            */
060            public static com.liferay.portal.model.WorkflowDefinitionLink addWorkflowDefinitionLink(
061                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink) {
062                    return getService().addWorkflowDefinitionLink(workflowDefinitionLink);
063            }
064    
065            /**
066            * Creates a new workflow definition link with the primary key. Does not add the workflow definition link to the database.
067            *
068            * @param workflowDefinitionLinkId the primary key for the new workflow definition link
069            * @return the new workflow definition link
070            */
071            public static com.liferay.portal.model.WorkflowDefinitionLink createWorkflowDefinitionLink(
072                    long workflowDefinitionLinkId) {
073                    return getService()
074                                       .createWorkflowDefinitionLink(workflowDefinitionLinkId);
075            }
076    
077            /**
078            * @throws PortalException
079            */
080            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
081                    com.liferay.portal.model.PersistedModel persistedModel)
082                    throws com.liferay.portal.kernel.exception.PortalException {
083                    return getService().deletePersistedModel(persistedModel);
084            }
085    
086            public static void deleteWorkflowDefinitionLink(long companyId,
087                    long groupId, java.lang.String className, long classPK, long typePK) {
088                    getService()
089                            .deleteWorkflowDefinitionLink(companyId, groupId, className,
090                            classPK, typePK);
091            }
092    
093            /**
094            * Deletes the workflow definition link from the database. Also notifies the appropriate model listeners.
095            *
096            * @param workflowDefinitionLink the workflow definition link
097            * @return the workflow definition link that was removed
098            */
099            public static com.liferay.portal.model.WorkflowDefinitionLink deleteWorkflowDefinitionLink(
100                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink) {
101                    return getService().deleteWorkflowDefinitionLink(workflowDefinitionLink);
102            }
103    
104            /**
105            * Deletes the workflow definition link with the primary key from the database. Also notifies the appropriate model listeners.
106            *
107            * @param workflowDefinitionLinkId the primary key of the workflow definition link
108            * @return the workflow definition link that was removed
109            * @throws PortalException if a workflow definition link with the primary key could not be found
110            */
111            public static com.liferay.portal.model.WorkflowDefinitionLink deleteWorkflowDefinitionLink(
112                    long workflowDefinitionLinkId)
113                    throws com.liferay.portal.kernel.exception.PortalException {
114                    return getService()
115                                       .deleteWorkflowDefinitionLink(workflowDefinitionLinkId);
116            }
117    
118            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
119                    return getService().dynamicQuery();
120            }
121    
122            /**
123            * Performs a dynamic query on the database and returns the matching rows.
124            *
125            * @param dynamicQuery the dynamic query
126            * @return the matching rows
127            */
128            public static <T> java.util.List<T> dynamicQuery(
129                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
130                    return getService().dynamicQuery(dynamicQuery);
131            }
132    
133            /**
134            * Performs a dynamic query on the database and returns a 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            * @return the range of matching rows
144            */
145            public static <T> java.util.List<T> dynamicQuery(
146                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
147                    int end) {
148                    return getService().dynamicQuery(dynamicQuery, start, end);
149            }
150    
151            /**
152            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
153            *
154            * <p>
155            * 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.
156            * </p>
157            *
158            * @param dynamicQuery the dynamic query
159            * @param start the lower bound of the range of model instances
160            * @param end the upper bound of the range of model instances (not inclusive)
161            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
162            * @return the ordered range of matching rows
163            */
164            public static <T> java.util.List<T> dynamicQuery(
165                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
166                    int end,
167                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
168                    return getService()
169                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
170            }
171    
172            /**
173            * Returns the number of rows matching the dynamic query.
174            *
175            * @param dynamicQuery the dynamic query
176            * @return the number of rows matching the dynamic query
177            */
178            public static long dynamicQueryCount(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
180                    return getService().dynamicQueryCount(dynamicQuery);
181            }
182    
183            /**
184            * Returns the number of rows matching the dynamic query.
185            *
186            * @param dynamicQuery the dynamic query
187            * @param projection the projection to apply to the query
188            * @return the number of rows matching the dynamic query
189            */
190            public static long dynamicQueryCount(
191                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
192                    com.liferay.portal.kernel.dao.orm.Projection projection) {
193                    return getService().dynamicQueryCount(dynamicQuery, projection);
194            }
195    
196            public static com.liferay.portal.model.WorkflowDefinitionLink fetchDefaultWorkflowDefinitionLink(
197                    long companyId, java.lang.String className, long classPK, long typePK) {
198                    return getService()
199                                       .fetchDefaultWorkflowDefinitionLink(companyId, className,
200                            classPK, typePK);
201            }
202    
203            public static com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
204                    long companyId, long groupId, java.lang.String className, long classPK,
205                    long typePK) {
206                    return getService()
207                                       .fetchWorkflowDefinitionLink(companyId, groupId, className,
208                            classPK, typePK);
209            }
210    
211            public static com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
212                    long companyId, long groupId, java.lang.String className, long classPK,
213                    long typePK, boolean strict) {
214                    return getService()
215                                       .fetchWorkflowDefinitionLink(companyId, groupId, className,
216                            classPK, typePK, strict);
217            }
218    
219            public static com.liferay.portal.model.WorkflowDefinitionLink fetchWorkflowDefinitionLink(
220                    long workflowDefinitionLinkId) {
221                    return getService().fetchWorkflowDefinitionLink(workflowDefinitionLinkId);
222            }
223    
224            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
225                    return getService().getActionableDynamicQuery();
226            }
227    
228            /**
229            * Returns the Spring bean ID for this bean.
230            *
231            * @return the Spring bean ID for this bean
232            */
233            public static java.lang.String getBeanIdentifier() {
234                    return getService().getBeanIdentifier();
235            }
236    
237            public static com.liferay.portal.model.WorkflowDefinitionLink getDefaultWorkflowDefinitionLink(
238                    long companyId, java.lang.String className, long classPK, long typePK)
239                    throws com.liferay.portal.kernel.exception.PortalException {
240                    return getService()
241                                       .getDefaultWorkflowDefinitionLink(companyId, className,
242                            classPK, typePK);
243            }
244    
245            public static com.liferay.portal.model.PersistedModel getPersistedModel(
246                    java.io.Serializable primaryKeyObj)
247                    throws com.liferay.portal.kernel.exception.PortalException {
248                    return getService().getPersistedModel(primaryKeyObj);
249            }
250    
251            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
252                    long companyId, long groupId, java.lang.String className, long classPK,
253                    long typePK) throws com.liferay.portal.kernel.exception.PortalException {
254                    return getService()
255                                       .getWorkflowDefinitionLink(companyId, groupId, className,
256                            classPK, typePK);
257            }
258    
259            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
260                    long companyId, long groupId, java.lang.String className, long classPK,
261                    long typePK, boolean strict)
262                    throws com.liferay.portal.kernel.exception.PortalException {
263                    return getService()
264                                       .getWorkflowDefinitionLink(companyId, groupId, className,
265                            classPK, typePK, strict);
266            }
267    
268            /**
269            * Returns the workflow definition link with the primary key.
270            *
271            * @param workflowDefinitionLinkId the primary key of the workflow definition link
272            * @return the workflow definition link
273            * @throws PortalException if a workflow definition link with the primary key could not be found
274            */
275            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
276                    long workflowDefinitionLinkId)
277                    throws com.liferay.portal.kernel.exception.PortalException {
278                    return getService().getWorkflowDefinitionLink(workflowDefinitionLinkId);
279            }
280    
281            /**
282            * Returns a range of all the workflow definition links.
283            *
284            * <p>
285            * 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.
286            * </p>
287            *
288            * @param start the lower bound of the range of workflow definition links
289            * @param end the upper bound of the range of workflow definition links (not inclusive)
290            * @return the range of workflow definition links
291            */
292            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> getWorkflowDefinitionLinks(
293                    int start, int end) {
294                    return getService().getWorkflowDefinitionLinks(start, end);
295            }
296    
297            /**
298            * Returns the number of workflow definition links.
299            *
300            * @return the number of workflow definition links
301            */
302            public static int getWorkflowDefinitionLinksCount() {
303                    return getService().getWorkflowDefinitionLinksCount();
304            }
305    
306            public static int getWorkflowDefinitionLinksCount(long companyId,
307                    long groupId, java.lang.String className) {
308                    return getService()
309                                       .getWorkflowDefinitionLinksCount(companyId, groupId,
310                            className);
311            }
312    
313            public static int getWorkflowDefinitionLinksCount(long companyId,
314                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion) {
315                    return getService()
316                                       .getWorkflowDefinitionLinksCount(companyId,
317                            workflowDefinitionName, workflowDefinitionVersion);
318            }
319    
320            public static boolean hasWorkflowDefinitionLink(long companyId,
321                    long groupId, java.lang.String className) {
322                    return getService()
323                                       .hasWorkflowDefinitionLink(companyId, groupId, className);
324            }
325    
326            public static boolean hasWorkflowDefinitionLink(long companyId,
327                    long groupId, java.lang.String className, long classPK) {
328                    return getService()
329                                       .hasWorkflowDefinitionLink(companyId, groupId, className,
330                            classPK);
331            }
332    
333            public static boolean hasWorkflowDefinitionLink(long companyId,
334                    long groupId, java.lang.String className, long classPK, long typePK) {
335                    return getService()
336                                       .hasWorkflowDefinitionLink(companyId, groupId, className,
337                            classPK, typePK);
338            }
339    
340            /**
341            * Sets the Spring bean ID for this bean.
342            *
343            * @param beanIdentifier the Spring bean ID for this bean
344            */
345            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
346                    getService().setBeanIdentifier(beanIdentifier);
347            }
348    
349            public static void updateWorkflowDefinitionLink(long userId,
350                    long companyId, long groupId, java.lang.String className, long classPK,
351                    long typePK, java.lang.String workflowDefinition)
352                    throws com.liferay.portal.kernel.exception.PortalException {
353                    getService()
354                            .updateWorkflowDefinitionLink(userId, companyId, groupId,
355                            className, classPK, typePK, workflowDefinition);
356            }
357    
358            public static com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
359                    long userId, long companyId, long groupId, java.lang.String className,
360                    long classPK, long typePK, java.lang.String workflowDefinitionName,
361                    int workflowDefinitionVersion)
362                    throws com.liferay.portal.kernel.exception.PortalException {
363                    return getService()
364                                       .updateWorkflowDefinitionLink(userId, companyId, groupId,
365                            className, classPK, typePK, workflowDefinitionName,
366                            workflowDefinitionVersion);
367            }
368    
369            /**
370            * Updates the workflow definition link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
371            *
372            * @param workflowDefinitionLink the workflow definition link
373            * @return the workflow definition link that was updated
374            */
375            public static com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
376                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink) {
377                    return getService().updateWorkflowDefinitionLink(workflowDefinitionLink);
378            }
379    
380            public static void updateWorkflowDefinitionLinks(long userId,
381                    long companyId, long groupId, java.lang.String className, long classPK,
382                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.Long, java.lang.String>> workflowDefinitionOVPs)
383                    throws com.liferay.portal.kernel.exception.PortalException {
384                    getService()
385                            .updateWorkflowDefinitionLinks(userId, companyId, groupId,
386                            className, classPK, workflowDefinitionOVPs);
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 As of 6.2.0
402             */
403            @Deprecated
404            public void setService(WorkflowDefinitionLinkLocalService service) {
405            }
406    
407            private static WorkflowDefinitionLinkLocalService _service;
408    }