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.kernel.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.NoSuchWorkflowInstanceLinkException;
020    import com.liferay.portal.kernel.model.WorkflowInstanceLink;
021    
022    /**
023     * The persistence interface for the workflow instance link service.
024     *
025     * <p>
026     * Caching information and settings can be found in <code>portal.properties</code>
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see com.liferay.portal.service.persistence.impl.WorkflowInstanceLinkPersistenceImpl
031     * @see WorkflowInstanceLinkUtil
032     * @generated
033     */
034    @ProviderType
035    public interface WorkflowInstanceLinkPersistence extends BasePersistence<WorkflowInstanceLink> {
036            /*
037             * NOTE FOR DEVELOPERS:
038             *
039             * Never modify or reference this interface directly. Always use {@link WorkflowInstanceLinkUtil} to access the workflow instance link persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
040             */
041    
042            /**
043            * Returns all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
044            *
045            * @param groupId the group ID
046            * @param companyId the company ID
047            * @param classNameId the class name ID
048            * @param classPK the class p k
049            * @return the matching workflow instance links
050            */
051            public java.util.List<WorkflowInstanceLink> findByG_C_C_C(long groupId,
052                    long companyId, long classNameId, long classPK);
053    
054            /**
055            * Returns a range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
056            *
057            * <p>
058            * 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 WorkflowInstanceLinkModelImpl}. 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.
059            * </p>
060            *
061            * @param groupId the group ID
062            * @param companyId the company ID
063            * @param classNameId the class name ID
064            * @param classPK the class p k
065            * @param start the lower bound of the range of workflow instance links
066            * @param end the upper bound of the range of workflow instance links (not inclusive)
067            * @return the range of matching workflow instance links
068            */
069            public java.util.List<WorkflowInstanceLink> findByG_C_C_C(long groupId,
070                    long companyId, long classNameId, long classPK, int start, int end);
071    
072            /**
073            * Returns an ordered range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
074            *
075            * <p>
076            * 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 WorkflowInstanceLinkModelImpl}. 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.
077            * </p>
078            *
079            * @param groupId the group ID
080            * @param companyId the company ID
081            * @param classNameId the class name ID
082            * @param classPK the class p k
083            * @param start the lower bound of the range of workflow instance links
084            * @param end the upper bound of the range of workflow instance links (not inclusive)
085            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
086            * @return the ordered range of matching workflow instance links
087            */
088            public java.util.List<WorkflowInstanceLink> findByG_C_C_C(long groupId,
089                    long companyId, long classNameId, long classPK, int start, int end,
090                    com.liferay.portal.kernel.util.OrderByComparator<WorkflowInstanceLink> orderByComparator);
091    
092            /**
093            * Returns an ordered range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
094            *
095            * <p>
096            * 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 WorkflowInstanceLinkModelImpl}. 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.
097            * </p>
098            *
099            * @param groupId the group ID
100            * @param companyId the company ID
101            * @param classNameId the class name ID
102            * @param classPK the class p k
103            * @param start the lower bound of the range of workflow instance links
104            * @param end the upper bound of the range of workflow instance links (not inclusive)
105            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
106            * @param retrieveFromCache whether to retrieve from the finder cache
107            * @return the ordered range of matching workflow instance links
108            */
109            public java.util.List<WorkflowInstanceLink> findByG_C_C_C(long groupId,
110                    long companyId, long classNameId, long classPK, int start, int end,
111                    com.liferay.portal.kernel.util.OrderByComparator<WorkflowInstanceLink> orderByComparator,
112                    boolean retrieveFromCache);
113    
114            /**
115            * Returns the first workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
116            *
117            * @param groupId the group ID
118            * @param companyId the company ID
119            * @param classNameId the class name ID
120            * @param classPK the class p k
121            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
122            * @return the first matching workflow instance link
123            * @throws NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
124            */
125            public WorkflowInstanceLink findByG_C_C_C_First(long groupId,
126                    long companyId, long classNameId, long classPK,
127                    com.liferay.portal.kernel.util.OrderByComparator<WorkflowInstanceLink> orderByComparator)
128                    throws NoSuchWorkflowInstanceLinkException;
129    
130            /**
131            * Returns the first workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
132            *
133            * @param groupId the group ID
134            * @param companyId the company ID
135            * @param classNameId the class name ID
136            * @param classPK the class p k
137            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
138            * @return the first matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found
139            */
140            public WorkflowInstanceLink fetchByG_C_C_C_First(long groupId,
141                    long companyId, long classNameId, long classPK,
142                    com.liferay.portal.kernel.util.OrderByComparator<WorkflowInstanceLink> orderByComparator);
143    
144            /**
145            * Returns the last workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
146            *
147            * @param groupId the group ID
148            * @param companyId the company ID
149            * @param classNameId the class name ID
150            * @param classPK the class p k
151            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
152            * @return the last matching workflow instance link
153            * @throws NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
154            */
155            public WorkflowInstanceLink findByG_C_C_C_Last(long groupId,
156                    long companyId, long classNameId, long classPK,
157                    com.liferay.portal.kernel.util.OrderByComparator<WorkflowInstanceLink> orderByComparator)
158                    throws NoSuchWorkflowInstanceLinkException;
159    
160            /**
161            * Returns the last workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
162            *
163            * @param groupId the group ID
164            * @param companyId the company ID
165            * @param classNameId the class name ID
166            * @param classPK the class p k
167            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
168            * @return the last matching workflow instance link, or <code>null</code> if a matching workflow instance link could not be found
169            */
170            public WorkflowInstanceLink fetchByG_C_C_C_Last(long groupId,
171                    long companyId, long classNameId, long classPK,
172                    com.liferay.portal.kernel.util.OrderByComparator<WorkflowInstanceLink> orderByComparator);
173    
174            /**
175            * Returns the workflow instance links before and after the current workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
176            *
177            * @param workflowInstanceLinkId the primary key of the current workflow instance link
178            * @param groupId the group ID
179            * @param companyId the company ID
180            * @param classNameId the class name ID
181            * @param classPK the class p k
182            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
183            * @return the previous, current, and next workflow instance link
184            * @throws NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
185            */
186            public WorkflowInstanceLink[] findByG_C_C_C_PrevAndNext(
187                    long workflowInstanceLinkId, long groupId, long companyId,
188                    long classNameId, long classPK,
189                    com.liferay.portal.kernel.util.OrderByComparator<WorkflowInstanceLink> orderByComparator)
190                    throws NoSuchWorkflowInstanceLinkException;
191    
192            /**
193            * Removes all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
194            *
195            * @param groupId the group ID
196            * @param companyId the company ID
197            * @param classNameId the class name ID
198            * @param classPK the class p k
199            */
200            public void removeByG_C_C_C(long groupId, long companyId, long classNameId,
201                    long classPK);
202    
203            /**
204            * Returns the number of workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
205            *
206            * @param groupId the group ID
207            * @param companyId the company ID
208            * @param classNameId the class name ID
209            * @param classPK the class p k
210            * @return the number of matching workflow instance links
211            */
212            public int countByG_C_C_C(long groupId, long companyId, long classNameId,
213                    long classPK);
214    
215            /**
216            * Caches the workflow instance link in the entity cache if it is enabled.
217            *
218            * @param workflowInstanceLink the workflow instance link
219            */
220            public void cacheResult(WorkflowInstanceLink workflowInstanceLink);
221    
222            /**
223            * Caches the workflow instance links in the entity cache if it is enabled.
224            *
225            * @param workflowInstanceLinks the workflow instance links
226            */
227            public void cacheResult(
228                    java.util.List<WorkflowInstanceLink> workflowInstanceLinks);
229    
230            /**
231            * Creates a new workflow instance link with the primary key. Does not add the workflow instance link to the database.
232            *
233            * @param workflowInstanceLinkId the primary key for the new workflow instance link
234            * @return the new workflow instance link
235            */
236            public WorkflowInstanceLink create(long workflowInstanceLinkId);
237    
238            /**
239            * Removes the workflow instance link with the primary key from the database. Also notifies the appropriate model listeners.
240            *
241            * @param workflowInstanceLinkId the primary key of the workflow instance link
242            * @return the workflow instance link that was removed
243            * @throws NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
244            */
245            public WorkflowInstanceLink remove(long workflowInstanceLinkId)
246                    throws NoSuchWorkflowInstanceLinkException;
247    
248            public WorkflowInstanceLink updateImpl(
249                    WorkflowInstanceLink workflowInstanceLink);
250    
251            /**
252            * Returns the workflow instance link with the primary key or throws a {@link NoSuchWorkflowInstanceLinkException} if it could not be found.
253            *
254            * @param workflowInstanceLinkId the primary key of the workflow instance link
255            * @return the workflow instance link
256            * @throws NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
257            */
258            public WorkflowInstanceLink findByPrimaryKey(long workflowInstanceLinkId)
259                    throws NoSuchWorkflowInstanceLinkException;
260    
261            /**
262            * Returns the workflow instance link with the primary key or returns <code>null</code> if it could not be found.
263            *
264            * @param workflowInstanceLinkId the primary key of the workflow instance link
265            * @return the workflow instance link, or <code>null</code> if a workflow instance link with the primary key could not be found
266            */
267            public WorkflowInstanceLink fetchByPrimaryKey(long workflowInstanceLinkId);
268    
269            @Override
270            public java.util.Map<java.io.Serializable, WorkflowInstanceLink> fetchByPrimaryKeys(
271                    java.util.Set<java.io.Serializable> primaryKeys);
272    
273            /**
274            * Returns all the workflow instance links.
275            *
276            * @return the workflow instance links
277            */
278            public java.util.List<WorkflowInstanceLink> findAll();
279    
280            /**
281            * Returns a range of all the workflow instance links.
282            *
283            * <p>
284            * 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 WorkflowInstanceLinkModelImpl}. 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.
285            * </p>
286            *
287            * @param start the lower bound of the range of workflow instance links
288            * @param end the upper bound of the range of workflow instance links (not inclusive)
289            * @return the range of workflow instance links
290            */
291            public java.util.List<WorkflowInstanceLink> findAll(int start, int end);
292    
293            /**
294            * Returns an ordered range of all the workflow instance links.
295            *
296            * <p>
297            * 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 WorkflowInstanceLinkModelImpl}. 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.
298            * </p>
299            *
300            * @param start the lower bound of the range of workflow instance links
301            * @param end the upper bound of the range of workflow instance links (not inclusive)
302            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
303            * @return the ordered range of workflow instance links
304            */
305            public java.util.List<WorkflowInstanceLink> findAll(int start, int end,
306                    com.liferay.portal.kernel.util.OrderByComparator<WorkflowInstanceLink> orderByComparator);
307    
308            /**
309            * Returns an ordered range of all the workflow instance links.
310            *
311            * <p>
312            * 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 WorkflowInstanceLinkModelImpl}. 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.
313            * </p>
314            *
315            * @param start the lower bound of the range of workflow instance links
316            * @param end the upper bound of the range of workflow instance links (not inclusive)
317            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
318            * @param retrieveFromCache whether to retrieve from the finder cache
319            * @return the ordered range of workflow instance links
320            */
321            public java.util.List<WorkflowInstanceLink> findAll(int start, int end,
322                    com.liferay.portal.kernel.util.OrderByComparator<WorkflowInstanceLink> orderByComparator,
323                    boolean retrieveFromCache);
324    
325            /**
326            * Removes all the workflow instance links from the database.
327            */
328            public void removeAll();
329    
330            /**
331            * Returns the number of workflow instance links.
332            *
333            * @return the number of workflow instance links
334            */
335            public int countAll();
336    }