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 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 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 java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
122                    long groupId, 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 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.
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 java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
143                    long groupId, long companyId, long classNameId, long classPK,
144                    int start, int end) {
145                    return getPersistence()
146                                       .findByG_C_C_C(groupId, companyId, classNameId, classPK,
147                            start, end);
148            }
149    
150            /**
151            * Returns an ordered range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
152            *
153            * <p>
154            * 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.
155            * </p>
156            *
157            * @param groupId the group ID
158            * @param companyId the company ID
159            * @param classNameId the class name ID
160            * @param classPK the class p k
161            * @param start the lower bound of the range of workflow instance links
162            * @param end the upper bound of the range of workflow instance links (not inclusive)
163            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
164            * @return the ordered range of matching workflow instance links
165            */
166            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
167                    long groupId, long companyId, long classNameId, long classPK,
168                    int start, int end,
169                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.WorkflowInstanceLink> orderByComparator) {
170                    return getPersistence()
171                                       .findByG_C_C_C(groupId, companyId, classNameId, classPK,
172                            start, end, orderByComparator);
173            }
174    
175            /**
176            * Returns the first workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
177            *
178            * @param groupId the group ID
179            * @param companyId the company ID
180            * @param classNameId the class name ID
181            * @param classPK the class p k
182            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
183            * @return the first matching workflow instance link
184            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
185            */
186            public static com.liferay.portal.model.WorkflowInstanceLink findByG_C_C_C_First(
187                    long groupId, long companyId, long classNameId, long classPK,
188                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.WorkflowInstanceLink> orderByComparator)
189                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException {
190                    return getPersistence()
191                                       .findByG_C_C_C_First(groupId, companyId, classNameId,
192                            classPK, orderByComparator);
193            }
194    
195            /**
196            * Returns the first workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
197            *
198            * @param groupId the group ID
199            * @param companyId the company ID
200            * @param classNameId the class name ID
201            * @param classPK the class p k
202            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
203            * @return the first matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found
204            */
205            public static com.liferay.portal.model.WorkflowInstanceLink fetchByG_C_C_C_First(
206                    long groupId, long companyId, long classNameId, long classPK,
207                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.WorkflowInstanceLink> orderByComparator) {
208                    return getPersistence()
209                                       .fetchByG_C_C_C_First(groupId, companyId, classNameId,
210                            classPK, orderByComparator);
211            }
212    
213            /**
214            * Returns the last workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
215            *
216            * @param groupId the group ID
217            * @param companyId the company ID
218            * @param classNameId the class name ID
219            * @param classPK the class p k
220            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
221            * @return the last matching workflow instance link
222            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
223            */
224            public static com.liferay.portal.model.WorkflowInstanceLink findByG_C_C_C_Last(
225                    long groupId, long companyId, long classNameId, long classPK,
226                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.WorkflowInstanceLink> orderByComparator)
227                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException {
228                    return getPersistence()
229                                       .findByG_C_C_C_Last(groupId, companyId, classNameId,
230                            classPK, orderByComparator);
231            }
232    
233            /**
234            * Returns the last workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
235            *
236            * @param groupId the group ID
237            * @param companyId the company ID
238            * @param classNameId the class name ID
239            * @param classPK the class p k
240            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
241            * @return the last matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found
242            */
243            public static com.liferay.portal.model.WorkflowInstanceLink fetchByG_C_C_C_Last(
244                    long groupId, long companyId, long classNameId, long classPK,
245                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.WorkflowInstanceLink> orderByComparator) {
246                    return getPersistence()
247                                       .fetchByG_C_C_C_Last(groupId, companyId, classNameId,
248                            classPK, orderByComparator);
249            }
250    
251            /**
252            * 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;.
253            *
254            * @param workflowInstanceLinkId the primary key of the current workflow instance link
255            * @param groupId the group ID
256            * @param companyId the company ID
257            * @param classNameId the class name ID
258            * @param classPK the class p k
259            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
260            * @return the previous, current, and next workflow instance link
261            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
262            */
263            public static com.liferay.portal.model.WorkflowInstanceLink[] findByG_C_C_C_PrevAndNext(
264                    long workflowInstanceLinkId, long groupId, long companyId,
265                    long classNameId, long classPK,
266                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.WorkflowInstanceLink> orderByComparator)
267                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException {
268                    return getPersistence()
269                                       .findByG_C_C_C_PrevAndNext(workflowInstanceLinkId, groupId,
270                            companyId, classNameId, classPK, orderByComparator);
271            }
272    
273            /**
274            * Removes all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
275            *
276            * @param groupId the group ID
277            * @param companyId the company ID
278            * @param classNameId the class name ID
279            * @param classPK the class p k
280            */
281            public static void removeByG_C_C_C(long groupId, long companyId,
282                    long classNameId, long classPK) {
283                    getPersistence()
284                            .removeByG_C_C_C(groupId, companyId, classNameId, classPK);
285            }
286    
287            /**
288            * Returns the number of workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
289            *
290            * @param groupId the group ID
291            * @param companyId the company ID
292            * @param classNameId the class name ID
293            * @param classPK the class p k
294            * @return the number of matching workflow instance links
295            */
296            public static int countByG_C_C_C(long groupId, long companyId,
297                    long classNameId, long classPK) {
298                    return getPersistence()
299                                       .countByG_C_C_C(groupId, companyId, classNameId, classPK);
300            }
301    
302            /**
303            * Caches the workflow instance link in the entity cache if it is enabled.
304            *
305            * @param workflowInstanceLink the workflow instance link
306            */
307            public static void cacheResult(
308                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) {
309                    getPersistence().cacheResult(workflowInstanceLink);
310            }
311    
312            /**
313            * Caches the workflow instance links in the entity cache if it is enabled.
314            *
315            * @param workflowInstanceLinks the workflow instance links
316            */
317            public static void cacheResult(
318                    java.util.List<com.liferay.portal.model.WorkflowInstanceLink> workflowInstanceLinks) {
319                    getPersistence().cacheResult(workflowInstanceLinks);
320            }
321    
322            /**
323            * Creates a new workflow instance link with the primary key. Does not add the workflow instance link to the database.
324            *
325            * @param workflowInstanceLinkId the primary key for the new workflow instance link
326            * @return the new workflow instance link
327            */
328            public static com.liferay.portal.model.WorkflowInstanceLink create(
329                    long workflowInstanceLinkId) {
330                    return getPersistence().create(workflowInstanceLinkId);
331            }
332    
333            /**
334            * Removes the workflow instance link with the primary key from the database. Also notifies the appropriate model listeners.
335            *
336            * @param workflowInstanceLinkId the primary key of the workflow instance link
337            * @return the workflow instance link that was removed
338            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
339            */
340            public static com.liferay.portal.model.WorkflowInstanceLink remove(
341                    long workflowInstanceLinkId)
342                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException {
343                    return getPersistence().remove(workflowInstanceLinkId);
344            }
345    
346            public static com.liferay.portal.model.WorkflowInstanceLink updateImpl(
347                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) {
348                    return getPersistence().updateImpl(workflowInstanceLink);
349            }
350    
351            /**
352            * Returns the workflow instance link with the primary key or throws a {@link com.liferay.portal.NoSuchWorkflowInstanceLinkException} if it could not be found.
353            *
354            * @param workflowInstanceLinkId the primary key of the workflow instance link
355            * @return the workflow instance link
356            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
357            */
358            public static com.liferay.portal.model.WorkflowInstanceLink findByPrimaryKey(
359                    long workflowInstanceLinkId)
360                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException {
361                    return getPersistence().findByPrimaryKey(workflowInstanceLinkId);
362            }
363    
364            /**
365            * Returns the workflow instance link with the primary key or returns <code>null</code> if it could not be found.
366            *
367            * @param workflowInstanceLinkId the primary key of the workflow instance link
368            * @return the workflow instance link, or <code>null</code> if a workflow instance link with the primary key could not be found
369            */
370            public static com.liferay.portal.model.WorkflowInstanceLink fetchByPrimaryKey(
371                    long workflowInstanceLinkId) {
372                    return getPersistence().fetchByPrimaryKey(workflowInstanceLinkId);
373            }
374    
375            public static java.util.Map<java.io.Serializable, com.liferay.portal.model.WorkflowInstanceLink> fetchByPrimaryKeys(
376                    java.util.Set<java.io.Serializable> primaryKeys) {
377                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
378            }
379    
380            /**
381            * Returns all the workflow instance links.
382            *
383            * @return the workflow instance links
384            */
385            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll() {
386                    return getPersistence().findAll();
387            }
388    
389            /**
390            * Returns a range of all the workflow instance links.
391            *
392            * <p>
393            * 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.
394            * </p>
395            *
396            * @param start the lower bound of the range of workflow instance links
397            * @param end the upper bound of the range of workflow instance links (not inclusive)
398            * @return the range of workflow instance links
399            */
400            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll(
401                    int start, int end) {
402                    return getPersistence().findAll(start, end);
403            }
404    
405            /**
406            * Returns an ordered range of all the workflow instance links.
407            *
408            * <p>
409            * 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.
410            * </p>
411            *
412            * @param start the lower bound of the range of workflow instance links
413            * @param end the upper bound of the range of workflow instance links (not inclusive)
414            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
415            * @return the ordered range of workflow instance links
416            */
417            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll(
418                    int start, int end,
419                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.WorkflowInstanceLink> orderByComparator) {
420                    return getPersistence().findAll(start, end, orderByComparator);
421            }
422    
423            /**
424            * Removes all the workflow instance links from the database.
425            */
426            public static void removeAll() {
427                    getPersistence().removeAll();
428            }
429    
430            /**
431            * Returns the number of workflow instance links.
432            *
433            * @return the number of workflow instance links
434            */
435            public static int countAll() {
436                    return getPersistence().countAll();
437            }
438    
439            public static WorkflowInstanceLinkPersistence getPersistence() {
440                    if (_persistence == null) {
441                            _persistence = (WorkflowInstanceLinkPersistence)PortalBeanLocatorUtil.locate(WorkflowInstanceLinkPersistence.class.getName());
442    
443                            ReferenceRegistry.registerReference(WorkflowInstanceLinkUtil.class,
444                                    "_persistence");
445                    }
446    
447                    return _persistence;
448            }
449    
450            /**
451             * @deprecated As of 6.2.0
452             */
453            @Deprecated
454            public void setPersistence(WorkflowInstanceLinkPersistence persistence) {
455            }
456    
457            private static WorkflowInstanceLinkPersistence _persistence;
458    }