001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.model.WorkflowInstanceLink;
018    
019    /**
020     * The persistence interface for the workflow instance link service.
021     *
022     * <p>
023     * Caching information and settings can be found in <code>portal.properties</code>
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see WorkflowInstanceLinkPersistenceImpl
028     * @see WorkflowInstanceLinkUtil
029     * @generated
030     */
031    public interface WorkflowInstanceLinkPersistence extends BasePersistence<WorkflowInstanceLink> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * 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.
036             */
037    
038            /**
039            * Caches the workflow instance link in the entity cache if it is enabled.
040            *
041            * @param workflowInstanceLink the workflow instance link
042            */
043            public void cacheResult(
044                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink);
045    
046            /**
047            * Caches the workflow instance links in the entity cache if it is enabled.
048            *
049            * @param workflowInstanceLinks the workflow instance links
050            */
051            public void cacheResult(
052                    java.util.List<com.liferay.portal.model.WorkflowInstanceLink> workflowInstanceLinks);
053    
054            /**
055            * Creates a new workflow instance link with the primary key. Does not add the workflow instance link to the database.
056            *
057            * @param workflowInstanceLinkId the primary key for the new workflow instance link
058            * @return the new workflow instance link
059            */
060            public com.liferay.portal.model.WorkflowInstanceLink create(
061                    long workflowInstanceLinkId);
062    
063            /**
064            * Removes the workflow instance link with the primary key from the database. Also notifies the appropriate model listeners.
065            *
066            * @param workflowInstanceLinkId the primary key of the workflow instance link
067            * @return the workflow instance link that was removed
068            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public com.liferay.portal.model.WorkflowInstanceLink remove(
072                    long workflowInstanceLinkId)
073                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            public com.liferay.portal.model.WorkflowInstanceLink updateImpl(
077                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink,
078                    boolean merge)
079                    throws com.liferay.portal.kernel.exception.SystemException;
080    
081            /**
082            * Returns the workflow instance link with the primary key or throws a {@link com.liferay.portal.NoSuchWorkflowInstanceLinkException} if it could not be found.
083            *
084            * @param workflowInstanceLinkId the primary key of the workflow instance link
085            * @return the workflow instance link
086            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
087            * @throws SystemException if a system exception occurred
088            */
089            public com.liferay.portal.model.WorkflowInstanceLink findByPrimaryKey(
090                    long workflowInstanceLinkId)
091                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
092                            com.liferay.portal.kernel.exception.SystemException;
093    
094            /**
095            * Returns the workflow instance link with the primary key or returns <code>null</code> if it could not be found.
096            *
097            * @param workflowInstanceLinkId the primary key of the workflow instance link
098            * @return the workflow instance link, or <code>null</code> if a workflow instance link with the primary key could not be found
099            * @throws SystemException if a system exception occurred
100            */
101            public com.liferay.portal.model.WorkflowInstanceLink fetchByPrimaryKey(
102                    long workflowInstanceLinkId)
103                    throws com.liferay.portal.kernel.exception.SystemException;
104    
105            /**
106            * Returns all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
107            *
108            * @param groupId the group ID
109            * @param companyId the company ID
110            * @param classNameId the class name ID
111            * @param classPK the class p k
112            * @return the matching workflow instance links
113            * @throws SystemException if a system exception occurred
114            */
115            public java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
116                    long groupId, long companyId, long classNameId, long classPK)
117                    throws com.liferay.portal.kernel.exception.SystemException;
118    
119            /**
120            * Returns a range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
121            *
122            * <p>
123            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
124            * </p>
125            *
126            * @param groupId the group ID
127            * @param companyId the company ID
128            * @param classNameId the class name ID
129            * @param classPK the class p k
130            * @param start the lower bound of the range of workflow instance links
131            * @param end the upper bound of the range of workflow instance links (not inclusive)
132            * @return the range of matching workflow instance links
133            * @throws SystemException if a system exception occurred
134            */
135            public java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
136                    long groupId, long companyId, long classNameId, long classPK,
137                    int start, int end)
138                    throws com.liferay.portal.kernel.exception.SystemException;
139    
140            /**
141            * Returns an ordered range of all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
145            * </p>
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 start the lower bound of the range of workflow instance links
152            * @param end the upper bound of the range of workflow instance links (not inclusive)
153            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
154            * @return the ordered range of matching workflow instance links
155            * @throws SystemException if a system exception occurred
156            */
157            public java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findByG_C_C_C(
158                    long groupId, long companyId, long classNameId, long classPK,
159                    int start, int end,
160                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161                    throws com.liferay.portal.kernel.exception.SystemException;
162    
163            /**
164            * Returns the first workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
165            *
166            * <p>
167            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
168            * </p>
169            *
170            * @param groupId the group ID
171            * @param companyId the company ID
172            * @param classNameId the class name ID
173            * @param classPK the class p k
174            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
175            * @return the first matching workflow instance link
176            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
177            * @throws SystemException if a system exception occurred
178            */
179            public com.liferay.portal.model.WorkflowInstanceLink findByG_C_C_C_First(
180                    long groupId, long companyId, long classNameId, long classPK,
181                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
183                            com.liferay.portal.kernel.exception.SystemException;
184    
185            /**
186            * Returns the last workflow instance link in the ordered set where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
187            *
188            * <p>
189            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
190            * </p>
191            *
192            * @param groupId the group ID
193            * @param companyId the company ID
194            * @param classNameId the class name ID
195            * @param classPK the class p k
196            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
197            * @return the last matching workflow instance link
198            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a matching workflow instance link could not be found
199            * @throws SystemException if a system exception occurred
200            */
201            public com.liferay.portal.model.WorkflowInstanceLink findByG_C_C_C_Last(
202                    long groupId, long companyId, long classNameId, long classPK,
203                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
205                            com.liferay.portal.kernel.exception.SystemException;
206    
207            /**
208            * 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;.
209            *
210            * <p>
211            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
212            * </p>
213            *
214            * @param workflowInstanceLinkId the primary key of the current workflow instance link
215            * @param groupId the group ID
216            * @param companyId the company ID
217            * @param classNameId the class name ID
218            * @param classPK the class p k
219            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
220            * @return the previous, current, and next workflow instance link
221            * @throws com.liferay.portal.NoSuchWorkflowInstanceLinkException if a workflow instance link with the primary key could not be found
222            * @throws SystemException if a system exception occurred
223            */
224            public com.liferay.portal.model.WorkflowInstanceLink[] findByG_C_C_C_PrevAndNext(
225                    long workflowInstanceLinkId, long groupId, long companyId,
226                    long classNameId, long classPK,
227                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228                    throws com.liferay.portal.NoSuchWorkflowInstanceLinkException,
229                            com.liferay.portal.kernel.exception.SystemException;
230    
231            /**
232            * Returns all the workflow instance links.
233            *
234            * @return the workflow instance links
235            * @throws SystemException if a system exception occurred
236            */
237            public java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll()
238                    throws com.liferay.portal.kernel.exception.SystemException;
239    
240            /**
241            * Returns a range of all the workflow instance links.
242            *
243            * <p>
244            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
245            * </p>
246            *
247            * @param start the lower bound of the range of workflow instance links
248            * @param end the upper bound of the range of workflow instance links (not inclusive)
249            * @return the range of workflow instance links
250            * @throws SystemException if a system exception occurred
251            */
252            public java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll(
253                    int start, int end)
254                    throws com.liferay.portal.kernel.exception.SystemException;
255    
256            /**
257            * Returns an ordered range of all the workflow instance links.
258            *
259            * <p>
260            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
261            * </p>
262            *
263            * @param start the lower bound of the range of workflow instance links
264            * @param end the upper bound of the range of workflow instance links (not inclusive)
265            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
266            * @return the ordered range of workflow instance links
267            * @throws SystemException if a system exception occurred
268            */
269            public java.util.List<com.liferay.portal.model.WorkflowInstanceLink> findAll(
270                    int start, int end,
271                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272                    throws com.liferay.portal.kernel.exception.SystemException;
273    
274            /**
275            * Removes all the workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
276            *
277            * @param groupId the group ID
278            * @param companyId the company ID
279            * @param classNameId the class name ID
280            * @param classPK the class p k
281            * @throws SystemException if a system exception occurred
282            */
283            public void removeByG_C_C_C(long groupId, long companyId, long classNameId,
284                    long classPK)
285                    throws com.liferay.portal.kernel.exception.SystemException;
286    
287            /**
288            * Removes all the workflow instance links from the database.
289            *
290            * @throws SystemException if a system exception occurred
291            */
292            public void removeAll()
293                    throws com.liferay.portal.kernel.exception.SystemException;
294    
295            /**
296            * Returns the number of workflow instance links where groupId = &#63; and companyId = &#63; and classNameId = &#63; and classPK = &#63;.
297            *
298            * @param groupId the group ID
299            * @param companyId the company ID
300            * @param classNameId the class name ID
301            * @param classPK the class p k
302            * @return the number of matching workflow instance links
303            * @throws SystemException if a system exception occurred
304            */
305            public int countByG_C_C_C(long groupId, long companyId, long classNameId,
306                    long classPK)
307                    throws com.liferay.portal.kernel.exception.SystemException;
308    
309            /**
310            * Returns the number of workflow instance links.
311            *
312            * @return the number of workflow instance links
313            * @throws SystemException if a system exception occurred
314            */
315            public int countAll()
316                    throws com.liferay.portal.kernel.exception.SystemException;
317    }