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.WorkflowDefinitionLink;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import java.util.List;
025    
026    /**
027     * The persistence utility for the workflow definition 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 WorkflowDefinitionLinkPersistence
035     * @see WorkflowDefinitionLinkPersistenceImpl
036     * @generated
037     */
038    public class WorkflowDefinitionLinkUtil {
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(WorkflowDefinitionLink workflowDefinitionLink) {
050                    getPersistence().clearCache(workflowDefinitionLink);
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<WorkflowDefinitionLink> 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<WorkflowDefinitionLink> 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<WorkflowDefinitionLink> 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 WorkflowDefinitionLink remove(
093                    WorkflowDefinitionLink workflowDefinitionLink)
094                    throws SystemException {
095                    return getPersistence().remove(workflowDefinitionLink);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
100             */
101            public static WorkflowDefinitionLink update(
102                    WorkflowDefinitionLink workflowDefinitionLink, boolean merge)
103                    throws SystemException {
104                    return getPersistence().update(workflowDefinitionLink, merge);
105            }
106    
107            /**
108             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
109             */
110            public static WorkflowDefinitionLink update(
111                    WorkflowDefinitionLink workflowDefinitionLink, boolean merge,
112                    ServiceContext serviceContext) throws SystemException {
113                    return getPersistence()
114                                       .update(workflowDefinitionLink, merge, serviceContext);
115            }
116    
117            /**
118            * Caches the workflow definition link in the entity cache if it is enabled.
119            *
120            * @param workflowDefinitionLink the workflow definition link to cache
121            */
122            public static void cacheResult(
123                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink) {
124                    getPersistence().cacheResult(workflowDefinitionLink);
125            }
126    
127            /**
128            * Caches the workflow definition links in the entity cache if it is enabled.
129            *
130            * @param workflowDefinitionLinks the workflow definition links to cache
131            */
132            public static void cacheResult(
133                    java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> workflowDefinitionLinks) {
134                    getPersistence().cacheResult(workflowDefinitionLinks);
135            }
136    
137            /**
138            * Creates a new workflow definition link with the primary key.
139            *
140            * @param workflowDefinitionLinkId the primary key for the new workflow definition link
141            * @return the new workflow definition link
142            */
143            public static com.liferay.portal.model.WorkflowDefinitionLink create(
144                    long workflowDefinitionLinkId) {
145                    return getPersistence().create(workflowDefinitionLinkId);
146            }
147    
148            /**
149            * Removes the workflow definition link with the primary key from the database. Also notifies the appropriate model listeners.
150            *
151            * @param workflowDefinitionLinkId the primary key of the workflow definition link to remove
152            * @return the workflow definition link that was removed
153            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
154            * @throws SystemException if a system exception occurred
155            */
156            public static com.liferay.portal.model.WorkflowDefinitionLink remove(
157                    long workflowDefinitionLinkId)
158                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
159                            com.liferay.portal.kernel.exception.SystemException {
160                    return getPersistence().remove(workflowDefinitionLinkId);
161            }
162    
163            public static com.liferay.portal.model.WorkflowDefinitionLink updateImpl(
164                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink,
165                    boolean merge)
166                    throws com.liferay.portal.kernel.exception.SystemException {
167                    return getPersistence().updateImpl(workflowDefinitionLink, merge);
168            }
169    
170            /**
171            * Finds the workflow definition link with the primary key or throws a {@link com.liferay.portal.NoSuchWorkflowDefinitionLinkException} if it could not be found.
172            *
173            * @param workflowDefinitionLinkId the primary key of the workflow definition link to find
174            * @return the workflow definition link
175            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            public static com.liferay.portal.model.WorkflowDefinitionLink findByPrimaryKey(
179                    long workflowDefinitionLinkId)
180                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return getPersistence().findByPrimaryKey(workflowDefinitionLinkId);
183            }
184    
185            /**
186            * Finds the workflow definition link with the primary key or returns <code>null</code> if it could not be found.
187            *
188            * @param workflowDefinitionLinkId the primary key of the workflow definition link to find
189            * @return the workflow definition link, or <code>null</code> if a workflow definition link with the primary key could not be found
190            * @throws SystemException if a system exception occurred
191            */
192            public static com.liferay.portal.model.WorkflowDefinitionLink fetchByPrimaryKey(
193                    long workflowDefinitionLinkId)
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return getPersistence().fetchByPrimaryKey(workflowDefinitionLinkId);
196            }
197    
198            /**
199            * Finds all the workflow definition links where companyId = &#63;.
200            *
201            * @param companyId the company id to search with
202            * @return the matching workflow definition links
203            * @throws SystemException if a system exception occurred
204            */
205            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByCompanyId(
206                    long companyId)
207                    throws com.liferay.portal.kernel.exception.SystemException {
208                    return getPersistence().findByCompanyId(companyId);
209            }
210    
211            /**
212            * Finds a range of all the workflow definition links where companyId = &#63;.
213            *
214            * <p>
215            * 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.
216            * </p>
217            *
218            * @param companyId the company id to search with
219            * @param start the lower bound of the range of workflow definition links to return
220            * @param end the upper bound of the range of workflow definition links to return (not inclusive)
221            * @return the range of matching workflow definition links
222            * @throws SystemException if a system exception occurred
223            */
224            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByCompanyId(
225                    long companyId, int start, int end)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getPersistence().findByCompanyId(companyId, start, end);
228            }
229    
230            /**
231            * Finds an ordered range of all the workflow definition links where companyId = &#63;.
232            *
233            * <p>
234            * 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.
235            * </p>
236            *
237            * @param companyId the company id to search with
238            * @param start the lower bound of the range of workflow definition links to return
239            * @param end the upper bound of the range of workflow definition links to return (not inclusive)
240            * @param orderByComparator the comparator to order the results by
241            * @return the ordered range of matching workflow definition links
242            * @throws SystemException if a system exception occurred
243            */
244            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByCompanyId(
245                    long companyId, int start, int end,
246                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
247                    throws com.liferay.portal.kernel.exception.SystemException {
248                    return getPersistence()
249                                       .findByCompanyId(companyId, start, end, orderByComparator);
250            }
251    
252            /**
253            * Finds the first workflow definition link in the ordered set where companyId = &#63;.
254            *
255            * <p>
256            * 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.
257            * </p>
258            *
259            * @param companyId the company id to search with
260            * @param orderByComparator the comparator to order the set by
261            * @return the first matching workflow definition link
262            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
263            * @throws SystemException if a system exception occurred
264            */
265            public static com.liferay.portal.model.WorkflowDefinitionLink findByCompanyId_First(
266                    long companyId,
267                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
268                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
269                            com.liferay.portal.kernel.exception.SystemException {
270                    return getPersistence()
271                                       .findByCompanyId_First(companyId, orderByComparator);
272            }
273    
274            /**
275            * Finds the last workflow definition link in the ordered set where companyId = &#63;.
276            *
277            * <p>
278            * 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.
279            * </p>
280            *
281            * @param companyId the company id to search with
282            * @param orderByComparator the comparator to order the set by
283            * @return the last matching workflow definition link
284            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
285            * @throws SystemException if a system exception occurred
286            */
287            public static com.liferay.portal.model.WorkflowDefinitionLink findByCompanyId_Last(
288                    long companyId,
289                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
290                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
291                            com.liferay.portal.kernel.exception.SystemException {
292                    return getPersistence()
293                                       .findByCompanyId_Last(companyId, orderByComparator);
294            }
295    
296            /**
297            * Finds the workflow definition links before and after the current workflow definition link in the ordered set where companyId = &#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 workflowDefinitionLinkId the primary key of the current workflow definition link
304            * @param companyId the company id to search with
305            * @param orderByComparator the comparator to order the set by
306            * @return the previous, current, and next workflow definition link
307            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
308            * @throws SystemException if a system exception occurred
309            */
310            public static com.liferay.portal.model.WorkflowDefinitionLink[] findByCompanyId_PrevAndNext(
311                    long workflowDefinitionLinkId, long companyId,
312                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
313                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
314                            com.liferay.portal.kernel.exception.SystemException {
315                    return getPersistence()
316                                       .findByCompanyId_PrevAndNext(workflowDefinitionLinkId,
317                            companyId, orderByComparator);
318            }
319    
320            /**
321            * Finds the workflow definition link where groupId = &#63; and companyId = &#63; and classNameId = &#63; or throws a {@link com.liferay.portal.NoSuchWorkflowDefinitionLinkException} if it could not be found.
322            *
323            * @param groupId the group id to search with
324            * @param companyId the company id to search with
325            * @param classNameId the class name id to search with
326            * @return the matching workflow definition link
327            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
328            * @throws SystemException if a system exception occurred
329            */
330            public static com.liferay.portal.model.WorkflowDefinitionLink findByG_C_C(
331                    long groupId, long companyId, long classNameId)
332                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
333                            com.liferay.portal.kernel.exception.SystemException {
334                    return getPersistence().findByG_C_C(groupId, companyId, classNameId);
335            }
336    
337            /**
338            * Finds the workflow definition link where groupId = &#63; and companyId = &#63; and classNameId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
339            *
340            * @param groupId the group id to search with
341            * @param companyId the company id to search with
342            * @param classNameId the class name id to search with
343            * @return the matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
344            * @throws SystemException if a system exception occurred
345            */
346            public static com.liferay.portal.model.WorkflowDefinitionLink fetchByG_C_C(
347                    long groupId, long companyId, long classNameId)
348                    throws com.liferay.portal.kernel.exception.SystemException {
349                    return getPersistence().fetchByG_C_C(groupId, companyId, classNameId);
350            }
351    
352            /**
353            * Finds the workflow definition link where groupId = &#63; and companyId = &#63; and classNameId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
354            *
355            * @param groupId the group id to search with
356            * @param companyId the company id to search with
357            * @param classNameId the class name id to search with
358            * @return the matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
359            * @throws SystemException if a system exception occurred
360            */
361            public static com.liferay.portal.model.WorkflowDefinitionLink fetchByG_C_C(
362                    long groupId, long companyId, long classNameId,
363                    boolean retrieveFromCache)
364                    throws com.liferay.portal.kernel.exception.SystemException {
365                    return getPersistence()
366                                       .fetchByG_C_C(groupId, companyId, classNameId,
367                            retrieveFromCache);
368            }
369    
370            /**
371            * Finds all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
372            *
373            * @param companyId the company id to search with
374            * @param workflowDefinitionName the workflow definition name to search with
375            * @param workflowDefinitionVersion the workflow definition version to search with
376            * @return the matching workflow definition links
377            * @throws SystemException if a system exception occurred
378            */
379            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByC_W_W(
380                    long companyId, java.lang.String workflowDefinitionName,
381                    int workflowDefinitionVersion)
382                    throws com.liferay.portal.kernel.exception.SystemException {
383                    return getPersistence()
384                                       .findByC_W_W(companyId, workflowDefinitionName,
385                            workflowDefinitionVersion);
386            }
387    
388            /**
389            * Finds a range of all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
390            *
391            * <p>
392            * 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.
393            * </p>
394            *
395            * @param companyId the company id to search with
396            * @param workflowDefinitionName the workflow definition name to search with
397            * @param workflowDefinitionVersion the workflow definition version to search with
398            * @param start the lower bound of the range of workflow definition links to return
399            * @param end the upper bound of the range of workflow definition links to return (not inclusive)
400            * @return the range of matching workflow definition links
401            * @throws SystemException if a system exception occurred
402            */
403            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByC_W_W(
404                    long companyId, java.lang.String workflowDefinitionName,
405                    int workflowDefinitionVersion, int start, int end)
406                    throws com.liferay.portal.kernel.exception.SystemException {
407                    return getPersistence()
408                                       .findByC_W_W(companyId, workflowDefinitionName,
409                            workflowDefinitionVersion, start, end);
410            }
411    
412            /**
413            * Finds an ordered range of all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
414            *
415            * <p>
416            * 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.
417            * </p>
418            *
419            * @param companyId the company id to search with
420            * @param workflowDefinitionName the workflow definition name to search with
421            * @param workflowDefinitionVersion the workflow definition version to search with
422            * @param start the lower bound of the range of workflow definition links to return
423            * @param end the upper bound of the range of workflow definition links to return (not inclusive)
424            * @param orderByComparator the comparator to order the results by
425            * @return the ordered range of matching workflow definition links
426            * @throws SystemException if a system exception occurred
427            */
428            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByC_W_W(
429                    long companyId, java.lang.String workflowDefinitionName,
430                    int workflowDefinitionVersion, int start, int end,
431                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
432                    throws com.liferay.portal.kernel.exception.SystemException {
433                    return getPersistence()
434                                       .findByC_W_W(companyId, workflowDefinitionName,
435                            workflowDefinitionVersion, start, end, orderByComparator);
436            }
437    
438            /**
439            * Finds the first workflow definition link in the ordered set where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
440            *
441            * <p>
442            * 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.
443            * </p>
444            *
445            * @param companyId the company id to search with
446            * @param workflowDefinitionName the workflow definition name to search with
447            * @param workflowDefinitionVersion the workflow definition version to search with
448            * @param orderByComparator the comparator to order the set by
449            * @return the first matching workflow definition link
450            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
451            * @throws SystemException if a system exception occurred
452            */
453            public static com.liferay.portal.model.WorkflowDefinitionLink findByC_W_W_First(
454                    long companyId, java.lang.String workflowDefinitionName,
455                    int workflowDefinitionVersion,
456                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
457                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
458                            com.liferay.portal.kernel.exception.SystemException {
459                    return getPersistence()
460                                       .findByC_W_W_First(companyId, workflowDefinitionName,
461                            workflowDefinitionVersion, orderByComparator);
462            }
463    
464            /**
465            * Finds the last workflow definition link in the ordered set where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
466            *
467            * <p>
468            * 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.
469            * </p>
470            *
471            * @param companyId the company id to search with
472            * @param workflowDefinitionName the workflow definition name to search with
473            * @param workflowDefinitionVersion the workflow definition version to search with
474            * @param orderByComparator the comparator to order the set by
475            * @return the last matching workflow definition link
476            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
477            * @throws SystemException if a system exception occurred
478            */
479            public static com.liferay.portal.model.WorkflowDefinitionLink findByC_W_W_Last(
480                    long companyId, java.lang.String workflowDefinitionName,
481                    int workflowDefinitionVersion,
482                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
483                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
484                            com.liferay.portal.kernel.exception.SystemException {
485                    return getPersistence()
486                                       .findByC_W_W_Last(companyId, workflowDefinitionName,
487                            workflowDefinitionVersion, orderByComparator);
488            }
489    
490            /**
491            * Finds the workflow definition links before and after the current workflow definition link in the ordered set where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
492            *
493            * <p>
494            * 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.
495            * </p>
496            *
497            * @param workflowDefinitionLinkId the primary key of the current workflow definition link
498            * @param companyId the company id to search with
499            * @param workflowDefinitionName the workflow definition name to search with
500            * @param workflowDefinitionVersion the workflow definition version to search with
501            * @param orderByComparator the comparator to order the set by
502            * @return the previous, current, and next workflow definition link
503            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
504            * @throws SystemException if a system exception occurred
505            */
506            public static com.liferay.portal.model.WorkflowDefinitionLink[] findByC_W_W_PrevAndNext(
507                    long workflowDefinitionLinkId, long companyId,
508                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion,
509                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
510                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
511                            com.liferay.portal.kernel.exception.SystemException {
512                    return getPersistence()
513                                       .findByC_W_W_PrevAndNext(workflowDefinitionLinkId,
514                            companyId, workflowDefinitionName, workflowDefinitionVersion,
515                            orderByComparator);
516            }
517    
518            /**
519            * Finds all the workflow definition links.
520            *
521            * @return the workflow definition links
522            * @throws SystemException if a system exception occurred
523            */
524            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findAll()
525                    throws com.liferay.portal.kernel.exception.SystemException {
526                    return getPersistence().findAll();
527            }
528    
529            /**
530            * Finds a range of all the workflow definition links.
531            *
532            * <p>
533            * 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.
534            * </p>
535            *
536            * @param start the lower bound of the range of workflow definition links to return
537            * @param end the upper bound of the range of workflow definition links to return (not inclusive)
538            * @return the range of workflow definition links
539            * @throws SystemException if a system exception occurred
540            */
541            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findAll(
542                    int start, int end)
543                    throws com.liferay.portal.kernel.exception.SystemException {
544                    return getPersistence().findAll(start, end);
545            }
546    
547            /**
548            * Finds an ordered range of all the workflow definition links.
549            *
550            * <p>
551            * 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.
552            * </p>
553            *
554            * @param start the lower bound of the range of workflow definition links to return
555            * @param end the upper bound of the range of workflow definition links to return (not inclusive)
556            * @param orderByComparator the comparator to order the results by
557            * @return the ordered range of workflow definition links
558            * @throws SystemException if a system exception occurred
559            */
560            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findAll(
561                    int start, int end,
562                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
563                    throws com.liferay.portal.kernel.exception.SystemException {
564                    return getPersistence().findAll(start, end, orderByComparator);
565            }
566    
567            /**
568            * Removes all the workflow definition links where companyId = &#63; from the database.
569            *
570            * @param companyId the company id to search with
571            * @throws SystemException if a system exception occurred
572            */
573            public static void removeByCompanyId(long companyId)
574                    throws com.liferay.portal.kernel.exception.SystemException {
575                    getPersistence().removeByCompanyId(companyId);
576            }
577    
578            /**
579            * Removes the workflow definition link where groupId = &#63; and companyId = &#63; and classNameId = &#63; from the database.
580            *
581            * @param groupId the group id to search with
582            * @param companyId the company id to search with
583            * @param classNameId the class name id to search with
584            * @throws SystemException if a system exception occurred
585            */
586            public static void removeByG_C_C(long groupId, long companyId,
587                    long classNameId)
588                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
589                            com.liferay.portal.kernel.exception.SystemException {
590                    getPersistence().removeByG_C_C(groupId, companyId, classNameId);
591            }
592    
593            /**
594            * Removes all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63; from the database.
595            *
596            * @param companyId the company id to search with
597            * @param workflowDefinitionName the workflow definition name to search with
598            * @param workflowDefinitionVersion the workflow definition version to search with
599            * @throws SystemException if a system exception occurred
600            */
601            public static void removeByC_W_W(long companyId,
602                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion)
603                    throws com.liferay.portal.kernel.exception.SystemException {
604                    getPersistence()
605                            .removeByC_W_W(companyId, workflowDefinitionName,
606                            workflowDefinitionVersion);
607            }
608    
609            /**
610            * Removes all the workflow definition links from the database.
611            *
612            * @throws SystemException if a system exception occurred
613            */
614            public static void removeAll()
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    getPersistence().removeAll();
617            }
618    
619            /**
620            * Counts all the workflow definition links where companyId = &#63;.
621            *
622            * @param companyId the company id to search with
623            * @return the number of matching workflow definition links
624            * @throws SystemException if a system exception occurred
625            */
626            public static int countByCompanyId(long companyId)
627                    throws com.liferay.portal.kernel.exception.SystemException {
628                    return getPersistence().countByCompanyId(companyId);
629            }
630    
631            /**
632            * Counts all the workflow definition links where groupId = &#63; and companyId = &#63; and classNameId = &#63;.
633            *
634            * @param groupId the group id to search with
635            * @param companyId the company id to search with
636            * @param classNameId the class name id to search with
637            * @return the number of matching workflow definition links
638            * @throws SystemException if a system exception occurred
639            */
640            public static int countByG_C_C(long groupId, long companyId,
641                    long classNameId)
642                    throws com.liferay.portal.kernel.exception.SystemException {
643                    return getPersistence().countByG_C_C(groupId, companyId, classNameId);
644            }
645    
646            /**
647            * Counts all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
648            *
649            * @param companyId the company id to search with
650            * @param workflowDefinitionName the workflow definition name to search with
651            * @param workflowDefinitionVersion the workflow definition version to search with
652            * @return the number of matching workflow definition links
653            * @throws SystemException if a system exception occurred
654            */
655            public static int countByC_W_W(long companyId,
656                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion)
657                    throws com.liferay.portal.kernel.exception.SystemException {
658                    return getPersistence()
659                                       .countByC_W_W(companyId, workflowDefinitionName,
660                            workflowDefinitionVersion);
661            }
662    
663            /**
664            * Counts all the workflow definition links.
665            *
666            * @return the number of workflow definition links
667            * @throws SystemException if a system exception occurred
668            */
669            public static int countAll()
670                    throws com.liferay.portal.kernel.exception.SystemException {
671                    return getPersistence().countAll();
672            }
673    
674            public static WorkflowDefinitionLinkPersistence getPersistence() {
675                    if (_persistence == null) {
676                            _persistence = (WorkflowDefinitionLinkPersistence)PortalBeanLocatorUtil.locate(WorkflowDefinitionLinkPersistence.class.getName());
677                    }
678    
679                    return _persistence;
680            }
681    
682            public void setPersistence(WorkflowDefinitionLinkPersistence persistence) {
683                    _persistence = persistence;
684            }
685    
686            private static WorkflowDefinitionLinkPersistence _persistence;
687    }