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