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