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