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