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