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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.model.UserNotificationEvent;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the user notification event service. This utility wraps {@link UserNotificationEventPersistenceImpl} 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.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see UserNotificationEventPersistence
036     * @see UserNotificationEventPersistenceImpl
037     * @generated
038     */
039    public class UserNotificationEventUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(UserNotificationEvent userNotificationEvent) {
057                    getPersistence().clearCache(userNotificationEvent);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<UserNotificationEvent> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<UserNotificationEvent> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<UserNotificationEvent> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
098             */
099            public static UserNotificationEvent update(
100                    UserNotificationEvent userNotificationEvent, boolean merge)
101                    throws SystemException {
102                    return getPersistence().update(userNotificationEvent, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static UserNotificationEvent update(
109                    UserNotificationEvent userNotificationEvent, boolean merge,
110                    ServiceContext serviceContext) throws SystemException {
111                    return getPersistence()
112                                       .update(userNotificationEvent, merge, serviceContext);
113            }
114    
115            /**
116            * Caches the user notification event in the entity cache if it is enabled.
117            *
118            * @param userNotificationEvent the user notification event
119            */
120            public static void cacheResult(
121                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent) {
122                    getPersistence().cacheResult(userNotificationEvent);
123            }
124    
125            /**
126            * Caches the user notification events in the entity cache if it is enabled.
127            *
128            * @param userNotificationEvents the user notification events
129            */
130            public static void cacheResult(
131                    java.util.List<com.liferay.portal.model.UserNotificationEvent> userNotificationEvents) {
132                    getPersistence().cacheResult(userNotificationEvents);
133            }
134    
135            /**
136            * Creates a new user notification event with the primary key. Does not add the user notification event to the database.
137            *
138            * @param userNotificationEventId the primary key for the new user notification event
139            * @return the new user notification event
140            */
141            public static com.liferay.portal.model.UserNotificationEvent create(
142                    long userNotificationEventId) {
143                    return getPersistence().create(userNotificationEventId);
144            }
145    
146            /**
147            * Removes the user notification event with the primary key from the database. Also notifies the appropriate model listeners.
148            *
149            * @param userNotificationEventId the primary key of the user notification event
150            * @return the user notification event that was removed
151            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            public static com.liferay.portal.model.UserNotificationEvent remove(
155                    long userNotificationEventId)
156                    throws com.liferay.portal.NoSuchUserNotificationEventException,
157                            com.liferay.portal.kernel.exception.SystemException {
158                    return getPersistence().remove(userNotificationEventId);
159            }
160    
161            public static com.liferay.portal.model.UserNotificationEvent updateImpl(
162                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent,
163                    boolean merge)
164                    throws com.liferay.portal.kernel.exception.SystemException {
165                    return getPersistence().updateImpl(userNotificationEvent, merge);
166            }
167    
168            /**
169            * Returns the user notification event with the primary key or throws a {@link com.liferay.portal.NoSuchUserNotificationEventException} if it could not be found.
170            *
171            * @param userNotificationEventId the primary key of the user notification event
172            * @return the user notification event
173            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
174            * @throws SystemException if a system exception occurred
175            */
176            public static com.liferay.portal.model.UserNotificationEvent findByPrimaryKey(
177                    long userNotificationEventId)
178                    throws com.liferay.portal.NoSuchUserNotificationEventException,
179                            com.liferay.portal.kernel.exception.SystemException {
180                    return getPersistence().findByPrimaryKey(userNotificationEventId);
181            }
182    
183            /**
184            * Returns the user notification event with the primary key or returns <code>null</code> if it could not be found.
185            *
186            * @param userNotificationEventId the primary key of the user notification event
187            * @return the user notification event, or <code>null</code> if a user notification event with the primary key could not be found
188            * @throws SystemException if a system exception occurred
189            */
190            public static com.liferay.portal.model.UserNotificationEvent fetchByPrimaryKey(
191                    long userNotificationEventId)
192                    throws com.liferay.portal.kernel.exception.SystemException {
193                    return getPersistence().fetchByPrimaryKey(userNotificationEventId);
194            }
195    
196            /**
197            * Returns all the user notification events where uuid = &#63;.
198            *
199            * @param uuid the uuid
200            * @return the matching user notification events
201            * @throws SystemException if a system exception occurred
202            */
203            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
204                    java.lang.String uuid)
205                    throws com.liferay.portal.kernel.exception.SystemException {
206                    return getPersistence().findByUuid(uuid);
207            }
208    
209            /**
210            * Returns a range of all the user notification events where uuid = &#63;.
211            *
212            * <p>
213            * 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.
214            * </p>
215            *
216            * @param uuid the uuid
217            * @param start the lower bound of the range of user notification events
218            * @param end the upper bound of the range of user notification events (not inclusive)
219            * @return the range of matching user notification events
220            * @throws SystemException if a system exception occurred
221            */
222            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
223                    java.lang.String uuid, int start, int end)
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return getPersistence().findByUuid(uuid, start, end);
226            }
227    
228            /**
229            * Returns an ordered range of all the user notification events where uuid = &#63;.
230            *
231            * <p>
232            * 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.
233            * </p>
234            *
235            * @param uuid the uuid
236            * @param start the lower bound of the range of user notification events
237            * @param end the upper bound of the range of user notification events (not inclusive)
238            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
239            * @return the ordered range of matching user notification events
240            * @throws SystemException if a system exception occurred
241            */
242            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
243                    java.lang.String uuid, int start, int end,
244                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
245                    throws com.liferay.portal.kernel.exception.SystemException {
246                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
247            }
248    
249            /**
250            * Returns the first user notification event in the ordered set where uuid = &#63;.
251            *
252            * @param uuid the uuid
253            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
254            * @return the first matching user notification event
255            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
256            * @throws SystemException if a system exception occurred
257            */
258            public static com.liferay.portal.model.UserNotificationEvent findByUuid_First(
259                    java.lang.String uuid,
260                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261                    throws com.liferay.portal.NoSuchUserNotificationEventException,
262                            com.liferay.portal.kernel.exception.SystemException {
263                    return getPersistence().findByUuid_First(uuid, orderByComparator);
264            }
265    
266            /**
267            * Returns the first user notification event in the ordered set where uuid = &#63;.
268            *
269            * @param uuid the uuid
270            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
271            * @return the first matching user notification event, or <code>null</code> if a matching user notification event could not be found
272            * @throws SystemException if a system exception occurred
273            */
274            public static com.liferay.portal.model.UserNotificationEvent fetchByUuid_First(
275                    java.lang.String uuid,
276                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
277                    throws com.liferay.portal.kernel.exception.SystemException {
278                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
279            }
280    
281            /**
282            * Returns the last user notification event in the ordered set where uuid = &#63;.
283            *
284            * @param uuid the uuid
285            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
286            * @return the last matching user notification event
287            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
288            * @throws SystemException if a system exception occurred
289            */
290            public static com.liferay.portal.model.UserNotificationEvent findByUuid_Last(
291                    java.lang.String uuid,
292                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
293                    throws com.liferay.portal.NoSuchUserNotificationEventException,
294                            com.liferay.portal.kernel.exception.SystemException {
295                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
296            }
297    
298            /**
299            * Returns the last user notification event in the ordered set where uuid = &#63;.
300            *
301            * @param uuid the uuid
302            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
303            * @return the last matching user notification event, or <code>null</code> if a matching user notification event could not be found
304            * @throws SystemException if a system exception occurred
305            */
306            public static com.liferay.portal.model.UserNotificationEvent fetchByUuid_Last(
307                    java.lang.String uuid,
308                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
309                    throws com.liferay.portal.kernel.exception.SystemException {
310                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
311            }
312    
313            /**
314            * Returns the user notification events before and after the current user notification event in the ordered set where uuid = &#63;.
315            *
316            * @param userNotificationEventId the primary key of the current user notification event
317            * @param uuid the uuid
318            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
319            * @return the previous, current, and next user notification event
320            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
321            * @throws SystemException if a system exception occurred
322            */
323            public static com.liferay.portal.model.UserNotificationEvent[] findByUuid_PrevAndNext(
324                    long userNotificationEventId, java.lang.String uuid,
325                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
326                    throws com.liferay.portal.NoSuchUserNotificationEventException,
327                            com.liferay.portal.kernel.exception.SystemException {
328                    return getPersistence()
329                                       .findByUuid_PrevAndNext(userNotificationEventId, uuid,
330                            orderByComparator);
331            }
332    
333            /**
334            * Returns all the user notification events where userId = &#63;.
335            *
336            * @param userId the user ID
337            * @return the matching user notification events
338            * @throws SystemException if a system exception occurred
339            */
340            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
341                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
342                    return getPersistence().findByUserId(userId);
343            }
344    
345            /**
346            * Returns a range of all the user notification events where userId = &#63;.
347            *
348            * <p>
349            * 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.
350            * </p>
351            *
352            * @param userId the user ID
353            * @param start the lower bound of the range of user notification events
354            * @param end the upper bound of the range of user notification events (not inclusive)
355            * @return the range of matching user notification events
356            * @throws SystemException if a system exception occurred
357            */
358            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
359                    long userId, int start, int end)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence().findByUserId(userId, start, end);
362            }
363    
364            /**
365            * Returns an ordered range of all the user notification events where userId = &#63;.
366            *
367            * <p>
368            * 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.
369            * </p>
370            *
371            * @param userId the user ID
372            * @param start the lower bound of the range of user notification events
373            * @param end the upper bound of the range of user notification events (not inclusive)
374            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
375            * @return the ordered range of matching user notification events
376            * @throws SystemException if a system exception occurred
377            */
378            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
379                    long userId, int start, int end,
380                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
381                    throws com.liferay.portal.kernel.exception.SystemException {
382                    return getPersistence()
383                                       .findByUserId(userId, start, end, orderByComparator);
384            }
385    
386            /**
387            * Returns the first user notification event in the ordered set where userId = &#63;.
388            *
389            * @param userId the user ID
390            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
391            * @return the first matching user notification event
392            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
393            * @throws SystemException if a system exception occurred
394            */
395            public static com.liferay.portal.model.UserNotificationEvent findByUserId_First(
396                    long userId,
397                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
398                    throws com.liferay.portal.NoSuchUserNotificationEventException,
399                            com.liferay.portal.kernel.exception.SystemException {
400                    return getPersistence().findByUserId_First(userId, orderByComparator);
401            }
402    
403            /**
404            * Returns the first user notification event in the ordered set where userId = &#63;.
405            *
406            * @param userId the user ID
407            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
408            * @return the first matching user notification event, or <code>null</code> if a matching user notification event could not be found
409            * @throws SystemException if a system exception occurred
410            */
411            public static com.liferay.portal.model.UserNotificationEvent fetchByUserId_First(
412                    long userId,
413                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
414                    throws com.liferay.portal.kernel.exception.SystemException {
415                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
416            }
417    
418            /**
419            * Returns the last user notification event in the ordered set where userId = &#63;.
420            *
421            * @param userId the user ID
422            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
423            * @return the last matching user notification event
424            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
425            * @throws SystemException if a system exception occurred
426            */
427            public static com.liferay.portal.model.UserNotificationEvent findByUserId_Last(
428                    long userId,
429                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
430                    throws com.liferay.portal.NoSuchUserNotificationEventException,
431                            com.liferay.portal.kernel.exception.SystemException {
432                    return getPersistence().findByUserId_Last(userId, orderByComparator);
433            }
434    
435            /**
436            * Returns the last user notification event in the ordered set where userId = &#63;.
437            *
438            * @param userId the user ID
439            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
440            * @return the last matching user notification event, or <code>null</code> if a matching user notification event could not be found
441            * @throws SystemException if a system exception occurred
442            */
443            public static com.liferay.portal.model.UserNotificationEvent fetchByUserId_Last(
444                    long userId,
445                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
446                    throws com.liferay.portal.kernel.exception.SystemException {
447                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
448            }
449    
450            /**
451            * Returns the user notification events before and after the current user notification event in the ordered set where userId = &#63;.
452            *
453            * @param userNotificationEventId the primary key of the current user notification event
454            * @param userId the user ID
455            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
456            * @return the previous, current, and next user notification event
457            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
458            * @throws SystemException if a system exception occurred
459            */
460            public static com.liferay.portal.model.UserNotificationEvent[] findByUserId_PrevAndNext(
461                    long userNotificationEventId, long userId,
462                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
463                    throws com.liferay.portal.NoSuchUserNotificationEventException,
464                            com.liferay.portal.kernel.exception.SystemException {
465                    return getPersistence()
466                                       .findByUserId_PrevAndNext(userNotificationEventId, userId,
467                            orderByComparator);
468            }
469    
470            /**
471            * Returns all the user notification events where userId = &#63; and archived = &#63;.
472            *
473            * @param userId the user ID
474            * @param archived the archived
475            * @return the matching user notification events
476            * @throws SystemException if a system exception occurred
477            */
478            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
479                    long userId, boolean archived)
480                    throws com.liferay.portal.kernel.exception.SystemException {
481                    return getPersistence().findByU_A(userId, archived);
482            }
483    
484            /**
485            * Returns a range of all the user notification events where userId = &#63; and archived = &#63;.
486            *
487            * <p>
488            * 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.
489            * </p>
490            *
491            * @param userId the user ID
492            * @param archived the archived
493            * @param start the lower bound of the range of user notification events
494            * @param end the upper bound of the range of user notification events (not inclusive)
495            * @return the range of matching user notification events
496            * @throws SystemException if a system exception occurred
497            */
498            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
499                    long userId, boolean archived, int start, int end)
500                    throws com.liferay.portal.kernel.exception.SystemException {
501                    return getPersistence().findByU_A(userId, archived, start, end);
502            }
503    
504            /**
505            * Returns an ordered range of all the user notification events where userId = &#63; and archived = &#63;.
506            *
507            * <p>
508            * 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.
509            * </p>
510            *
511            * @param userId the user ID
512            * @param archived the archived
513            * @param start the lower bound of the range of user notification events
514            * @param end the upper bound of the range of user notification events (not inclusive)
515            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
516            * @return the ordered range of matching user notification events
517            * @throws SystemException if a system exception occurred
518            */
519            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
520                    long userId, boolean archived, int start, int end,
521                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
522                    throws com.liferay.portal.kernel.exception.SystemException {
523                    return getPersistence()
524                                       .findByU_A(userId, archived, start, end, orderByComparator);
525            }
526    
527            /**
528            * Returns the first user notification event in the ordered set where userId = &#63; and archived = &#63;.
529            *
530            * @param userId the user ID
531            * @param archived the archived
532            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
533            * @return the first matching user notification event
534            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
535            * @throws SystemException if a system exception occurred
536            */
537            public static com.liferay.portal.model.UserNotificationEvent findByU_A_First(
538                    long userId, boolean archived,
539                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
540                    throws com.liferay.portal.NoSuchUserNotificationEventException,
541                            com.liferay.portal.kernel.exception.SystemException {
542                    return getPersistence()
543                                       .findByU_A_First(userId, archived, orderByComparator);
544            }
545    
546            /**
547            * Returns the first user notification event in the ordered set where userId = &#63; and archived = &#63;.
548            *
549            * @param userId the user ID
550            * @param archived the archived
551            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
552            * @return the first matching user notification event, or <code>null</code> if a matching user notification event could not be found
553            * @throws SystemException if a system exception occurred
554            */
555            public static com.liferay.portal.model.UserNotificationEvent fetchByU_A_First(
556                    long userId, boolean archived,
557                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
558                    throws com.liferay.portal.kernel.exception.SystemException {
559                    return getPersistence()
560                                       .fetchByU_A_First(userId, archived, orderByComparator);
561            }
562    
563            /**
564            * Returns the last user notification event in the ordered set where userId = &#63; and archived = &#63;.
565            *
566            * @param userId the user ID
567            * @param archived the archived
568            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
569            * @return the last matching user notification event
570            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
571            * @throws SystemException if a system exception occurred
572            */
573            public static com.liferay.portal.model.UserNotificationEvent findByU_A_Last(
574                    long userId, boolean archived,
575                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
576                    throws com.liferay.portal.NoSuchUserNotificationEventException,
577                            com.liferay.portal.kernel.exception.SystemException {
578                    return getPersistence()
579                                       .findByU_A_Last(userId, archived, orderByComparator);
580            }
581    
582            /**
583            * Returns the last user notification event in the ordered set where userId = &#63; and archived = &#63;.
584            *
585            * @param userId the user ID
586            * @param archived the archived
587            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
588            * @return the last matching user notification event, or <code>null</code> if a matching user notification event could not be found
589            * @throws SystemException if a system exception occurred
590            */
591            public static com.liferay.portal.model.UserNotificationEvent fetchByU_A_Last(
592                    long userId, boolean archived,
593                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
594                    throws com.liferay.portal.kernel.exception.SystemException {
595                    return getPersistence()
596                                       .fetchByU_A_Last(userId, archived, orderByComparator);
597            }
598    
599            /**
600            * Returns the user notification events before and after the current user notification event in the ordered set where userId = &#63; and archived = &#63;.
601            *
602            * @param userNotificationEventId the primary key of the current user notification event
603            * @param userId the user ID
604            * @param archived the archived
605            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
606            * @return the previous, current, and next user notification event
607            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
608            * @throws SystemException if a system exception occurred
609            */
610            public static com.liferay.portal.model.UserNotificationEvent[] findByU_A_PrevAndNext(
611                    long userNotificationEventId, long userId, boolean archived,
612                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
613                    throws com.liferay.portal.NoSuchUserNotificationEventException,
614                            com.liferay.portal.kernel.exception.SystemException {
615                    return getPersistence()
616                                       .findByU_A_PrevAndNext(userNotificationEventId, userId,
617                            archived, orderByComparator);
618            }
619    
620            /**
621            * Returns all the user notification events.
622            *
623            * @return the user notification events
624            * @throws SystemException if a system exception occurred
625            */
626            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll()
627                    throws com.liferay.portal.kernel.exception.SystemException {
628                    return getPersistence().findAll();
629            }
630    
631            /**
632            * Returns a range of all the user notification events.
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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
636            * </p>
637            *
638            * @param start the lower bound of the range of user notification events
639            * @param end the upper bound of the range of user notification events (not inclusive)
640            * @return the range of user notification events
641            * @throws SystemException if a system exception occurred
642            */
643            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll(
644                    int start, int end)
645                    throws com.liferay.portal.kernel.exception.SystemException {
646                    return getPersistence().findAll(start, end);
647            }
648    
649            /**
650            * Returns an ordered range of all the user notification events.
651            *
652            * <p>
653            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
654            * </p>
655            *
656            * @param start the lower bound of the range of user notification events
657            * @param end the upper bound of the range of user notification events (not inclusive)
658            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
659            * @return the ordered range of user notification events
660            * @throws SystemException if a system exception occurred
661            */
662            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll(
663                    int start, int end,
664                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
665                    throws com.liferay.portal.kernel.exception.SystemException {
666                    return getPersistence().findAll(start, end, orderByComparator);
667            }
668    
669            /**
670            * Removes all the user notification events where uuid = &#63; from the database.
671            *
672            * @param uuid the uuid
673            * @throws SystemException if a system exception occurred
674            */
675            public static void removeByUuid(java.lang.String uuid)
676                    throws com.liferay.portal.kernel.exception.SystemException {
677                    getPersistence().removeByUuid(uuid);
678            }
679    
680            /**
681            * Removes all the user notification events where userId = &#63; from the database.
682            *
683            * @param userId the user ID
684            * @throws SystemException if a system exception occurred
685            */
686            public static void removeByUserId(long userId)
687                    throws com.liferay.portal.kernel.exception.SystemException {
688                    getPersistence().removeByUserId(userId);
689            }
690    
691            /**
692            * Removes all the user notification events where userId = &#63; and archived = &#63; from the database.
693            *
694            * @param userId the user ID
695            * @param archived the archived
696            * @throws SystemException if a system exception occurred
697            */
698            public static void removeByU_A(long userId, boolean archived)
699                    throws com.liferay.portal.kernel.exception.SystemException {
700                    getPersistence().removeByU_A(userId, archived);
701            }
702    
703            /**
704            * Removes all the user notification events from the database.
705            *
706            * @throws SystemException if a system exception occurred
707            */
708            public static void removeAll()
709                    throws com.liferay.portal.kernel.exception.SystemException {
710                    getPersistence().removeAll();
711            }
712    
713            /**
714            * Returns the number of user notification events where uuid = &#63;.
715            *
716            * @param uuid the uuid
717            * @return the number of matching user notification events
718            * @throws SystemException if a system exception occurred
719            */
720            public static int countByUuid(java.lang.String uuid)
721                    throws com.liferay.portal.kernel.exception.SystemException {
722                    return getPersistence().countByUuid(uuid);
723            }
724    
725            /**
726            * Returns the number of user notification events where userId = &#63;.
727            *
728            * @param userId the user ID
729            * @return the number of matching user notification events
730            * @throws SystemException if a system exception occurred
731            */
732            public static int countByUserId(long userId)
733                    throws com.liferay.portal.kernel.exception.SystemException {
734                    return getPersistence().countByUserId(userId);
735            }
736    
737            /**
738            * Returns the number of user notification events where userId = &#63; and archived = &#63;.
739            *
740            * @param userId the user ID
741            * @param archived the archived
742            * @return the number of matching user notification events
743            * @throws SystemException if a system exception occurred
744            */
745            public static int countByU_A(long userId, boolean archived)
746                    throws com.liferay.portal.kernel.exception.SystemException {
747                    return getPersistence().countByU_A(userId, archived);
748            }
749    
750            /**
751            * Returns the number of user notification events.
752            *
753            * @return the number of user notification events
754            * @throws SystemException if a system exception occurred
755            */
756            public static int countAll()
757                    throws com.liferay.portal.kernel.exception.SystemException {
758                    return getPersistence().countAll();
759            }
760    
761            public static UserNotificationEventPersistence getPersistence() {
762                    if (_persistence == null) {
763                            _persistence = (UserNotificationEventPersistence)PortalBeanLocatorUtil.locate(UserNotificationEventPersistence.class.getName());
764    
765                            ReferenceRegistry.registerReference(UserNotificationEventUtil.class,
766                                    "_persistence");
767                    }
768    
769                    return _persistence;
770            }
771    
772            /**
773             * @deprecated
774             */
775            public void setPersistence(UserNotificationEventPersistence persistence) {
776            }
777    
778            private static UserNotificationEventPersistence _persistence;
779    }