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 WorkflowInstanceLink. This utility wraps
024     * {@link com.liferay.portal.service.impl.WorkflowInstanceLinkLocalServiceImpl} 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 WorkflowInstanceLinkLocalService
032     * @see com.liferay.portal.service.base.WorkflowInstanceLinkLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.WorkflowInstanceLinkLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class WorkflowInstanceLinkLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.WorkflowInstanceLinkLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portal.model.WorkflowInstanceLink addWorkflowInstanceLink(
044                    long userId, long companyId, long groupId, java.lang.String className,
045                    long classPK, long workflowInstanceId)
046                    throws com.liferay.portal.kernel.exception.PortalException {
047                    return getService()
048                                       .addWorkflowInstanceLink(userId, companyId, groupId,
049                            className, classPK, workflowInstanceId);
050            }
051    
052            /**
053            * Adds the workflow instance link to the database. Also notifies the appropriate model listeners.
054            *
055            * @param workflowInstanceLink the workflow instance link
056            * @return the workflow instance link that was added
057            */
058            public static com.liferay.portal.model.WorkflowInstanceLink addWorkflowInstanceLink(
059                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) {
060                    return getService().addWorkflowInstanceLink(workflowInstanceLink);
061            }
062    
063            /**
064            * Creates a new workflow instance link with the primary key. Does not add the workflow instance link to the database.
065            *
066            * @param workflowInstanceLinkId the primary key for the new workflow instance link
067            * @return the new workflow instance link
068            */
069            public static com.liferay.portal.model.WorkflowInstanceLink createWorkflowInstanceLink(
070                    long workflowInstanceLinkId) {
071                    return getService().createWorkflowInstanceLink(workflowInstanceLinkId);
072            }
073    
074            /**
075            * @throws PortalException
076            */
077            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
078                    com.liferay.portal.model.PersistedModel persistedModel)
079                    throws com.liferay.portal.kernel.exception.PortalException {
080                    return getService().deletePersistedModel(persistedModel);
081            }
082    
083            public static com.liferay.portal.model.WorkflowInstanceLink deleteWorkflowInstanceLink(
084                    long companyId, long groupId, java.lang.String className, long classPK)
085                    throws com.liferay.portal.kernel.exception.PortalException {
086                    return getService()
087                                       .deleteWorkflowInstanceLink(companyId, groupId, className,
088                            classPK);
089            }
090    
091            /**
092            * Deletes the workflow instance link from the database. Also notifies the appropriate model listeners.
093            *
094            * @param workflowInstanceLink the workflow instance link
095            * @return the workflow instance link that was removed
096            * @throws PortalException
097            */
098            public static com.liferay.portal.model.WorkflowInstanceLink deleteWorkflowInstanceLink(
099                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink)
100                    throws com.liferay.portal.kernel.exception.PortalException {
101                    return getService().deleteWorkflowInstanceLink(workflowInstanceLink);
102            }
103    
104            /**
105            * Deletes the workflow instance link with the primary key from the database. Also notifies the appropriate model listeners.
106            *
107            * @param workflowInstanceLinkId the primary key of the workflow instance link
108            * @return the workflow instance link that was removed
109            * @throws PortalException if a workflow instance link with the primary key could not be found
110            */
111            public static com.liferay.portal.model.WorkflowInstanceLink deleteWorkflowInstanceLink(
112                    long workflowInstanceLinkId)
113                    throws com.liferay.portal.kernel.exception.PortalException {
114                    return getService().deleteWorkflowInstanceLink(workflowInstanceLinkId);
115            }
116    
117            public static void deleteWorkflowInstanceLinks(long companyId,
118                    long groupId, java.lang.String className, long classPK)
119                    throws com.liferay.portal.kernel.exception.PortalException {
120                    getService()
121                            .deleteWorkflowInstanceLinks(companyId, groupId, className, classPK);
122            }
123    
124            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
125                    return getService().dynamicQuery();
126            }
127    
128            /**
129            * Performs a dynamic query on the database and returns the matching rows.
130            *
131            * @param dynamicQuery the dynamic query
132            * @return the matching rows
133            */
134            public static <T> java.util.List<T> dynamicQuery(
135                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
136                    return getService().dynamicQuery(dynamicQuery);
137            }
138    
139            /**
140            * Performs a dynamic query on the database and returns a range of the matching rows.
141            *
142            * <p>
143            * 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.WorkflowInstanceLinkModelImpl}. 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.
144            * </p>
145            *
146            * @param dynamicQuery the dynamic query
147            * @param start the lower bound of the range of model instances
148            * @param end the upper bound of the range of model instances (not inclusive)
149            * @return the range of matching rows
150            */
151            public static <T> java.util.List<T> dynamicQuery(
152                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
153                    int end) {
154                    return getService().dynamicQuery(dynamicQuery, start, end);
155            }
156    
157            /**
158            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
159            *
160            * <p>
161            * 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.WorkflowInstanceLinkModelImpl}. 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.
162            * </p>
163            *
164            * @param dynamicQuery the dynamic query
165            * @param start the lower bound of the range of model instances
166            * @param end the upper bound of the range of model instances (not inclusive)
167            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
168            * @return the ordered range of matching rows
169            */
170            public static <T> java.util.List<T> dynamicQuery(
171                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
172                    int end,
173                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
174                    return getService()
175                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
176            }
177    
178            /**
179            * Returns the number of rows matching the dynamic query.
180            *
181            * @param dynamicQuery the dynamic query
182            * @return the number of rows matching the dynamic query
183            */
184            public static long dynamicQueryCount(
185                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
186                    return getService().dynamicQueryCount(dynamicQuery);
187            }
188    
189            /**
190            * Returns the number of rows matching the dynamic query.
191            *
192            * @param dynamicQuery the dynamic query
193            * @param projection the projection to apply to the query
194            * @return the number of rows matching the dynamic query
195            */
196            public static long dynamicQueryCount(
197                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
198                    com.liferay.portal.kernel.dao.orm.Projection projection) {
199                    return getService().dynamicQueryCount(dynamicQuery, projection);
200            }
201    
202            public static com.liferay.portal.model.WorkflowInstanceLink fetchWorkflowInstanceLink(
203                    long companyId, long groupId, java.lang.String className, long classPK) {
204                    return getService()
205                                       .fetchWorkflowInstanceLink(companyId, groupId, className,
206                            classPK);
207            }
208    
209            public static com.liferay.portal.model.WorkflowInstanceLink fetchWorkflowInstanceLink(
210                    long workflowInstanceLinkId) {
211                    return getService().fetchWorkflowInstanceLink(workflowInstanceLinkId);
212            }
213    
214            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
215                    return getService().getActionableDynamicQuery();
216            }
217    
218            /**
219            * Returns the Spring bean ID for this bean.
220            *
221            * @return the Spring bean ID for this bean
222            */
223            public static java.lang.String getBeanIdentifier() {
224                    return getService().getBeanIdentifier();
225            }
226    
227            public static com.liferay.portal.model.PersistedModel getPersistedModel(
228                    java.io.Serializable primaryKeyObj)
229                    throws com.liferay.portal.kernel.exception.PortalException {
230                    return getService().getPersistedModel(primaryKeyObj);
231            }
232    
233            public static java.lang.String getState(long companyId, long groupId,
234                    java.lang.String className, long classPK)
235                    throws com.liferay.portal.kernel.exception.PortalException {
236                    return getService().getState(companyId, groupId, className, classPK);
237            }
238    
239            public static com.liferay.portal.model.WorkflowInstanceLink getWorkflowInstanceLink(
240                    long companyId, long groupId, java.lang.String className, long classPK)
241                    throws com.liferay.portal.kernel.exception.PortalException {
242                    return getService()
243                                       .getWorkflowInstanceLink(companyId, groupId, className,
244                            classPK);
245            }
246    
247            /**
248            * Returns the workflow instance link with the primary key.
249            *
250            * @param workflowInstanceLinkId the primary key of the workflow instance link
251            * @return the workflow instance link
252            * @throws PortalException if a workflow instance link with the primary key could not be found
253            */
254            public static com.liferay.portal.model.WorkflowInstanceLink getWorkflowInstanceLink(
255                    long workflowInstanceLinkId)
256                    throws com.liferay.portal.kernel.exception.PortalException {
257                    return getService().getWorkflowInstanceLink(workflowInstanceLinkId);
258            }
259    
260            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> getWorkflowInstanceLinks(
261                    long companyId, long groupId, java.lang.String className, long classPK) {
262                    return getService()
263                                       .getWorkflowInstanceLinks(companyId, groupId, className,
264                            classPK);
265            }
266    
267            /**
268            * Returns a range of all the workflow instance links.
269            *
270            * <p>
271            * 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.WorkflowInstanceLinkModelImpl}. 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.
272            * </p>
273            *
274            * @param start the lower bound of the range of workflow instance links
275            * @param end the upper bound of the range of workflow instance links (not inclusive)
276            * @return the range of workflow instance links
277            */
278            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> getWorkflowInstanceLinks(
279                    int start, int end) {
280                    return getService().getWorkflowInstanceLinks(start, end);
281            }
282    
283            /**
284            * Returns the number of workflow instance links.
285            *
286            * @return the number of workflow instance links
287            */
288            public static int getWorkflowInstanceLinksCount() {
289                    return getService().getWorkflowInstanceLinksCount();
290            }
291    
292            public static boolean hasWorkflowInstanceLink(long companyId, long groupId,
293                    java.lang.String className, long classPK) {
294                    return getService()
295                                       .hasWorkflowInstanceLink(companyId, groupId, className,
296                            classPK);
297            }
298    
299            public static boolean isEnded(long companyId, long groupId,
300                    java.lang.String className, long classPK)
301                    throws com.liferay.portal.kernel.exception.PortalException {
302                    return getService().isEnded(companyId, groupId, className, classPK);
303            }
304    
305            /**
306            * Sets the Spring bean ID for this bean.
307            *
308            * @param beanIdentifier the Spring bean ID for this bean
309            */
310            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
311                    getService().setBeanIdentifier(beanIdentifier);
312            }
313    
314            public static void startWorkflowInstance(long companyId, long groupId,
315                    long userId, java.lang.String className, long classPK,
316                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
317                    throws com.liferay.portal.kernel.exception.PortalException {
318                    getService()
319                            .startWorkflowInstance(companyId, groupId, userId, className,
320                            classPK, workflowContext);
321            }
322    
323            public static void updateClassPK(long companyId, long groupId,
324                    java.lang.String className, long oldClassPK, long newClassPK)
325                    throws com.liferay.portal.kernel.exception.PortalException {
326                    getService()
327                            .updateClassPK(companyId, groupId, className, oldClassPK, newClassPK);
328            }
329    
330            /**
331            * Updates the workflow instance link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
332            *
333            * @param workflowInstanceLink the workflow instance link
334            * @return the workflow instance link that was updated
335            */
336            public static com.liferay.portal.model.WorkflowInstanceLink updateWorkflowInstanceLink(
337                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) {
338                    return getService().updateWorkflowInstanceLink(workflowInstanceLink);
339            }
340    
341            public static WorkflowInstanceLinkLocalService getService() {
342                    if (_service == null) {
343                            _service = (WorkflowInstanceLinkLocalService)PortalBeanLocatorUtil.locate(WorkflowInstanceLinkLocalService.class.getName());
344    
345                            ReferenceRegistry.registerReference(WorkflowInstanceLinkLocalServiceUtil.class,
346                                    "_service");
347                    }
348    
349                    return _service;
350            }
351    
352            /**
353             * @deprecated As of 6.2.0
354             */
355            @Deprecated
356            public void setService(WorkflowInstanceLinkLocalService service) {
357            }
358    
359            private static WorkflowInstanceLinkLocalService _service;
360    }