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.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.exception.SystemException;
022    import com.liferay.portal.kernel.util.OrderByComparator;
023    import com.liferay.portal.kernel.util.ReferenceRegistry;
024    import com.liferay.portal.model.UserNotificationDelivery;
025    import com.liferay.portal.service.ServiceContext;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the user notification delivery service. This utility wraps {@link UserNotificationDeliveryPersistenceImpl} 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.
031     *
032     * <p>
033     * Caching information and settings can be found in <code>portal.properties</code>
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see UserNotificationDeliveryPersistence
038     * @see UserNotificationDeliveryPersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class UserNotificationDeliveryUtil {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
047             */
048    
049            /**
050             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
051             */
052            public static void clearCache() {
053                    getPersistence().clearCache();
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
058             */
059            public static void clearCache(
060                    UserNotificationDelivery userNotificationDelivery) {
061                    getPersistence().clearCache(userNotificationDelivery);
062            }
063    
064            /**
065             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
066             */
067            public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
068                    throws SystemException {
069                    return getPersistence().countWithDynamicQuery(dynamicQuery);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
074             */
075            public static List<UserNotificationDelivery> findWithDynamicQuery(
076                    DynamicQuery dynamicQuery) throws SystemException {
077                    return getPersistence().findWithDynamicQuery(dynamicQuery);
078            }
079    
080            /**
081             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
082             */
083            public static List<UserNotificationDelivery> findWithDynamicQuery(
084                    DynamicQuery dynamicQuery, int start, int end)
085                    throws SystemException {
086                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
087            }
088    
089            /**
090             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
091             */
092            public static List<UserNotificationDelivery> findWithDynamicQuery(
093                    DynamicQuery dynamicQuery, int start, int end,
094                    OrderByComparator orderByComparator) throws SystemException {
095                    return getPersistence()
096                                       .findWithDynamicQuery(dynamicQuery, start, end,
097                            orderByComparator);
098            }
099    
100            /**
101             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
102             */
103            public static UserNotificationDelivery update(
104                    UserNotificationDelivery userNotificationDelivery)
105                    throws SystemException {
106                    return getPersistence().update(userNotificationDelivery);
107            }
108    
109            /**
110             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
111             */
112            public static UserNotificationDelivery update(
113                    UserNotificationDelivery userNotificationDelivery,
114                    ServiceContext serviceContext) throws SystemException {
115                    return getPersistence().update(userNotificationDelivery, serviceContext);
116            }
117    
118            /**
119            * Returns all the user notification deliveries where userId = &#63;.
120            *
121            * @param userId the user ID
122            * @return the matching user notification deliveries
123            * @throws SystemException if a system exception occurred
124            */
125            public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId(
126                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
127                    return getPersistence().findByUserId(userId);
128            }
129    
130            /**
131            * Returns a range of all the user notification deliveries where userId = &#63;.
132            *
133            * <p>
134            * 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.portal.model.impl.UserNotificationDeliveryModelImpl}. 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.
135            * </p>
136            *
137            * @param userId the user ID
138            * @param start the lower bound of the range of user notification deliveries
139            * @param end the upper bound of the range of user notification deliveries (not inclusive)
140            * @return the range of matching user notification deliveries
141            * @throws SystemException if a system exception occurred
142            */
143            public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId(
144                    long userId, int start, int end)
145                    throws com.liferay.portal.kernel.exception.SystemException {
146                    return getPersistence().findByUserId(userId, start, end);
147            }
148    
149            /**
150            * Returns an ordered range of all the user notification deliveries where userId = &#63;.
151            *
152            * <p>
153            * 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.portal.model.impl.UserNotificationDeliveryModelImpl}. 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.
154            * </p>
155            *
156            * @param userId the user ID
157            * @param start the lower bound of the range of user notification deliveries
158            * @param end the upper bound of the range of user notification deliveries (not inclusive)
159            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
160            * @return the ordered range of matching user notification deliveries
161            * @throws SystemException if a system exception occurred
162            */
163            public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId(
164                    long userId, int start, int end,
165                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166                    throws com.liferay.portal.kernel.exception.SystemException {
167                    return getPersistence()
168                                       .findByUserId(userId, start, end, orderByComparator);
169            }
170    
171            /**
172            * Returns the first user notification delivery in the ordered set where userId = &#63;.
173            *
174            * @param userId the user ID
175            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
176            * @return the first matching user notification delivery
177            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found
178            * @throws SystemException if a system exception occurred
179            */
180            public static com.liferay.portal.model.UserNotificationDelivery findByUserId_First(
181                    long userId,
182                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
183                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
184                            com.liferay.portal.kernel.exception.SystemException {
185                    return getPersistence().findByUserId_First(userId, orderByComparator);
186            }
187    
188            /**
189            * Returns the first user notification delivery in the ordered set where userId = &#63;.
190            *
191            * @param userId the user ID
192            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
193            * @return the first matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found
194            * @throws SystemException if a system exception occurred
195            */
196            public static com.liferay.portal.model.UserNotificationDelivery fetchByUserId_First(
197                    long userId,
198                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
199                    throws com.liferay.portal.kernel.exception.SystemException {
200                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
201            }
202    
203            /**
204            * Returns the last user notification delivery in the ordered set where userId = &#63;.
205            *
206            * @param userId the user ID
207            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
208            * @return the last matching user notification delivery
209            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found
210            * @throws SystemException if a system exception occurred
211            */
212            public static com.liferay.portal.model.UserNotificationDelivery findByUserId_Last(
213                    long userId,
214                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
215                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
216                            com.liferay.portal.kernel.exception.SystemException {
217                    return getPersistence().findByUserId_Last(userId, orderByComparator);
218            }
219    
220            /**
221            * Returns the last user notification delivery in the ordered set where userId = &#63;.
222            *
223            * @param userId the user ID
224            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
225            * @return the last matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found
226            * @throws SystemException if a system exception occurred
227            */
228            public static com.liferay.portal.model.UserNotificationDelivery fetchByUserId_Last(
229                    long userId,
230                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
231                    throws com.liferay.portal.kernel.exception.SystemException {
232                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
233            }
234    
235            /**
236            * Returns the user notification deliveries before and after the current user notification delivery in the ordered set where userId = &#63;.
237            *
238            * @param userNotificationDeliveryId the primary key of the current user notification delivery
239            * @param userId the user ID
240            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
241            * @return the previous, current, and next user notification delivery
242            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found
243            * @throws SystemException if a system exception occurred
244            */
245            public static com.liferay.portal.model.UserNotificationDelivery[] findByUserId_PrevAndNext(
246                    long userNotificationDeliveryId, long userId,
247                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
248                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
249                            com.liferay.portal.kernel.exception.SystemException {
250                    return getPersistence()
251                                       .findByUserId_PrevAndNext(userNotificationDeliveryId,
252                            userId, orderByComparator);
253            }
254    
255            /**
256            * Removes all the user notification deliveries where userId = &#63; from the database.
257            *
258            * @param userId the user ID
259            * @throws SystemException if a system exception occurred
260            */
261            public static void removeByUserId(long userId)
262                    throws com.liferay.portal.kernel.exception.SystemException {
263                    getPersistence().removeByUserId(userId);
264            }
265    
266            /**
267            * Returns the number of user notification deliveries where userId = &#63;.
268            *
269            * @param userId the user ID
270            * @return the number of matching user notification deliveries
271            * @throws SystemException if a system exception occurred
272            */
273            public static int countByUserId(long userId)
274                    throws com.liferay.portal.kernel.exception.SystemException {
275                    return getPersistence().countByUserId(userId);
276            }
277    
278            /**
279            * Returns the user notification delivery where userId = &#63; and portletId = &#63; and classNameId = &#63; and notificationType = &#63; and deliveryType = &#63; or throws a {@link com.liferay.portal.NoSuchUserNotificationDeliveryException} if it could not be found.
280            *
281            * @param userId the user ID
282            * @param portletId the portlet ID
283            * @param classNameId the class name ID
284            * @param notificationType the notification type
285            * @param deliveryType the delivery type
286            * @return the matching user notification delivery
287            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found
288            * @throws SystemException if a system exception occurred
289            */
290            public static com.liferay.portal.model.UserNotificationDelivery findByU_P_C_N_D(
291                    long userId, java.lang.String portletId, long classNameId,
292                    int notificationType, int deliveryType)
293                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
294                            com.liferay.portal.kernel.exception.SystemException {
295                    return getPersistence()
296                                       .findByU_P_C_N_D(userId, portletId, classNameId,
297                            notificationType, deliveryType);
298            }
299    
300            /**
301            * Returns the user notification delivery where userId = &#63; and portletId = &#63; and classNameId = &#63; and notificationType = &#63; and deliveryType = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
302            *
303            * @param userId the user ID
304            * @param portletId the portlet ID
305            * @param classNameId the class name ID
306            * @param notificationType the notification type
307            * @param deliveryType the delivery type
308            * @return the matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found
309            * @throws SystemException if a system exception occurred
310            */
311            public static com.liferay.portal.model.UserNotificationDelivery fetchByU_P_C_N_D(
312                    long userId, java.lang.String portletId, long classNameId,
313                    int notificationType, int deliveryType)
314                    throws com.liferay.portal.kernel.exception.SystemException {
315                    return getPersistence()
316                                       .fetchByU_P_C_N_D(userId, portletId, classNameId,
317                            notificationType, deliveryType);
318            }
319    
320            /**
321            * Returns the user notification delivery where userId = &#63; and portletId = &#63; and classNameId = &#63; and notificationType = &#63; and deliveryType = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
322            *
323            * @param userId the user ID
324            * @param portletId the portlet ID
325            * @param classNameId the class name ID
326            * @param notificationType the notification type
327            * @param deliveryType the delivery type
328            * @param retrieveFromCache whether to use the finder cache
329            * @return the matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found
330            * @throws SystemException if a system exception occurred
331            */
332            public static com.liferay.portal.model.UserNotificationDelivery fetchByU_P_C_N_D(
333                    long userId, java.lang.String portletId, long classNameId,
334                    int notificationType, int deliveryType, boolean retrieveFromCache)
335                    throws com.liferay.portal.kernel.exception.SystemException {
336                    return getPersistence()
337                                       .fetchByU_P_C_N_D(userId, portletId, classNameId,
338                            notificationType, deliveryType, retrieveFromCache);
339            }
340    
341            /**
342            * Removes the user notification delivery where userId = &#63; and portletId = &#63; and classNameId = &#63; and notificationType = &#63; and deliveryType = &#63; from the database.
343            *
344            * @param userId the user ID
345            * @param portletId the portlet ID
346            * @param classNameId the class name ID
347            * @param notificationType the notification type
348            * @param deliveryType the delivery type
349            * @return the user notification delivery that was removed
350            * @throws SystemException if a system exception occurred
351            */
352            public static com.liferay.portal.model.UserNotificationDelivery removeByU_P_C_N_D(
353                    long userId, java.lang.String portletId, long classNameId,
354                    int notificationType, int deliveryType)
355                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
356                            com.liferay.portal.kernel.exception.SystemException {
357                    return getPersistence()
358                                       .removeByU_P_C_N_D(userId, portletId, classNameId,
359                            notificationType, deliveryType);
360            }
361    
362            /**
363            * Returns the number of user notification deliveries where userId = &#63; and portletId = &#63; and classNameId = &#63; and notificationType = &#63; and deliveryType = &#63;.
364            *
365            * @param userId the user ID
366            * @param portletId the portlet ID
367            * @param classNameId the class name ID
368            * @param notificationType the notification type
369            * @param deliveryType the delivery type
370            * @return the number of matching user notification deliveries
371            * @throws SystemException if a system exception occurred
372            */
373            public static int countByU_P_C_N_D(long userId, java.lang.String portletId,
374                    long classNameId, int notificationType, int deliveryType)
375                    throws com.liferay.portal.kernel.exception.SystemException {
376                    return getPersistence()
377                                       .countByU_P_C_N_D(userId, portletId, classNameId,
378                            notificationType, deliveryType);
379            }
380    
381            /**
382            * Caches the user notification delivery in the entity cache if it is enabled.
383            *
384            * @param userNotificationDelivery the user notification delivery
385            */
386            public static void cacheResult(
387                    com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery) {
388                    getPersistence().cacheResult(userNotificationDelivery);
389            }
390    
391            /**
392            * Caches the user notification deliveries in the entity cache if it is enabled.
393            *
394            * @param userNotificationDeliveries the user notification deliveries
395            */
396            public static void cacheResult(
397                    java.util.List<com.liferay.portal.model.UserNotificationDelivery> userNotificationDeliveries) {
398                    getPersistence().cacheResult(userNotificationDeliveries);
399            }
400    
401            /**
402            * Creates a new user notification delivery with the primary key. Does not add the user notification delivery to the database.
403            *
404            * @param userNotificationDeliveryId the primary key for the new user notification delivery
405            * @return the new user notification delivery
406            */
407            public static com.liferay.portal.model.UserNotificationDelivery create(
408                    long userNotificationDeliveryId) {
409                    return getPersistence().create(userNotificationDeliveryId);
410            }
411    
412            /**
413            * Removes the user notification delivery with the primary key from the database. Also notifies the appropriate model listeners.
414            *
415            * @param userNotificationDeliveryId the primary key of the user notification delivery
416            * @return the user notification delivery that was removed
417            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found
418            * @throws SystemException if a system exception occurred
419            */
420            public static com.liferay.portal.model.UserNotificationDelivery remove(
421                    long userNotificationDeliveryId)
422                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
423                            com.liferay.portal.kernel.exception.SystemException {
424                    return getPersistence().remove(userNotificationDeliveryId);
425            }
426    
427            public static com.liferay.portal.model.UserNotificationDelivery updateImpl(
428                    com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery)
429                    throws com.liferay.portal.kernel.exception.SystemException {
430                    return getPersistence().updateImpl(userNotificationDelivery);
431            }
432    
433            /**
434            * Returns the user notification delivery with the primary key or throws a {@link com.liferay.portal.NoSuchUserNotificationDeliveryException} if it could not be found.
435            *
436            * @param userNotificationDeliveryId the primary key of the user notification delivery
437            * @return the user notification delivery
438            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found
439            * @throws SystemException if a system exception occurred
440            */
441            public static com.liferay.portal.model.UserNotificationDelivery findByPrimaryKey(
442                    long userNotificationDeliveryId)
443                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
444                            com.liferay.portal.kernel.exception.SystemException {
445                    return getPersistence().findByPrimaryKey(userNotificationDeliveryId);
446            }
447    
448            /**
449            * Returns the user notification delivery with the primary key or returns <code>null</code> if it could not be found.
450            *
451            * @param userNotificationDeliveryId the primary key of the user notification delivery
452            * @return the user notification delivery, or <code>null</code> if a user notification delivery with the primary key could not be found
453            * @throws SystemException if a system exception occurred
454            */
455            public static com.liferay.portal.model.UserNotificationDelivery fetchByPrimaryKey(
456                    long userNotificationDeliveryId)
457                    throws com.liferay.portal.kernel.exception.SystemException {
458                    return getPersistence().fetchByPrimaryKey(userNotificationDeliveryId);
459            }
460    
461            /**
462            * Returns all the user notification deliveries.
463            *
464            * @return the user notification deliveries
465            * @throws SystemException if a system exception occurred
466            */
467            public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll()
468                    throws com.liferay.portal.kernel.exception.SystemException {
469                    return getPersistence().findAll();
470            }
471    
472            /**
473            * Returns a range of all the user notification deliveries.
474            *
475            * <p>
476            * 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.portal.model.impl.UserNotificationDeliveryModelImpl}. 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.
477            * </p>
478            *
479            * @param start the lower bound of the range of user notification deliveries
480            * @param end the upper bound of the range of user notification deliveries (not inclusive)
481            * @return the range of user notification deliveries
482            * @throws SystemException if a system exception occurred
483            */
484            public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll(
485                    int start, int end)
486                    throws com.liferay.portal.kernel.exception.SystemException {
487                    return getPersistence().findAll(start, end);
488            }
489    
490            /**
491            * Returns an ordered range of all the user notification deliveries.
492            *
493            * <p>
494            * 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.portal.model.impl.UserNotificationDeliveryModelImpl}. 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.
495            * </p>
496            *
497            * @param start the lower bound of the range of user notification deliveries
498            * @param end the upper bound of the range of user notification deliveries (not inclusive)
499            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
500            * @return the ordered range of user notification deliveries
501            * @throws SystemException if a system exception occurred
502            */
503            public static java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll(
504                    int start, int end,
505                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
506                    throws com.liferay.portal.kernel.exception.SystemException {
507                    return getPersistence().findAll(start, end, orderByComparator);
508            }
509    
510            /**
511            * Removes all the user notification deliveries from the database.
512            *
513            * @throws SystemException if a system exception occurred
514            */
515            public static void removeAll()
516                    throws com.liferay.portal.kernel.exception.SystemException {
517                    getPersistence().removeAll();
518            }
519    
520            /**
521            * Returns the number of user notification deliveries.
522            *
523            * @return the number of user notification deliveries
524            * @throws SystemException if a system exception occurred
525            */
526            public static int countAll()
527                    throws com.liferay.portal.kernel.exception.SystemException {
528                    return getPersistence().countAll();
529            }
530    
531            public static UserNotificationDeliveryPersistence getPersistence() {
532                    if (_persistence == null) {
533                            _persistence = (UserNotificationDeliveryPersistence)PortalBeanLocatorUtil.locate(UserNotificationDeliveryPersistence.class.getName());
534    
535                            ReferenceRegistry.registerReference(UserNotificationDeliveryUtil.class,
536                                    "_persistence");
537                    }
538    
539                    return _persistence;
540            }
541    
542            /**
543             * @deprecated As of 6.2.0
544             */
545            public void setPersistence(UserNotificationDeliveryPersistence persistence) {
546            }
547    
548            private static UserNotificationDeliveryPersistence _persistence;
549    }