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            public static com.liferay.portal.model.WorkflowDefinitionLink getDefaultWorkflowDefinitionLink(
229                    long companyId, java.lang.String className, long classPK, long typePK)
230                    throws com.liferay.portal.kernel.exception.PortalException {
231                    return getService()
232                                       .getDefaultWorkflowDefinitionLink(companyId, className,
233                            classPK, typePK);
234            }
235    
236            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
237                    return getService().getIndexableActionableDynamicQuery();
238            }
239    
240            /**
241            * Returns the OSGi service identifier.
242            *
243            * @return the OSGi service identifier
244            */
245            public static java.lang.String getOSGiServiceIdentifier() {
246                    return getService().getOSGiServiceIdentifier();
247            }
248    
249            public static com.liferay.portal.model.PersistedModel getPersistedModel(
250                    java.io.Serializable primaryKeyObj)
251                    throws com.liferay.portal.kernel.exception.PortalException {
252                    return getService().getPersistedModel(primaryKeyObj);
253            }
254    
255            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
256                    long companyId, long groupId, java.lang.String className, long classPK,
257                    long typePK) throws com.liferay.portal.kernel.exception.PortalException {
258                    return getService()
259                                       .getWorkflowDefinitionLink(companyId, groupId, className,
260                            classPK, typePK);
261            }
262    
263            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
264                    long companyId, long groupId, java.lang.String className, long classPK,
265                    long typePK, boolean strict)
266                    throws com.liferay.portal.kernel.exception.PortalException {
267                    return getService()
268                                       .getWorkflowDefinitionLink(companyId, groupId, className,
269                            classPK, typePK, strict);
270            }
271    
272            /**
273            * Returns the workflow definition link with the primary key.
274            *
275            * @param workflowDefinitionLinkId the primary key of the workflow definition link
276            * @return the workflow definition link
277            * @throws PortalException if a workflow definition link with the primary key could not be found
278            */
279            public static com.liferay.portal.model.WorkflowDefinitionLink getWorkflowDefinitionLink(
280                    long workflowDefinitionLinkId)
281                    throws com.liferay.portal.kernel.exception.PortalException {
282                    return getService().getWorkflowDefinitionLink(workflowDefinitionLinkId);
283            }
284    
285            /**
286            * Returns a range of all the workflow definition links.
287            *
288            * <p>
289            * 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.
290            * </p>
291            *
292            * @param start the lower bound of the range of workflow definition links
293            * @param end the upper bound of the range of workflow definition links (not inclusive)
294            * @return the range of workflow definition links
295            */
296            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> getWorkflowDefinitionLinks(
297                    int start, int end) {
298                    return getService().getWorkflowDefinitionLinks(start, end);
299            }
300    
301            /**
302            * Returns the number of workflow definition links.
303            *
304            * @return the number of workflow definition links
305            */
306            public static int getWorkflowDefinitionLinksCount() {
307                    return getService().getWorkflowDefinitionLinksCount();
308            }
309    
310            public static int getWorkflowDefinitionLinksCount(long companyId,
311                    long groupId, java.lang.String className) {
312                    return getService()
313                                       .getWorkflowDefinitionLinksCount(companyId, groupId,
314                            className);
315            }
316    
317            public static int getWorkflowDefinitionLinksCount(long companyId,
318                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion) {
319                    return getService()
320                                       .getWorkflowDefinitionLinksCount(companyId,
321                            workflowDefinitionName, workflowDefinitionVersion);
322            }
323    
324            public static boolean hasWorkflowDefinitionLink(long companyId,
325                    long groupId, java.lang.String className) {
326                    return getService()
327                                       .hasWorkflowDefinitionLink(companyId, groupId, className);
328            }
329    
330            public static boolean hasWorkflowDefinitionLink(long companyId,
331                    long groupId, java.lang.String className, long classPK) {
332                    return getService()
333                                       .hasWorkflowDefinitionLink(companyId, groupId, className,
334                            classPK);
335            }
336    
337            public static boolean hasWorkflowDefinitionLink(long companyId,
338                    long groupId, java.lang.String className, long classPK, long typePK) {
339                    return getService()
340                                       .hasWorkflowDefinitionLink(companyId, groupId, className,
341                            classPK, typePK);
342            }
343    
344            public static void updateWorkflowDefinitionLink(long userId,
345                    long companyId, long groupId, java.lang.String className, long classPK,
346                    long typePK, java.lang.String workflowDefinition)
347                    throws com.liferay.portal.kernel.exception.PortalException {
348                    getService()
349                            .updateWorkflowDefinitionLink(userId, companyId, groupId,
350                            className, classPK, typePK, workflowDefinition);
351            }
352    
353            public static com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
354                    long userId, long companyId, long groupId, java.lang.String className,
355                    long classPK, long typePK, java.lang.String workflowDefinitionName,
356                    int workflowDefinitionVersion)
357                    throws com.liferay.portal.kernel.exception.PortalException {
358                    return getService()
359                                       .updateWorkflowDefinitionLink(userId, companyId, groupId,
360                            className, classPK, typePK, workflowDefinitionName,
361                            workflowDefinitionVersion);
362            }
363    
364            /**
365            * Updates the workflow definition link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
366            *
367            * @param workflowDefinitionLink the workflow definition link
368            * @return the workflow definition link that was updated
369            */
370            public static com.liferay.portal.model.WorkflowDefinitionLink updateWorkflowDefinitionLink(
371                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink) {
372                    return getService().updateWorkflowDefinitionLink(workflowDefinitionLink);
373            }
374    
375            public static void updateWorkflowDefinitionLinks(long userId,
376                    long companyId, long groupId, java.lang.String className, long classPK,
377                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.Long, java.lang.String>> workflowDefinitionOVPs)
378                    throws com.liferay.portal.kernel.exception.PortalException {
379                    getService()
380                            .updateWorkflowDefinitionLinks(userId, companyId, groupId,
381                            className, classPK, workflowDefinitionOVPs);
382            }
383    
384            public static WorkflowDefinitionLinkLocalService getService() {
385                    if (_service == null) {
386                            _service = (WorkflowDefinitionLinkLocalService)PortalBeanLocatorUtil.locate(WorkflowDefinitionLinkLocalService.class.getName());
387    
388                            ReferenceRegistry.registerReference(WorkflowDefinitionLinkLocalServiceUtil.class,
389                                    "_service");
390                    }
391    
392                    return _service;
393            }
394    
395            private static WorkflowDefinitionLinkLocalService _service;
396    }