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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.exception.SystemException;
022    import com.liferay.portal.kernel.util.OrderByComparator;
023    import com.liferay.portal.kernel.util.ReferenceRegistry;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import com.liferay.portlet.trash.model.TrashEntry;
027    
028    import java.util.List;
029    
030    /**
031     * The persistence utility for the trash entry service. This utility wraps {@link TrashEntryPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
032     *
033     * <p>
034     * Caching information and settings can be found in <code>portal.properties</code>
035     * </p>
036     *
037     * @author Brian Wing Shun Chan
038     * @see TrashEntryPersistence
039     * @see TrashEntryPersistenceImpl
040     * @generated
041     */
042    @ProviderType
043    public class TrashEntryUtil {
044            /*
045             * NOTE FOR DEVELOPERS:
046             *
047             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
048             */
049    
050            /**
051             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
052             */
053            public static void clearCache() {
054                    getPersistence().clearCache();
055            }
056    
057            /**
058             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
059             */
060            public static void clearCache(TrashEntry trashEntry) {
061                    getPersistence().clearCache(trashEntry);
062            }
063    
064            /**
065             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
066             */
067            public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
068                    throws SystemException {
069                    return getPersistence().countWithDynamicQuery(dynamicQuery);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
074             */
075            public static List<TrashEntry> findWithDynamicQuery(
076                    DynamicQuery dynamicQuery) throws SystemException {
077                    return getPersistence().findWithDynamicQuery(dynamicQuery);
078            }
079    
080            /**
081             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
082             */
083            public static List<TrashEntry> findWithDynamicQuery(
084                    DynamicQuery dynamicQuery, int start, int end)
085                    throws SystemException {
086                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
087            }
088    
089            /**
090             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
091             */
092            public static List<TrashEntry> findWithDynamicQuery(
093                    DynamicQuery dynamicQuery, int start, int end,
094                    OrderByComparator orderByComparator) throws SystemException {
095                    return getPersistence()
096                                       .findWithDynamicQuery(dynamicQuery, start, end,
097                            orderByComparator);
098            }
099    
100            /**
101             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
102             */
103            public static TrashEntry update(TrashEntry trashEntry)
104                    throws SystemException {
105                    return getPersistence().update(trashEntry);
106            }
107    
108            /**
109             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
110             */
111            public static TrashEntry update(TrashEntry trashEntry,
112                    ServiceContext serviceContext) throws SystemException {
113                    return getPersistence().update(trashEntry, serviceContext);
114            }
115    
116            /**
117            * Returns all the trash entries where groupId = &#63;.
118            *
119            * @param groupId the group ID
120            * @return the matching trash entries
121            * @throws SystemException if a system exception occurred
122            */
123            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByGroupId(
124                    long groupId)
125                    throws com.liferay.portal.kernel.exception.SystemException {
126                    return getPersistence().findByGroupId(groupId);
127            }
128    
129            /**
130            * Returns a range of all the trash entries where groupId = &#63;.
131            *
132            * <p>
133            * 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.TrashEntryModelImpl}. 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.
134            * </p>
135            *
136            * @param groupId the group ID
137            * @param start the lower bound of the range of trash entries
138            * @param end the upper bound of the range of trash entries (not inclusive)
139            * @return the range of matching trash entries
140            * @throws SystemException if a system exception occurred
141            */
142            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByGroupId(
143                    long groupId, int start, int end)
144                    throws com.liferay.portal.kernel.exception.SystemException {
145                    return getPersistence().findByGroupId(groupId, start, end);
146            }
147    
148            /**
149            * Returns an ordered range of all the trash entries where groupId = &#63;.
150            *
151            * <p>
152            * 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.TrashEntryModelImpl}. 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.
153            * </p>
154            *
155            * @param groupId the group ID
156            * @param start the lower bound of the range of trash entries
157            * @param end the upper bound of the range of trash entries (not inclusive)
158            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
159            * @return the ordered range of matching trash entries
160            * @throws SystemException if a system exception occurred
161            */
162            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByGroupId(
163                    long groupId, int start, int end,
164                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence()
167                                       .findByGroupId(groupId, start, end, orderByComparator);
168            }
169    
170            /**
171            * Returns the first trash entry in the ordered set where groupId = &#63;.
172            *
173            * @param groupId the group ID
174            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
175            * @return the first matching trash entry
176            * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found
177            * @throws SystemException if a system exception occurred
178            */
179            public static com.liferay.portlet.trash.model.TrashEntry findByGroupId_First(
180                    long groupId,
181                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
182                    throws com.liferay.portal.kernel.exception.SystemException,
183                            com.liferay.portlet.trash.NoSuchEntryException {
184                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
185            }
186    
187            /**
188            * Returns the first trash entry in the ordered set where groupId = &#63;.
189            *
190            * @param groupId the group ID
191            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
192            * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found
193            * @throws SystemException if a system exception occurred
194            */
195            public static com.liferay.portlet.trash.model.TrashEntry fetchByGroupId_First(
196                    long groupId,
197                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
200            }
201    
202            /**
203            * Returns the last trash entry in the ordered set where groupId = &#63;.
204            *
205            * @param groupId the group ID
206            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
207            * @return the last matching trash entry
208            * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found
209            * @throws SystemException if a system exception occurred
210            */
211            public static com.liferay.portlet.trash.model.TrashEntry findByGroupId_Last(
212                    long groupId,
213                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214                    throws com.liferay.portal.kernel.exception.SystemException,
215                            com.liferay.portlet.trash.NoSuchEntryException {
216                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
217            }
218    
219            /**
220            * Returns the last trash entry in the ordered set where groupId = &#63;.
221            *
222            * @param groupId the group ID
223            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
224            * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found
225            * @throws SystemException if a system exception occurred
226            */
227            public static com.liferay.portlet.trash.model.TrashEntry fetchByGroupId_Last(
228                    long groupId,
229                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
232            }
233    
234            /**
235            * Returns the trash entries before and after the current trash entry in the ordered set where groupId = &#63;.
236            *
237            * @param entryId the primary key of the current trash entry
238            * @param groupId the group ID
239            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
240            * @return the previous, current, and next trash entry
241            * @throws com.liferay.portlet.trash.NoSuchEntryException if a trash entry with the primary key could not be found
242            * @throws SystemException if a system exception occurred
243            */
244            public static com.liferay.portlet.trash.model.TrashEntry[] findByGroupId_PrevAndNext(
245                    long entryId, long groupId,
246                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
247                    throws com.liferay.portal.kernel.exception.SystemException,
248                            com.liferay.portlet.trash.NoSuchEntryException {
249                    return getPersistence()
250                                       .findByGroupId_PrevAndNext(entryId, groupId,
251                            orderByComparator);
252            }
253    
254            /**
255            * Removes all the trash entries where groupId = &#63; from the database.
256            *
257            * @param groupId the group ID
258            * @throws SystemException if a system exception occurred
259            */
260            public static void removeByGroupId(long groupId)
261                    throws com.liferay.portal.kernel.exception.SystemException {
262                    getPersistence().removeByGroupId(groupId);
263            }
264    
265            /**
266            * Returns the number of trash entries where groupId = &#63;.
267            *
268            * @param groupId the group ID
269            * @return the number of matching trash entries
270            * @throws SystemException if a system exception occurred
271            */
272            public static int countByGroupId(long groupId)
273                    throws com.liferay.portal.kernel.exception.SystemException {
274                    return getPersistence().countByGroupId(groupId);
275            }
276    
277            /**
278            * Returns all the trash entries where companyId = &#63;.
279            *
280            * @param companyId the company ID
281            * @return the matching trash entries
282            * @throws SystemException if a system exception occurred
283            */
284            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByCompanyId(
285                    long companyId)
286                    throws com.liferay.portal.kernel.exception.SystemException {
287                    return getPersistence().findByCompanyId(companyId);
288            }
289    
290            /**
291            * Returns a range of all the trash entries where companyId = &#63;.
292            *
293            * <p>
294            * 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.TrashEntryModelImpl}. 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.
295            * </p>
296            *
297            * @param companyId the company ID
298            * @param start the lower bound of the range of trash entries
299            * @param end the upper bound of the range of trash entries (not inclusive)
300            * @return the range of matching trash entries
301            * @throws SystemException if a system exception occurred
302            */
303            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByCompanyId(
304                    long companyId, int start, int end)
305                    throws com.liferay.portal.kernel.exception.SystemException {
306                    return getPersistence().findByCompanyId(companyId, start, end);
307            }
308    
309            /**
310            * Returns an ordered range of all the trash entries where companyId = &#63;.
311            *
312            * <p>
313            * 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.TrashEntryModelImpl}. 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.
314            * </p>
315            *
316            * @param companyId the company ID
317            * @param start the lower bound of the range of trash entries
318            * @param end the upper bound of the range of trash entries (not inclusive)
319            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
320            * @return the ordered range of matching trash entries
321            * @throws SystemException if a system exception occurred
322            */
323            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByCompanyId(
324                    long companyId, int start, int end,
325                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
326                    throws com.liferay.portal.kernel.exception.SystemException {
327                    return getPersistence()
328                                       .findByCompanyId(companyId, start, end, orderByComparator);
329            }
330    
331            /**
332            * Returns the first trash entry in the ordered set where companyId = &#63;.
333            *
334            * @param companyId the company ID
335            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
336            * @return the first matching trash entry
337            * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found
338            * @throws SystemException if a system exception occurred
339            */
340            public static com.liferay.portlet.trash.model.TrashEntry findByCompanyId_First(
341                    long companyId,
342                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
343                    throws com.liferay.portal.kernel.exception.SystemException,
344                            com.liferay.portlet.trash.NoSuchEntryException {
345                    return getPersistence()
346                                       .findByCompanyId_First(companyId, orderByComparator);
347            }
348    
349            /**
350            * Returns the first trash entry in the ordered set where companyId = &#63;.
351            *
352            * @param companyId the company ID
353            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
354            * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found
355            * @throws SystemException if a system exception occurred
356            */
357            public static com.liferay.portlet.trash.model.TrashEntry fetchByCompanyId_First(
358                    long companyId,
359                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence()
362                                       .fetchByCompanyId_First(companyId, orderByComparator);
363            }
364    
365            /**
366            * Returns the last trash entry in the ordered set where companyId = &#63;.
367            *
368            * @param companyId the company ID
369            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
370            * @return the last matching trash entry
371            * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found
372            * @throws SystemException if a system exception occurred
373            */
374            public static com.liferay.portlet.trash.model.TrashEntry findByCompanyId_Last(
375                    long companyId,
376                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
377                    throws com.liferay.portal.kernel.exception.SystemException,
378                            com.liferay.portlet.trash.NoSuchEntryException {
379                    return getPersistence()
380                                       .findByCompanyId_Last(companyId, orderByComparator);
381            }
382    
383            /**
384            * Returns the last trash entry in the ordered set where companyId = &#63;.
385            *
386            * @param companyId the company ID
387            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
388            * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found
389            * @throws SystemException if a system exception occurred
390            */
391            public static com.liferay.portlet.trash.model.TrashEntry fetchByCompanyId_Last(
392                    long companyId,
393                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
394                    throws com.liferay.portal.kernel.exception.SystemException {
395                    return getPersistence()
396                                       .fetchByCompanyId_Last(companyId, orderByComparator);
397            }
398    
399            /**
400            * Returns the trash entries before and after the current trash entry in the ordered set where companyId = &#63;.
401            *
402            * @param entryId the primary key of the current trash entry
403            * @param companyId the company ID
404            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
405            * @return the previous, current, and next trash entry
406            * @throws com.liferay.portlet.trash.NoSuchEntryException if a trash entry with the primary key could not be found
407            * @throws SystemException if a system exception occurred
408            */
409            public static com.liferay.portlet.trash.model.TrashEntry[] findByCompanyId_PrevAndNext(
410                    long entryId, long companyId,
411                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
412                    throws com.liferay.portal.kernel.exception.SystemException,
413                            com.liferay.portlet.trash.NoSuchEntryException {
414                    return getPersistence()
415                                       .findByCompanyId_PrevAndNext(entryId, companyId,
416                            orderByComparator);
417            }
418    
419            /**
420            * Removes all the trash entries where companyId = &#63; from the database.
421            *
422            * @param companyId the company ID
423            * @throws SystemException if a system exception occurred
424            */
425            public static void removeByCompanyId(long companyId)
426                    throws com.liferay.portal.kernel.exception.SystemException {
427                    getPersistence().removeByCompanyId(companyId);
428            }
429    
430            /**
431            * Returns the number of trash entries where companyId = &#63;.
432            *
433            * @param companyId the company ID
434            * @return the number of matching trash entries
435            * @throws SystemException if a system exception occurred
436            */
437            public static int countByCompanyId(long companyId)
438                    throws com.liferay.portal.kernel.exception.SystemException {
439                    return getPersistence().countByCompanyId(companyId);
440            }
441    
442            /**
443            * Returns all the trash entries where groupId = &#63; and createDate &lt; &#63;.
444            *
445            * @param groupId the group ID
446            * @param createDate the create date
447            * @return the matching trash entries
448            * @throws SystemException if a system exception occurred
449            */
450            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByG_LtCD(
451                    long groupId, java.util.Date createDate)
452                    throws com.liferay.portal.kernel.exception.SystemException {
453                    return getPersistence().findByG_LtCD(groupId, createDate);
454            }
455    
456            /**
457            * Returns a range of all the trash entries where groupId = &#63; and createDate &lt; &#63;.
458            *
459            * <p>
460            * 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.TrashEntryModelImpl}. 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.
461            * </p>
462            *
463            * @param groupId the group ID
464            * @param createDate the create date
465            * @param start the lower bound of the range of trash entries
466            * @param end the upper bound of the range of trash entries (not inclusive)
467            * @return the range of matching trash entries
468            * @throws SystemException if a system exception occurred
469            */
470            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByG_LtCD(
471                    long groupId, java.util.Date createDate, int start, int end)
472                    throws com.liferay.portal.kernel.exception.SystemException {
473                    return getPersistence().findByG_LtCD(groupId, createDate, start, end);
474            }
475    
476            /**
477            * Returns an ordered range of all the trash entries where groupId = &#63; and createDate &lt; &#63;.
478            *
479            * <p>
480            * 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.TrashEntryModelImpl}. 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.
481            * </p>
482            *
483            * @param groupId the group ID
484            * @param createDate the create date
485            * @param start the lower bound of the range of trash entries
486            * @param end the upper bound of the range of trash entries (not inclusive)
487            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
488            * @return the ordered range of matching trash entries
489            * @throws SystemException if a system exception occurred
490            */
491            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByG_LtCD(
492                    long groupId, java.util.Date createDate, int start, int end,
493                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
494                    throws com.liferay.portal.kernel.exception.SystemException {
495                    return getPersistence()
496                                       .findByG_LtCD(groupId, createDate, start, end,
497                            orderByComparator);
498            }
499    
500            /**
501            * Returns the first trash entry in the ordered set where groupId = &#63; and createDate &lt; &#63;.
502            *
503            * @param groupId the group ID
504            * @param createDate the create date
505            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
506            * @return the first matching trash entry
507            * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found
508            * @throws SystemException if a system exception occurred
509            */
510            public static com.liferay.portlet.trash.model.TrashEntry findByG_LtCD_First(
511                    long groupId, java.util.Date createDate,
512                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
513                    throws com.liferay.portal.kernel.exception.SystemException,
514                            com.liferay.portlet.trash.NoSuchEntryException {
515                    return getPersistence()
516                                       .findByG_LtCD_First(groupId, createDate, orderByComparator);
517            }
518    
519            /**
520            * Returns the first trash entry in the ordered set where groupId = &#63; and createDate &lt; &#63;.
521            *
522            * @param groupId the group ID
523            * @param createDate the create date
524            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
525            * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found
526            * @throws SystemException if a system exception occurred
527            */
528            public static com.liferay.portlet.trash.model.TrashEntry fetchByG_LtCD_First(
529                    long groupId, java.util.Date createDate,
530                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
531                    throws com.liferay.portal.kernel.exception.SystemException {
532                    return getPersistence()
533                                       .fetchByG_LtCD_First(groupId, createDate, orderByComparator);
534            }
535    
536            /**
537            * Returns the last trash entry in the ordered set where groupId = &#63; and createDate &lt; &#63;.
538            *
539            * @param groupId the group ID
540            * @param createDate the create date
541            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
542            * @return the last matching trash entry
543            * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found
544            * @throws SystemException if a system exception occurred
545            */
546            public static com.liferay.portlet.trash.model.TrashEntry findByG_LtCD_Last(
547                    long groupId, java.util.Date createDate,
548                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
549                    throws com.liferay.portal.kernel.exception.SystemException,
550                            com.liferay.portlet.trash.NoSuchEntryException {
551                    return getPersistence()
552                                       .findByG_LtCD_Last(groupId, createDate, orderByComparator);
553            }
554    
555            /**
556            * Returns the last trash entry in the ordered set where groupId = &#63; and createDate &lt; &#63;.
557            *
558            * @param groupId the group ID
559            * @param createDate the create date
560            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
561            * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found
562            * @throws SystemException if a system exception occurred
563            */
564            public static com.liferay.portlet.trash.model.TrashEntry fetchByG_LtCD_Last(
565                    long groupId, java.util.Date createDate,
566                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
567                    throws com.liferay.portal.kernel.exception.SystemException {
568                    return getPersistence()
569                                       .fetchByG_LtCD_Last(groupId, createDate, orderByComparator);
570            }
571    
572            /**
573            * Returns the trash entries before and after the current trash entry in the ordered set where groupId = &#63; and createDate &lt; &#63;.
574            *
575            * @param entryId the primary key of the current trash entry
576            * @param groupId the group ID
577            * @param createDate the create date
578            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
579            * @return the previous, current, and next trash entry
580            * @throws com.liferay.portlet.trash.NoSuchEntryException if a trash entry with the primary key could not be found
581            * @throws SystemException if a system exception occurred
582            */
583            public static com.liferay.portlet.trash.model.TrashEntry[] findByG_LtCD_PrevAndNext(
584                    long entryId, long groupId, java.util.Date createDate,
585                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
586                    throws com.liferay.portal.kernel.exception.SystemException,
587                            com.liferay.portlet.trash.NoSuchEntryException {
588                    return getPersistence()
589                                       .findByG_LtCD_PrevAndNext(entryId, groupId, createDate,
590                            orderByComparator);
591            }
592    
593            /**
594            * Removes all the trash entries where groupId = &#63; and createDate &lt; &#63; from the database.
595            *
596            * @param groupId the group ID
597            * @param createDate the create date
598            * @throws SystemException if a system exception occurred
599            */
600            public static void removeByG_LtCD(long groupId, java.util.Date createDate)
601                    throws com.liferay.portal.kernel.exception.SystemException {
602                    getPersistence().removeByG_LtCD(groupId, createDate);
603            }
604    
605            /**
606            * Returns the number of trash entries where groupId = &#63; and createDate &lt; &#63;.
607            *
608            * @param groupId the group ID
609            * @param createDate the create date
610            * @return the number of matching trash entries
611            * @throws SystemException if a system exception occurred
612            */
613            public static int countByG_LtCD(long groupId, java.util.Date createDate)
614                    throws com.liferay.portal.kernel.exception.SystemException {
615                    return getPersistence().countByG_LtCD(groupId, createDate);
616            }
617    
618            /**
619            * Returns all the trash entries where groupId = &#63; and classNameId = &#63;.
620            *
621            * @param groupId the group ID
622            * @param classNameId the class name ID
623            * @return the matching trash entries
624            * @throws SystemException if a system exception occurred
625            */
626            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByG_C(
627                    long groupId, long classNameId)
628                    throws com.liferay.portal.kernel.exception.SystemException {
629                    return getPersistence().findByG_C(groupId, classNameId);
630            }
631    
632            /**
633            * Returns a range of all the trash entries where groupId = &#63; and classNameId = &#63;.
634            *
635            * <p>
636            * 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.TrashEntryModelImpl}. 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.
637            * </p>
638            *
639            * @param groupId the group ID
640            * @param classNameId the class name ID
641            * @param start the lower bound of the range of trash entries
642            * @param end the upper bound of the range of trash entries (not inclusive)
643            * @return the range of matching trash entries
644            * @throws SystemException if a system exception occurred
645            */
646            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByG_C(
647                    long groupId, long classNameId, int start, int end)
648                    throws com.liferay.portal.kernel.exception.SystemException {
649                    return getPersistence().findByG_C(groupId, classNameId, start, end);
650            }
651    
652            /**
653            * Returns an ordered range of all the trash entries where groupId = &#63; and classNameId = &#63;.
654            *
655            * <p>
656            * 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.TrashEntryModelImpl}. 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.
657            * </p>
658            *
659            * @param groupId the group ID
660            * @param classNameId the class name ID
661            * @param start the lower bound of the range of trash entries
662            * @param end the upper bound of the range of trash entries (not inclusive)
663            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
664            * @return the ordered range of matching trash entries
665            * @throws SystemException if a system exception occurred
666            */
667            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findByG_C(
668                    long groupId, long classNameId, int start, int end,
669                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
670                    throws com.liferay.portal.kernel.exception.SystemException {
671                    return getPersistence()
672                                       .findByG_C(groupId, classNameId, start, end,
673                            orderByComparator);
674            }
675    
676            /**
677            * Returns the first trash entry in the ordered set where groupId = &#63; and classNameId = &#63;.
678            *
679            * @param groupId the group ID
680            * @param classNameId the class name ID
681            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
682            * @return the first matching trash entry
683            * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found
684            * @throws SystemException if a system exception occurred
685            */
686            public static com.liferay.portlet.trash.model.TrashEntry findByG_C_First(
687                    long groupId, long classNameId,
688                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
689                    throws com.liferay.portal.kernel.exception.SystemException,
690                            com.liferay.portlet.trash.NoSuchEntryException {
691                    return getPersistence()
692                                       .findByG_C_First(groupId, classNameId, orderByComparator);
693            }
694    
695            /**
696            * Returns the first trash entry in the ordered set where groupId = &#63; and classNameId = &#63;.
697            *
698            * @param groupId the group ID
699            * @param classNameId the class name ID
700            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
701            * @return the first matching trash entry, or <code>null</code> if a matching trash entry could not be found
702            * @throws SystemException if a system exception occurred
703            */
704            public static com.liferay.portlet.trash.model.TrashEntry fetchByG_C_First(
705                    long groupId, long classNameId,
706                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
707                    throws com.liferay.portal.kernel.exception.SystemException {
708                    return getPersistence()
709                                       .fetchByG_C_First(groupId, classNameId, orderByComparator);
710            }
711    
712            /**
713            * Returns the last trash entry in the ordered set where groupId = &#63; and classNameId = &#63;.
714            *
715            * @param groupId the group ID
716            * @param classNameId the class name ID
717            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
718            * @return the last matching trash entry
719            * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found
720            * @throws SystemException if a system exception occurred
721            */
722            public static com.liferay.portlet.trash.model.TrashEntry findByG_C_Last(
723                    long groupId, long classNameId,
724                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
725                    throws com.liferay.portal.kernel.exception.SystemException,
726                            com.liferay.portlet.trash.NoSuchEntryException {
727                    return getPersistence()
728                                       .findByG_C_Last(groupId, classNameId, orderByComparator);
729            }
730    
731            /**
732            * Returns the last trash entry in the ordered set where groupId = &#63; and classNameId = &#63;.
733            *
734            * @param groupId the group ID
735            * @param classNameId the class name ID
736            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
737            * @return the last matching trash entry, or <code>null</code> if a matching trash entry could not be found
738            * @throws SystemException if a system exception occurred
739            */
740            public static com.liferay.portlet.trash.model.TrashEntry fetchByG_C_Last(
741                    long groupId, long classNameId,
742                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
743                    throws com.liferay.portal.kernel.exception.SystemException {
744                    return getPersistence()
745                                       .fetchByG_C_Last(groupId, classNameId, orderByComparator);
746            }
747    
748            /**
749            * Returns the trash entries before and after the current trash entry in the ordered set where groupId = &#63; and classNameId = &#63;.
750            *
751            * @param entryId the primary key of the current trash entry
752            * @param groupId the group ID
753            * @param classNameId the class name ID
754            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
755            * @return the previous, current, and next trash entry
756            * @throws com.liferay.portlet.trash.NoSuchEntryException if a trash entry with the primary key could not be found
757            * @throws SystemException if a system exception occurred
758            */
759            public static com.liferay.portlet.trash.model.TrashEntry[] findByG_C_PrevAndNext(
760                    long entryId, long groupId, long classNameId,
761                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
762                    throws com.liferay.portal.kernel.exception.SystemException,
763                            com.liferay.portlet.trash.NoSuchEntryException {
764                    return getPersistence()
765                                       .findByG_C_PrevAndNext(entryId, groupId, classNameId,
766                            orderByComparator);
767            }
768    
769            /**
770            * Removes all the trash entries where groupId = &#63; and classNameId = &#63; from the database.
771            *
772            * @param groupId the group ID
773            * @param classNameId the class name ID
774            * @throws SystemException if a system exception occurred
775            */
776            public static void removeByG_C(long groupId, long classNameId)
777                    throws com.liferay.portal.kernel.exception.SystemException {
778                    getPersistence().removeByG_C(groupId, classNameId);
779            }
780    
781            /**
782            * Returns the number of trash entries where groupId = &#63; and classNameId = &#63;.
783            *
784            * @param groupId the group ID
785            * @param classNameId the class name ID
786            * @return the number of matching trash entries
787            * @throws SystemException if a system exception occurred
788            */
789            public static int countByG_C(long groupId, long classNameId)
790                    throws com.liferay.portal.kernel.exception.SystemException {
791                    return getPersistence().countByG_C(groupId, classNameId);
792            }
793    
794            /**
795            * 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.
796            *
797            * @param classNameId the class name ID
798            * @param classPK the class p k
799            * @return the matching trash entry
800            * @throws com.liferay.portlet.trash.NoSuchEntryException if a matching trash entry could not be found
801            * @throws SystemException if a system exception occurred
802            */
803            public static com.liferay.portlet.trash.model.TrashEntry findByC_C(
804                    long classNameId, long classPK)
805                    throws com.liferay.portal.kernel.exception.SystemException,
806                            com.liferay.portlet.trash.NoSuchEntryException {
807                    return getPersistence().findByC_C(classNameId, classPK);
808            }
809    
810            /**
811            * 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.
812            *
813            * @param classNameId the class name ID
814            * @param classPK the class p k
815            * @return the matching trash entry, or <code>null</code> if a matching trash entry could not be found
816            * @throws SystemException if a system exception occurred
817            */
818            public static com.liferay.portlet.trash.model.TrashEntry fetchByC_C(
819                    long classNameId, long classPK)
820                    throws com.liferay.portal.kernel.exception.SystemException {
821                    return getPersistence().fetchByC_C(classNameId, classPK);
822            }
823    
824            /**
825            * 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.
826            *
827            * @param classNameId the class name ID
828            * @param classPK the class p k
829            * @param retrieveFromCache whether to use the finder cache
830            * @return the matching trash entry, or <code>null</code> if a matching trash entry could not be found
831            * @throws SystemException if a system exception occurred
832            */
833            public static com.liferay.portlet.trash.model.TrashEntry fetchByC_C(
834                    long classNameId, long classPK, boolean retrieveFromCache)
835                    throws com.liferay.portal.kernel.exception.SystemException {
836                    return getPersistence()
837                                       .fetchByC_C(classNameId, classPK, retrieveFromCache);
838            }
839    
840            /**
841            * Removes the trash entry where classNameId = &#63; and classPK = &#63; from the database.
842            *
843            * @param classNameId the class name ID
844            * @param classPK the class p k
845            * @return the trash entry that was removed
846            * @throws SystemException if a system exception occurred
847            */
848            public static com.liferay.portlet.trash.model.TrashEntry removeByC_C(
849                    long classNameId, long classPK)
850                    throws com.liferay.portal.kernel.exception.SystemException,
851                            com.liferay.portlet.trash.NoSuchEntryException {
852                    return getPersistence().removeByC_C(classNameId, classPK);
853            }
854    
855            /**
856            * Returns the number of trash entries where classNameId = &#63; and classPK = &#63;.
857            *
858            * @param classNameId the class name ID
859            * @param classPK the class p k
860            * @return the number of matching trash entries
861            * @throws SystemException if a system exception occurred
862            */
863            public static int countByC_C(long classNameId, long classPK)
864                    throws com.liferay.portal.kernel.exception.SystemException {
865                    return getPersistence().countByC_C(classNameId, classPK);
866            }
867    
868            /**
869            * Caches the trash entry in the entity cache if it is enabled.
870            *
871            * @param trashEntry the trash entry
872            */
873            public static void cacheResult(
874                    com.liferay.portlet.trash.model.TrashEntry trashEntry) {
875                    getPersistence().cacheResult(trashEntry);
876            }
877    
878            /**
879            * Caches the trash entries in the entity cache if it is enabled.
880            *
881            * @param trashEntries the trash entries
882            */
883            public static void cacheResult(
884                    java.util.List<com.liferay.portlet.trash.model.TrashEntry> trashEntries) {
885                    getPersistence().cacheResult(trashEntries);
886            }
887    
888            /**
889            * Creates a new trash entry with the primary key. Does not add the trash entry to the database.
890            *
891            * @param entryId the primary key for the new trash entry
892            * @return the new trash entry
893            */
894            public static com.liferay.portlet.trash.model.TrashEntry create(
895                    long entryId) {
896                    return getPersistence().create(entryId);
897            }
898    
899            /**
900            * Removes the trash entry with the primary key from the database. Also notifies the appropriate model listeners.
901            *
902            * @param entryId the primary key of the trash entry
903            * @return the trash entry that was removed
904            * @throws com.liferay.portlet.trash.NoSuchEntryException if a trash entry with the primary key could not be found
905            * @throws SystemException if a system exception occurred
906            */
907            public static com.liferay.portlet.trash.model.TrashEntry remove(
908                    long entryId)
909                    throws com.liferay.portal.kernel.exception.SystemException,
910                            com.liferay.portlet.trash.NoSuchEntryException {
911                    return getPersistence().remove(entryId);
912            }
913    
914            public static com.liferay.portlet.trash.model.TrashEntry updateImpl(
915                    com.liferay.portlet.trash.model.TrashEntry trashEntry)
916                    throws com.liferay.portal.kernel.exception.SystemException {
917                    return getPersistence().updateImpl(trashEntry);
918            }
919    
920            /**
921            * Returns the trash entry with the primary key or throws a {@link com.liferay.portlet.trash.NoSuchEntryException} if it could not be found.
922            *
923            * @param entryId the primary key of the trash entry
924            * @return the trash entry
925            * @throws com.liferay.portlet.trash.NoSuchEntryException if a trash entry with the primary key could not be found
926            * @throws SystemException if a system exception occurred
927            */
928            public static com.liferay.portlet.trash.model.TrashEntry findByPrimaryKey(
929                    long entryId)
930                    throws com.liferay.portal.kernel.exception.SystemException,
931                            com.liferay.portlet.trash.NoSuchEntryException {
932                    return getPersistence().findByPrimaryKey(entryId);
933            }
934    
935            /**
936            * Returns the trash entry with the primary key or returns <code>null</code> if it could not be found.
937            *
938            * @param entryId the primary key of the trash entry
939            * @return the trash entry, or <code>null</code> if a trash entry with the primary key could not be found
940            * @throws SystemException if a system exception occurred
941            */
942            public static com.liferay.portlet.trash.model.TrashEntry fetchByPrimaryKey(
943                    long entryId)
944                    throws com.liferay.portal.kernel.exception.SystemException {
945                    return getPersistence().fetchByPrimaryKey(entryId);
946            }
947    
948            /**
949            * Returns all the trash entries.
950            *
951            * @return the trash entries
952            * @throws SystemException if a system exception occurred
953            */
954            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findAll()
955                    throws com.liferay.portal.kernel.exception.SystemException {
956                    return getPersistence().findAll();
957            }
958    
959            /**
960            * Returns a range of all the trash entries.
961            *
962            * <p>
963            * 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.TrashEntryModelImpl}. 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.
964            * </p>
965            *
966            * @param start the lower bound of the range of trash entries
967            * @param end the upper bound of the range of trash entries (not inclusive)
968            * @return the range of trash entries
969            * @throws SystemException if a system exception occurred
970            */
971            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findAll(
972                    int start, int end)
973                    throws com.liferay.portal.kernel.exception.SystemException {
974                    return getPersistence().findAll(start, end);
975            }
976    
977            /**
978            * Returns an ordered range of all the trash entries.
979            *
980            * <p>
981            * 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.TrashEntryModelImpl}. 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.
982            * </p>
983            *
984            * @param start the lower bound of the range of trash entries
985            * @param end the upper bound of the range of trash entries (not inclusive)
986            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
987            * @return the ordered range of trash entries
988            * @throws SystemException if a system exception occurred
989            */
990            public static java.util.List<com.liferay.portlet.trash.model.TrashEntry> findAll(
991                    int start, int end,
992                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
993                    throws com.liferay.portal.kernel.exception.SystemException {
994                    return getPersistence().findAll(start, end, orderByComparator);
995            }
996    
997            /**
998            * Removes all the trash entries from the database.
999            *
1000            * @throws SystemException if a system exception occurred
1001            */
1002            public static void removeAll()
1003                    throws com.liferay.portal.kernel.exception.SystemException {
1004                    getPersistence().removeAll();
1005            }
1006    
1007            /**
1008            * Returns the number of trash entries.
1009            *
1010            * @return the number of trash entries
1011            * @throws SystemException if a system exception occurred
1012            */
1013            public static int countAll()
1014                    throws com.liferay.portal.kernel.exception.SystemException {
1015                    return getPersistence().countAll();
1016            }
1017    
1018            public static TrashEntryPersistence getPersistence() {
1019                    if (_persistence == null) {
1020                            _persistence = (TrashEntryPersistence)PortalBeanLocatorUtil.locate(TrashEntryPersistence.class.getName());
1021    
1022                            ReferenceRegistry.registerReference(TrashEntryUtil.class,
1023                                    "_persistence");
1024                    }
1025    
1026                    return _persistence;
1027            }
1028    
1029            /**
1030             * @deprecated As of 6.2.0
1031             */
1032            public void setPersistence(TrashEntryPersistence persistence) {
1033            }
1034    
1035            private static TrashEntryPersistence _persistence;
1036    }