001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.exception.SystemException;
018    import com.liferay.portal.model.UserNotificationEvent;
019    
020    /**
021     * The persistence interface for the user notification event service.
022     *
023     * <p>
024     * Caching information and settings can be found in <code>portal.properties</code>
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see UserNotificationEventPersistenceImpl
029     * @see UserNotificationEventUtil
030     * @generated
031     */
032    public interface UserNotificationEventPersistence extends BasePersistence<UserNotificationEvent> {
033            /*
034             * NOTE FOR DEVELOPERS:
035             *
036             * Never modify or reference this interface directly. Always use {@link UserNotificationEventUtil} to access the user notification event persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
037             */
038    
039            /**
040            * Caches the user notification event in the entity cache if it is enabled.
041            *
042            * @param userNotificationEvent the user notification event to cache
043            */
044            public void cacheResult(
045                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent);
046    
047            /**
048            * Caches the user notification events in the entity cache if it is enabled.
049            *
050            * @param userNotificationEvents the user notification events to cache
051            */
052            public void cacheResult(
053                    java.util.List<com.liferay.portal.model.UserNotificationEvent> userNotificationEvents);
054    
055            /**
056            * Creates a new user notification event with the primary key. Does not add the user notification event to the database.
057            *
058            * @param userNotificationEventId the primary key for the new user notification event
059            * @return the new user notification event
060            */
061            public com.liferay.portal.model.UserNotificationEvent create(
062                    long userNotificationEventId);
063    
064            /**
065            * Removes the user notification event with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param userNotificationEventId the primary key of the user notification event to remove
068            * @return the user notification event that was removed
069            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public com.liferay.portal.model.UserNotificationEvent remove(
073                    long userNotificationEventId)
074                    throws com.liferay.portal.NoSuchUserNotificationEventException,
075                            com.liferay.portal.kernel.exception.SystemException;
076    
077            public com.liferay.portal.model.UserNotificationEvent updateImpl(
078                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent,
079                    boolean merge)
080                    throws com.liferay.portal.kernel.exception.SystemException;
081    
082            /**
083            * Finds the user notification event with the primary key or throws a {@link com.liferay.portal.NoSuchUserNotificationEventException} if it could not be found.
084            *
085            * @param userNotificationEventId the primary key of the user notification event to find
086            * @return the user notification event
087            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
088            * @throws SystemException if a system exception occurred
089            */
090            public com.liferay.portal.model.UserNotificationEvent findByPrimaryKey(
091                    long userNotificationEventId)
092                    throws com.liferay.portal.NoSuchUserNotificationEventException,
093                            com.liferay.portal.kernel.exception.SystemException;
094    
095            /**
096            * Finds the user notification event with the primary key or returns <code>null</code> if it could not be found.
097            *
098            * @param userNotificationEventId the primary key of the user notification event to find
099            * @return the user notification event, or <code>null</code> if a user notification event with the primary key could not be found
100            * @throws SystemException if a system exception occurred
101            */
102            public com.liferay.portal.model.UserNotificationEvent fetchByPrimaryKey(
103                    long userNotificationEventId)
104                    throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Finds all the user notification events where uuid = &#63;.
108            *
109            * @param uuid the uuid to search with
110            * @return the matching user notification events
111            * @throws SystemException if a system exception occurred
112            */
113            public java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
114                    java.lang.String uuid)
115                    throws com.liferay.portal.kernel.exception.SystemException;
116    
117            /**
118            * Finds a range of all the user notification events where uuid = &#63;.
119            *
120            * <p>
121            * 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.
122            * </p>
123            *
124            * @param uuid the uuid to search with
125            * @param start the lower bound of the range of user notification events to return
126            * @param end the upper bound of the range of user notification events to return (not inclusive)
127            * @return the range of matching user notification events
128            * @throws SystemException if a system exception occurred
129            */
130            public java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
131                    java.lang.String uuid, int start, int end)
132                    throws com.liferay.portal.kernel.exception.SystemException;
133    
134            /**
135            * Finds an ordered range of all the user notification events where uuid = &#63;.
136            *
137            * <p>
138            * 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.
139            * </p>
140            *
141            * @param uuid the uuid to search with
142            * @param start the lower bound of the range of user notification events to return
143            * @param end the upper bound of the range of user notification events to return (not inclusive)
144            * @param orderByComparator the comparator to order the results by
145            * @return the ordered range of matching user notification events
146            * @throws SystemException if a system exception occurred
147            */
148            public java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUuid(
149                    java.lang.String uuid, int start, int end,
150                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            /**
154            * Finds the first user notification event in the ordered set where uuid = &#63;.
155            *
156            * <p>
157            * 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.
158            * </p>
159            *
160            * @param uuid the uuid to search with
161            * @param orderByComparator the comparator to order the set by
162            * @return the first matching user notification event
163            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            public com.liferay.portal.model.UserNotificationEvent findByUuid_First(
167                    java.lang.String uuid,
168                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169                    throws com.liferay.portal.NoSuchUserNotificationEventException,
170                            com.liferay.portal.kernel.exception.SystemException;
171    
172            /**
173            * Finds the last user notification event in the ordered set where uuid = &#63;.
174            *
175            * <p>
176            * 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.
177            * </p>
178            *
179            * @param uuid the uuid to search with
180            * @param orderByComparator the comparator to order the set by
181            * @return the last matching user notification event
182            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
183            * @throws SystemException if a system exception occurred
184            */
185            public com.liferay.portal.model.UserNotificationEvent findByUuid_Last(
186                    java.lang.String uuid,
187                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
188                    throws com.liferay.portal.NoSuchUserNotificationEventException,
189                            com.liferay.portal.kernel.exception.SystemException;
190    
191            /**
192            * Finds the user notification events before and after the current user notification event in the ordered set where uuid = &#63;.
193            *
194            * <p>
195            * 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.
196            * </p>
197            *
198            * @param userNotificationEventId the primary key of the current user notification event
199            * @param uuid the uuid to search with
200            * @param orderByComparator the comparator to order the set by
201            * @return the previous, current, and next user notification event
202            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
203            * @throws SystemException if a system exception occurred
204            */
205            public com.liferay.portal.model.UserNotificationEvent[] findByUuid_PrevAndNext(
206                    long userNotificationEventId, java.lang.String uuid,
207                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208                    throws com.liferay.portal.NoSuchUserNotificationEventException,
209                            com.liferay.portal.kernel.exception.SystemException;
210    
211            /**
212            * Finds all the user notification events where userId = &#63;.
213            *
214            * @param userId the user ID to search with
215            * @return the matching user notification events
216            * @throws SystemException if a system exception occurred
217            */
218            public java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
219                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
220    
221            /**
222            * Finds a range of all the user notification events where userId = &#63;.
223            *
224            * <p>
225            * 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.
226            * </p>
227            *
228            * @param userId the user ID to search with
229            * @param start the lower bound of the range of user notification events to return
230            * @param end the upper bound of the range of user notification events to return (not inclusive)
231            * @return the range of matching user notification events
232            * @throws SystemException if a system exception occurred
233            */
234            public java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
235                    long userId, int start, int end)
236                    throws com.liferay.portal.kernel.exception.SystemException;
237    
238            /**
239            * Finds an ordered range of all the user notification events where userId = &#63;.
240            *
241            * <p>
242            * 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.
243            * </p>
244            *
245            * @param userId the user ID to search with
246            * @param start the lower bound of the range of user notification events to return
247            * @param end the upper bound of the range of user notification events to return (not inclusive)
248            * @param orderByComparator the comparator to order the results by
249            * @return the ordered range of matching user notification events
250            * @throws SystemException if a system exception occurred
251            */
252            public java.util.List<com.liferay.portal.model.UserNotificationEvent> findByUserId(
253                    long userId, int start, int end,
254                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
255                    throws com.liferay.portal.kernel.exception.SystemException;
256    
257            /**
258            * Finds the first user notification event in the ordered set where userId = &#63;.
259            *
260            * <p>
261            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
262            * </p>
263            *
264            * @param userId the user ID to search with
265            * @param orderByComparator the comparator to order the set by
266            * @return the first matching user notification event
267            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
268            * @throws SystemException if a system exception occurred
269            */
270            public com.liferay.portal.model.UserNotificationEvent findByUserId_First(
271                    long userId,
272                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
273                    throws com.liferay.portal.NoSuchUserNotificationEventException,
274                            com.liferay.portal.kernel.exception.SystemException;
275    
276            /**
277            * Finds the last user notification event in the ordered set where userId = &#63;.
278            *
279            * <p>
280            * 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.
281            * </p>
282            *
283            * @param userId the user ID to search with
284            * @param orderByComparator the comparator to order the set by
285            * @return the last matching user notification event
286            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a matching user notification event could not be found
287            * @throws SystemException if a system exception occurred
288            */
289            public com.liferay.portal.model.UserNotificationEvent findByUserId_Last(
290                    long userId,
291                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
292                    throws com.liferay.portal.NoSuchUserNotificationEventException,
293                            com.liferay.portal.kernel.exception.SystemException;
294    
295            /**
296            * Finds the user notification events before and after the current user notification event in the ordered set where userId = &#63;.
297            *
298            * <p>
299            * 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.
300            * </p>
301            *
302            * @param userNotificationEventId the primary key of the current user notification event
303            * @param userId the user ID to search with
304            * @param orderByComparator the comparator to order the set by
305            * @return the previous, current, and next user notification event
306            * @throws com.liferay.portal.NoSuchUserNotificationEventException if a user notification event with the primary key could not be found
307            * @throws SystemException if a system exception occurred
308            */
309            public com.liferay.portal.model.UserNotificationEvent[] findByUserId_PrevAndNext(
310                    long userNotificationEventId, long userId,
311                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
312                    throws com.liferay.portal.NoSuchUserNotificationEventException,
313                            com.liferay.portal.kernel.exception.SystemException;
314    
315            /**
316            * Finds all the user notification events.
317            *
318            * @return the user notification events
319            * @throws SystemException if a system exception occurred
320            */
321            public java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll()
322                    throws com.liferay.portal.kernel.exception.SystemException;
323    
324            /**
325            * Finds a range of all the user notification events.
326            *
327            * <p>
328            * 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.
329            * </p>
330            *
331            * @param start the lower bound of the range of user notification events to return
332            * @param end the upper bound of the range of user notification events to return (not inclusive)
333            * @return the range of user notification events
334            * @throws SystemException if a system exception occurred
335            */
336            public java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll(
337                    int start, int end)
338                    throws com.liferay.portal.kernel.exception.SystemException;
339    
340            /**
341            * Finds an ordered range of all the user notification events.
342            *
343            * <p>
344            * 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.
345            * </p>
346            *
347            * @param start the lower bound of the range of user notification events to return
348            * @param end the upper bound of the range of user notification events to return (not inclusive)
349            * @param orderByComparator the comparator to order the results by
350            * @return the ordered range of user notification events
351            * @throws SystemException if a system exception occurred
352            */
353            public java.util.List<com.liferay.portal.model.UserNotificationEvent> findAll(
354                    int start, int end,
355                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
356                    throws com.liferay.portal.kernel.exception.SystemException;
357    
358            /**
359            * Removes all the user notification events where uuid = &#63; from the database.
360            *
361            * @param uuid the uuid to search with
362            * @throws SystemException if a system exception occurred
363            */
364            public void removeByUuid(java.lang.String uuid)
365                    throws com.liferay.portal.kernel.exception.SystemException;
366    
367            /**
368            * Removes all the user notification events where userId = &#63; from the database.
369            *
370            * @param userId the user ID to search with
371            * @throws SystemException if a system exception occurred
372            */
373            public void removeByUserId(long userId)
374                    throws com.liferay.portal.kernel.exception.SystemException;
375    
376            /**
377            * Removes all the user notification events from the database.
378            *
379            * @throws SystemException if a system exception occurred
380            */
381            public void removeAll()
382                    throws com.liferay.portal.kernel.exception.SystemException;
383    
384            /**
385            * Counts all the user notification events where uuid = &#63;.
386            *
387            * @param uuid the uuid to search with
388            * @return the number of matching user notification events
389            * @throws SystemException if a system exception occurred
390            */
391            public int countByUuid(java.lang.String uuid)
392                    throws com.liferay.portal.kernel.exception.SystemException;
393    
394            /**
395            * Counts all the user notification events where userId = &#63;.
396            *
397            * @param userId the user ID to search with
398            * @return the number of matching user notification events
399            * @throws SystemException if a system exception occurred
400            */
401            public int countByUserId(long userId)
402                    throws com.liferay.portal.kernel.exception.SystemException;
403    
404            /**
405            * Counts all the user notification events.
406            *
407            * @return the number of user notification events
408            * @throws SystemException if a system exception occurred
409            */
410            public int countAll()
411                    throws com.liferay.portal.kernel.exception.SystemException;
412    
413            public UserNotificationEvent remove(
414                    UserNotificationEvent userNotificationEvent) throws SystemException;
415    }