001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.WorkflowInstanceLink;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * 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.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see WorkflowInstanceLinkPersistence
036     * @see WorkflowInstanceLinkPersistenceImpl
037     * @generated
038     */
039    public class WorkflowInstanceLinkUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(WorkflowInstanceLink workflowInstanceLink) {
057                    getPersistence().clearCache(workflowInstanceLink);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<WorkflowInstanceLink> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<WorkflowInstanceLink> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
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 orderByComparator) throws SystemException {
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) throws SystemException {
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                    throws SystemException {
110                    return getPersistence().update(workflowInstanceLink, serviceContext);
111            }
112    
113            /**
114            * Caches the workflow instance link in the entity cache if it is enabled.
115            *
116            * @param workflowInstanceLink the workflow instance link
117            */
118            public static void cacheResult(
119                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) {
120                    getPersistence().cacheResult(workflowInstanceLink);
121            }
122    
123            /**
124            * Caches the workflow instance links in the entity cache if it is enabled.
125            *
126            * @param workflowInstanceLinks the workflow instance links
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portal.model.WorkflowInstanceLink> workflowInstanceLinks) {
130                    getPersistence().cacheResult(workflowInstanceLinks);
131            }
132    
133            /**
134            * Creates a new workflow instance link with the primary key. Does not add the workflow instance link to the database.
135            *
136            * @param workflowInstanceLinkId the primary key for the new workflow instance link
137            * @return the new workflow instance link
138            */
139            public static com.liferay.portal.model.WorkflowInstanceLink create(
140                    long workflowInstanceLinkId) {
141                    return getPersistence().create(workflowInstanceLinkId);
142            }
143    
144            /**
145            * Removes the workflow instance link with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param workflowInstanceLinkId the primary key of the workflow instance link
148            * @return the workflow instance link that was removed
149            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portal.model.WorkflowInstanceLink remove(
153                    long workflowInstanceLinkId)
154                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
155                            com.liferay.portal.kernel.exception.SystemException {
156                    return getPersistence().remove(workflowInstanceLinkId);
157            }
158    
159            public static com.liferay.portal.model.WorkflowInstanceLink updateImpl(
160                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence().updateImpl(workflowInstanceLink);
163            }
164    
165            /**
166            * Returns the workflow instance link with the primary key or throws a {@link com.liferay.portal.NoSuchWorkflowInstanceLinkException} if it could not be found.
167            *
168            * @param workflowInstanceLinkId the primary key of the workflow instance link
169            * @return the workflow instance link
170            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public static com.liferay.portal.model.WorkflowInstanceLink findByPrimaryKey(
174                    long workflowInstanceLinkId)
175                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
176                            com.liferay.portal.kernel.exception.SystemException {
177                    return getPersistence().findByPrimaryKey(workflowInstanceLinkId);
178            }
179    
180            /**
181            * Returns the workflow instance link with the primary key or returns <code>null</code> if it could not be found.
182            *
183            * @param workflowInstanceLinkId the primary key of the workflow instance link
184            * @return the workflow instance link, or <code>null</code> if a workflow instance link with the primary key could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public static com.liferay.portal.model.WorkflowInstanceLink fetchByPrimaryKey(
188                    long workflowInstanceLinkId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().fetchByPrimaryKey(workflowInstanceLinkId);
191            }
192    
193            /**
194            * Returns all the workflow instance links 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            * @return the matching workflow instance links
201            * @throws SystemException if a system exception occurred
202            */
203            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
204                    long groupId, long companyId, long classNameId, long classPK)
205                    throws com.liferay.portal.kernel.exception.SystemException {
206                    return getPersistence()
207                                       .findByG_C_C_C(groupId, companyId, classNameId, classPK);
208            }
209    
210            /**
211            * Returns a range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
212            *
213            * <p>
214            * 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.
215            * </p>
216            *
217            * @param groupId the group ID
218            * @param companyId the company ID
219            * @param classNameId the class name ID
220            * @param classPK the class p k
221            * @param start the lower bound of the range of workflow instance links
222            * @param end the upper bound of the range of workflow instance links (not inclusive)
223            * @return the range of matching workflow instance links
224            * @throws SystemException if a system exception occurred
225            */
226            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
227                    long groupId, long companyId, long classNameId, long classPK,
228                    int start, int end)
229                    throws com.liferay.portal.kernel.exception.SystemException {
230                    return getPersistence()
231                                       .findByG_C_C_C(groupId, companyId, classNameId, classPK,
232                            start, end);
233            }
234    
235            /**
236            * Returns an ordered range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
237            *
238            * <p>
239            * 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.
240            * </p>
241            *
242            * @param groupId the group ID
243            * @param companyId the company ID
244            * @param classNameId the class name ID
245            * @param classPK the class p k
246            * @param start the lower bound of the range of workflow instance links
247            * @param end the upper bound of the range of workflow instance links (not inclusive)
248            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
249            * @return the ordered range of matching workflow instance links
250            * @throws SystemException if a system exception occurred
251            */
252            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
253                    long groupId, long companyId, long classNameId, long classPK,
254                    int start, int end,
255                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
256                    throws com.liferay.portal.kernel.exception.SystemException {
257                    return getPersistence()
258                                       .findByG_C_C_C(groupId, companyId, classNameId, classPK,
259                            start, end, orderByComparator);
260            }
261    
262            /**
263            * Returns the first workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
264            *
265            * @param groupId the group ID
266            * @param companyId the company ID
267            * @param classNameId the class name ID
268            * @param classPK the class p k
269            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
270            * @return the first matching workflow instance link
271            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
272            * @throws SystemException if a system exception occurred
273            */
274            public static com.liferay.portal.model.WorkflowInstanceLink findByG_C_C_C_First(
275                    long groupId, long companyId, long classNameId, long classPK,
276                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
277                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
278                            com.liferay.portal.kernel.exception.SystemException {
279                    return getPersistence()
280                                       .findByG_C_C_C_First(groupId, companyId, classNameId,
281                            classPK, orderByComparator);
282            }
283    
284            /**
285            * Returns the first workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
286            *
287            * @param groupId the group ID
288            * @param companyId the company ID
289            * @param classNameId the class name ID
290            * @param classPK the class p k
291            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
292            * @return the first matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found
293            * @throws SystemException if a system exception occurred
294            */
295            public static com.liferay.portal.model.WorkflowInstanceLink fetchByG_C_C_C_First(
296                    long groupId, long companyId, long classNameId, long classPK,
297                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
298                    throws com.liferay.portal.kernel.exception.SystemException {
299                    return getPersistence()
300                                       .fetchByG_C_C_C_First(groupId, companyId, classNameId,
301                            classPK, orderByComparator);
302            }
303    
304            /**
305            * Returns the last workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
306            *
307            * @param groupId the group ID
308            * @param companyId the company ID
309            * @param classNameId the class name ID
310            * @param classPK the class p k
311            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
312            * @return the last matching workflow instance link
313            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
314            * @throws SystemException if a system exception occurred
315            */
316            public static com.liferay.portal.model.WorkflowInstanceLink findByG_C_C_C_Last(
317                    long groupId, long companyId, long classNameId, long classPK,
318                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
319                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
320                            com.liferay.portal.kernel.exception.SystemException {
321                    return getPersistence()
322                                       .findByG_C_C_C_Last(groupId, companyId, classNameId,
323                            classPK, orderByComparator);
324            }
325    
326            /**
327            * Returns the last workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
328            *
329            * @param groupId the group ID
330            * @param companyId the company ID
331            * @param classNameId the class name ID
332            * @param classPK the class p k
333            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
334            * @return the last matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found
335            * @throws SystemException if a system exception occurred
336            */
337            public static com.liferay.portal.model.WorkflowInstanceLink fetchByG_C_C_C_Last(
338                    long groupId, long companyId, long classNameId, long classPK,
339                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence()
342                                       .fetchByG_C_C_C_Last(groupId, companyId, classNameId,
343                            classPK, orderByComparator);
344            }
345    
346            /**
347            * 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;.
348            *
349            * @param workflowInstanceLinkId the primary key of the current workflow instance link
350            * @param groupId the group ID
351            * @param companyId the company ID
352            * @param classNameId the class name ID
353            * @param classPK the class p k
354            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
355            * @return the previous, current, and next workflow instance link
356            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
357            * @throws SystemException if a system exception occurred
358            */
359            public static com.liferay.portal.model.WorkflowInstanceLink[] findByG_C_C_C_PrevAndNext(
360                    long workflowInstanceLinkId, long groupId, long companyId,
361                    long classNameId, long classPK,
362                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
363                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
364                            com.liferay.portal.kernel.exception.SystemException {
365                    return getPersistence()
366                                       .findByG_C_C_C_PrevAndNext(workflowInstanceLinkId, groupId,
367                            companyId, classNameId, classPK, orderByComparator);
368            }
369    
370            /**
371            * Returns all the workflow instance links.
372            *
373            * @return the workflow instance links
374            * @throws SystemException if a system exception occurred
375            */
376            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll()
377                    throws com.liferay.portal.kernel.exception.SystemException {
378                    return getPersistence().findAll();
379            }
380    
381            /**
382            * Returns a range of all the workflow instance links.
383            *
384            * <p>
385            * 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.
386            * </p>
387            *
388            * @param start the lower bound of the range of workflow instance links
389            * @param end the upper bound of the range of workflow instance links (not inclusive)
390            * @return the range of workflow instance links
391            * @throws SystemException if a system exception occurred
392            */
393            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll(
394                    int start, int end)
395                    throws com.liferay.portal.kernel.exception.SystemException {
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
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            * @throws SystemException if a system exception occurred
411            */
412            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll(
413                    int start, int end,
414                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415                    throws com.liferay.portal.kernel.exception.SystemException {
416                    return getPersistence().findAll(start, end, orderByComparator);
417            }
418    
419            /**
420            * Removes all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
421            *
422            * @param groupId the group ID
423            * @param companyId the company ID
424            * @param classNameId the class name ID
425            * @param classPK the class p k
426            * @throws SystemException if a system exception occurred
427            */
428            public static void removeByG_C_C_C(long groupId, long companyId,
429                    long classNameId, long classPK)
430                    throws com.liferay.portal.kernel.exception.SystemException {
431                    getPersistence()
432                            .removeByG_C_C_C(groupId, companyId, classNameId, classPK);
433            }
434    
435            /**
436            * Removes all the workflow instance links from the database.
437            *
438            * @throws SystemException if a system exception occurred
439            */
440            public static void removeAll()
441                    throws com.liferay.portal.kernel.exception.SystemException {
442                    getPersistence().removeAll();
443            }
444    
445            /**
446            * Returns the number of workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
447            *
448            * @param groupId the group ID
449            * @param companyId the company ID
450            * @param classNameId the class name ID
451            * @param classPK the class p k
452            * @return the number of matching workflow instance links
453            * @throws SystemException if a system exception occurred
454            */
455            public static int countByG_C_C_C(long groupId, long companyId,
456                    long classNameId, long classPK)
457                    throws com.liferay.portal.kernel.exception.SystemException {
458                    return getPersistence()
459                                       .countByG_C_C_C(groupId, companyId, classNameId, classPK);
460            }
461    
462            /**
463            * Returns the number of workflow instance links.
464            *
465            * @return the number of workflow instance links
466            * @throws SystemException if a system exception occurred
467            */
468            public static int countAll()
469                    throws com.liferay.portal.kernel.exception.SystemException {
470                    return getPersistence().countAll();
471            }
472    
473            public static WorkflowInstanceLinkPersistence getPersistence() {
474                    if (_persistence == null) {
475                            _persistence = (WorkflowInstanceLinkPersistence)PortalBeanLocatorUtil.locate(WorkflowInstanceLinkPersistence.class.getName());
476    
477                            ReferenceRegistry.registerReference(WorkflowInstanceLinkUtil.class,
478                                    "_persistence");
479                    }
480    
481                    return _persistence;
482            }
483    
484            /**
485             * @deprecated
486             */
487            public void setPersistence(WorkflowInstanceLinkPersistence persistence) {
488            }
489    
490            private static WorkflowInstanceLinkPersistence _persistence;
491    }