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)
098             */
099            public static UserNotificationEvent update(
100                    UserNotificationEvent userNotificationEvent) throws SystemException {
101                    return getPersistence().update(userNotificationEvent);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static UserNotificationEvent update(
108                    UserNotificationEvent userNotificationEvent,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(userNotificationEvent, serviceContext);
111            }
112    
113            /**
114            * Caches the user notification event in the entity cache if it is enabled.
115            *
116            * @param userNotificationEvent the user notification event
117            */
118            public static void cacheResult(
119                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent) {
120                    getPersistence().cacheResult(userNotificationEvent);
121            }
122    
123            /**
124            * Caches the user notification events in the entity cache if it is enabled.
125            *
126            * @param userNotificationEvents the user notification events
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portal.model.UserNotificationEvent> userNotificationEvents) {
130                    getPersistence().cacheResult(userNotificationEvents);
131            }
132    
133            /**
134            * Creates a new user notification event with the primary key. Does not add the user notification event to the database.
135            *
136            * @param userNotificationEventId the primary key for the new user notification event
137            * @return the new user notification event
138            */
139            public static com.liferay.portal.model.UserNotificationEvent create(
140                    long userNotificationEventId) {
141                    return getPersistence().create(userNotificationEventId);
142            }
143    
144            /**
145            * Removes the user notification event with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param userNotificationEventId the primary key of the user notification event
148            * @return the user notification event that was removed
149            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portal.model.UserNotificationEvent remove(
153                    long userNotificationEventId)
154                    throws com.liferay.portal.NoSuchUserNotificationEventException,
155                            com.liferay.portal.kernel.exception.SystemException {
156                    return getPersistence().remove(userNotificationEventId);
157            }
158    
159            public static com.liferay.portal.model.UserNotificationEvent updateImpl(
160                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence().updateImpl(userNotificationEvent);
163            }
164    
165            /**
166            * Returns the user notification event with the primary key or throws a {@link com.liferay.portal.NoSuchUserNotificationEventException} if it could not be found.
167            *
168            * @param userNotificationEventId the primary key of the user notification event
169            * @return the user notification event
170            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public static com.liferay.portal.model.UserNotificationEvent findByPrimaryKey(
174                    long userNotificationEventId)
175                    throws com.liferay.portal.NoSuchUserNotificationEventException,
176                            com.liferay.portal.kernel.exception.SystemException {
177                    return getPersistence().findByPrimaryKey(userNotificationEventId);
178            }
179    
180            /**
181            * Returns the user notification event with the primary key or returns <code>null</code> if it could not be found.
182            *
183            * @param userNotificationEventId the primary key of the user notification event
184            * @return the user notification event, or <code>null</code> if a user notification event with the primary key could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public static com.liferay.portal.model.UserNotificationEvent fetchByPrimaryKey(
188                    long userNotificationEventId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().fetchByPrimaryKey(userNotificationEventId);
191            }
192    
193            /**
194            * Returns all the user notification events where uuid = &#63;.
195            *
196            * @param uuid the uuid
197            * @return the matching user notification events
198            * @throws SystemException if a system exception occurred
199            */
200            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
201                    java.lang.String uuid)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().findByUuid(uuid);
204            }
205    
206            /**
207            * Returns a range of all the user notification events where uuid = &#63;.
208            *
209            * <p>
210            * 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.
211            * </p>
212            *
213            * @param uuid the uuid
214            * @param start the lower bound of the range of user notification events
215            * @param end the upper bound of the range of user notification events (not inclusive)
216            * @return the range of matching user notification events
217            * @throws SystemException if a system exception occurred
218            */
219            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
220                    java.lang.String uuid, int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getPersistence().findByUuid(uuid, start, end);
223            }
224    
225            /**
226            * Returns an ordered range of all the user notification events where uuid = &#63;.
227            *
228            * <p>
229            * 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.
230            * </p>
231            *
232            * @param uuid the uuid
233            * @param start the lower bound of the range of user notification events
234            * @param end the upper bound of the range of user notification events (not inclusive)
235            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
236            * @return the ordered range of matching user notification events
237            * @throws SystemException if a system exception occurred
238            */
239            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
240                    java.lang.String uuid, int start, int end,
241                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
244            }
245    
246            /**
247            * Returns the first user notification event in the ordered set where uuid = &#63;.
248            *
249            * @param uuid the uuid
250            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
251            * @return the first matching user notification event
252            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
253            * @throws SystemException if a system exception occurred
254            */
255            public static com.liferay.portal.model.UserNotificationEvent findByUuid_First(
256                    java.lang.String uuid,
257                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
258                    throws com.liferay.portal.NoSuchUserNotificationEventException,
259                            com.liferay.portal.kernel.exception.SystemException {
260                    return getPersistence().findByUuid_First(uuid, orderByComparator);
261            }
262    
263            /**
264            * Returns the first user notification event in the ordered set where uuid = &#63;.
265            *
266            * @param uuid the uuid
267            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
268            * @return the first matching user notification event, or <code>null</code> if a matching user notification event could not be found
269            * @throws SystemException if a system exception occurred
270            */
271            public static com.liferay.portal.model.UserNotificationEvent fetchByUuid_First(
272                    java.lang.String uuid,
273                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
274                    throws com.liferay.portal.kernel.exception.SystemException {
275                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
276            }
277    
278            /**
279            * Returns the last user notification event in the ordered set where uuid = &#63;.
280            *
281            * @param uuid the uuid
282            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
283            * @return the last matching user notification event
284            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
285            * @throws SystemException if a system exception occurred
286            */
287            public static com.liferay.portal.model.UserNotificationEvent findByUuid_Last(
288                    java.lang.String uuid,
289                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
290                    throws com.liferay.portal.NoSuchUserNotificationEventException,
291                            com.liferay.portal.kernel.exception.SystemException {
292                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
293            }
294    
295            /**
296            * Returns the last user notification event in the ordered set where uuid = &#63;.
297            *
298            * @param uuid the uuid
299            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
300            * @return the last matching user notification event, or <code>null</code> if a matching user notification event could not be found
301            * @throws SystemException if a system exception occurred
302            */
303            public static com.liferay.portal.model.UserNotificationEvent fetchByUuid_Last(
304                    java.lang.String uuid,
305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
306                    throws com.liferay.portal.kernel.exception.SystemException {
307                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
308            }
309    
310            /**
311            * Returns the user notification events before and after the current user notification event in the ordered set where uuid = &#63;.
312            *
313            * @param userNotificationEventId the primary key of the current user notification event
314            * @param uuid the uuid
315            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
316            * @return the previous, current, and next user notification event
317            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
318            * @throws SystemException if a system exception occurred
319            */
320            public static com.liferay.portal.model.UserNotificationEvent[] findByUuid_PrevAndNext(
321                    long userNotificationEventId, java.lang.String uuid,
322                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
323                    throws com.liferay.portal.NoSuchUserNotificationEventException,
324                            com.liferay.portal.kernel.exception.SystemException {
325                    return getPersistence()
326                                       .findByUuid_PrevAndNext(userNotificationEventId, uuid,
327                            orderByComparator);
328            }
329    
330            /**
331            * Returns all the user notification events where uuid = &#63; and companyId = &#63;.
332            *
333            * @param uuid the uuid
334            * @param companyId the company ID
335            * @return the matching user notification events
336            * @throws SystemException if a system exception occurred
337            */
338            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid_C(
339                    java.lang.String uuid, long companyId)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence().findByUuid_C(uuid, companyId);
342            }
343    
344            /**
345            * Returns a range of all the user notification events where uuid = &#63; and companyId = &#63;.
346            *
347            * <p>
348            * 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.
349            * </p>
350            *
351            * @param uuid the uuid
352            * @param companyId the company 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> findByUuid_C(
359                    java.lang.String uuid, long companyId, int start, int end)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
362            }
363    
364            /**
365            * Returns an ordered range of all the user notification events where uuid = &#63; and companyId = &#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 uuid the uuid
372            * @param companyId the company ID
373            * @param start the lower bound of the range of user notification events
374            * @param end the upper bound of the range of user notification events (not inclusive)
375            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
376            * @return the ordered range of matching user notification events
377            * @throws SystemException if a system exception occurred
378            */
379            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid_C(
380                    java.lang.String uuid, long companyId, int start, int end,
381                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
382                    throws com.liferay.portal.kernel.exception.SystemException {
383                    return getPersistence()
384                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
385            }
386    
387            /**
388            * Returns the first user notification event in the ordered set where uuid = &#63; and companyId = &#63;.
389            *
390            * @param uuid the uuid
391            * @param companyId the company ID
392            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
393            * @return the first matching user notification event
394            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
395            * @throws SystemException if a system exception occurred
396            */
397            public static com.liferay.portal.model.UserNotificationEvent findByUuid_C_First(
398                    java.lang.String uuid, long companyId,
399                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
400                    throws com.liferay.portal.NoSuchUserNotificationEventException,
401                            com.liferay.portal.kernel.exception.SystemException {
402                    return getPersistence()
403                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
404            }
405    
406            /**
407            * Returns the first user notification event in the ordered set where uuid = &#63; and companyId = &#63;.
408            *
409            * @param uuid the uuid
410            * @param companyId the company ID
411            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
412            * @return the first matching user notification event, or <code>null</code> if a matching user notification event could not be found
413            * @throws SystemException if a system exception occurred
414            */
415            public static com.liferay.portal.model.UserNotificationEvent fetchByUuid_C_First(
416                    java.lang.String uuid, long companyId,
417                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
418                    throws com.liferay.portal.kernel.exception.SystemException {
419                    return getPersistence()
420                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
421            }
422    
423            /**
424            * Returns the last user notification event in the ordered set where uuid = &#63; and companyId = &#63;.
425            *
426            * @param uuid the uuid
427            * @param companyId the company ID
428            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
429            * @return the last matching user notification event
430            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
431            * @throws SystemException if a system exception occurred
432            */
433            public static com.liferay.portal.model.UserNotificationEvent findByUuid_C_Last(
434                    java.lang.String uuid, long companyId,
435                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
436                    throws com.liferay.portal.NoSuchUserNotificationEventException,
437                            com.liferay.portal.kernel.exception.SystemException {
438                    return getPersistence()
439                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
440            }
441    
442            /**
443            * Returns the last user notification event in the ordered set where uuid = &#63; and companyId = &#63;.
444            *
445            * @param uuid the uuid
446            * @param companyId the company ID
447            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
448            * @return the last matching user notification event, or <code>null</code> if a matching user notification event could not be found
449            * @throws SystemException if a system exception occurred
450            */
451            public static com.liferay.portal.model.UserNotificationEvent fetchByUuid_C_Last(
452                    java.lang.String uuid, long companyId,
453                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
454                    throws com.liferay.portal.kernel.exception.SystemException {
455                    return getPersistence()
456                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
457            }
458    
459            /**
460            * Returns the user notification events before and after the current user notification event in the ordered set where uuid = &#63; and companyId = &#63;.
461            *
462            * @param userNotificationEventId the primary key of the current user notification event
463            * @param uuid the uuid
464            * @param companyId the company ID
465            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
466            * @return the previous, current, and next user notification event
467            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
468            * @throws SystemException if a system exception occurred
469            */
470            public static com.liferay.portal.model.UserNotificationEvent[] findByUuid_C_PrevAndNext(
471                    long userNotificationEventId, java.lang.String uuid, long companyId,
472                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
473                    throws com.liferay.portal.NoSuchUserNotificationEventException,
474                            com.liferay.portal.kernel.exception.SystemException {
475                    return getPersistence()
476                                       .findByUuid_C_PrevAndNext(userNotificationEventId, uuid,
477                            companyId, orderByComparator);
478            }
479    
480            /**
481            * Returns all the user notification events where userId = &#63;.
482            *
483            * @param userId the user ID
484            * @return the matching user notification events
485            * @throws SystemException if a system exception occurred
486            */
487            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
488                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
489                    return getPersistence().findByUserId(userId);
490            }
491    
492            /**
493            * Returns a range of all the user notification events where userId = &#63;.
494            *
495            * <p>
496            * 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.
497            * </p>
498            *
499            * @param userId the user ID
500            * @param start the lower bound of the range of user notification events
501            * @param end the upper bound of the range of user notification events (not inclusive)
502            * @return the range of matching user notification events
503            * @throws SystemException if a system exception occurred
504            */
505            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
506                    long userId, int start, int end)
507                    throws com.liferay.portal.kernel.exception.SystemException {
508                    return getPersistence().findByUserId(userId, start, end);
509            }
510    
511            /**
512            * Returns an ordered range of all the user notification events where userId = &#63;.
513            *
514            * <p>
515            * 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.
516            * </p>
517            *
518            * @param userId the user ID
519            * @param start the lower bound of the range of user notification events
520            * @param end the upper bound of the range of user notification events (not inclusive)
521            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
522            * @return the ordered range of matching user notification events
523            * @throws SystemException if a system exception occurred
524            */
525            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
526                    long userId, int start, int end,
527                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
528                    throws com.liferay.portal.kernel.exception.SystemException {
529                    return getPersistence()
530                                       .findByUserId(userId, start, end, orderByComparator);
531            }
532    
533            /**
534            * Returns the first user notification event in the ordered set where userId = &#63;.
535            *
536            * @param userId the user ID
537            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
538            * @return the first matching user notification event
539            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
540            * @throws SystemException if a system exception occurred
541            */
542            public static com.liferay.portal.model.UserNotificationEvent findByUserId_First(
543                    long userId,
544                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
545                    throws com.liferay.portal.NoSuchUserNotificationEventException,
546                            com.liferay.portal.kernel.exception.SystemException {
547                    return getPersistence().findByUserId_First(userId, orderByComparator);
548            }
549    
550            /**
551            * Returns the first user notification event in the ordered set where userId = &#63;.
552            *
553            * @param userId the user ID
554            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
555            * @return the first matching user notification event, or <code>null</code> if a matching user notification event could not be found
556            * @throws SystemException if a system exception occurred
557            */
558            public static com.liferay.portal.model.UserNotificationEvent fetchByUserId_First(
559                    long userId,
560                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
561                    throws com.liferay.portal.kernel.exception.SystemException {
562                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
563            }
564    
565            /**
566            * Returns the last user notification event in the ordered set where userId = &#63;.
567            *
568            * @param userId the user ID
569            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
570            * @return the last matching user notification event
571            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
572            * @throws SystemException if a system exception occurred
573            */
574            public static com.liferay.portal.model.UserNotificationEvent findByUserId_Last(
575                    long userId,
576                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
577                    throws com.liferay.portal.NoSuchUserNotificationEventException,
578                            com.liferay.portal.kernel.exception.SystemException {
579                    return getPersistence().findByUserId_Last(userId, orderByComparator);
580            }
581    
582            /**
583            * Returns the last user notification event in the ordered set where userId = &#63;.
584            *
585            * @param userId the user ID
586            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
587            * @return the last matching user notification event, or <code>null</code> if a matching user notification event could not be found
588            * @throws SystemException if a system exception occurred
589            */
590            public static com.liferay.portal.model.UserNotificationEvent fetchByUserId_Last(
591                    long userId,
592                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
593                    throws com.liferay.portal.kernel.exception.SystemException {
594                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
595            }
596    
597            /**
598            * Returns the user notification events before and after the current user notification event in the ordered set where userId = &#63;.
599            *
600            * @param userNotificationEventId the primary key of the current user notification event
601            * @param userId the user ID
602            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
603            * @return the previous, current, and next user notification event
604            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
605            * @throws SystemException if a system exception occurred
606            */
607            public static com.liferay.portal.model.UserNotificationEvent[] findByUserId_PrevAndNext(
608                    long userNotificationEventId, long userId,
609                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
610                    throws com.liferay.portal.NoSuchUserNotificationEventException,
611                            com.liferay.portal.kernel.exception.SystemException {
612                    return getPersistence()
613                                       .findByUserId_PrevAndNext(userNotificationEventId, userId,
614                            orderByComparator);
615            }
616    
617            /**
618            * Returns all the user notification events where userId = &#63; and archived = &#63;.
619            *
620            * @param userId the user ID
621            * @param archived the archived
622            * @return the matching user notification events
623            * @throws SystemException if a system exception occurred
624            */
625            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
626                    long userId, boolean archived)
627                    throws com.liferay.portal.kernel.exception.SystemException {
628                    return getPersistence().findByU_A(userId, archived);
629            }
630    
631            /**
632            * Returns a range of all the user notification events where userId = &#63; and archived = &#63;.
633            *
634            * <p>
635            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
636            * </p>
637            *
638            * @param userId the user ID
639            * @param archived the archived
640            * @param start the lower bound of the range of user notification events
641            * @param end the upper bound of the range of user notification events (not inclusive)
642            * @return the range of matching user notification events
643            * @throws SystemException if a system exception occurred
644            */
645            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
646                    long userId, boolean archived, int start, int end)
647                    throws com.liferay.portal.kernel.exception.SystemException {
648                    return getPersistence().findByU_A(userId, archived, start, end);
649            }
650    
651            /**
652            * Returns an ordered range of all the user notification events where userId = &#63; and archived = &#63;.
653            *
654            * <p>
655            * 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.
656            * </p>
657            *
658            * @param userId the user ID
659            * @param archived the archived
660            * @param start the lower bound of the range of user notification events
661            * @param end the upper bound of the range of user notification events (not inclusive)
662            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
663            * @return the ordered range of matching user notification events
664            * @throws SystemException if a system exception occurred
665            */
666            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findByU_A(
667                    long userId, boolean archived, int start, int end,
668                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
669                    throws com.liferay.portal.kernel.exception.SystemException {
670                    return getPersistence()
671                                       .findByU_A(userId, archived, start, end, orderByComparator);
672            }
673    
674            /**
675            * Returns the first user notification event in the ordered set where userId = &#63; and archived = &#63;.
676            *
677            * @param userId the user ID
678            * @param archived the archived
679            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
680            * @return the first matching user notification event
681            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
682            * @throws SystemException if a system exception occurred
683            */
684            public static com.liferay.portal.model.UserNotificationEvent findByU_A_First(
685                    long userId, boolean archived,
686                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
687                    throws com.liferay.portal.NoSuchUserNotificationEventException,
688                            com.liferay.portal.kernel.exception.SystemException {
689                    return getPersistence()
690                                       .findByU_A_First(userId, archived, orderByComparator);
691            }
692    
693            /**
694            * Returns the first user notification event in the ordered set where userId = &#63; and archived = &#63;.
695            *
696            * @param userId the user ID
697            * @param archived the archived
698            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
699            * @return the first matching user notification event, or <code>null</code> if a matching user notification event could not be found
700            * @throws SystemException if a system exception occurred
701            */
702            public static com.liferay.portal.model.UserNotificationEvent fetchByU_A_First(
703                    long userId, boolean archived,
704                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
705                    throws com.liferay.portal.kernel.exception.SystemException {
706                    return getPersistence()
707                                       .fetchByU_A_First(userId, archived, orderByComparator);
708            }
709    
710            /**
711            * Returns the last user notification event in the ordered set where userId = &#63; and archived = &#63;.
712            *
713            * @param userId the user ID
714            * @param archived the archived
715            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
716            * @return the last matching user notification event
717            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
718            * @throws SystemException if a system exception occurred
719            */
720            public static com.liferay.portal.model.UserNotificationEvent findByU_A_Last(
721                    long userId, boolean archived,
722                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
723                    throws com.liferay.portal.NoSuchUserNotificationEventException,
724                            com.liferay.portal.kernel.exception.SystemException {
725                    return getPersistence()
726                                       .findByU_A_Last(userId, archived, orderByComparator);
727            }
728    
729            /**
730            * Returns the last user notification event in the ordered set where userId = &#63; and archived = &#63;.
731            *
732            * @param userId the user ID
733            * @param archived the archived
734            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
735            * @return the last matching user notification event, or <code>null</code> if a matching user notification event could not be found
736            * @throws SystemException if a system exception occurred
737            */
738            public static com.liferay.portal.model.UserNotificationEvent fetchByU_A_Last(
739                    long userId, boolean archived,
740                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
741                    throws com.liferay.portal.kernel.exception.SystemException {
742                    return getPersistence()
743                                       .fetchByU_A_Last(userId, archived, orderByComparator);
744            }
745    
746            /**
747            * Returns the user notification events before and after the current user notification event in the ordered set where userId = &#63; and archived = &#63;.
748            *
749            * @param userNotificationEventId the primary key of the current user notification event
750            * @param userId the user ID
751            * @param archived the archived
752            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
753            * @return the previous, current, and next user notification event
754            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
755            * @throws SystemException if a system exception occurred
756            */
757            public static com.liferay.portal.model.UserNotificationEvent[] findByU_A_PrevAndNext(
758                    long userNotificationEventId, long userId, boolean archived,
759                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
760                    throws com.liferay.portal.NoSuchUserNotificationEventException,
761                            com.liferay.portal.kernel.exception.SystemException {
762                    return getPersistence()
763                                       .findByU_A_PrevAndNext(userNotificationEventId, userId,
764                            archived, orderByComparator);
765            }
766    
767            /**
768            * Returns all the user notification events.
769            *
770            * @return the user notification events
771            * @throws SystemException if a system exception occurred
772            */
773            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll()
774                    throws com.liferay.portal.kernel.exception.SystemException {
775                    return getPersistence().findAll();
776            }
777    
778            /**
779            * Returns a range of all the user notification events.
780            *
781            * <p>
782            * 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.
783            * </p>
784            *
785            * @param start the lower bound of the range of user notification events
786            * @param end the upper bound of the range of user notification events (not inclusive)
787            * @return the range of user notification events
788            * @throws SystemException if a system exception occurred
789            */
790            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll(
791                    int start, int end)
792                    throws com.liferay.portal.kernel.exception.SystemException {
793                    return getPersistence().findAll(start, end);
794            }
795    
796            /**
797            * Returns an ordered range of all the user notification events.
798            *
799            * <p>
800            * 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.
801            * </p>
802            *
803            * @param start the lower bound of the range of user notification events
804            * @param end the upper bound of the range of user notification events (not inclusive)
805            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
806            * @return the ordered range of user notification events
807            * @throws SystemException if a system exception occurred
808            */
809            public static java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll(
810                    int start, int end,
811                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
812                    throws com.liferay.portal.kernel.exception.SystemException {
813                    return getPersistence().findAll(start, end, orderByComparator);
814            }
815    
816            /**
817            * Removes all the user notification events where uuid = &#63; from the database.
818            *
819            * @param uuid the uuid
820            * @throws SystemException if a system exception occurred
821            */
822            public static void removeByUuid(java.lang.String uuid)
823                    throws com.liferay.portal.kernel.exception.SystemException {
824                    getPersistence().removeByUuid(uuid);
825            }
826    
827            /**
828            * Removes all the user notification events where uuid = &#63; and companyId = &#63; from the database.
829            *
830            * @param uuid the uuid
831            * @param companyId the company ID
832            * @throws SystemException if a system exception occurred
833            */
834            public static void removeByUuid_C(java.lang.String uuid, long companyId)
835                    throws com.liferay.portal.kernel.exception.SystemException {
836                    getPersistence().removeByUuid_C(uuid, companyId);
837            }
838    
839            /**
840            * Removes all the user notification events where userId = &#63; from the database.
841            *
842            * @param userId the user ID
843            * @throws SystemException if a system exception occurred
844            */
845            public static void removeByUserId(long userId)
846                    throws com.liferay.portal.kernel.exception.SystemException {
847                    getPersistence().removeByUserId(userId);
848            }
849    
850            /**
851            * Removes all the user notification events where userId = &#63; and archived = &#63; from the database.
852            *
853            * @param userId the user ID
854            * @param archived the archived
855            * @throws SystemException if a system exception occurred
856            */
857            public static void removeByU_A(long userId, boolean archived)
858                    throws com.liferay.portal.kernel.exception.SystemException {
859                    getPersistence().removeByU_A(userId, archived);
860            }
861    
862            /**
863            * Removes all the user notification events from the database.
864            *
865            * @throws SystemException if a system exception occurred
866            */
867            public static void removeAll()
868                    throws com.liferay.portal.kernel.exception.SystemException {
869                    getPersistence().removeAll();
870            }
871    
872            /**
873            * Returns the number of user notification events where uuid = &#63;.
874            *
875            * @param uuid the uuid
876            * @return the number of matching user notification events
877            * @throws SystemException if a system exception occurred
878            */
879            public static int countByUuid(java.lang.String uuid)
880                    throws com.liferay.portal.kernel.exception.SystemException {
881                    return getPersistence().countByUuid(uuid);
882            }
883    
884            /**
885            * Returns the number of user notification events where uuid = &#63; and companyId = &#63;.
886            *
887            * @param uuid the uuid
888            * @param companyId the company ID
889            * @return the number of matching user notification events
890            * @throws SystemException if a system exception occurred
891            */
892            public static int countByUuid_C(java.lang.String uuid, long companyId)
893                    throws com.liferay.portal.kernel.exception.SystemException {
894                    return getPersistence().countByUuid_C(uuid, companyId);
895            }
896    
897            /**
898            * Returns the number of user notification events where userId = &#63;.
899            *
900            * @param userId the user ID
901            * @return the number of matching user notification events
902            * @throws SystemException if a system exception occurred
903            */
904            public static int countByUserId(long userId)
905                    throws com.liferay.portal.kernel.exception.SystemException {
906                    return getPersistence().countByUserId(userId);
907            }
908    
909            /**
910            * Returns the number of user notification events where userId = &#63; and archived = &#63;.
911            *
912            * @param userId the user ID
913            * @param archived the archived
914            * @return the number of matching user notification events
915            * @throws SystemException if a system exception occurred
916            */
917            public static int countByU_A(long userId, boolean archived)
918                    throws com.liferay.portal.kernel.exception.SystemException {
919                    return getPersistence().countByU_A(userId, archived);
920            }
921    
922            /**
923            * Returns the number of user notification events.
924            *
925            * @return the number of user notification events
926            * @throws SystemException if a system exception occurred
927            */
928            public static int countAll()
929                    throws com.liferay.portal.kernel.exception.SystemException {
930                    return getPersistence().countAll();
931            }
932    
933            public static UserNotificationEventPersistence getPersistence() {
934                    if (_persistence == null) {
935                            _persistence = (UserNotificationEventPersistence)PortalBeanLocatorUtil.locate(UserNotificationEventPersistence.class.getName());
936    
937                            ReferenceRegistry.registerReference(UserNotificationEventUtil.class,
938                                    "_persistence");
939                    }
940    
941                    return _persistence;
942            }
943    
944            /**
945             * @deprecated
946             */
947            public void setPersistence(UserNotificationEventPersistence persistence) {
948            }
949    
950            private static UserNotificationEventPersistence _persistence;
951    }