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