001    /**
002     * Copyright (c) 2000-2012 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            * <p>
253            * 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.
254            * </p>
255            *
256            * @param uuid the uuid
257            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
258            * @return the first matching user notification event
259            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
260            * @throws SystemException if a system exception occurred
261            */
262            public static com.liferay.portal.model.UserNotificationEvent findByUuid_First(
263                    java.lang.String uuid,
264                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
265                    throws com.liferay.portal.NoSuchUserNotificationEventException,
266                            com.liferay.portal.kernel.exception.SystemException {
267                    return getPersistence().findByUuid_First(uuid, orderByComparator);
268            }
269    
270            /**
271            * Returns the last user notification event in the ordered set where uuid = &#63;.
272            *
273            * <p>
274            * 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.
275            * </p>
276            *
277            * @param uuid the uuid
278            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
279            * @return the last matching user notification event
280            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
281            * @throws SystemException if a system exception occurred
282            */
283            public static com.liferay.portal.model.UserNotificationEvent findByUuid_Last(
284                    java.lang.String uuid,
285                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
286                    throws com.liferay.portal.NoSuchUserNotificationEventException,
287                            com.liferay.portal.kernel.exception.SystemException {
288                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
289            }
290    
291            /**
292            * Returns the user notification events before and after the current user notification event in the ordered set where uuid = &#63;.
293            *
294            * <p>
295            * 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.
296            * </p>
297            *
298            * @param userNotificationEventId the primary key of the current user notification event
299            * @param uuid the uuid
300            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
301            * @return the previous, current, and next user notification event
302            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
303            * @throws SystemException if a system exception occurred
304            */
305            public static com.liferay.portal.model.UserNotificationEvent[] findByUuid_PrevAndNext(
306                    long userNotificationEventId, java.lang.String uuid,
307                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
308                    throws com.liferay.portal.NoSuchUserNotificationEventException,
309                            com.liferay.portal.kernel.exception.SystemException {
310                    return getPersistence()
311                                       .findByUuid_PrevAndNext(userNotificationEventId, uuid,
312                            orderByComparator);
313            }
314    
315            /**
316            * Returns all the user notification events where userId = &#63;.
317            *
318            * @param userId the user ID
319            * @return the matching user notification events
320            * @throws SystemException if a system exception occurred
321            */
322            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
323                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
324                    return getPersistence().findByUserId(userId);
325            }
326    
327            /**
328            * Returns a range of all the user notification events where userId = &#63;.
329            *
330            * <p>
331            * 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.
332            * </p>
333            *
334            * @param userId the user ID
335            * @param start the lower bound of the range of user notification events
336            * @param end the upper bound of the range of user notification events (not inclusive)
337            * @return the range of 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, int start, int end)
342                    throws com.liferay.portal.kernel.exception.SystemException {
343                    return getPersistence().findByUserId(userId, start, end);
344            }
345    
346            /**
347            * Returns an ordered range of all the user notification events where userId = &#63;.
348            *
349            * <p>
350            * 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.
351            * </p>
352            *
353            * @param userId the user ID
354            * @param start the lower bound of the range of user notification events
355            * @param end the upper bound of the range of user notification events (not inclusive)
356            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
357            * @return the ordered range of matching user notification events
358            * @throws SystemException if a system exception occurred
359            */
360            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
361                    long userId, int start, int end,
362                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
363                    throws com.liferay.portal.kernel.exception.SystemException {
364                    return getPersistence()
365                                       .findByUserId(userId, start, end, orderByComparator);
366            }
367    
368            /**
369            * Returns the first user notification event in the ordered set where userId = &#63;.
370            *
371            * <p>
372            * 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.
373            * </p>
374            *
375            * @param userId the user ID
376            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
377            * @return the first matching user notification event
378            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
379            * @throws SystemException if a system exception occurred
380            */
381            public static com.liferay.portal.model.UserNotificationEvent findByUserId_First(
382                    long userId,
383                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
384                    throws com.liferay.portal.NoSuchUserNotificationEventException,
385                            com.liferay.portal.kernel.exception.SystemException {
386                    return getPersistence().findByUserId_First(userId, orderByComparator);
387            }
388    
389            /**
390            * Returns the last user notification event in the ordered set where userId = &#63;.
391            *
392            * <p>
393            * 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.
394            * </p>
395            *
396            * @param userId the user ID
397            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
398            * @return the last matching user notification event
399            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
400            * @throws SystemException if a system exception occurred
401            */
402            public static com.liferay.portal.model.UserNotificationEvent findByUserId_Last(
403                    long userId,
404                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
405                    throws com.liferay.portal.NoSuchUserNotificationEventException,
406                            com.liferay.portal.kernel.exception.SystemException {
407                    return getPersistence().findByUserId_Last(userId, orderByComparator);
408            }
409    
410            /**
411            * Returns the user notification events before and after the current user notification event in the ordered set where userId = &#63;.
412            *
413            * <p>
414            * 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.
415            * </p>
416            *
417            * @param userNotificationEventId the primary key of the current user notification event
418            * @param userId the user ID
419            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
420            * @return the previous, current, and next user notification event
421            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
422            * @throws SystemException if a system exception occurred
423            */
424            public static com.liferay.portal.model.UserNotificationEvent[] findByUserId_PrevAndNext(
425                    long userNotificationEventId, long userId,
426                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
427                    throws com.liferay.portal.NoSuchUserNotificationEventException,
428                            com.liferay.portal.kernel.exception.SystemException {
429                    return getPersistence()
430                                       .findByUserId_PrevAndNext(userNotificationEventId, userId,
431                            orderByComparator);
432            }
433    
434            /**
435            * Returns all the user notification events where userId = &#63; and archived = &#63;.
436            *
437            * @param userId the user ID
438            * @param archived the archived
439            * @return the matching user notification events
440            * @throws SystemException if a system exception occurred
441            */
442            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
443                    long userId, boolean archived)
444                    throws com.liferay.portal.kernel.exception.SystemException {
445                    return getPersistence().findByU_A(userId, archived);
446            }
447    
448            /**
449            * Returns a range of all the user notification events where userId = &#63; and archived = &#63;.
450            *
451            * <p>
452            * 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.
453            * </p>
454            *
455            * @param userId the user ID
456            * @param archived the archived
457            * @param start the lower bound of the range of user notification events
458            * @param end the upper bound of the range of user notification events (not inclusive)
459            * @return the range of matching user notification events
460            * @throws SystemException if a system exception occurred
461            */
462            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
463                    long userId, boolean archived, int start, int end)
464                    throws com.liferay.portal.kernel.exception.SystemException {
465                    return getPersistence().findByU_A(userId, archived, start, end);
466            }
467    
468            /**
469            * Returns an ordered range of all the user notification events where userId = &#63; and archived = &#63;.
470            *
471            * <p>
472            * 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.
473            * </p>
474            *
475            * @param userId the user ID
476            * @param archived the archived
477            * @param start the lower bound of the range of user notification events
478            * @param end the upper bound of the range of user notification events (not inclusive)
479            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
480            * @return the ordered range of matching user notification events
481            * @throws SystemException if a system exception occurred
482            */
483            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
484                    long userId, boolean archived, int start, int end,
485                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
486                    throws com.liferay.portal.kernel.exception.SystemException {
487                    return getPersistence()
488                                       .findByU_A(userId, archived, start, end, orderByComparator);
489            }
490    
491            /**
492            * Returns the first user notification event in the ordered set where userId = &#63; and archived = &#63;.
493            *
494            * <p>
495            * 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.
496            * </p>
497            *
498            * @param userId the user ID
499            * @param archived the archived
500            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
501            * @return the first matching user notification event
502            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
503            * @throws SystemException if a system exception occurred
504            */
505            public static com.liferay.portal.model.UserNotificationEvent findByU_A_First(
506                    long userId, boolean archived,
507                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
508                    throws com.liferay.portal.NoSuchUserNotificationEventException,
509                            com.liferay.portal.kernel.exception.SystemException {
510                    return getPersistence()
511                                       .findByU_A_First(userId, archived, orderByComparator);
512            }
513    
514            /**
515            * Returns the last user notification event in the ordered set where userId = &#63; and archived = &#63;.
516            *
517            * <p>
518            * 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.
519            * </p>
520            *
521            * @param userId the user ID
522            * @param archived the archived
523            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
524            * @return the last matching user notification event
525            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
526            * @throws SystemException if a system exception occurred
527            */
528            public static com.liferay.portal.model.UserNotificationEvent findByU_A_Last(
529                    long userId, boolean archived,
530                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
531                    throws com.liferay.portal.NoSuchUserNotificationEventException,
532                            com.liferay.portal.kernel.exception.SystemException {
533                    return getPersistence()
534                                       .findByU_A_Last(userId, archived, orderByComparator);
535            }
536    
537            /**
538            * Returns the user notification events before and after the current user notification event in the ordered set where userId = &#63; and archived = &#63;.
539            *
540            * <p>
541            * 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.
542            * </p>
543            *
544            * @param userNotificationEventId the primary key of the current user notification event
545            * @param userId the user ID
546            * @param archived the archived
547            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
548            * @return the previous, current, and next user notification event
549            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
550            * @throws SystemException if a system exception occurred
551            */
552            public static com.liferay.portal.model.UserNotificationEvent[] findByU_A_PrevAndNext(
553                    long userNotificationEventId, long userId, boolean archived,
554                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
555                    throws com.liferay.portal.NoSuchUserNotificationEventException,
556                            com.liferay.portal.kernel.exception.SystemException {
557                    return getPersistence()
558                                       .findByU_A_PrevAndNext(userNotificationEventId, userId,
559                            archived, orderByComparator);
560            }
561    
562            /**
563            * Returns all the user notification events.
564            *
565            * @return the user notification events
566            * @throws SystemException if a system exception occurred
567            */
568            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll()
569                    throws com.liferay.portal.kernel.exception.SystemException {
570                    return getPersistence().findAll();
571            }
572    
573            /**
574            * Returns a range of all the user notification events.
575            *
576            * <p>
577            * 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.
578            * </p>
579            *
580            * @param start the lower bound of the range of user notification events
581            * @param end the upper bound of the range of user notification events (not inclusive)
582            * @return the range of user notification events
583            * @throws SystemException if a system exception occurred
584            */
585            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll(
586                    int start, int end)
587                    throws com.liferay.portal.kernel.exception.SystemException {
588                    return getPersistence().findAll(start, end);
589            }
590    
591            /**
592            * Returns an ordered range of all the user notification events.
593            *
594            * <p>
595            * 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.
596            * </p>
597            *
598            * @param start the lower bound of the range of user notification events
599            * @param end the upper bound of the range of user notification events (not inclusive)
600            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
601            * @return the ordered range of user notification events
602            * @throws SystemException if a system exception occurred
603            */
604            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll(
605                    int start, int end,
606                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
607                    throws com.liferay.portal.kernel.exception.SystemException {
608                    return getPersistence().findAll(start, end, orderByComparator);
609            }
610    
611            /**
612            * Removes all the user notification events where uuid = &#63; from the database.
613            *
614            * @param uuid the uuid
615            * @throws SystemException if a system exception occurred
616            */
617            public static void removeByUuid(java.lang.String uuid)
618                    throws com.liferay.portal.kernel.exception.SystemException {
619                    getPersistence().removeByUuid(uuid);
620            }
621    
622            /**
623            * Removes all the user notification events where userId = &#63; from the database.
624            *
625            * @param userId the user ID
626            * @throws SystemException if a system exception occurred
627            */
628            public static void removeByUserId(long userId)
629                    throws com.liferay.portal.kernel.exception.SystemException {
630                    getPersistence().removeByUserId(userId);
631            }
632    
633            /**
634            * Removes all the user notification events where userId = &#63; and archived = &#63; from the database.
635            *
636            * @param userId the user ID
637            * @param archived the archived
638            * @throws SystemException if a system exception occurred
639            */
640            public static void removeByU_A(long userId, boolean archived)
641                    throws com.liferay.portal.kernel.exception.SystemException {
642                    getPersistence().removeByU_A(userId, archived);
643            }
644    
645            /**
646            * Removes all the user notification events from the database.
647            *
648            * @throws SystemException if a system exception occurred
649            */
650            public static void removeAll()
651                    throws com.liferay.portal.kernel.exception.SystemException {
652                    getPersistence().removeAll();
653            }
654    
655            /**
656            * Returns the number of user notification events where uuid = &#63;.
657            *
658            * @param uuid the uuid
659            * @return the number of matching user notification events
660            * @throws SystemException if a system exception occurred
661            */
662            public static int countByUuid(java.lang.String uuid)
663                    throws com.liferay.portal.kernel.exception.SystemException {
664                    return getPersistence().countByUuid(uuid);
665            }
666    
667            /**
668            * Returns the number of user notification events where userId = &#63;.
669            *
670            * @param userId the user ID
671            * @return the number of matching user notification events
672            * @throws SystemException if a system exception occurred
673            */
674            public static int countByUserId(long userId)
675                    throws com.liferay.portal.kernel.exception.SystemException {
676                    return getPersistence().countByUserId(userId);
677            }
678    
679            /**
680            * Returns the number of user notification events where userId = &#63; and archived = &#63;.
681            *
682            * @param userId the user ID
683            * @param archived the archived
684            * @return the number of matching user notification events
685            * @throws SystemException if a system exception occurred
686            */
687            public static int countByU_A(long userId, boolean archived)
688                    throws com.liferay.portal.kernel.exception.SystemException {
689                    return getPersistence().countByU_A(userId, archived);
690            }
691    
692            /**
693            * Returns the number of user notification events.
694            *
695            * @return the number of user notification events
696            * @throws SystemException if a system exception occurred
697            */
698            public static int countAll()
699                    throws com.liferay.portal.kernel.exception.SystemException {
700                    return getPersistence().countAll();
701            }
702    
703            public static UserNotificationEventPersistence getPersistence() {
704                    if (_persistence == null) {
705                            _persistence = (UserNotificationEventPersistence)PortalBeanLocatorUtil.locate(UserNotificationEventPersistence.class.getName());
706    
707                            ReferenceRegistry.registerReference(UserNotificationEventUtil.class,
708                                    "_persistence");
709                    }
710    
711                    return _persistence;
712            }
713    
714            public void setPersistence(UserNotificationEventPersistence persistence) {
715                    _persistence = persistence;
716    
717                    ReferenceRegistry.registerReference(UserNotificationEventUtil.class,
718                            "_persistence");
719            }
720    
721            private static UserNotificationEventPersistence _persistence;
722    }