001    /**
002     * Copyright (c) 2000-2013 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.portlet.trash.service.persistence;
016    
017    import com.liferay.portal.service.persistence.BasePersistence;
018    
019    import com.liferay.portlet.trash.model.TrashVersion;
020    
021    /**
022     * The persistence interface for the trash version 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 TrashVersionPersistenceImpl
030     * @see TrashVersionUtil
031     * @generated
032     */
033    public interface TrashVersionPersistence extends BasePersistence<TrashVersion> {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify or reference this interface directly. Always use {@link TrashVersionUtil} to access the trash version persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
038             */
039    
040            /**
041            * Returns all the trash versions where entryId = &#63;.
042            *
043            * @param entryId the entry ID
044            * @return the matching trash versions
045            * @throws SystemException if a system exception occurred
046            */
047            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByEntryId(
048                    long entryId)
049                    throws com.liferay.portal.kernel.exception.SystemException;
050    
051            /**
052            * Returns a range of all the trash versions where entryId = &#63;.
053            *
054            * <p>
055            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.trash.model.impl.TrashVersionModelImpl}. 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.
056            * </p>
057            *
058            * @param entryId the entry ID
059            * @param start the lower bound of the range of trash versions
060            * @param end the upper bound of the range of trash versions (not inclusive)
061            * @return the range of matching trash versions
062            * @throws SystemException if a system exception occurred
063            */
064            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByEntryId(
065                    long entryId, int start, int end)
066                    throws com.liferay.portal.kernel.exception.SystemException;
067    
068            /**
069            * Returns an ordered range of all the trash versions where entryId = &#63;.
070            *
071            * <p>
072            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.trash.model.impl.TrashVersionModelImpl}. 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.
073            * </p>
074            *
075            * @param entryId the entry ID
076            * @param start the lower bound of the range of trash versions
077            * @param end the upper bound of the range of trash versions (not inclusive)
078            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
079            * @return the ordered range of matching trash versions
080            * @throws SystemException if a system exception occurred
081            */
082            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByEntryId(
083                    long entryId, int start, int end,
084                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
085                    throws com.liferay.portal.kernel.exception.SystemException;
086    
087            /**
088            * Returns the first trash version in the ordered set where entryId = &#63;.
089            *
090            * @param entryId the entry ID
091            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
092            * @return the first matching trash version
093            * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found
094            * @throws SystemException if a system exception occurred
095            */
096            public com.liferay.portlet.trash.model.TrashVersion findByEntryId_First(
097                    long entryId,
098                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
099                    throws com.liferay.portal.kernel.exception.SystemException,
100                            com.liferay.portlet.trash.NoSuchVersionException;
101    
102            /**
103            * Returns the first trash version in the ordered set where entryId = &#63;.
104            *
105            * @param entryId the entry ID
106            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
107            * @return the first matching trash version, or <code>null</code> if a matching trash version could not be found
108            * @throws SystemException if a system exception occurred
109            */
110            public com.liferay.portlet.trash.model.TrashVersion fetchByEntryId_First(
111                    long entryId,
112                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
113                    throws com.liferay.portal.kernel.exception.SystemException;
114    
115            /**
116            * Returns the last trash version in the ordered set where entryId = &#63;.
117            *
118            * @param entryId the entry ID
119            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
120            * @return the last matching trash version
121            * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found
122            * @throws SystemException if a system exception occurred
123            */
124            public com.liferay.portlet.trash.model.TrashVersion findByEntryId_Last(
125                    long entryId,
126                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
127                    throws com.liferay.portal.kernel.exception.SystemException,
128                            com.liferay.portlet.trash.NoSuchVersionException;
129    
130            /**
131            * Returns the last trash version in the ordered set where entryId = &#63;.
132            *
133            * @param entryId the entry ID
134            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
135            * @return the last matching trash version, or <code>null</code> if a matching trash version could not be found
136            * @throws SystemException if a system exception occurred
137            */
138            public com.liferay.portlet.trash.model.TrashVersion fetchByEntryId_Last(
139                    long entryId,
140                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141                    throws com.liferay.portal.kernel.exception.SystemException;
142    
143            /**
144            * Returns the trash versions before and after the current trash version in the ordered set where entryId = &#63;.
145            *
146            * @param versionId the primary key of the current trash version
147            * @param entryId the entry ID
148            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
149            * @return the previous, current, and next trash version
150            * @throws com.liferay.portlet.trash.NoSuchVersionException if a trash version with the primary key could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            public com.liferay.portlet.trash.model.TrashVersion[] findByEntryId_PrevAndNext(
154                    long versionId, long entryId,
155                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156                    throws com.liferay.portal.kernel.exception.SystemException,
157                            com.liferay.portlet.trash.NoSuchVersionException;
158    
159            /**
160            * Removes all the trash versions where entryId = &#63; from the database.
161            *
162            * @param entryId the entry ID
163            * @throws SystemException if a system exception occurred
164            */
165            public void removeByEntryId(long entryId)
166                    throws com.liferay.portal.kernel.exception.SystemException;
167    
168            /**
169            * Returns the number of trash versions where entryId = &#63;.
170            *
171            * @param entryId the entry ID
172            * @return the number of matching trash versions
173            * @throws SystemException if a system exception occurred
174            */
175            public int countByEntryId(long entryId)
176                    throws com.liferay.portal.kernel.exception.SystemException;
177    
178            /**
179            * Returns all the trash versions where entryId = &#63; and classNameId = &#63;.
180            *
181            * @param entryId the entry ID
182            * @param classNameId the class name ID
183            * @return the matching trash versions
184            * @throws SystemException if a system exception occurred
185            */
186            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByE_C(
187                    long entryId, long classNameId)
188                    throws com.liferay.portal.kernel.exception.SystemException;
189    
190            /**
191            * Returns a range of all the trash versions where entryId = &#63; and classNameId = &#63;.
192            *
193            * <p>
194            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.trash.model.impl.TrashVersionModelImpl}. 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.
195            * </p>
196            *
197            * @param entryId the entry ID
198            * @param classNameId the class name ID
199            * @param start the lower bound of the range of trash versions
200            * @param end the upper bound of the range of trash versions (not inclusive)
201            * @return the range of matching trash versions
202            * @throws SystemException if a system exception occurred
203            */
204            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByE_C(
205                    long entryId, long classNameId, int start, int end)
206                    throws com.liferay.portal.kernel.exception.SystemException;
207    
208            /**
209            * Returns an ordered range of all the trash versions where entryId = &#63; and classNameId = &#63;.
210            *
211            * <p>
212            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.trash.model.impl.TrashVersionModelImpl}. 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.
213            * </p>
214            *
215            * @param entryId the entry ID
216            * @param classNameId the class name ID
217            * @param start the lower bound of the range of trash versions
218            * @param end the upper bound of the range of trash versions (not inclusive)
219            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
220            * @return the ordered range of matching trash versions
221            * @throws SystemException if a system exception occurred
222            */
223            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByE_C(
224                    long entryId, long classNameId, int start, int end,
225                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
226                    throws com.liferay.portal.kernel.exception.SystemException;
227    
228            /**
229            * Returns the first trash version in the ordered set where entryId = &#63; and classNameId = &#63;.
230            *
231            * @param entryId the entry ID
232            * @param classNameId the class name ID
233            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
234            * @return the first matching trash version
235            * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found
236            * @throws SystemException if a system exception occurred
237            */
238            public com.liferay.portlet.trash.model.TrashVersion findByE_C_First(
239                    long entryId, long classNameId,
240                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
241                    throws com.liferay.portal.kernel.exception.SystemException,
242                            com.liferay.portlet.trash.NoSuchVersionException;
243    
244            /**
245            * Returns the first trash version in the ordered set where entryId = &#63; and classNameId = &#63;.
246            *
247            * @param entryId the entry ID
248            * @param classNameId the class name ID
249            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
250            * @return the first matching trash version, or <code>null</code> if a matching trash version could not be found
251            * @throws SystemException if a system exception occurred
252            */
253            public com.liferay.portlet.trash.model.TrashVersion fetchByE_C_First(
254                    long entryId, long classNameId,
255                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
256                    throws com.liferay.portal.kernel.exception.SystemException;
257    
258            /**
259            * Returns the last trash version in the ordered set where entryId = &#63; and classNameId = &#63;.
260            *
261            * @param entryId the entry ID
262            * @param classNameId the class name ID
263            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
264            * @return the last matching trash version
265            * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found
266            * @throws SystemException if a system exception occurred
267            */
268            public com.liferay.portlet.trash.model.TrashVersion findByE_C_Last(
269                    long entryId, long classNameId,
270                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
271                    throws com.liferay.portal.kernel.exception.SystemException,
272                            com.liferay.portlet.trash.NoSuchVersionException;
273    
274            /**
275            * Returns the last trash version in the ordered set where entryId = &#63; and classNameId = &#63;.
276            *
277            * @param entryId the entry ID
278            * @param classNameId the class name ID
279            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
280            * @return the last matching trash version, or <code>null</code> if a matching trash version could not be found
281            * @throws SystemException if a system exception occurred
282            */
283            public com.liferay.portlet.trash.model.TrashVersion fetchByE_C_Last(
284                    long entryId, long classNameId,
285                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
286                    throws com.liferay.portal.kernel.exception.SystemException;
287    
288            /**
289            * Returns the trash versions before and after the current trash version in the ordered set where entryId = &#63; and classNameId = &#63;.
290            *
291            * @param versionId the primary key of the current trash version
292            * @param entryId the entry ID
293            * @param classNameId the class name ID
294            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
295            * @return the previous, current, and next trash version
296            * @throws com.liferay.portlet.trash.NoSuchVersionException if a trash version with the primary key could not be found
297            * @throws SystemException if a system exception occurred
298            */
299            public com.liferay.portlet.trash.model.TrashVersion[] findByE_C_PrevAndNext(
300                    long versionId, long entryId, long classNameId,
301                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
302                    throws com.liferay.portal.kernel.exception.SystemException,
303                            com.liferay.portlet.trash.NoSuchVersionException;
304    
305            /**
306            * Removes all the trash versions where entryId = &#63; and classNameId = &#63; from the database.
307            *
308            * @param entryId the entry ID
309            * @param classNameId the class name ID
310            * @throws SystemException if a system exception occurred
311            */
312            public void removeByE_C(long entryId, long classNameId)
313                    throws com.liferay.portal.kernel.exception.SystemException;
314    
315            /**
316            * Returns the number of trash versions where entryId = &#63; and classNameId = &#63;.
317            *
318            * @param entryId the entry ID
319            * @param classNameId the class name ID
320            * @return the number of matching trash versions
321            * @throws SystemException if a system exception occurred
322            */
323            public int countByE_C(long entryId, long classNameId)
324                    throws com.liferay.portal.kernel.exception.SystemException;
325    
326            /**
327            * Returns all the trash versions where classNameId = &#63; and classPK = &#63;.
328            *
329            * @param classNameId the class name ID
330            * @param classPK the class p k
331            * @return the matching trash versions
332            * @throws SystemException if a system exception occurred
333            */
334            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByC_C(
335                    long classNameId, long classPK)
336                    throws com.liferay.portal.kernel.exception.SystemException;
337    
338            /**
339            * Returns a range of all the trash versions where classNameId = &#63; and classPK = &#63;.
340            *
341            * <p>
342            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.trash.model.impl.TrashVersionModelImpl}. 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.
343            * </p>
344            *
345            * @param classNameId the class name ID
346            * @param classPK the class p k
347            * @param start the lower bound of the range of trash versions
348            * @param end the upper bound of the range of trash versions (not inclusive)
349            * @return the range of matching trash versions
350            * @throws SystemException if a system exception occurred
351            */
352            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByC_C(
353                    long classNameId, long classPK, int start, int end)
354                    throws com.liferay.portal.kernel.exception.SystemException;
355    
356            /**
357            * Returns an ordered range of all the trash versions where classNameId = &#63; and classPK = &#63;.
358            *
359            * <p>
360            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.trash.model.impl.TrashVersionModelImpl}. 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.
361            * </p>
362            *
363            * @param classNameId the class name ID
364            * @param classPK the class p k
365            * @param start the lower bound of the range of trash versions
366            * @param end the upper bound of the range of trash versions (not inclusive)
367            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
368            * @return the ordered range of matching trash versions
369            * @throws SystemException if a system exception occurred
370            */
371            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findByC_C(
372                    long classNameId, long classPK, int start, int end,
373                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
374                    throws com.liferay.portal.kernel.exception.SystemException;
375    
376            /**
377            * Returns the first trash version in the ordered set where classNameId = &#63; and classPK = &#63;.
378            *
379            * @param classNameId the class name ID
380            * @param classPK the class p k
381            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
382            * @return the first matching trash version
383            * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found
384            * @throws SystemException if a system exception occurred
385            */
386            public com.liferay.portlet.trash.model.TrashVersion findByC_C_First(
387                    long classNameId, long classPK,
388                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
389                    throws com.liferay.portal.kernel.exception.SystemException,
390                            com.liferay.portlet.trash.NoSuchVersionException;
391    
392            /**
393            * Returns the first trash version in the ordered set where classNameId = &#63; and classPK = &#63;.
394            *
395            * @param classNameId the class name ID
396            * @param classPK the class p k
397            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
398            * @return the first matching trash version, or <code>null</code> if a matching trash version could not be found
399            * @throws SystemException if a system exception occurred
400            */
401            public com.liferay.portlet.trash.model.TrashVersion fetchByC_C_First(
402                    long classNameId, long classPK,
403                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
404                    throws com.liferay.portal.kernel.exception.SystemException;
405    
406            /**
407            * Returns the last trash version in the ordered set where classNameId = &#63; and classPK = &#63;.
408            *
409            * @param classNameId the class name ID
410            * @param classPK the class p k
411            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
412            * @return the last matching trash version
413            * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found
414            * @throws SystemException if a system exception occurred
415            */
416            public com.liferay.portlet.trash.model.TrashVersion findByC_C_Last(
417                    long classNameId, long classPK,
418                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
419                    throws com.liferay.portal.kernel.exception.SystemException,
420                            com.liferay.portlet.trash.NoSuchVersionException;
421    
422            /**
423            * Returns the last trash version in the ordered set where classNameId = &#63; and classPK = &#63;.
424            *
425            * @param classNameId the class name ID
426            * @param classPK the class p k
427            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
428            * @return the last matching trash version, or <code>null</code> if a matching trash version could not be found
429            * @throws SystemException if a system exception occurred
430            */
431            public com.liferay.portlet.trash.model.TrashVersion fetchByC_C_Last(
432                    long classNameId, long classPK,
433                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
434                    throws com.liferay.portal.kernel.exception.SystemException;
435    
436            /**
437            * Returns the trash versions before and after the current trash version in the ordered set where classNameId = &#63; and classPK = &#63;.
438            *
439            * @param versionId the primary key of the current trash version
440            * @param classNameId the class name ID
441            * @param classPK the class p k
442            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
443            * @return the previous, current, and next trash version
444            * @throws com.liferay.portlet.trash.NoSuchVersionException if a trash version with the primary key could not be found
445            * @throws SystemException if a system exception occurred
446            */
447            public com.liferay.portlet.trash.model.TrashVersion[] findByC_C_PrevAndNext(
448                    long versionId, long classNameId, long classPK,
449                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
450                    throws com.liferay.portal.kernel.exception.SystemException,
451                            com.liferay.portlet.trash.NoSuchVersionException;
452    
453            /**
454            * Removes all the trash versions where classNameId = &#63; and classPK = &#63; from the database.
455            *
456            * @param classNameId the class name ID
457            * @param classPK the class p k
458            * @throws SystemException if a system exception occurred
459            */
460            public void removeByC_C(long classNameId, long classPK)
461                    throws com.liferay.portal.kernel.exception.SystemException;
462    
463            /**
464            * Returns the number of trash versions where classNameId = &#63; and classPK = &#63;.
465            *
466            * @param classNameId the class name ID
467            * @param classPK the class p k
468            * @return the number of matching trash versions
469            * @throws SystemException if a system exception occurred
470            */
471            public int countByC_C(long classNameId, long classPK)
472                    throws com.liferay.portal.kernel.exception.SystemException;
473    
474            /**
475            * Returns the trash version where entryId = &#63; and classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portlet.trash.NoSuchVersionException} if it could not be found.
476            *
477            * @param entryId the entry ID
478            * @param classNameId the class name ID
479            * @param classPK the class p k
480            * @return the matching trash version
481            * @throws com.liferay.portlet.trash.NoSuchVersionException if a matching trash version could not be found
482            * @throws SystemException if a system exception occurred
483            */
484            public com.liferay.portlet.trash.model.TrashVersion findByE_C_C(
485                    long entryId, long classNameId, long classPK)
486                    throws com.liferay.portal.kernel.exception.SystemException,
487                            com.liferay.portlet.trash.NoSuchVersionException;
488    
489            /**
490            * Returns the trash version where entryId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
491            *
492            * @param entryId the entry ID
493            * @param classNameId the class name ID
494            * @param classPK the class p k
495            * @return the matching trash version, or <code>null</code> if a matching trash version could not be found
496            * @throws SystemException if a system exception occurred
497            */
498            public com.liferay.portlet.trash.model.TrashVersion fetchByE_C_C(
499                    long entryId, long classNameId, long classPK)
500                    throws com.liferay.portal.kernel.exception.SystemException;
501    
502            /**
503            * Returns the trash version where entryId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
504            *
505            * @param entryId the entry ID
506            * @param classNameId the class name ID
507            * @param classPK the class p k
508            * @param retrieveFromCache whether to use the finder cache
509            * @return the matching trash version, or <code>null</code> if a matching trash version could not be found
510            * @throws SystemException if a system exception occurred
511            */
512            public com.liferay.portlet.trash.model.TrashVersion fetchByE_C_C(
513                    long entryId, long classNameId, long classPK, boolean retrieveFromCache)
514                    throws com.liferay.portal.kernel.exception.SystemException;
515    
516            /**
517            * Removes the trash version where entryId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
518            *
519            * @param entryId the entry ID
520            * @param classNameId the class name ID
521            * @param classPK the class p k
522            * @return the trash version that was removed
523            * @throws SystemException if a system exception occurred
524            */
525            public com.liferay.portlet.trash.model.TrashVersion removeByE_C_C(
526                    long entryId, long classNameId, long classPK)
527                    throws com.liferay.portal.kernel.exception.SystemException,
528                            com.liferay.portlet.trash.NoSuchVersionException;
529    
530            /**
531            * Returns the number of trash versions where entryId = &#63; and classNameId = &#63; and classPK = &#63;.
532            *
533            * @param entryId the entry ID
534            * @param classNameId the class name ID
535            * @param classPK the class p k
536            * @return the number of matching trash versions
537            * @throws SystemException if a system exception occurred
538            */
539            public int countByE_C_C(long entryId, long classNameId, long classPK)
540                    throws com.liferay.portal.kernel.exception.SystemException;
541    
542            /**
543            * Caches the trash version in the entity cache if it is enabled.
544            *
545            * @param trashVersion the trash version
546            */
547            public void cacheResult(
548                    com.liferay.portlet.trash.model.TrashVersion trashVersion);
549    
550            /**
551            * Caches the trash versions in the entity cache if it is enabled.
552            *
553            * @param trashVersions the trash versions
554            */
555            public void cacheResult(
556                    java.util.List<com.liferay.portlet.trash.model.TrashVersion> trashVersions);
557    
558            /**
559            * Creates a new trash version with the primary key. Does not add the trash version to the database.
560            *
561            * @param versionId the primary key for the new trash version
562            * @return the new trash version
563            */
564            public com.liferay.portlet.trash.model.TrashVersion create(long versionId);
565    
566            /**
567            * Removes the trash version with the primary key from the database. Also notifies the appropriate model listeners.
568            *
569            * @param versionId the primary key of the trash version
570            * @return the trash version that was removed
571            * @throws com.liferay.portlet.trash.NoSuchVersionException if a trash version with the primary key could not be found
572            * @throws SystemException if a system exception occurred
573            */
574            public com.liferay.portlet.trash.model.TrashVersion remove(long versionId)
575                    throws com.liferay.portal.kernel.exception.SystemException,
576                            com.liferay.portlet.trash.NoSuchVersionException;
577    
578            public com.liferay.portlet.trash.model.TrashVersion updateImpl(
579                    com.liferay.portlet.trash.model.TrashVersion trashVersion)
580                    throws com.liferay.portal.kernel.exception.SystemException;
581    
582            /**
583            * Returns the trash version with the primary key or throws a {@link com.liferay.portlet.trash.NoSuchVersionException} if it could not be found.
584            *
585            * @param versionId the primary key of the trash version
586            * @return the trash version
587            * @throws com.liferay.portlet.trash.NoSuchVersionException if a trash version with the primary key could not be found
588            * @throws SystemException if a system exception occurred
589            */
590            public com.liferay.portlet.trash.model.TrashVersion findByPrimaryKey(
591                    long versionId)
592                    throws com.liferay.portal.kernel.exception.SystemException,
593                            com.liferay.portlet.trash.NoSuchVersionException;
594    
595            /**
596            * Returns the trash version with the primary key or returns <code>null</code> if it could not be found.
597            *
598            * @param versionId the primary key of the trash version
599            * @return the trash version, or <code>null</code> if a trash version with the primary key could not be found
600            * @throws SystemException if a system exception occurred
601            */
602            public com.liferay.portlet.trash.model.TrashVersion fetchByPrimaryKey(
603                    long versionId)
604                    throws com.liferay.portal.kernel.exception.SystemException;
605    
606            /**
607            * Returns all the trash versions.
608            *
609            * @return the trash versions
610            * @throws SystemException if a system exception occurred
611            */
612            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findAll()
613                    throws com.liferay.portal.kernel.exception.SystemException;
614    
615            /**
616            * Returns a range of all the trash versions.
617            *
618            * <p>
619            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.trash.model.impl.TrashVersionModelImpl}. 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.
620            * </p>
621            *
622            * @param start the lower bound of the range of trash versions
623            * @param end the upper bound of the range of trash versions (not inclusive)
624            * @return the range of trash versions
625            * @throws SystemException if a system exception occurred
626            */
627            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findAll(
628                    int start, int end)
629                    throws com.liferay.portal.kernel.exception.SystemException;
630    
631            /**
632            * Returns an ordered range of all the trash versions.
633            *
634            * <p>
635            * 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. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.trash.model.impl.TrashVersionModelImpl}. 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.
636            * </p>
637            *
638            * @param start the lower bound of the range of trash versions
639            * @param end the upper bound of the range of trash versions (not inclusive)
640            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
641            * @return the ordered range of trash versions
642            * @throws SystemException if a system exception occurred
643            */
644            public java.util.List<com.liferay.portlet.trash.model.TrashVersion> findAll(
645                    int start, int end,
646                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
647                    throws com.liferay.portal.kernel.exception.SystemException;
648    
649            /**
650            * Removes all the trash versions from the database.
651            *
652            * @throws SystemException if a system exception occurred
653            */
654            public void removeAll()
655                    throws com.liferay.portal.kernel.exception.SystemException;
656    
657            /**
658            * Returns the number of trash versions.
659            *
660            * @return the number of trash versions
661            * @throws SystemException if a system exception occurred
662            */
663            public int countAll()
664                    throws com.liferay.portal.kernel.exception.SystemException;
665    }