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