001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.WorkflowDefinitionLink;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the workflow definition link service. This utility wraps {@link WorkflowDefinitionLinkPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see WorkflowDefinitionLinkPersistence
036     * @see WorkflowDefinitionLinkPersistenceImpl
037     * @generated
038     */
039    public class WorkflowDefinitionLinkUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(WorkflowDefinitionLink workflowDefinitionLink) {
057                    getPersistence().clearCache(workflowDefinitionLink);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<WorkflowDefinitionLink> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<WorkflowDefinitionLink> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<WorkflowDefinitionLink> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
098             */
099            public static WorkflowDefinitionLink update(
100                    WorkflowDefinitionLink workflowDefinitionLink)
101                    throws SystemException {
102                    return getPersistence().update(workflowDefinitionLink);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
107             */
108            public static WorkflowDefinitionLink update(
109                    WorkflowDefinitionLink workflowDefinitionLink,
110                    ServiceContext serviceContext) throws SystemException {
111                    return getPersistence().update(workflowDefinitionLink, serviceContext);
112            }
113    
114            /**
115            * Caches the workflow definition link in the entity cache if it is enabled.
116            *
117            * @param workflowDefinitionLink the workflow definition link
118            */
119            public static void cacheResult(
120                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink) {
121                    getPersistence().cacheResult(workflowDefinitionLink);
122            }
123    
124            /**
125            * Caches the workflow definition links in the entity cache if it is enabled.
126            *
127            * @param workflowDefinitionLinks the workflow definition links
128            */
129            public static void cacheResult(
130                    java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> workflowDefinitionLinks) {
131                    getPersistence().cacheResult(workflowDefinitionLinks);
132            }
133    
134            /**
135            * Creates a new workflow definition link with the primary key. Does not add the workflow definition link to the database.
136            *
137            * @param workflowDefinitionLinkId the primary key for the new workflow definition link
138            * @return the new workflow definition link
139            */
140            public static com.liferay.portal.model.WorkflowDefinitionLink create(
141                    long workflowDefinitionLinkId) {
142                    return getPersistence().create(workflowDefinitionLinkId);
143            }
144    
145            /**
146            * Removes the workflow definition link with the primary key from the database. Also notifies the appropriate model listeners.
147            *
148            * @param workflowDefinitionLinkId the primary key of the workflow definition link
149            * @return the workflow definition link that was removed
150            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            public static com.liferay.portal.model.WorkflowDefinitionLink remove(
154                    long workflowDefinitionLinkId)
155                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
156                            com.liferay.portal.kernel.exception.SystemException {
157                    return getPersistence().remove(workflowDefinitionLinkId);
158            }
159    
160            public static com.liferay.portal.model.WorkflowDefinitionLink updateImpl(
161                    com.liferay.portal.model.WorkflowDefinitionLink workflowDefinitionLink)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().updateImpl(workflowDefinitionLink);
164            }
165    
166            /**
167            * Returns the workflow definition link with the primary key or throws a {@link com.liferay.portal.NoSuchWorkflowDefinitionLinkException} if it could not be found.
168            *
169            * @param workflowDefinitionLinkId the primary key of the workflow definition link
170            * @return the workflow definition link
171            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
172            * @throws SystemException if a system exception occurred
173            */
174            public static com.liferay.portal.model.WorkflowDefinitionLink findByPrimaryKey(
175                    long workflowDefinitionLinkId)
176                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
177                            com.liferay.portal.kernel.exception.SystemException {
178                    return getPersistence().findByPrimaryKey(workflowDefinitionLinkId);
179            }
180    
181            /**
182            * Returns the workflow definition link with the primary key or returns <code>null</code> if it could not be found.
183            *
184            * @param workflowDefinitionLinkId the primary key of the workflow definition link
185            * @return the workflow definition link, or <code>null</code> if a workflow definition link with the primary key could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            public static com.liferay.portal.model.WorkflowDefinitionLink fetchByPrimaryKey(
189                    long workflowDefinitionLinkId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence().fetchByPrimaryKey(workflowDefinitionLinkId);
192            }
193    
194            /**
195            * Returns all the workflow definition links where companyId = &#63;.
196            *
197            * @param companyId the company ID
198            * @return the matching workflow definition links
199            * @throws SystemException if a system exception occurred
200            */
201            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByCompanyId(
202                    long companyId)
203                    throws com.liferay.portal.kernel.exception.SystemException {
204                    return getPersistence().findByCompanyId(companyId);
205            }
206    
207            /**
208            * Returns a range of all the workflow definition links where companyId = &#63;.
209            *
210            * <p>
211            * 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.
212            * </p>
213            *
214            * @param companyId the company ID
215            * @param start the lower bound of the range of workflow definition links
216            * @param end the upper bound of the range of workflow definition links (not inclusive)
217            * @return the range of matching workflow definition links
218            * @throws SystemException if a system exception occurred
219            */
220            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByCompanyId(
221                    long companyId, int start, int end)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getPersistence().findByCompanyId(companyId, start, end);
224            }
225    
226            /**
227            * Returns an ordered range of all the workflow definition links where companyId = &#63;.
228            *
229            * <p>
230            * 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.
231            * </p>
232            *
233            * @param companyId the company ID
234            * @param start the lower bound of the range of workflow definition links
235            * @param end the upper bound of the range of workflow definition links (not inclusive)
236            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
237            * @return the ordered range of matching workflow definition links
238            * @throws SystemException if a system exception occurred
239            */
240            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByCompanyId(
241                    long companyId, int start, int end,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence()
245                                       .findByCompanyId(companyId, start, end, orderByComparator);
246            }
247    
248            /**
249            * Returns the first workflow definition link in the ordered set where companyId = &#63;.
250            *
251            * @param companyId the company ID
252            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
253            * @return the first matching workflow definition link
254            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
255            * @throws SystemException if a system exception occurred
256            */
257            public static com.liferay.portal.model.WorkflowDefinitionLink findByCompanyId_First(
258                    long companyId,
259                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
260                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
261                            com.liferay.portal.kernel.exception.SystemException {
262                    return getPersistence()
263                                       .findByCompanyId_First(companyId, orderByComparator);
264            }
265    
266            /**
267            * Returns the first workflow definition link in the ordered set where companyId = &#63;.
268            *
269            * @param companyId the company ID
270            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
271            * @return the first matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
272            * @throws SystemException if a system exception occurred
273            */
274            public static com.liferay.portal.model.WorkflowDefinitionLink fetchByCompanyId_First(
275                    long companyId,
276                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
277                    throws com.liferay.portal.kernel.exception.SystemException {
278                    return getPersistence()
279                                       .fetchByCompanyId_First(companyId, orderByComparator);
280            }
281    
282            /**
283            * Returns the last workflow definition link in the ordered set where companyId = &#63;.
284            *
285            * @param companyId the company ID
286            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
287            * @return the last matching workflow definition link
288            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
289            * @throws SystemException if a system exception occurred
290            */
291            public static com.liferay.portal.model.WorkflowDefinitionLink findByCompanyId_Last(
292                    long companyId,
293                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
294                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
295                            com.liferay.portal.kernel.exception.SystemException {
296                    return getPersistence()
297                                       .findByCompanyId_Last(companyId, orderByComparator);
298            }
299    
300            /**
301            * Returns the last workflow definition link in the ordered set where companyId = &#63;.
302            *
303            * @param companyId the company ID
304            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
305            * @return the last matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
306            * @throws SystemException if a system exception occurred
307            */
308            public static com.liferay.portal.model.WorkflowDefinitionLink fetchByCompanyId_Last(
309                    long companyId,
310                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
311                    throws com.liferay.portal.kernel.exception.SystemException {
312                    return getPersistence()
313                                       .fetchByCompanyId_Last(companyId, orderByComparator);
314            }
315    
316            /**
317            * Returns the workflow definition links before and after the current workflow definition link in the ordered set where companyId = &#63;.
318            *
319            * @param workflowDefinitionLinkId the primary key of the current workflow definition link
320            * @param companyId the company ID
321            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
322            * @return the previous, current, and next workflow definition link
323            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
324            * @throws SystemException if a system exception occurred
325            */
326            public static com.liferay.portal.model.WorkflowDefinitionLink[] findByCompanyId_PrevAndNext(
327                    long workflowDefinitionLinkId, long companyId,
328                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
329                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
330                            com.liferay.portal.kernel.exception.SystemException {
331                    return getPersistence()
332                                       .findByCompanyId_PrevAndNext(workflowDefinitionLinkId,
333                            companyId, orderByComparator);
334            }
335    
336            /**
337            * Returns all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
338            *
339            * @param companyId the company ID
340            * @param workflowDefinitionName the workflow definition name
341            * @param workflowDefinitionVersion the workflow definition version
342            * @return the matching workflow definition links
343            * @throws SystemException if a system exception occurred
344            */
345            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByC_W_W(
346                    long companyId, java.lang.String workflowDefinitionName,
347                    int workflowDefinitionVersion)
348                    throws com.liferay.portal.kernel.exception.SystemException {
349                    return getPersistence()
350                                       .findByC_W_W(companyId, workflowDefinitionName,
351                            workflowDefinitionVersion);
352            }
353    
354            /**
355            * Returns a range of all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
356            *
357            * <p>
358            * 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.
359            * </p>
360            *
361            * @param companyId the company ID
362            * @param workflowDefinitionName the workflow definition name
363            * @param workflowDefinitionVersion the workflow definition version
364            * @param start the lower bound of the range of workflow definition links
365            * @param end the upper bound of the range of workflow definition links (not inclusive)
366            * @return the range of matching workflow definition links
367            * @throws SystemException if a system exception occurred
368            */
369            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByC_W_W(
370                    long companyId, java.lang.String workflowDefinitionName,
371                    int workflowDefinitionVersion, int start, int end)
372                    throws com.liferay.portal.kernel.exception.SystemException {
373                    return getPersistence()
374                                       .findByC_W_W(companyId, workflowDefinitionName,
375                            workflowDefinitionVersion, start, end);
376            }
377    
378            /**
379            * Returns an ordered range of all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
380            *
381            * <p>
382            * 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.
383            * </p>
384            *
385            * @param companyId the company ID
386            * @param workflowDefinitionName the workflow definition name
387            * @param workflowDefinitionVersion the workflow definition version
388            * @param start the lower bound of the range of workflow definition links
389            * @param end the upper bound of the range of workflow definition links (not inclusive)
390            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
391            * @return the ordered range of matching workflow definition links
392            * @throws SystemException if a system exception occurred
393            */
394            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findByC_W_W(
395                    long companyId, java.lang.String workflowDefinitionName,
396                    int workflowDefinitionVersion, int start, int end,
397                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
398                    throws com.liferay.portal.kernel.exception.SystemException {
399                    return getPersistence()
400                                       .findByC_W_W(companyId, workflowDefinitionName,
401                            workflowDefinitionVersion, start, end, orderByComparator);
402            }
403    
404            /**
405            * Returns the first workflow definition link in the ordered set where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
406            *
407            * @param companyId the company ID
408            * @param workflowDefinitionName the workflow definition name
409            * @param workflowDefinitionVersion the workflow definition version
410            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
411            * @return the first matching workflow definition link
412            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
413            * @throws SystemException if a system exception occurred
414            */
415            public static com.liferay.portal.model.WorkflowDefinitionLink findByC_W_W_First(
416                    long companyId, java.lang.String workflowDefinitionName,
417                    int workflowDefinitionVersion,
418                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
419                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
420                            com.liferay.portal.kernel.exception.SystemException {
421                    return getPersistence()
422                                       .findByC_W_W_First(companyId, workflowDefinitionName,
423                            workflowDefinitionVersion, orderByComparator);
424            }
425    
426            /**
427            * Returns the first workflow definition link in the ordered set where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
428            *
429            * @param companyId the company ID
430            * @param workflowDefinitionName the workflow definition name
431            * @param workflowDefinitionVersion the workflow definition version
432            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
433            * @return the first matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
434            * @throws SystemException if a system exception occurred
435            */
436            public static com.liferay.portal.model.WorkflowDefinitionLink fetchByC_W_W_First(
437                    long companyId, java.lang.String workflowDefinitionName,
438                    int workflowDefinitionVersion,
439                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
440                    throws com.liferay.portal.kernel.exception.SystemException {
441                    return getPersistence()
442                                       .fetchByC_W_W_First(companyId, workflowDefinitionName,
443                            workflowDefinitionVersion, orderByComparator);
444            }
445    
446            /**
447            * Returns the last workflow definition link in the ordered set where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
448            *
449            * @param companyId the company ID
450            * @param workflowDefinitionName the workflow definition name
451            * @param workflowDefinitionVersion the workflow definition version
452            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
453            * @return the last matching workflow definition link
454            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
455            * @throws SystemException if a system exception occurred
456            */
457            public static com.liferay.portal.model.WorkflowDefinitionLink findByC_W_W_Last(
458                    long companyId, java.lang.String workflowDefinitionName,
459                    int workflowDefinitionVersion,
460                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
461                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
462                            com.liferay.portal.kernel.exception.SystemException {
463                    return getPersistence()
464                                       .findByC_W_W_Last(companyId, workflowDefinitionName,
465                            workflowDefinitionVersion, orderByComparator);
466            }
467    
468            /**
469            * Returns the last workflow definition link in the ordered set where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
470            *
471            * @param companyId the company ID
472            * @param workflowDefinitionName the workflow definition name
473            * @param workflowDefinitionVersion the workflow definition version
474            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
475            * @return the last matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
476            * @throws SystemException if a system exception occurred
477            */
478            public static com.liferay.portal.model.WorkflowDefinitionLink fetchByC_W_W_Last(
479                    long companyId, java.lang.String workflowDefinitionName,
480                    int workflowDefinitionVersion,
481                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
482                    throws com.liferay.portal.kernel.exception.SystemException {
483                    return getPersistence()
484                                       .fetchByC_W_W_Last(companyId, workflowDefinitionName,
485                            workflowDefinitionVersion, orderByComparator);
486            }
487    
488            /**
489            * Returns 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;.
490            *
491            * @param workflowDefinitionLinkId the primary key of the current workflow definition link
492            * @param companyId the company ID
493            * @param workflowDefinitionName the workflow definition name
494            * @param workflowDefinitionVersion the workflow definition version
495            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
496            * @return the previous, current, and next workflow definition link
497            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
498            * @throws SystemException if a system exception occurred
499            */
500            public static com.liferay.portal.model.WorkflowDefinitionLink[] findByC_W_W_PrevAndNext(
501                    long workflowDefinitionLinkId, long companyId,
502                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion,
503                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
504                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
505                            com.liferay.portal.kernel.exception.SystemException {
506                    return getPersistence()
507                                       .findByC_W_W_PrevAndNext(workflowDefinitionLinkId,
508                            companyId, workflowDefinitionName, workflowDefinitionVersion,
509                            orderByComparator);
510            }
511    
512            /**
513            * Returns the workflow definition link where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; and typePK = &#63; or throws a {@link com.liferay.portal.NoSuchWorkflowDefinitionLinkException} if it could not be found.
514            *
515            * @param groupId the group ID
516            * @param companyId the company ID
517            * @param classNameId the class name ID
518            * @param classPK the class p k
519            * @param typePK the type p k
520            * @return the matching workflow definition link
521            * @throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
522            * @throws SystemException if a system exception occurred
523            */
524            public static com.liferay.portal.model.WorkflowDefinitionLink findByG_C_C_C_T(
525                    long groupId, long companyId, long classNameId, long classPK,
526                    long typePK)
527                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
528                            com.liferay.portal.kernel.exception.SystemException {
529                    return getPersistence()
530                                       .findByG_C_C_C_T(groupId, companyId, classNameId, classPK,
531                            typePK);
532            }
533    
534            /**
535            * Returns the workflow definition link where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; and typePK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
536            *
537            * @param groupId the group ID
538            * @param companyId the company ID
539            * @param classNameId the class name ID
540            * @param classPK the class p k
541            * @param typePK the type p k
542            * @return the matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
543            * @throws SystemException if a system exception occurred
544            */
545            public static com.liferay.portal.model.WorkflowDefinitionLink fetchByG_C_C_C_T(
546                    long groupId, long companyId, long classNameId, long classPK,
547                    long typePK) throws com.liferay.portal.kernel.exception.SystemException {
548                    return getPersistence()
549                                       .fetchByG_C_C_C_T(groupId, companyId, classNameId, classPK,
550                            typePK);
551            }
552    
553            /**
554            * Returns the workflow definition link where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; and typePK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
555            *
556            * @param groupId the group ID
557            * @param companyId the company ID
558            * @param classNameId the class name ID
559            * @param classPK the class p k
560            * @param typePK the type p k
561            * @param retrieveFromCache whether to use the finder cache
562            * @return the matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
563            * @throws SystemException if a system exception occurred
564            */
565            public static com.liferay.portal.model.WorkflowDefinitionLink fetchByG_C_C_C_T(
566                    long groupId, long companyId, long classNameId, long classPK,
567                    long typePK, boolean retrieveFromCache)
568                    throws com.liferay.portal.kernel.exception.SystemException {
569                    return getPersistence()
570                                       .fetchByG_C_C_C_T(groupId, companyId, classNameId, classPK,
571                            typePK, retrieveFromCache);
572            }
573    
574            /**
575            * Returns all the workflow definition links.
576            *
577            * @return the workflow definition links
578            * @throws SystemException if a system exception occurred
579            */
580            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findAll()
581                    throws com.liferay.portal.kernel.exception.SystemException {
582                    return getPersistence().findAll();
583            }
584    
585            /**
586            * Returns a range of all the workflow definition links.
587            *
588            * <p>
589            * 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.
590            * </p>
591            *
592            * @param start the lower bound of the range of workflow definition links
593            * @param end the upper bound of the range of workflow definition links (not inclusive)
594            * @return the range of workflow definition links
595            * @throws SystemException if a system exception occurred
596            */
597            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findAll(
598                    int start, int end)
599                    throws com.liferay.portal.kernel.exception.SystemException {
600                    return getPersistence().findAll(start, end);
601            }
602    
603            /**
604            * Returns an ordered range of all the workflow definition links.
605            *
606            * <p>
607            * 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.
608            * </p>
609            *
610            * @param start the lower bound of the range of workflow definition links
611            * @param end the upper bound of the range of workflow definition links (not inclusive)
612            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
613            * @return the ordered range of workflow definition links
614            * @throws SystemException if a system exception occurred
615            */
616            public static java.util.List<com.liferay.portal.model.WorkflowDefinitionLink> findAll(
617                    int start, int end,
618                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
619                    throws com.liferay.portal.kernel.exception.SystemException {
620                    return getPersistence().findAll(start, end, orderByComparator);
621            }
622    
623            /**
624            * Removes all the workflow definition links where companyId = &#63; from the database.
625            *
626            * @param companyId the company ID
627            * @throws SystemException if a system exception occurred
628            */
629            public static void removeByCompanyId(long companyId)
630                    throws com.liferay.portal.kernel.exception.SystemException {
631                    getPersistence().removeByCompanyId(companyId);
632            }
633    
634            /**
635            * Removes all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63; from the database.
636            *
637            * @param companyId the company ID
638            * @param workflowDefinitionName the workflow definition name
639            * @param workflowDefinitionVersion the workflow definition version
640            * @throws SystemException if a system exception occurred
641            */
642            public static void removeByC_W_W(long companyId,
643                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion)
644                    throws com.liferay.portal.kernel.exception.SystemException {
645                    getPersistence()
646                            .removeByC_W_W(companyId, workflowDefinitionName,
647                            workflowDefinitionVersion);
648            }
649    
650            /**
651            * Removes the workflow definition link where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; and typePK = &#63; from the database.
652            *
653            * @param groupId the group ID
654            * @param companyId the company ID
655            * @param classNameId the class name ID
656            * @param classPK the class p k
657            * @param typePK the type p k
658            * @return the workflow definition link that was removed
659            * @throws SystemException if a system exception occurred
660            */
661            public static com.liferay.portal.model.WorkflowDefinitionLink removeByG_C_C_C_T(
662                    long groupId, long companyId, long classNameId, long classPK,
663                    long typePK)
664                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException,
665                            com.liferay.portal.kernel.exception.SystemException {
666                    return getPersistence()
667                                       .removeByG_C_C_C_T(groupId, companyId, classNameId, classPK,
668                            typePK);
669            }
670    
671            /**
672            * Removes all the workflow definition links from the database.
673            *
674            * @throws SystemException if a system exception occurred
675            */
676            public static void removeAll()
677                    throws com.liferay.portal.kernel.exception.SystemException {
678                    getPersistence().removeAll();
679            }
680    
681            /**
682            * Returns the number of workflow definition links where companyId = &#63;.
683            *
684            * @param companyId the company ID
685            * @return the number of matching workflow definition links
686            * @throws SystemException if a system exception occurred
687            */
688            public static int countByCompanyId(long companyId)
689                    throws com.liferay.portal.kernel.exception.SystemException {
690                    return getPersistence().countByCompanyId(companyId);
691            }
692    
693            /**
694            * Returns the number of workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
695            *
696            * @param companyId the company ID
697            * @param workflowDefinitionName the workflow definition name
698            * @param workflowDefinitionVersion the workflow definition version
699            * @return the number of matching workflow definition links
700            * @throws SystemException if a system exception occurred
701            */
702            public static int countByC_W_W(long companyId,
703                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion)
704                    throws com.liferay.portal.kernel.exception.SystemException {
705                    return getPersistence()
706                                       .countByC_W_W(companyId, workflowDefinitionName,
707                            workflowDefinitionVersion);
708            }
709    
710            /**
711            * Returns the number of workflow definition links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; and typePK = &#63;.
712            *
713            * @param groupId the group ID
714            * @param companyId the company ID
715            * @param classNameId the class name ID
716            * @param classPK the class p k
717            * @param typePK the type p k
718            * @return the number of matching workflow definition links
719            * @throws SystemException if a system exception occurred
720            */
721            public static int countByG_C_C_C_T(long groupId, long companyId,
722                    long classNameId, long classPK, long typePK)
723                    throws com.liferay.portal.kernel.exception.SystemException {
724                    return getPersistence()
725                                       .countByG_C_C_C_T(groupId, companyId, classNameId, classPK,
726                            typePK);
727            }
728    
729            /**
730            * Returns the number of workflow definition links.
731            *
732            * @return the number of workflow definition links
733            * @throws SystemException if a system exception occurred
734            */
735            public static int countAll()
736                    throws com.liferay.portal.kernel.exception.SystemException {
737                    return getPersistence().countAll();
738            }
739    
740            public static WorkflowDefinitionLinkPersistence getPersistence() {
741                    if (_persistence == null) {
742                            _persistence = (WorkflowDefinitionLinkPersistence)PortalBeanLocatorUtil.locate(WorkflowDefinitionLinkPersistence.class.getName());
743    
744                            ReferenceRegistry.registerReference(WorkflowDefinitionLinkUtil.class,
745                                    "_persistence");
746                    }
747    
748                    return _persistence;
749            }
750    
751            /**
752             * @deprecated
753             */
754            public void setPersistence(WorkflowDefinitionLinkPersistence persistence) {
755            }
756    
757            private static WorkflowDefinitionLinkPersistence _persistence;
758    }