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.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.model.WorkflowInstanceLink;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the workflow instance link service. This utility wraps {@link com.liferay.portal.service.persistence.impl.WorkflowInstanceLinkPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see WorkflowInstanceLinkPersistence
037     * @see com.liferay.portal.service.persistence.impl.WorkflowInstanceLinkPersistenceImpl
038     * @generated
039     */
040    @ProviderType
041    public class WorkflowInstanceLinkUtil {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
046             */
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
050             */
051            public static void clearCache() {
052                    getPersistence().clearCache();
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
057             */
058            public static void clearCache(WorkflowInstanceLink workflowInstanceLink) {
059                    getPersistence().clearCache(workflowInstanceLink);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<WorkflowInstanceLink> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<WorkflowInstanceLink> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end) {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<WorkflowInstanceLink> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator<WorkflowInstanceLink> orderByComparator) {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
098             */
099            public static WorkflowInstanceLink update(
100                    WorkflowInstanceLink workflowInstanceLink) {
101                    return getPersistence().update(workflowInstanceLink);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static WorkflowInstanceLink update(
108                    WorkflowInstanceLink workflowInstanceLink, ServiceContext serviceContext) {
109                    return getPersistence().update(workflowInstanceLink, serviceContext);
110            }
111    
112            /**
113            * Returns all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
114            *
115            * @param groupId the group ID
116            * @param companyId the company ID
117            * @param classNameId the class name ID
118            * @param classPK the class p k
119            * @return the matching workflow instance links
120            */
121            public static List<WorkflowInstanceLink> findByG_C_C_C(long groupId,
122                    long companyId, long classNameId, long classPK) {
123                    return getPersistence()
124                                       .findByG_C_C_C(groupId, companyId, classNameId, classPK);
125            }
126    
127            /**
128            * Returns a range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
129            *
130            * <p>
131            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
132            * </p>
133            *
134            * @param groupId the group ID
135            * @param companyId the company ID
136            * @param classNameId the class name ID
137            * @param classPK the class p k
138            * @param start the lower bound of the range of workflow instance links
139            * @param end the upper bound of the range of workflow instance links (not inclusive)
140            * @return the range of matching workflow instance links
141            */
142            public static List<WorkflowInstanceLink> findByG_C_C_C(long groupId,
143                    long companyId, long classNameId, long classPK, int start, int end) {
144                    return getPersistence()
145                                       .findByG_C_C_C(groupId, companyId, classNameId, classPK,
146                            start, end);
147            }
148    
149            /**
150            * Returns an ordered range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
151            *
152            * <p>
153            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
154            * </p>
155            *
156            * @param groupId the group ID
157            * @param companyId the company ID
158            * @param classNameId the class name ID
159            * @param classPK the class p k
160            * @param start the lower bound of the range of workflow instance links
161            * @param end the upper bound of the range of workflow instance links (not inclusive)
162            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
163            * @return the ordered range of matching workflow instance links
164            */
165            public static List<WorkflowInstanceLink> findByG_C_C_C(long groupId,
166                    long companyId, long classNameId, long classPK, int start, int end,
167                    OrderByComparator<WorkflowInstanceLink> orderByComparator) {
168                    return getPersistence()
169                                       .findByG_C_C_C(groupId, companyId, classNameId, classPK,
170                            start, end, orderByComparator);
171            }
172    
173            /**
174            * Returns the first workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
175            *
176            * @param groupId the group ID
177            * @param companyId the company ID
178            * @param classNameId the class name ID
179            * @param classPK the class p k
180            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
181            * @return the first matching workflow instance link
182            * @throws NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
183            */
184            public static WorkflowInstanceLink findByG_C_C_C_First(long groupId,
185                    long companyId, long classNameId, long classPK,
186                    OrderByComparator<WorkflowInstanceLink> orderByComparator)
187                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException {
188                    return getPersistence()
189                                       .findByG_C_C_C_First(groupId, companyId, classNameId,
190                            classPK, orderByComparator);
191            }
192    
193            /**
194            * Returns the first workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
195            *
196            * @param groupId the group ID
197            * @param companyId the company ID
198            * @param classNameId the class name ID
199            * @param classPK the class p k
200            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
201            * @return the first matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found
202            */
203            public static WorkflowInstanceLink fetchByG_C_C_C_First(long groupId,
204                    long companyId, long classNameId, long classPK,
205                    OrderByComparator<WorkflowInstanceLink> orderByComparator) {
206                    return getPersistence()
207                                       .fetchByG_C_C_C_First(groupId, companyId, classNameId,
208                            classPK, orderByComparator);
209            }
210    
211            /**
212            * Returns the last workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
213            *
214            * @param groupId the group ID
215            * @param companyId the company ID
216            * @param classNameId the class name ID
217            * @param classPK the class p k
218            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
219            * @return the last matching workflow instance link
220            * @throws NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
221            */
222            public static WorkflowInstanceLink findByG_C_C_C_Last(long groupId,
223                    long companyId, long classNameId, long classPK,
224                    OrderByComparator<WorkflowInstanceLink> orderByComparator)
225                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException {
226                    return getPersistence()
227                                       .findByG_C_C_C_Last(groupId, companyId, classNameId,
228                            classPK, orderByComparator);
229            }
230    
231            /**
232            * Returns the last workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
233            *
234            * @param groupId the group ID
235            * @param companyId the company ID
236            * @param classNameId the class name ID
237            * @param classPK the class p k
238            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
239            * @return the last matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found
240            */
241            public static WorkflowInstanceLink fetchByG_C_C_C_Last(long groupId,
242                    long companyId, long classNameId, long classPK,
243                    OrderByComparator<WorkflowInstanceLink> orderByComparator) {
244                    return getPersistence()
245                                       .fetchByG_C_C_C_Last(groupId, companyId, classNameId,
246                            classPK, orderByComparator);
247            }
248    
249            /**
250            * Returns the workflow instance links before and after the current workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
251            *
252            * @param workflowInstanceLinkId the primary key of the current workflow instance link
253            * @param groupId the group ID
254            * @param companyId the company ID
255            * @param classNameId the class name ID
256            * @param classPK the class p k
257            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
258            * @return the previous, current, and next workflow instance link
259            * @throws NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
260            */
261            public static WorkflowInstanceLink[] findByG_C_C_C_PrevAndNext(
262                    long workflowInstanceLinkId, long groupId, long companyId,
263                    long classNameId, long classPK,
264                    OrderByComparator<WorkflowInstanceLink> orderByComparator)
265                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException {
266                    return getPersistence()
267                                       .findByG_C_C_C_PrevAndNext(workflowInstanceLinkId, groupId,
268                            companyId, classNameId, classPK, orderByComparator);
269            }
270    
271            /**
272            * Removes all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
273            *
274            * @param groupId the group ID
275            * @param companyId the company ID
276            * @param classNameId the class name ID
277            * @param classPK the class p k
278            */
279            public static void removeByG_C_C_C(long groupId, long companyId,
280                    long classNameId, long classPK) {
281                    getPersistence()
282                            .removeByG_C_C_C(groupId, companyId, classNameId, classPK);
283            }
284    
285            /**
286            * Returns the number of workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
287            *
288            * @param groupId the group ID
289            * @param companyId the company ID
290            * @param classNameId the class name ID
291            * @param classPK the class p k
292            * @return the number of matching workflow instance links
293            */
294            public static int countByG_C_C_C(long groupId, long companyId,
295                    long classNameId, long classPK) {
296                    return getPersistence()
297                                       .countByG_C_C_C(groupId, companyId, classNameId, classPK);
298            }
299    
300            /**
301            * Caches the workflow instance link in the entity cache if it is enabled.
302            *
303            * @param workflowInstanceLink the workflow instance link
304            */
305            public static void cacheResult(WorkflowInstanceLink workflowInstanceLink) {
306                    getPersistence().cacheResult(workflowInstanceLink);
307            }
308    
309            /**
310            * Caches the workflow instance links in the entity cache if it is enabled.
311            *
312            * @param workflowInstanceLinks the workflow instance links
313            */
314            public static void cacheResult(
315                    List<WorkflowInstanceLink> workflowInstanceLinks) {
316                    getPersistence().cacheResult(workflowInstanceLinks);
317            }
318    
319            /**
320            * Creates a new workflow instance link with the primary key. Does not add the workflow instance link to the database.
321            *
322            * @param workflowInstanceLinkId the primary key for the new workflow instance link
323            * @return the new workflow instance link
324            */
325            public static WorkflowInstanceLink create(long workflowInstanceLinkId) {
326                    return getPersistence().create(workflowInstanceLinkId);
327            }
328    
329            /**
330            * Removes the workflow instance link with the primary key from the database. Also notifies the appropriate model listeners.
331            *
332            * @param workflowInstanceLinkId the primary key of the workflow instance link
333            * @return the workflow instance link that was removed
334            * @throws NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
335            */
336            public static WorkflowInstanceLink remove(long workflowInstanceLinkId)
337                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException {
338                    return getPersistence().remove(workflowInstanceLinkId);
339            }
340    
341            public static WorkflowInstanceLink updateImpl(
342                    WorkflowInstanceLink workflowInstanceLink) {
343                    return getPersistence().updateImpl(workflowInstanceLink);
344            }
345    
346            /**
347            * Returns the workflow instance link with the primary key or throws a {@link NoSuchWorkflowInstanceLinkException} if it could not be found.
348            *
349            * @param workflowInstanceLinkId the primary key of the workflow instance link
350            * @return the workflow instance link
351            * @throws NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
352            */
353            public static WorkflowInstanceLink findByPrimaryKey(
354                    long workflowInstanceLinkId)
355                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException {
356                    return getPersistence().findByPrimaryKey(workflowInstanceLinkId);
357            }
358    
359            /**
360            * Returns the workflow instance link with the primary key or returns <code>null</code> if it could not be found.
361            *
362            * @param workflowInstanceLinkId the primary key of the workflow instance link
363            * @return the workflow instance link, or <code>null</code> if a workflow instance link with the primary key could not be found
364            */
365            public static WorkflowInstanceLink fetchByPrimaryKey(
366                    long workflowInstanceLinkId) {
367                    return getPersistence().fetchByPrimaryKey(workflowInstanceLinkId);
368            }
369    
370            public static java.util.Map<java.io.Serializable, WorkflowInstanceLink> fetchByPrimaryKeys(
371                    java.util.Set<java.io.Serializable> primaryKeys) {
372                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
373            }
374    
375            /**
376            * Returns all the workflow instance links.
377            *
378            * @return the workflow instance links
379            */
380            public static List<WorkflowInstanceLink> findAll() {
381                    return getPersistence().findAll();
382            }
383    
384            /**
385            * Returns a range of all the workflow instance links.
386            *
387            * <p>
388            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
389            * </p>
390            *
391            * @param start the lower bound of the range of workflow instance links
392            * @param end the upper bound of the range of workflow instance links (not inclusive)
393            * @return the range of workflow instance links
394            */
395            public static List<WorkflowInstanceLink> findAll(int start, int end) {
396                    return getPersistence().findAll(start, end);
397            }
398    
399            /**
400            * Returns an ordered range of all the workflow instance links.
401            *
402            * <p>
403            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
404            * </p>
405            *
406            * @param start the lower bound of the range of workflow instance links
407            * @param end the upper bound of the range of workflow instance links (not inclusive)
408            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
409            * @return the ordered range of workflow instance links
410            */
411            public static List<WorkflowInstanceLink> findAll(int start, int end,
412                    OrderByComparator<WorkflowInstanceLink> orderByComparator) {
413                    return getPersistence().findAll(start, end, orderByComparator);
414            }
415    
416            /**
417            * Removes all the workflow instance links from the database.
418            */
419            public static void removeAll() {
420                    getPersistence().removeAll();
421            }
422    
423            /**
424            * Returns the number of workflow instance links.
425            *
426            * @return the number of workflow instance links
427            */
428            public static int countAll() {
429                    return getPersistence().countAll();
430            }
431    
432            public static WorkflowInstanceLinkPersistence getPersistence() {
433                    if (_persistence == null) {
434                            _persistence = (WorkflowInstanceLinkPersistence)PortalBeanLocatorUtil.locate(WorkflowInstanceLinkPersistence.class.getName());
435    
436                            ReferenceRegistry.registerReference(WorkflowInstanceLinkUtil.class,
437                                    "_persistence");
438                    }
439    
440                    return _persistence;
441            }
442    
443            /**
444             * @deprecated As of 6.2.0
445             */
446            @Deprecated
447            public void setPersistence(WorkflowInstanceLinkPersistence persistence) {
448            }
449    
450            private static WorkflowInstanceLinkPersistence _persistence;
451    }