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            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
219                    return getService().getIndexableActionableDynamicQuery();
220            }
221    
222            /**
223            * Returns the OSGi service identifier.
224            *
225            * @return the OSGi service identifier
226            */
227            public static java.lang.String getOSGiServiceIdentifier() {
228                    return getService().getOSGiServiceIdentifier();
229            }
230    
231            public static com.liferay.portal.model.PersistedModel getPersistedModel(
232                    java.io.Serializable primaryKeyObj)
233                    throws com.liferay.portal.kernel.exception.PortalException {
234                    return getService().getPersistedModel(primaryKeyObj);
235            }
236    
237            public static java.lang.String getState(long companyId, long groupId,
238                    java.lang.String className, long classPK)
239                    throws com.liferay.portal.kernel.exception.PortalException {
240                    return getService().getState(companyId, groupId, className, classPK);
241            }
242    
243            public static com.liferay.portal.model.WorkflowInstanceLink getWorkflowInstanceLink(
244                    long companyId, long groupId, java.lang.String className, long classPK)
245                    throws com.liferay.portal.kernel.exception.PortalException {
246                    return getService()
247                                       .getWorkflowInstanceLink(companyId, groupId, className,
248                            classPK);
249            }
250    
251            /**
252            * Returns the workflow instance link with the primary key.
253            *
254            * @param workflowInstanceLinkId the primary key of the workflow instance link
255            * @return the workflow instance link
256            * @throws PortalException if a workflow instance link with the primary key could not be found
257            */
258            public static com.liferay.portal.model.WorkflowInstanceLink getWorkflowInstanceLink(
259                    long workflowInstanceLinkId)
260                    throws com.liferay.portal.kernel.exception.PortalException {
261                    return getService().getWorkflowInstanceLink(workflowInstanceLinkId);
262            }
263    
264            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> getWorkflowInstanceLinks(
265                    long companyId, long groupId, java.lang.String className, long classPK) {
266                    return getService()
267                                       .getWorkflowInstanceLinks(companyId, groupId, className,
268                            classPK);
269            }
270    
271            /**
272            * Returns a range of all the workflow instance links.
273            *
274            * <p>
275            * 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.
276            * </p>
277            *
278            * @param start the lower bound of the range of workflow instance links
279            * @param end the upper bound of the range of workflow instance links (not inclusive)
280            * @return the range of workflow instance links
281            */
282            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> getWorkflowInstanceLinks(
283                    int start, int end) {
284                    return getService().getWorkflowInstanceLinks(start, end);
285            }
286    
287            /**
288            * Returns the number of workflow instance links.
289            *
290            * @return the number of workflow instance links
291            */
292            public static int getWorkflowInstanceLinksCount() {
293                    return getService().getWorkflowInstanceLinksCount();
294            }
295    
296            public static boolean hasWorkflowInstanceLink(long companyId, long groupId,
297                    java.lang.String className, long classPK) {
298                    return getService()
299                                       .hasWorkflowInstanceLink(companyId, groupId, className,
300                            classPK);
301            }
302    
303            public static boolean isEnded(long companyId, long groupId,
304                    java.lang.String className, long classPK)
305                    throws com.liferay.portal.kernel.exception.PortalException {
306                    return getService().isEnded(companyId, groupId, className, classPK);
307            }
308    
309            public static void startWorkflowInstance(long companyId, long groupId,
310                    long userId, java.lang.String className, long classPK,
311                    java.util.Map<java.lang.String, java.io.Serializable> workflowContext)
312                    throws com.liferay.portal.kernel.exception.PortalException {
313                    getService()
314                            .startWorkflowInstance(companyId, groupId, userId, className,
315                            classPK, workflowContext);
316            }
317    
318            public static void updateClassPK(long companyId, long groupId,
319                    java.lang.String className, long oldClassPK, long newClassPK)
320                    throws com.liferay.portal.kernel.exception.PortalException {
321                    getService()
322                            .updateClassPK(companyId, groupId, className, oldClassPK, newClassPK);
323            }
324    
325            /**
326            * Updates the workflow instance link in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
327            *
328            * @param workflowInstanceLink the workflow instance link
329            * @return the workflow instance link that was updated
330            */
331            public static com.liferay.portal.model.WorkflowInstanceLink updateWorkflowInstanceLink(
332                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) {
333                    return getService().updateWorkflowInstanceLink(workflowInstanceLink);
334            }
335    
336            public static WorkflowInstanceLinkLocalService getService() {
337                    if (_service == null) {
338                            _service = (WorkflowInstanceLinkLocalService)PortalBeanLocatorUtil.locate(WorkflowInstanceLinkLocalService.class.getName());
339    
340                            ReferenceRegistry.registerReference(WorkflowInstanceLinkLocalServiceUtil.class,
341                                    "_service");
342                    }
343    
344                    return _service;
345            }
346    
347            private static WorkflowInstanceLinkLocalService _service;
348    }