001    /**
002     * Copyright (c) 2000-2013 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, boolean)
098             */
099            public static WorkflowInstanceLink update(
100                    WorkflowInstanceLink workflowInstanceLink, boolean merge)
101                    throws SystemException {
102                    return getPersistence().update(workflowInstanceLink, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static WorkflowInstanceLink update(
109                    WorkflowInstanceLink workflowInstanceLink, boolean merge,
110                    ServiceContext serviceContext) throws SystemException {
111                    return getPersistence()
112                                       .update(workflowInstanceLink, merge, serviceContext);
113            }
114    
115            /**
116            * Caches the workflow instance link in the entity cache if it is enabled.
117            *
118            * @param workflowInstanceLink the workflow instance link
119            */
120            public static void cacheResult(
121                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) {
122                    getPersistence().cacheResult(workflowInstanceLink);
123            }
124    
125            /**
126            * Caches the workflow instance links in the entity cache if it is enabled.
127            *
128            * @param workflowInstanceLinks the workflow instance links
129            */
130            public static void cacheResult(
131                    java.util.List<com.liferay.portal.model.WorkflowInstanceLink> workflowInstanceLinks) {
132                    getPersistence().cacheResult(workflowInstanceLinks);
133            }
134    
135            /**
136            * Creates a new workflow instance link with the primary key. Does not add the workflow instance link to the database.
137            *
138            * @param workflowInstanceLinkId the primary key for the new workflow instance link
139            * @return the new workflow instance link
140            */
141            public static com.liferay.portal.model.WorkflowInstanceLink create(
142                    long workflowInstanceLinkId) {
143                    return getPersistence().create(workflowInstanceLinkId);
144            }
145    
146            /**
147            * Removes the workflow instance link with the primary key from the database. Also notifies the appropriate model listeners.
148            *
149            * @param workflowInstanceLinkId the primary key of the workflow instance link
150            * @return the workflow instance link that was removed
151            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            public static com.liferay.portal.model.WorkflowInstanceLink remove(
155                    long workflowInstanceLinkId)
156                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
157                            com.liferay.portal.kernel.exception.SystemException {
158                    return getPersistence().remove(workflowInstanceLinkId);
159            }
160    
161            public static com.liferay.portal.model.WorkflowInstanceLink updateImpl(
162                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink,
163                    boolean merge)
164                    throws com.liferay.portal.kernel.exception.SystemException {
165                    return getPersistence().updateImpl(workflowInstanceLink, merge);
166            }
167    
168            /**
169            * Returns the workflow instance link with the primary key or throws a {@link com.liferay.portal.NoSuchWorkflowInstanceLinkException} if it could not be found.
170            *
171            * @param workflowInstanceLinkId the primary key of the workflow instance link
172            * @return the workflow instance link
173            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
174            * @throws SystemException if a system exception occurred
175            */
176            public static com.liferay.portal.model.WorkflowInstanceLink findByPrimaryKey(
177                    long workflowInstanceLinkId)
178                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getPersistence().findByPrimaryKey(workflowInstanceLinkId);
181            }
182    
183            /**
184            * Returns the workflow instance link with the primary key or returns <code>null</code> if it could not be found.
185            *
186            * @param workflowInstanceLinkId the primary key of the workflow instance link
187            * @return the workflow instance link, or <code>null</code> if a workflow instance link with the primary key could not be found
188            * @throws SystemException if a system exception occurred
189            */
190            public static com.liferay.portal.model.WorkflowInstanceLink fetchByPrimaryKey(
191                    long workflowInstanceLinkId)
192                    throws com.liferay.portal.kernel.exception.SystemException {
193                    return getPersistence().fetchByPrimaryKey(workflowInstanceLinkId);
194            }
195    
196            /**
197            * Returns all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
198            *
199            * @param groupId the group ID
200            * @param companyId the company ID
201            * @param classNameId the class name ID
202            * @param classPK the class p k
203            * @return the matching workflow instance links
204            * @throws SystemException if a system exception occurred
205            */
206            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
207                    long groupId, long companyId, long classNameId, long classPK)
208                    throws com.liferay.portal.kernel.exception.SystemException {
209                    return getPersistence()
210                                       .findByG_C_C_C(groupId, companyId, classNameId, classPK);
211            }
212    
213            /**
214            * Returns a range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
215            *
216            * <p>
217            * 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.
218            * </p>
219            *
220            * @param groupId the group ID
221            * @param companyId the company ID
222            * @param classNameId the class name ID
223            * @param classPK the class p k
224            * @param start the lower bound of the range of workflow instance links
225            * @param end the upper bound of the range of workflow instance links (not inclusive)
226            * @return the range of matching workflow instance links
227            * @throws SystemException if a system exception occurred
228            */
229            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
230                    long groupId, long companyId, long classNameId, long classPK,
231                    int start, int end)
232                    throws com.liferay.portal.kernel.exception.SystemException {
233                    return getPersistence()
234                                       .findByG_C_C_C(groupId, companyId, classNameId, classPK,
235                            start, end);
236            }
237    
238            /**
239            * Returns an ordered range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
240            *
241            * <p>
242            * 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.
243            * </p>
244            *
245            * @param groupId the group ID
246            * @param companyId the company ID
247            * @param classNameId the class name ID
248            * @param classPK the class p k
249            * @param start the lower bound of the range of workflow instance links
250            * @param end the upper bound of the range of workflow instance links (not inclusive)
251            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
252            * @return the ordered range of matching workflow instance links
253            * @throws SystemException if a system exception occurred
254            */
255            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
256                    long groupId, long companyId, long classNameId, long classPK,
257                    int start, int end,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.kernel.exception.SystemException {
260                    return getPersistence()
261                                       .findByG_C_C_C(groupId, companyId, classNameId, classPK,
262                            start, end, orderByComparator);
263            }
264    
265            /**
266            * Returns the first workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
267            *
268            * @param groupId the group ID
269            * @param companyId the company ID
270            * @param classNameId the class name ID
271            * @param classPK the class p k
272            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
273            * @return the first matching workflow instance link
274            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
275            * @throws SystemException if a system exception occurred
276            */
277            public static com.liferay.portal.model.WorkflowInstanceLink findByG_C_C_C_First(
278                    long groupId, long companyId, long classNameId, long classPK,
279                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
280                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
281                            com.liferay.portal.kernel.exception.SystemException {
282                    return getPersistence()
283                                       .findByG_C_C_C_First(groupId, companyId, classNameId,
284                            classPK, orderByComparator);
285            }
286    
287            /**
288            * Returns the first workflow instance link in the ordered set 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            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
295            * @return the first matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found
296            * @throws SystemException if a system exception occurred
297            */
298            public static com.liferay.portal.model.WorkflowInstanceLink fetchByG_C_C_C_First(
299                    long groupId, long companyId, long classNameId, long classPK,
300                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
301                    throws com.liferay.portal.kernel.exception.SystemException {
302                    return getPersistence()
303                                       .fetchByG_C_C_C_First(groupId, companyId, classNameId,
304                            classPK, orderByComparator);
305            }
306    
307            /**
308            * Returns the last workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
309            *
310            * @param groupId the group ID
311            * @param companyId the company ID
312            * @param classNameId the class name ID
313            * @param classPK the class p k
314            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
315            * @return the last matching workflow instance link
316            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
317            * @throws SystemException if a system exception occurred
318            */
319            public static com.liferay.portal.model.WorkflowInstanceLink findByG_C_C_C_Last(
320                    long groupId, long companyId, long classNameId, long classPK,
321                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
322                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
323                            com.liferay.portal.kernel.exception.SystemException {
324                    return getPersistence()
325                                       .findByG_C_C_C_Last(groupId, companyId, classNameId,
326                            classPK, orderByComparator);
327            }
328    
329            /**
330            * Returns the last workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
331            *
332            * @param groupId the group ID
333            * @param companyId the company ID
334            * @param classNameId the class name ID
335            * @param classPK the class p k
336            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
337            * @return the last matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found
338            * @throws SystemException if a system exception occurred
339            */
340            public static com.liferay.portal.model.WorkflowInstanceLink fetchByG_C_C_C_Last(
341                    long groupId, long companyId, long classNameId, long classPK,
342                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
343                    throws com.liferay.portal.kernel.exception.SystemException {
344                    return getPersistence()
345                                       .fetchByG_C_C_C_Last(groupId, companyId, classNameId,
346                            classPK, orderByComparator);
347            }
348    
349            /**
350            * 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;.
351            *
352            * @param workflowInstanceLinkId the primary key of the current workflow instance link
353            * @param groupId the group ID
354            * @param companyId the company ID
355            * @param classNameId the class name ID
356            * @param classPK the class p k
357            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
358            * @return the previous, current, and next workflow instance link
359            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
360            * @throws SystemException if a system exception occurred
361            */
362            public static com.liferay.portal.model.WorkflowInstanceLink[] findByG_C_C_C_PrevAndNext(
363                    long workflowInstanceLinkId, long groupId, long companyId,
364                    long classNameId, long classPK,
365                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
366                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
367                            com.liferay.portal.kernel.exception.SystemException {
368                    return getPersistence()
369                                       .findByG_C_C_C_PrevAndNext(workflowInstanceLinkId, groupId,
370                            companyId, classNameId, classPK, orderByComparator);
371            }
372    
373            /**
374            * Returns all the workflow instance links.
375            *
376            * @return the workflow instance links
377            * @throws SystemException if a system exception occurred
378            */
379            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll()
380                    throws com.liferay.portal.kernel.exception.SystemException {
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
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            * @throws SystemException if a system exception occurred
395            */
396            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll(
397                    int start, int end)
398                    throws com.liferay.portal.kernel.exception.SystemException {
399                    return getPersistence().findAll(start, end);
400            }
401    
402            /**
403            * Returns an ordered range of all the workflow instance links.
404            *
405            * <p>
406            * 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.
407            * </p>
408            *
409            * @param start the lower bound of the range of workflow instance links
410            * @param end the upper bound of the range of workflow instance links (not inclusive)
411            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
412            * @return the ordered range of workflow instance links
413            * @throws SystemException if a system exception occurred
414            */
415            public static java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll(
416                    int start, int end,
417                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
418                    throws com.liferay.portal.kernel.exception.SystemException {
419                    return getPersistence().findAll(start, end, orderByComparator);
420            }
421    
422            /**
423            * Removes all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
424            *
425            * @param groupId the group ID
426            * @param companyId the company ID
427            * @param classNameId the class name ID
428            * @param classPK the class p k
429            * @throws SystemException if a system exception occurred
430            */
431            public static void removeByG_C_C_C(long groupId, long companyId,
432                    long classNameId, long classPK)
433                    throws com.liferay.portal.kernel.exception.SystemException {
434                    getPersistence()
435                            .removeByG_C_C_C(groupId, companyId, classNameId, classPK);
436            }
437    
438            /**
439            * Removes all the workflow instance links from the database.
440            *
441            * @throws SystemException if a system exception occurred
442            */
443            public static void removeAll()
444                    throws com.liferay.portal.kernel.exception.SystemException {
445                    getPersistence().removeAll();
446            }
447    
448            /**
449            * Returns the number of workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
450            *
451            * @param groupId the group ID
452            * @param companyId the company ID
453            * @param classNameId the class name ID
454            * @param classPK the class p k
455            * @return the number of matching workflow instance links
456            * @throws SystemException if a system exception occurred
457            */
458            public static int countByG_C_C_C(long groupId, long companyId,
459                    long classNameId, long classPK)
460                    throws com.liferay.portal.kernel.exception.SystemException {
461                    return getPersistence()
462                                       .countByG_C_C_C(groupId, companyId, classNameId, classPK);
463            }
464    
465            /**
466            * Returns the number of workflow instance links.
467            *
468            * @return the number of workflow instance links
469            * @throws SystemException if a system exception occurred
470            */
471            public static int countAll()
472                    throws com.liferay.portal.kernel.exception.SystemException {
473                    return getPersistence().countAll();
474            }
475    
476            public static WorkflowInstanceLinkPersistence getPersistence() {
477                    if (_persistence == null) {
478                            _persistence = (WorkflowInstanceLinkPersistence)PortalBeanLocatorUtil.locate(WorkflowInstanceLinkPersistence.class.getName());
479    
480                            ReferenceRegistry.registerReference(WorkflowInstanceLinkUtil.class,
481                                    "_persistence");
482                    }
483    
484                    return _persistence;
485            }
486    
487            /**
488             * @deprecated
489             */
490            public void setPersistence(WorkflowInstanceLinkPersistence persistence) {
491            }
492    
493            private static WorkflowInstanceLinkPersistence _persistence;
494    }