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