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