001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.model.WorkflowDefinitionLink;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the workflow definition link service. This utility wraps {@link com.liferay.portal.service.persistence.impl.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.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see WorkflowDefinitionLinkPersistence
037     * @see com.liferay.portal.service.persistence.impl.WorkflowDefinitionLinkPersistenceImpl
038     * @generated
039     */
040    @ProviderType
041    public class WorkflowDefinitionLinkUtil {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
046             */
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
050             */
051            public static void clearCache() {
052                    getPersistence().clearCache();
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
057             */
058            public static void clearCache(WorkflowDefinitionLink workflowDefinitionLink) {
059                    getPersistence().clearCache(workflowDefinitionLink);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<WorkflowDefinitionLink> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<WorkflowDefinitionLink> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end) {
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<WorkflowDefinitionLink> orderByComparator) {
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                    return getPersistence().update(workflowDefinitionLink);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static WorkflowDefinitionLink update(
108                    WorkflowDefinitionLink workflowDefinitionLink,
109                    ServiceContext serviceContext) {
110                    return getPersistence().update(workflowDefinitionLink, serviceContext);
111            }
112    
113            /**
114            * Returns all the workflow definition links where companyId = &#63;.
115            *
116            * @param companyId the company ID
117            * @return the matching workflow definition links
118            */
119            public static List<WorkflowDefinitionLink> findByCompanyId(long companyId) {
120                    return getPersistence().findByCompanyId(companyId);
121            }
122    
123            /**
124            * Returns a range of all the workflow definition links where companyId = &#63;.
125            *
126            * <p>
127            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowDefinitionLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
128            * </p>
129            *
130            * @param companyId the company ID
131            * @param start the lower bound of the range of workflow definition links
132            * @param end the upper bound of the range of workflow definition links (not inclusive)
133            * @return the range of matching workflow definition links
134            */
135            public static List<WorkflowDefinitionLink> findByCompanyId(long companyId,
136                    int start, int end) {
137                    return getPersistence().findByCompanyId(companyId, start, end);
138            }
139    
140            /**
141            * Returns an ordered range of all the workflow definition links where companyId = &#63;.
142            *
143            * <p>
144            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowDefinitionLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
145            * </p>
146            *
147            * @param companyId the company ID
148            * @param start the lower bound of the range of workflow definition links
149            * @param end the upper bound of the range of workflow definition links (not inclusive)
150            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
151            * @return the ordered range of matching workflow definition links
152            */
153            public static List<WorkflowDefinitionLink> findByCompanyId(long companyId,
154                    int start, int end,
155                    OrderByComparator<WorkflowDefinitionLink> orderByComparator) {
156                    return getPersistence()
157                                       .findByCompanyId(companyId, start, end, orderByComparator);
158            }
159    
160            /**
161            * Returns the first workflow definition link in the ordered set where companyId = &#63;.
162            *
163            * @param companyId the company ID
164            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
165            * @return the first matching workflow definition link
166            * @throws NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
167            */
168            public static WorkflowDefinitionLink findByCompanyId_First(long companyId,
169                    OrderByComparator<WorkflowDefinitionLink> orderByComparator)
170                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
171                    return getPersistence()
172                                       .findByCompanyId_First(companyId, orderByComparator);
173            }
174    
175            /**
176            * Returns the first workflow definition link in the ordered set where companyId = &#63;.
177            *
178            * @param companyId the company ID
179            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
180            * @return the first matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
181            */
182            public static WorkflowDefinitionLink fetchByCompanyId_First(
183                    long companyId,
184                    OrderByComparator<WorkflowDefinitionLink> orderByComparator) {
185                    return getPersistence()
186                                       .fetchByCompanyId_First(companyId, orderByComparator);
187            }
188    
189            /**
190            * Returns the last workflow definition link in the ordered set where companyId = &#63;.
191            *
192            * @param companyId the company ID
193            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
194            * @return the last matching workflow definition link
195            * @throws NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
196            */
197            public static WorkflowDefinitionLink findByCompanyId_Last(long companyId,
198                    OrderByComparator<WorkflowDefinitionLink> orderByComparator)
199                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
200                    return getPersistence()
201                                       .findByCompanyId_Last(companyId, orderByComparator);
202            }
203    
204            /**
205            * Returns the last workflow definition link in the ordered set where companyId = &#63;.
206            *
207            * @param companyId the company ID
208            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
209            * @return the last matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
210            */
211            public static WorkflowDefinitionLink fetchByCompanyId_Last(long companyId,
212                    OrderByComparator<WorkflowDefinitionLink> orderByComparator) {
213                    return getPersistence()
214                                       .fetchByCompanyId_Last(companyId, orderByComparator);
215            }
216    
217            /**
218            * Returns the workflow definition links before and after the current workflow definition link in the ordered set where companyId = &#63;.
219            *
220            * @param workflowDefinitionLinkId the primary key of the current workflow definition link
221            * @param companyId the company ID
222            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
223            * @return the previous, current, and next workflow definition link
224            * @throws NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
225            */
226            public static WorkflowDefinitionLink[] findByCompanyId_PrevAndNext(
227                    long workflowDefinitionLinkId, long companyId,
228                    OrderByComparator<WorkflowDefinitionLink> orderByComparator)
229                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
230                    return getPersistence()
231                                       .findByCompanyId_PrevAndNext(workflowDefinitionLinkId,
232                            companyId, orderByComparator);
233            }
234    
235            /**
236            * Removes all the workflow definition links where companyId = &#63; from the database.
237            *
238            * @param companyId the company ID
239            */
240            public static void removeByCompanyId(long companyId) {
241                    getPersistence().removeByCompanyId(companyId);
242            }
243    
244            /**
245            * Returns the number of workflow definition links where companyId = &#63;.
246            *
247            * @param companyId the company ID
248            * @return the number of matching workflow definition links
249            */
250            public static int countByCompanyId(long companyId) {
251                    return getPersistence().countByCompanyId(companyId);
252            }
253    
254            /**
255            * Returns all the workflow definition links where groupId = &#63; and companyId = &#63; and classNameId = &#63;.
256            *
257            * @param groupId the group ID
258            * @param companyId the company ID
259            * @param classNameId the class name ID
260            * @return the matching workflow definition links
261            */
262            public static List<WorkflowDefinitionLink> findByG_C_C(long groupId,
263                    long companyId, long classNameId) {
264                    return getPersistence().findByG_C_C(groupId, companyId, classNameId);
265            }
266    
267            /**
268            * Returns a range of all the workflow definition links where groupId = &#63; and companyId = &#63; and classNameId = &#63;.
269            *
270            * <p>
271            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowDefinitionLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
272            * </p>
273            *
274            * @param groupId the group ID
275            * @param companyId the company ID
276            * @param classNameId the class name ID
277            * @param start the lower bound of the range of workflow definition links
278            * @param end the upper bound of the range of workflow definition links (not inclusive)
279            * @return the range of matching workflow definition links
280            */
281            public static List<WorkflowDefinitionLink> findByG_C_C(long groupId,
282                    long companyId, long classNameId, int start, int end) {
283                    return getPersistence()
284                                       .findByG_C_C(groupId, companyId, classNameId, start, end);
285            }
286    
287            /**
288            * Returns an ordered range of all the workflow definition links where groupId = &#63; and companyId = &#63; and classNameId = &#63;.
289            *
290            * <p>
291            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowDefinitionLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
292            * </p>
293            *
294            * @param groupId the group ID
295            * @param companyId the company ID
296            * @param classNameId the class name ID
297            * @param start the lower bound of the range of workflow definition links
298            * @param end the upper bound of the range of workflow definition links (not inclusive)
299            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
300            * @return the ordered range of matching workflow definition links
301            */
302            public static List<WorkflowDefinitionLink> findByG_C_C(long groupId,
303                    long companyId, long classNameId, int start, int end,
304                    OrderByComparator<WorkflowDefinitionLink> orderByComparator) {
305                    return getPersistence()
306                                       .findByG_C_C(groupId, companyId, classNameId, start, end,
307                            orderByComparator);
308            }
309    
310            /**
311            * Returns the first workflow definition link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63;.
312            *
313            * @param groupId the group ID
314            * @param companyId the company ID
315            * @param classNameId the class name ID
316            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
317            * @return the first matching workflow definition link
318            * @throws NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
319            */
320            public static WorkflowDefinitionLink findByG_C_C_First(long groupId,
321                    long companyId, long classNameId,
322                    OrderByComparator<WorkflowDefinitionLink> orderByComparator)
323                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
324                    return getPersistence()
325                                       .findByG_C_C_First(groupId, companyId, classNameId,
326                            orderByComparator);
327            }
328    
329            /**
330            * Returns the first workflow definition link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63;.
331            *
332            * @param groupId the group ID
333            * @param companyId the company ID
334            * @param classNameId the class name ID
335            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
336            * @return the first matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
337            */
338            public static WorkflowDefinitionLink fetchByG_C_C_First(long groupId,
339                    long companyId, long classNameId,
340                    OrderByComparator<WorkflowDefinitionLink> orderByComparator) {
341                    return getPersistence()
342                                       .fetchByG_C_C_First(groupId, companyId, classNameId,
343                            orderByComparator);
344            }
345    
346            /**
347            * Returns the last workflow definition link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63;.
348            *
349            * @param groupId the group ID
350            * @param companyId the company ID
351            * @param classNameId the class name ID
352            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
353            * @return the last matching workflow definition link
354            * @throws NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
355            */
356            public static WorkflowDefinitionLink findByG_C_C_Last(long groupId,
357                    long companyId, long classNameId,
358                    OrderByComparator<WorkflowDefinitionLink> orderByComparator)
359                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
360                    return getPersistence()
361                                       .findByG_C_C_Last(groupId, companyId, classNameId,
362                            orderByComparator);
363            }
364    
365            /**
366            * Returns the last workflow definition link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63;.
367            *
368            * @param groupId the group ID
369            * @param companyId the company ID
370            * @param classNameId the class name ID
371            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
372            * @return the last matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
373            */
374            public static WorkflowDefinitionLink fetchByG_C_C_Last(long groupId,
375                    long companyId, long classNameId,
376                    OrderByComparator<WorkflowDefinitionLink> orderByComparator) {
377                    return getPersistence()
378                                       .fetchByG_C_C_Last(groupId, companyId, classNameId,
379                            orderByComparator);
380            }
381    
382            /**
383            * Returns the workflow definition links before and after the current workflow definition link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63;.
384            *
385            * @param workflowDefinitionLinkId the primary key of the current workflow definition link
386            * @param groupId the group ID
387            * @param companyId the company ID
388            * @param classNameId the class name ID
389            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
390            * @return the previous, current, and next workflow definition link
391            * @throws NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
392            */
393            public static WorkflowDefinitionLink[] findByG_C_C_PrevAndNext(
394                    long workflowDefinitionLinkId, long groupId, long companyId,
395                    long classNameId,
396                    OrderByComparator<WorkflowDefinitionLink> orderByComparator)
397                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
398                    return getPersistence()
399                                       .findByG_C_C_PrevAndNext(workflowDefinitionLinkId, groupId,
400                            companyId, classNameId, orderByComparator);
401            }
402    
403            /**
404            * Removes all the workflow definition links where groupId = &#63; and companyId = &#63; and classNameId = &#63; from the database.
405            *
406            * @param groupId the group ID
407            * @param companyId the company ID
408            * @param classNameId the class name ID
409            */
410            public static void removeByG_C_C(long groupId, long companyId,
411                    long classNameId) {
412                    getPersistence().removeByG_C_C(groupId, companyId, classNameId);
413            }
414    
415            /**
416            * Returns the number of workflow definition links where groupId = &#63; and companyId = &#63; and classNameId = &#63;.
417            *
418            * @param groupId the group ID
419            * @param companyId the company ID
420            * @param classNameId the class name ID
421            * @return the number of matching workflow definition links
422            */
423            public static int countByG_C_C(long groupId, long companyId,
424                    long classNameId) {
425                    return getPersistence().countByG_C_C(groupId, companyId, classNameId);
426            }
427    
428            /**
429            * Returns all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
430            *
431            * @param companyId the company ID
432            * @param workflowDefinitionName the workflow definition name
433            * @param workflowDefinitionVersion the workflow definition version
434            * @return the matching workflow definition links
435            */
436            public static List<WorkflowDefinitionLink> findByC_W_W(long companyId,
437                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion) {
438                    return getPersistence()
439                                       .findByC_W_W(companyId, workflowDefinitionName,
440                            workflowDefinitionVersion);
441            }
442    
443            /**
444            * Returns a range of all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
445            *
446            * <p>
447            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowDefinitionLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
448            * </p>
449            *
450            * @param companyId the company ID
451            * @param workflowDefinitionName the workflow definition name
452            * @param workflowDefinitionVersion the workflow definition version
453            * @param start the lower bound of the range of workflow definition links
454            * @param end the upper bound of the range of workflow definition links (not inclusive)
455            * @return the range of matching workflow definition links
456            */
457            public static List<WorkflowDefinitionLink> findByC_W_W(long companyId,
458                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion,
459                    int start, int end) {
460                    return getPersistence()
461                                       .findByC_W_W(companyId, workflowDefinitionName,
462                            workflowDefinitionVersion, start, end);
463            }
464    
465            /**
466            * Returns an ordered range of all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
467            *
468            * <p>
469            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowDefinitionLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
470            * </p>
471            *
472            * @param companyId the company ID
473            * @param workflowDefinitionName the workflow definition name
474            * @param workflowDefinitionVersion the workflow definition version
475            * @param start the lower bound of the range of workflow definition links
476            * @param end the upper bound of the range of workflow definition links (not inclusive)
477            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
478            * @return the ordered range of matching workflow definition links
479            */
480            public static List<WorkflowDefinitionLink> findByC_W_W(long companyId,
481                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion,
482                    int start, int end,
483                    OrderByComparator<WorkflowDefinitionLink> orderByComparator) {
484                    return getPersistence()
485                                       .findByC_W_W(companyId, workflowDefinitionName,
486                            workflowDefinitionVersion, start, end, orderByComparator);
487            }
488    
489            /**
490            * Returns the first workflow definition link in the ordered set where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
491            *
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 first matching workflow definition link
497            * @throws NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
498            */
499            public static WorkflowDefinitionLink findByC_W_W_First(long companyId,
500                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion,
501                    OrderByComparator<WorkflowDefinitionLink> orderByComparator)
502                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
503                    return getPersistence()
504                                       .findByC_W_W_First(companyId, workflowDefinitionName,
505                            workflowDefinitionVersion, orderByComparator);
506            }
507    
508            /**
509            * Returns the first workflow definition link in the ordered set where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
510            *
511            * @param companyId the company ID
512            * @param workflowDefinitionName the workflow definition name
513            * @param workflowDefinitionVersion the workflow definition version
514            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
515            * @return the first matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
516            */
517            public static WorkflowDefinitionLink fetchByC_W_W_First(long companyId,
518                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion,
519                    OrderByComparator<WorkflowDefinitionLink> orderByComparator) {
520                    return getPersistence()
521                                       .fetchByC_W_W_First(companyId, workflowDefinitionName,
522                            workflowDefinitionVersion, orderByComparator);
523            }
524    
525            /**
526            * Returns the last workflow definition link in the ordered set where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
527            *
528            * @param companyId the company ID
529            * @param workflowDefinitionName the workflow definition name
530            * @param workflowDefinitionVersion the workflow definition version
531            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
532            * @return the last matching workflow definition link
533            * @throws NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
534            */
535            public static WorkflowDefinitionLink findByC_W_W_Last(long companyId,
536                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion,
537                    OrderByComparator<WorkflowDefinitionLink> orderByComparator)
538                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
539                    return getPersistence()
540                                       .findByC_W_W_Last(companyId, workflowDefinitionName,
541                            workflowDefinitionVersion, orderByComparator);
542            }
543    
544            /**
545            * Returns the last workflow definition link in the ordered set where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
546            *
547            * @param companyId the company ID
548            * @param workflowDefinitionName the workflow definition name
549            * @param workflowDefinitionVersion the workflow definition version
550            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
551            * @return the last matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
552            */
553            public static WorkflowDefinitionLink fetchByC_W_W_Last(long companyId,
554                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion,
555                    OrderByComparator<WorkflowDefinitionLink> orderByComparator) {
556                    return getPersistence()
557                                       .fetchByC_W_W_Last(companyId, workflowDefinitionName,
558                            workflowDefinitionVersion, orderByComparator);
559            }
560    
561            /**
562            * 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;.
563            *
564            * @param workflowDefinitionLinkId the primary key of the current workflow definition link
565            * @param companyId the company ID
566            * @param workflowDefinitionName the workflow definition name
567            * @param workflowDefinitionVersion the workflow definition version
568            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
569            * @return the previous, current, and next workflow definition link
570            * @throws NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
571            */
572            public static WorkflowDefinitionLink[] findByC_W_W_PrevAndNext(
573                    long workflowDefinitionLinkId, long companyId,
574                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion,
575                    OrderByComparator<WorkflowDefinitionLink> orderByComparator)
576                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
577                    return getPersistence()
578                                       .findByC_W_W_PrevAndNext(workflowDefinitionLinkId,
579                            companyId, workflowDefinitionName, workflowDefinitionVersion,
580                            orderByComparator);
581            }
582    
583            /**
584            * Removes all the workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63; from the database.
585            *
586            * @param companyId the company ID
587            * @param workflowDefinitionName the workflow definition name
588            * @param workflowDefinitionVersion the workflow definition version
589            */
590            public static void removeByC_W_W(long companyId,
591                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion) {
592                    getPersistence()
593                            .removeByC_W_W(companyId, workflowDefinitionName,
594                            workflowDefinitionVersion);
595            }
596    
597            /**
598            * Returns the number of workflow definition links where companyId = &#63; and workflowDefinitionName = &#63; and workflowDefinitionVersion = &#63;.
599            *
600            * @param companyId the company ID
601            * @param workflowDefinitionName the workflow definition name
602            * @param workflowDefinitionVersion the workflow definition version
603            * @return the number of matching workflow definition links
604            */
605            public static int countByC_W_W(long companyId,
606                    java.lang.String workflowDefinitionName, int workflowDefinitionVersion) {
607                    return getPersistence()
608                                       .countByC_W_W(companyId, workflowDefinitionName,
609                            workflowDefinitionVersion);
610            }
611    
612            /**
613            * Returns the workflow definition link where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; and typePK = &#63; or throws a {@link NoSuchWorkflowDefinitionLinkException} if it could not be found.
614            *
615            * @param groupId the group ID
616            * @param companyId the company ID
617            * @param classNameId the class name ID
618            * @param classPK the class p k
619            * @param typePK the type p k
620            * @return the matching workflow definition link
621            * @throws NoSuchWorkflowDefinitionLinkException if a matching workflow definition link could not be found
622            */
623            public static WorkflowDefinitionLink findByG_C_C_C_T(long groupId,
624                    long companyId, long classNameId, long classPK, long typePK)
625                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
626                    return getPersistence()
627                                       .findByG_C_C_C_T(groupId, companyId, classNameId, classPK,
628                            typePK);
629            }
630    
631            /**
632            * 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.
633            *
634            * @param groupId the group ID
635            * @param companyId the company ID
636            * @param classNameId the class name ID
637            * @param classPK the class p k
638            * @param typePK the type p k
639            * @return the matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
640            */
641            public static WorkflowDefinitionLink fetchByG_C_C_C_T(long groupId,
642                    long companyId, long classNameId, long classPK, long typePK) {
643                    return getPersistence()
644                                       .fetchByG_C_C_C_T(groupId, companyId, classNameId, classPK,
645                            typePK);
646            }
647    
648            /**
649            * 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.
650            *
651            * @param groupId the group ID
652            * @param companyId the company ID
653            * @param classNameId the class name ID
654            * @param classPK the class p k
655            * @param typePK the type p k
656            * @param retrieveFromCache whether to use the finder cache
657            * @return the matching workflow definition link, or <code>null</code> if a matching workflow definition link could not be found
658            */
659            public static WorkflowDefinitionLink fetchByG_C_C_C_T(long groupId,
660                    long companyId, long classNameId, long classPK, long typePK,
661                    boolean retrieveFromCache) {
662                    return getPersistence()
663                                       .fetchByG_C_C_C_T(groupId, companyId, classNameId, classPK,
664                            typePK, retrieveFromCache);
665            }
666    
667            /**
668            * Removes the workflow definition link where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; and typePK = &#63; from the database.
669            *
670            * @param groupId the group ID
671            * @param companyId the company ID
672            * @param classNameId the class name ID
673            * @param classPK the class p k
674            * @param typePK the type p k
675            * @return the workflow definition link that was removed
676            */
677            public static WorkflowDefinitionLink removeByG_C_C_C_T(long groupId,
678                    long companyId, long classNameId, long classPK, long typePK)
679                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
680                    return getPersistence()
681                                       .removeByG_C_C_C_T(groupId, companyId, classNameId, classPK,
682                            typePK);
683            }
684    
685            /**
686            * Returns the number of workflow definition links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; and typePK = &#63;.
687            *
688            * @param groupId the group ID
689            * @param companyId the company ID
690            * @param classNameId the class name ID
691            * @param classPK the class p k
692            * @param typePK the type p k
693            * @return the number of matching workflow definition links
694            */
695            public static int countByG_C_C_C_T(long groupId, long companyId,
696                    long classNameId, long classPK, long typePK) {
697                    return getPersistence()
698                                       .countByG_C_C_C_T(groupId, companyId, classNameId, classPK,
699                            typePK);
700            }
701    
702            /**
703            * Caches the workflow definition link in the entity cache if it is enabled.
704            *
705            * @param workflowDefinitionLink the workflow definition link
706            */
707            public static void cacheResult(
708                    WorkflowDefinitionLink workflowDefinitionLink) {
709                    getPersistence().cacheResult(workflowDefinitionLink);
710            }
711    
712            /**
713            * Caches the workflow definition links in the entity cache if it is enabled.
714            *
715            * @param workflowDefinitionLinks the workflow definition links
716            */
717            public static void cacheResult(
718                    List<WorkflowDefinitionLink> workflowDefinitionLinks) {
719                    getPersistence().cacheResult(workflowDefinitionLinks);
720            }
721    
722            /**
723            * Creates a new workflow definition link with the primary key. Does not add the workflow definition link to the database.
724            *
725            * @param workflowDefinitionLinkId the primary key for the new workflow definition link
726            * @return the new workflow definition link
727            */
728            public static WorkflowDefinitionLink create(long workflowDefinitionLinkId) {
729                    return getPersistence().create(workflowDefinitionLinkId);
730            }
731    
732            /**
733            * Removes the workflow definition link with the primary key from the database. Also notifies the appropriate model listeners.
734            *
735            * @param workflowDefinitionLinkId the primary key of the workflow definition link
736            * @return the workflow definition link that was removed
737            * @throws NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
738            */
739            public static WorkflowDefinitionLink remove(long workflowDefinitionLinkId)
740                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
741                    return getPersistence().remove(workflowDefinitionLinkId);
742            }
743    
744            public static WorkflowDefinitionLink updateImpl(
745                    WorkflowDefinitionLink workflowDefinitionLink) {
746                    return getPersistence().updateImpl(workflowDefinitionLink);
747            }
748    
749            /**
750            * Returns the workflow definition link with the primary key or throws a {@link NoSuchWorkflowDefinitionLinkException} if it could not be found.
751            *
752            * @param workflowDefinitionLinkId the primary key of the workflow definition link
753            * @return the workflow definition link
754            * @throws NoSuchWorkflowDefinitionLinkException if a workflow definition link with the primary key could not be found
755            */
756            public static WorkflowDefinitionLink findByPrimaryKey(
757                    long workflowDefinitionLinkId)
758                    throws com.liferay.portal.NoSuchWorkflowDefinitionLinkException {
759                    return getPersistence().findByPrimaryKey(workflowDefinitionLinkId);
760            }
761    
762            /**
763            * Returns the workflow definition link with the primary key or returns <code>null</code> if it could not be found.
764            *
765            * @param workflowDefinitionLinkId the primary key of the workflow definition link
766            * @return the workflow definition link, or <code>null</code> if a workflow definition link with the primary key could not be found
767            */
768            public static WorkflowDefinitionLink fetchByPrimaryKey(
769                    long workflowDefinitionLinkId) {
770                    return getPersistence().fetchByPrimaryKey(workflowDefinitionLinkId);
771            }
772    
773            public static java.util.Map<java.io.Serializable, WorkflowDefinitionLink> fetchByPrimaryKeys(
774                    java.util.Set<java.io.Serializable> primaryKeys) {
775                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
776            }
777    
778            /**
779            * Returns all the workflow definition links.
780            *
781            * @return the workflow definition links
782            */
783            public static List<WorkflowDefinitionLink> findAll() {
784                    return getPersistence().findAll();
785            }
786    
787            /**
788            * Returns a range of all the workflow definition links.
789            *
790            * <p>
791            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowDefinitionLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
792            * </p>
793            *
794            * @param start the lower bound of the range of workflow definition links
795            * @param end the upper bound of the range of workflow definition links (not inclusive)
796            * @return the range of workflow definition links
797            */
798            public static List<WorkflowDefinitionLink> findAll(int start, int end) {
799                    return getPersistence().findAll(start, end);
800            }
801    
802            /**
803            * Returns an ordered range of all the workflow definition links.
804            *
805            * <p>
806            * 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 QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link WorkflowDefinitionLinkModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
807            * </p>
808            *
809            * @param start the lower bound of the range of workflow definition links
810            * @param end the upper bound of the range of workflow definition links (not inclusive)
811            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
812            * @return the ordered range of workflow definition links
813            */
814            public static List<WorkflowDefinitionLink> findAll(int start, int end,
815                    OrderByComparator<WorkflowDefinitionLink> orderByComparator) {
816                    return getPersistence().findAll(start, end, orderByComparator);
817            }
818    
819            /**
820            * Removes all the workflow definition links from the database.
821            */
822            public static void removeAll() {
823                    getPersistence().removeAll();
824            }
825    
826            /**
827            * Returns the number of workflow definition links.
828            *
829            * @return the number of workflow definition links
830            */
831            public static int countAll() {
832                    return getPersistence().countAll();
833            }
834    
835            public static WorkflowDefinitionLinkPersistence getPersistence() {
836                    if (_persistence == null) {
837                            _persistence = (WorkflowDefinitionLinkPersistence)PortalBeanLocatorUtil.locate(WorkflowDefinitionLinkPersistence.class.getName());
838    
839                            ReferenceRegistry.registerReference(WorkflowDefinitionLinkUtil.class,
840                                    "_persistence");
841                    }
842    
843                    return _persistence;
844            }
845    
846            /**
847             * @deprecated As of 6.2.0
848             */
849            @Deprecated
850            public void setPersistence(WorkflowDefinitionLinkPersistence persistence) {
851            }
852    
853            private static WorkflowDefinitionLinkPersistence _persistence;
854    }