001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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#remove(com.liferay.portal.model.BaseModel)
098             */
099            public static UserNotificationEvent remove(
100                    UserNotificationEvent userNotificationEvent) throws SystemException {
101                    return getPersistence().remove(userNotificationEvent);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
106             */
107            public static UserNotificationEvent update(
108                    UserNotificationEvent userNotificationEvent, boolean merge)
109                    throws SystemException {
110                    return getPersistence().update(userNotificationEvent, merge);
111            }
112    
113            /**
114             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
115             */
116            public static UserNotificationEvent update(
117                    UserNotificationEvent userNotificationEvent, boolean merge,
118                    ServiceContext serviceContext) throws SystemException {
119                    return getPersistence()
120                                       .update(userNotificationEvent, merge, serviceContext);
121            }
122    
123            /**
124            * Caches the user notification event in the entity cache if it is enabled.
125            *
126            * @param userNotificationEvent the user notification event
127            */
128            public static void cacheResult(
129                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent) {
130                    getPersistence().cacheResult(userNotificationEvent);
131            }
132    
133            /**
134            * Caches the user notification events in the entity cache if it is enabled.
135            *
136            * @param userNotificationEvents the user notification events
137            */
138            public static void cacheResult(
139                    java.util.List<com.liferay.portal.model.UserNotificationEvent> userNotificationEvents) {
140                    getPersistence().cacheResult(userNotificationEvents);
141            }
142    
143            /**
144            * Creates a new user notification event with the primary key. Does not add the user notification event to the database.
145            *
146            * @param userNotificationEventId the primary key for the new user notification event
147            * @return the new user notification event
148            */
149            public static com.liferay.portal.model.UserNotificationEvent create(
150                    long userNotificationEventId) {
151                    return getPersistence().create(userNotificationEventId);
152            }
153    
154            /**
155            * Removes the user notification event with the primary key from the database. Also notifies the appropriate model listeners.
156            *
157            * @param userNotificationEventId the primary key of the user notification event
158            * @return the user notification event that was removed
159            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
160            * @throws SystemException if a system exception occurred
161            */
162            public static com.liferay.portal.model.UserNotificationEvent remove(
163                    long userNotificationEventId)
164                    throws com.liferay.portal.NoSuchUserNotificationEventException,
165                            com.liferay.portal.kernel.exception.SystemException {
166                    return getPersistence().remove(userNotificationEventId);
167            }
168    
169            public static com.liferay.portal.model.UserNotificationEvent updateImpl(
170                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent,
171                    boolean merge)
172                    throws com.liferay.portal.kernel.exception.SystemException {
173                    return getPersistence().updateImpl(userNotificationEvent, merge);
174            }
175    
176            /**
177            * Returns the user notification event with the primary key or throws a {@link com.liferay.portal.NoSuchUserNotificationEventException} if it could not be found.
178            *
179            * @param userNotificationEventId the primary key of the user notification event
180            * @return the user notification event
181            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
182            * @throws SystemException if a system exception occurred
183            */
184            public static com.liferay.portal.model.UserNotificationEvent findByPrimaryKey(
185                    long userNotificationEventId)
186                    throws com.liferay.portal.NoSuchUserNotificationEventException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    return getPersistence().findByPrimaryKey(userNotificationEventId);
189            }
190    
191            /**
192            * Returns the user notification event with the primary key or returns <code>null</code> if it could not be found.
193            *
194            * @param userNotificationEventId the primary key of the user notification event
195            * @return the user notification event, or <code>null</code> if a user notification event with the primary key could not be found
196            * @throws SystemException if a system exception occurred
197            */
198            public static com.liferay.portal.model.UserNotificationEvent fetchByPrimaryKey(
199                    long userNotificationEventId)
200                    throws com.liferay.portal.kernel.exception.SystemException {
201                    return getPersistence().fetchByPrimaryKey(userNotificationEventId);
202            }
203    
204            /**
205            * Returns all the user notification events where uuid = &#63;.
206            *
207            * @param uuid the uuid
208            * @return the matching user notification events
209            * @throws SystemException if a system exception occurred
210            */
211            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
212                    java.lang.String uuid)
213                    throws com.liferay.portal.kernel.exception.SystemException {
214                    return getPersistence().findByUuid(uuid);
215            }
216    
217            /**
218            * Returns a range of all the user notification events where uuid = &#63;.
219            *
220            * <p>
221            * 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.
222            * </p>
223            *
224            * @param uuid the uuid
225            * @param start the lower bound of the range of user notification events
226            * @param end the upper bound of the range of user notification events (not inclusive)
227            * @return the range of matching user notification events
228            * @throws SystemException if a system exception occurred
229            */
230            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
231                    java.lang.String uuid, int start, int end)
232                    throws com.liferay.portal.kernel.exception.SystemException {
233                    return getPersistence().findByUuid(uuid, start, end);
234            }
235    
236            /**
237            * Returns an ordered range of all the user notification events where uuid = &#63;.
238            *
239            * <p>
240            * 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.
241            * </p>
242            *
243            * @param uuid the uuid
244            * @param start the lower bound of the range of user notification events
245            * @param end the upper bound of the range of user notification events (not inclusive)
246            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
247            * @return the ordered range of matching user notification events
248            * @throws SystemException if a system exception occurred
249            */
250            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
251                    java.lang.String uuid, int start, int end,
252                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
253                    throws com.liferay.portal.kernel.exception.SystemException {
254                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
255            }
256    
257            /**
258            * Returns the first user notification event in the ordered set where uuid = &#63;.
259            *
260            * <p>
261            * 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.
262            * </p>
263            *
264            * @param uuid the uuid
265            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
266            * @return the first matching user notification event
267            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
268            * @throws SystemException if a system exception occurred
269            */
270            public static com.liferay.portal.model.UserNotificationEvent findByUuid_First(
271                    java.lang.String uuid,
272                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
273                    throws com.liferay.portal.NoSuchUserNotificationEventException,
274                            com.liferay.portal.kernel.exception.SystemException {
275                    return getPersistence().findByUuid_First(uuid, orderByComparator);
276            }
277    
278            /**
279            * Returns the last user notification event in the ordered set where uuid = &#63;.
280            *
281            * <p>
282            * 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.
283            * </p>
284            *
285            * @param uuid the uuid
286            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
287            * @return the last matching user notification event
288            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
289            * @throws SystemException if a system exception occurred
290            */
291            public static com.liferay.portal.model.UserNotificationEvent findByUuid_Last(
292                    java.lang.String uuid,
293                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
294                    throws com.liferay.portal.NoSuchUserNotificationEventException,
295                            com.liferay.portal.kernel.exception.SystemException {
296                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
297            }
298    
299            /**
300            * Returns the user notification events before and after the current user notification event in the ordered set where uuid = &#63;.
301            *
302            * <p>
303            * 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.
304            * </p>
305            *
306            * @param userNotificationEventId the primary key of the current user notification event
307            * @param uuid the uuid
308            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
309            * @return the previous, current, and next user notification event
310            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
311            * @throws SystemException if a system exception occurred
312            */
313            public static com.liferay.portal.model.UserNotificationEvent[] findByUuid_PrevAndNext(
314                    long userNotificationEventId, java.lang.String uuid,
315                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
316                    throws com.liferay.portal.NoSuchUserNotificationEventException,
317                            com.liferay.portal.kernel.exception.SystemException {
318                    return getPersistence()
319                                       .findByUuid_PrevAndNext(userNotificationEventId, uuid,
320                            orderByComparator);
321            }
322    
323            /**
324            * Returns all the user notification events where userId = &#63;.
325            *
326            * @param userId the user ID
327            * @return the matching user notification events
328            * @throws SystemException if a system exception occurred
329            */
330            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
331                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
332                    return getPersistence().findByUserId(userId);
333            }
334    
335            /**
336            * Returns a range of all the user notification events where userId = &#63;.
337            *
338            * <p>
339            * 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.
340            * </p>
341            *
342            * @param userId the user ID
343            * @param start the lower bound of the range of user notification events
344            * @param end the upper bound of the range of user notification events (not inclusive)
345            * @return the range of matching user notification events
346            * @throws SystemException if a system exception occurred
347            */
348            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
349                    long userId, int start, int end)
350                    throws com.liferay.portal.kernel.exception.SystemException {
351                    return getPersistence().findByUserId(userId, start, end);
352            }
353    
354            /**
355            * Returns an ordered range of all the user notification events where userId = &#63;.
356            *
357            * <p>
358            * 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.
359            * </p>
360            *
361            * @param userId the user ID
362            * @param start the lower bound of the range of user notification events
363            * @param end the upper bound of the range of user notification events (not inclusive)
364            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
365            * @return the ordered range of matching user notification events
366            * @throws SystemException if a system exception occurred
367            */
368            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
369                    long userId, int start, int end,
370                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
371                    throws com.liferay.portal.kernel.exception.SystemException {
372                    return getPersistence()
373                                       .findByUserId(userId, start, end, orderByComparator);
374            }
375    
376            /**
377            * Returns the first user notification event in the ordered set where userId = &#63;.
378            *
379            * <p>
380            * 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.
381            * </p>
382            *
383            * @param userId the user ID
384            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
385            * @return the first matching user notification event
386            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
387            * @throws SystemException if a system exception occurred
388            */
389            public static com.liferay.portal.model.UserNotificationEvent findByUserId_First(
390                    long userId,
391                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
392                    throws com.liferay.portal.NoSuchUserNotificationEventException,
393                            com.liferay.portal.kernel.exception.SystemException {
394                    return getPersistence().findByUserId_First(userId, orderByComparator);
395            }
396    
397            /**
398            * Returns the last user notification event in the ordered set where userId = &#63;.
399            *
400            * <p>
401            * 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.
402            * </p>
403            *
404            * @param userId the user ID
405            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
406            * @return the last matching user notification event
407            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
408            * @throws SystemException if a system exception occurred
409            */
410            public static com.liferay.portal.model.UserNotificationEvent findByUserId_Last(
411                    long userId,
412                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
413                    throws com.liferay.portal.NoSuchUserNotificationEventException,
414                            com.liferay.portal.kernel.exception.SystemException {
415                    return getPersistence().findByUserId_Last(userId, orderByComparator);
416            }
417    
418            /**
419            * Returns the user notification events before and after the current user notification event in the ordered set where userId = &#63;.
420            *
421            * <p>
422            * 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.
423            * </p>
424            *
425            * @param userNotificationEventId the primary key of the current user notification event
426            * @param userId the user ID
427            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
428            * @return the previous, current, and next user notification event
429            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
430            * @throws SystemException if a system exception occurred
431            */
432            public static com.liferay.portal.model.UserNotificationEvent[] findByUserId_PrevAndNext(
433                    long userNotificationEventId, long userId,
434                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
435                    throws com.liferay.portal.NoSuchUserNotificationEventException,
436                            com.liferay.portal.kernel.exception.SystemException {
437                    return getPersistence()
438                                       .findByUserId_PrevAndNext(userNotificationEventId, userId,
439                            orderByComparator);
440            }
441    
442            /**
443            * Returns all the user notification events where userId = &#63; and archived = &#63;.
444            *
445            * @param userId the user ID
446            * @param archived the archived
447            * @return the matching user notification events
448            * @throws SystemException if a system exception occurred
449            */
450            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
451                    long userId, boolean archived)
452                    throws com.liferay.portal.kernel.exception.SystemException {
453                    return getPersistence().findByU_A(userId, archived);
454            }
455    
456            /**
457            * Returns a range of all the user notification events where userId = &#63; and archived = &#63;.
458            *
459            * <p>
460            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
461            * </p>
462            *
463            * @param userId the user ID
464            * @param archived the archived
465            * @param start the lower bound of the range of user notification events
466            * @param end the upper bound of the range of user notification events (not inclusive)
467            * @return the range of matching user notification events
468            * @throws SystemException if a system exception occurred
469            */
470            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
471                    long userId, boolean archived, int start, int end)
472                    throws com.liferay.portal.kernel.exception.SystemException {
473                    return getPersistence().findByU_A(userId, archived, start, end);
474            }
475    
476            /**
477            * Returns an ordered range of all the user notification events where userId = &#63; and archived = &#63;.
478            *
479            * <p>
480            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
481            * </p>
482            *
483            * @param userId the user ID
484            * @param archived the archived
485            * @param start the lower bound of the range of user notification events
486            * @param end the upper bound of the range of user notification events (not inclusive)
487            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
488            * @return the ordered range of matching user notification events
489            * @throws SystemException if a system exception occurred
490            */
491            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
492                    long userId, boolean archived, int start, int end,
493                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
494                    throws com.liferay.portal.kernel.exception.SystemException {
495                    return getPersistence()
496                                       .findByU_A(userId, archived, start, end, orderByComparator);
497            }
498    
499            /**
500            * Returns the first user notification event in the ordered set where userId = &#63; and archived = &#63;.
501            *
502            * <p>
503            * 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.
504            * </p>
505            *
506            * @param userId the user ID
507            * @param archived the archived
508            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
509            * @return the first matching user notification event
510            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
511            * @throws SystemException if a system exception occurred
512            */
513            public static com.liferay.portal.model.UserNotificationEvent findByU_A_First(
514                    long userId, boolean archived,
515                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
516                    throws com.liferay.portal.NoSuchUserNotificationEventException,
517                            com.liferay.portal.kernel.exception.SystemException {
518                    return getPersistence()
519                                       .findByU_A_First(userId, archived, orderByComparator);
520            }
521    
522            /**
523            * Returns the last user notification event in the ordered set where userId = &#63; and archived = &#63;.
524            *
525            * <p>
526            * 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.
527            * </p>
528            *
529            * @param userId the user ID
530            * @param archived the archived
531            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
532            * @return the last matching user notification event
533            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
534            * @throws SystemException if a system exception occurred
535            */
536            public static com.liferay.portal.model.UserNotificationEvent findByU_A_Last(
537                    long userId, boolean archived,
538                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
539                    throws com.liferay.portal.NoSuchUserNotificationEventException,
540                            com.liferay.portal.kernel.exception.SystemException {
541                    return getPersistence()
542                                       .findByU_A_Last(userId, archived, orderByComparator);
543            }
544    
545            /**
546            * Returns the user notification events before and after the current user notification event in the ordered set where userId = &#63; and archived = &#63;.
547            *
548            * <p>
549            * 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.
550            * </p>
551            *
552            * @param userNotificationEventId the primary key of the current user notification event
553            * @param userId the user ID
554            * @param archived the archived
555            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
556            * @return the previous, current, and next user notification event
557            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
558            * @throws SystemException if a system exception occurred
559            */
560            public static com.liferay.portal.model.UserNotificationEvent[] findByU_A_PrevAndNext(
561                    long userNotificationEventId, long userId, boolean archived,
562                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
563                    throws com.liferay.portal.NoSuchUserNotificationEventException,
564                            com.liferay.portal.kernel.exception.SystemException {
565                    return getPersistence()
566                                       .findByU_A_PrevAndNext(userNotificationEventId, userId,
567                            archived, orderByComparator);
568            }
569    
570            /**
571            * Returns all the user notification events.
572            *
573            * @return the user notification events
574            * @throws SystemException if a system exception occurred
575            */
576            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll()
577                    throws com.liferay.portal.kernel.exception.SystemException {
578                    return getPersistence().findAll();
579            }
580    
581            /**
582            * Returns a range of all the user notification events.
583            *
584            * <p>
585            * 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.
586            * </p>
587            *
588            * @param start the lower bound of the range of user notification events
589            * @param end the upper bound of the range of user notification events (not inclusive)
590            * @return the range of user notification events
591            * @throws SystemException if a system exception occurred
592            */
593            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll(
594                    int start, int end)
595                    throws com.liferay.portal.kernel.exception.SystemException {
596                    return getPersistence().findAll(start, end);
597            }
598    
599            /**
600            * Returns an ordered range of all the user notification events.
601            *
602            * <p>
603            * 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.
604            * </p>
605            *
606            * @param start the lower bound of the range of user notification events
607            * @param end the upper bound of the range of user notification events (not inclusive)
608            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
609            * @return the ordered range of user notification events
610            * @throws SystemException if a system exception occurred
611            */
612            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll(
613                    int start, int end,
614                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    return getPersistence().findAll(start, end, orderByComparator);
617            }
618    
619            /**
620            * Removes all the user notification events where uuid = &#63; from the database.
621            *
622            * @param uuid the uuid
623            * @throws SystemException if a system exception occurred
624            */
625            public static void removeByUuid(java.lang.String uuid)
626                    throws com.liferay.portal.kernel.exception.SystemException {
627                    getPersistence().removeByUuid(uuid);
628            }
629    
630            /**
631            * Removes all the user notification events where userId = &#63; from the database.
632            *
633            * @param userId the user ID
634            * @throws SystemException if a system exception occurred
635            */
636            public static void removeByUserId(long userId)
637                    throws com.liferay.portal.kernel.exception.SystemException {
638                    getPersistence().removeByUserId(userId);
639            }
640    
641            /**
642            * Removes all the user notification events where userId = &#63; and archived = &#63; from the database.
643            *
644            * @param userId the user ID
645            * @param archived the archived
646            * @throws SystemException if a system exception occurred
647            */
648            public static void removeByU_A(long userId, boolean archived)
649                    throws com.liferay.portal.kernel.exception.SystemException {
650                    getPersistence().removeByU_A(userId, archived);
651            }
652    
653            /**
654            * Removes all the user notification events from the database.
655            *
656            * @throws SystemException if a system exception occurred
657            */
658            public static void removeAll()
659                    throws com.liferay.portal.kernel.exception.SystemException {
660                    getPersistence().removeAll();
661            }
662    
663            /**
664            * Returns the number of user notification events where uuid = &#63;.
665            *
666            * @param uuid the uuid
667            * @return the number of matching user notification events
668            * @throws SystemException if a system exception occurred
669            */
670            public static int countByUuid(java.lang.String uuid)
671                    throws com.liferay.portal.kernel.exception.SystemException {
672                    return getPersistence().countByUuid(uuid);
673            }
674    
675            /**
676            * Returns the number of user notification events where userId = &#63;.
677            *
678            * @param userId the user ID
679            * @return the number of matching user notification events
680            * @throws SystemException if a system exception occurred
681            */
682            public static int countByUserId(long userId)
683                    throws com.liferay.portal.kernel.exception.SystemException {
684                    return getPersistence().countByUserId(userId);
685            }
686    
687            /**
688            * Returns the number of user notification events where userId = &#63; and archived = &#63;.
689            *
690            * @param userId the user ID
691            * @param archived the archived
692            * @return the number of matching user notification events
693            * @throws SystemException if a system exception occurred
694            */
695            public static int countByU_A(long userId, boolean archived)
696                    throws com.liferay.portal.kernel.exception.SystemException {
697                    return getPersistence().countByU_A(userId, archived);
698            }
699    
700            /**
701            * Returns the number of user notification events.
702            *
703            * @return the number of user notification events
704            * @throws SystemException if a system exception occurred
705            */
706            public static int countAll()
707                    throws com.liferay.portal.kernel.exception.SystemException {
708                    return getPersistence().countAll();
709            }
710    
711            public static UserNotificationEventPersistence getPersistence() {
712                    if (_persistence == null) {
713                            _persistence = (UserNotificationEventPersistence)PortalBeanLocatorUtil.locate(UserNotificationEventPersistence.class.getName());
714    
715                            ReferenceRegistry.registerReference(UserNotificationEventUtil.class,
716                                    "_persistence");
717                    }
718    
719                    return _persistence;
720            }
721    
722            public void setPersistence(UserNotificationEventPersistence persistence) {
723                    _persistence = persistence;
724    
725                    ReferenceRegistry.registerReference(UserNotificationEventUtil.class,
726                            "_persistence");
727            }
728    
729            private static UserNotificationEventPersistence _persistence;
730    }