001    /**
002     * Copyright (c) 2000-2013 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.model.UserNotificationDelivery;
020    
021    /**
022     * The persistence interface for the user notification delivery service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see UserNotificationDeliveryPersistenceImpl
030     * @see UserNotificationDeliveryUtil
031     * @generated
032     */
033    @ProviderType
034    public interface UserNotificationDeliveryPersistence extends BasePersistence<UserNotificationDelivery> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link UserNotificationDeliveryUtil} to access the user notification delivery persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Returns all the user notification deliveries where userId = &#63;.
043            *
044            * @param userId the user ID
045            * @return the matching user notification deliveries
046            * @throws SystemException if a system exception occurred
047            */
048            public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId(
049                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
050    
051            /**
052            * Returns a range of all the user notification deliveries where userId = &#63;.
053            *
054            * <p>
055            * 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.UserNotificationDeliveryModelImpl}. 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.
056            * </p>
057            *
058            * @param userId the user ID
059            * @param start the lower bound of the range of user notification deliveries
060            * @param end the upper bound of the range of user notification deliveries (not inclusive)
061            * @return the range of matching user notification deliveries
062            * @throws SystemException if a system exception occurred
063            */
064            public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId(
065                    long userId, int start, int end)
066                    throws com.liferay.portal.kernel.exception.SystemException;
067    
068            /**
069            * Returns an ordered range of all the user notification deliveries where userId = &#63;.
070            *
071            * <p>
072            * 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.UserNotificationDeliveryModelImpl}. 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.
073            * </p>
074            *
075            * @param userId the user ID
076            * @param start the lower bound of the range of user notification deliveries
077            * @param end the upper bound of the range of user notification deliveries (not inclusive)
078            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
079            * @return the ordered range of matching user notification deliveries
080            * @throws SystemException if a system exception occurred
081            */
082            public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findByUserId(
083                    long userId, int start, int end,
084                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
085                    throws com.liferay.portal.kernel.exception.SystemException;
086    
087            /**
088            * Returns the first user notification delivery in the ordered set where userId = &#63;.
089            *
090            * @param userId the user ID
091            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
092            * @return the first matching user notification delivery
093            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found
094            * @throws SystemException if a system exception occurred
095            */
096            public com.liferay.portal.model.UserNotificationDelivery findByUserId_First(
097                    long userId,
098                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
099                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
100                            com.liferay.portal.kernel.exception.SystemException;
101    
102            /**
103            * Returns the first user notification delivery in the ordered set where userId = &#63;.
104            *
105            * @param userId the user ID
106            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
107            * @return the first matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found
108            * @throws SystemException if a system exception occurred
109            */
110            public com.liferay.portal.model.UserNotificationDelivery fetchByUserId_First(
111                    long userId,
112                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
113                    throws com.liferay.portal.kernel.exception.SystemException;
114    
115            /**
116            * Returns the last user notification delivery in the ordered set where userId = &#63;.
117            *
118            * @param userId the user ID
119            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
120            * @return the last matching user notification delivery
121            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found
122            * @throws SystemException if a system exception occurred
123            */
124            public com.liferay.portal.model.UserNotificationDelivery findByUserId_Last(
125                    long userId,
126                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
127                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
128                            com.liferay.portal.kernel.exception.SystemException;
129    
130            /**
131            * Returns the last user notification delivery in the ordered set where userId = &#63;.
132            *
133            * @param userId the user ID
134            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
135            * @return the last matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found
136            * @throws SystemException if a system exception occurred
137            */
138            public com.liferay.portal.model.UserNotificationDelivery fetchByUserId_Last(
139                    long userId,
140                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141                    throws com.liferay.portal.kernel.exception.SystemException;
142    
143            /**
144            * Returns the user notification deliveries before and after the current user notification delivery in the ordered set where userId = &#63;.
145            *
146            * @param userNotificationDeliveryId the primary key of the current user notification delivery
147            * @param userId the user ID
148            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
149            * @return the previous, current, and next user notification delivery
150            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            public com.liferay.portal.model.UserNotificationDelivery[] findByUserId_PrevAndNext(
154                    long userNotificationDeliveryId, long userId,
155                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
157                            com.liferay.portal.kernel.exception.SystemException;
158    
159            /**
160            * Removes all the user notification deliveries where userId = &#63; from the database.
161            *
162            * @param userId the user ID
163            * @throws SystemException if a system exception occurred
164            */
165            public void removeByUserId(long userId)
166                    throws com.liferay.portal.kernel.exception.SystemException;
167    
168            /**
169            * Returns the number of user notification deliveries where userId = &#63;.
170            *
171            * @param userId the user ID
172            * @return the number of matching user notification deliveries
173            * @throws SystemException if a system exception occurred
174            */
175            public int countByUserId(long userId)
176                    throws com.liferay.portal.kernel.exception.SystemException;
177    
178            /**
179            * Returns the user notification delivery where userId = &#63; and portletId = &#63; and classNameId = &#63; and notificationType = &#63; and deliveryType = &#63; or throws a {@link com.liferay.portal.NoSuchUserNotificationDeliveryException} if it could not be found.
180            *
181            * @param userId the user ID
182            * @param portletId the portlet ID
183            * @param classNameId the class name ID
184            * @param notificationType the notification type
185            * @param deliveryType the delivery type
186            * @return the matching user notification delivery
187            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a matching user notification delivery could not be found
188            * @throws SystemException if a system exception occurred
189            */
190            public com.liferay.portal.model.UserNotificationDelivery findByU_P_C_N_D(
191                    long userId, java.lang.String portletId, long classNameId,
192                    int notificationType, int deliveryType)
193                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
194                            com.liferay.portal.kernel.exception.SystemException;
195    
196            /**
197            * Returns the user notification delivery where userId = &#63; and portletId = &#63; and classNameId = &#63; and notificationType = &#63; and deliveryType = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
198            *
199            * @param userId the user ID
200            * @param portletId the portlet ID
201            * @param classNameId the class name ID
202            * @param notificationType the notification type
203            * @param deliveryType the delivery type
204            * @return the matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found
205            * @throws SystemException if a system exception occurred
206            */
207            public com.liferay.portal.model.UserNotificationDelivery fetchByU_P_C_N_D(
208                    long userId, java.lang.String portletId, long classNameId,
209                    int notificationType, int deliveryType)
210                    throws com.liferay.portal.kernel.exception.SystemException;
211    
212            /**
213            * Returns the user notification delivery where userId = &#63; and portletId = &#63; and classNameId = &#63; and notificationType = &#63; and deliveryType = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
214            *
215            * @param userId the user ID
216            * @param portletId the portlet ID
217            * @param classNameId the class name ID
218            * @param notificationType the notification type
219            * @param deliveryType the delivery type
220            * @param retrieveFromCache whether to use the finder cache
221            * @return the matching user notification delivery, or <code>null</code> if a matching user notification delivery could not be found
222            * @throws SystemException if a system exception occurred
223            */
224            public com.liferay.portal.model.UserNotificationDelivery fetchByU_P_C_N_D(
225                    long userId, java.lang.String portletId, long classNameId,
226                    int notificationType, int deliveryType, boolean retrieveFromCache)
227                    throws com.liferay.portal.kernel.exception.SystemException;
228    
229            /**
230            * Removes the user notification delivery where userId = &#63; and portletId = &#63; and classNameId = &#63; and notificationType = &#63; and deliveryType = &#63; from the database.
231            *
232            * @param userId the user ID
233            * @param portletId the portlet ID
234            * @param classNameId the class name ID
235            * @param notificationType the notification type
236            * @param deliveryType the delivery type
237            * @return the user notification delivery that was removed
238            * @throws SystemException if a system exception occurred
239            */
240            public com.liferay.portal.model.UserNotificationDelivery removeByU_P_C_N_D(
241                    long userId, java.lang.String portletId, long classNameId,
242                    int notificationType, int deliveryType)
243                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
244                            com.liferay.portal.kernel.exception.SystemException;
245    
246            /**
247            * Returns the number of user notification deliveries where userId = &#63; and portletId = &#63; and classNameId = &#63; and notificationType = &#63; and deliveryType = &#63;.
248            *
249            * @param userId the user ID
250            * @param portletId the portlet ID
251            * @param classNameId the class name ID
252            * @param notificationType the notification type
253            * @param deliveryType the delivery type
254            * @return the number of matching user notification deliveries
255            * @throws SystemException if a system exception occurred
256            */
257            public int countByU_P_C_N_D(long userId, java.lang.String portletId,
258                    long classNameId, int notificationType, int deliveryType)
259                    throws com.liferay.portal.kernel.exception.SystemException;
260    
261            /**
262            * Caches the user notification delivery in the entity cache if it is enabled.
263            *
264            * @param userNotificationDelivery the user notification delivery
265            */
266            public void cacheResult(
267                    com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery);
268    
269            /**
270            * Caches the user notification deliveries in the entity cache if it is enabled.
271            *
272            * @param userNotificationDeliveries the user notification deliveries
273            */
274            public void cacheResult(
275                    java.util.List<com.liferay.portal.model.UserNotificationDelivery> userNotificationDeliveries);
276    
277            /**
278            * Creates a new user notification delivery with the primary key. Does not add the user notification delivery to the database.
279            *
280            * @param userNotificationDeliveryId the primary key for the new user notification delivery
281            * @return the new user notification delivery
282            */
283            public com.liferay.portal.model.UserNotificationDelivery create(
284                    long userNotificationDeliveryId);
285    
286            /**
287            * Removes the user notification delivery with the primary key from the database. Also notifies the appropriate model listeners.
288            *
289            * @param userNotificationDeliveryId the primary key of the user notification delivery
290            * @return the user notification delivery that was removed
291            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found
292            * @throws SystemException if a system exception occurred
293            */
294            public com.liferay.portal.model.UserNotificationDelivery remove(
295                    long userNotificationDeliveryId)
296                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
297                            com.liferay.portal.kernel.exception.SystemException;
298    
299            public com.liferay.portal.model.UserNotificationDelivery updateImpl(
300                    com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery)
301                    throws com.liferay.portal.kernel.exception.SystemException;
302    
303            /**
304            * Returns the user notification delivery with the primary key or throws a {@link com.liferay.portal.NoSuchUserNotificationDeliveryException} if it could not be found.
305            *
306            * @param userNotificationDeliveryId the primary key of the user notification delivery
307            * @return the user notification delivery
308            * @throws com.liferay.portal.NoSuchUserNotificationDeliveryException if a user notification delivery with the primary key could not be found
309            * @throws SystemException if a system exception occurred
310            */
311            public com.liferay.portal.model.UserNotificationDelivery findByPrimaryKey(
312                    long userNotificationDeliveryId)
313                    throws com.liferay.portal.NoSuchUserNotificationDeliveryException,
314                            com.liferay.portal.kernel.exception.SystemException;
315    
316            /**
317            * Returns the user notification delivery with the primary key or returns <code>null</code> if it could not be found.
318            *
319            * @param userNotificationDeliveryId the primary key of the user notification delivery
320            * @return the user notification delivery, or <code>null</code> if a user notification delivery with the primary key could not be found
321            * @throws SystemException if a system exception occurred
322            */
323            public com.liferay.portal.model.UserNotificationDelivery fetchByPrimaryKey(
324                    long userNotificationDeliveryId)
325                    throws com.liferay.portal.kernel.exception.SystemException;
326    
327            /**
328            * Returns all the user notification deliveries.
329            *
330            * @return the user notification deliveries
331            * @throws SystemException if a system exception occurred
332            */
333            public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll()
334                    throws com.liferay.portal.kernel.exception.SystemException;
335    
336            /**
337            * Returns a range of all the user notification deliveries.
338            *
339            * <p>
340            * 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.UserNotificationDeliveryModelImpl}. 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.
341            * </p>
342            *
343            * @param start the lower bound of the range of user notification deliveries
344            * @param end the upper bound of the range of user notification deliveries (not inclusive)
345            * @return the range of user notification deliveries
346            * @throws SystemException if a system exception occurred
347            */
348            public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll(
349                    int start, int end)
350                    throws com.liferay.portal.kernel.exception.SystemException;
351    
352            /**
353            * Returns an ordered range of all the user notification deliveries.
354            *
355            * <p>
356            * 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.UserNotificationDeliveryModelImpl}. 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.
357            * </p>
358            *
359            * @param start the lower bound of the range of user notification deliveries
360            * @param end the upper bound of the range of user notification deliveries (not inclusive)
361            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
362            * @return the ordered range of user notification deliveries
363            * @throws SystemException if a system exception occurred
364            */
365            public java.util.List<com.liferay.portal.model.UserNotificationDelivery> findAll(
366                    int start, int end,
367                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
368                    throws com.liferay.portal.kernel.exception.SystemException;
369    
370            /**
371            * Removes all the user notification deliveries from the database.
372            *
373            * @throws SystemException if a system exception occurred
374            */
375            public void removeAll()
376                    throws com.liferay.portal.kernel.exception.SystemException;
377    
378            /**
379            * Returns the number of user notification deliveries.
380            *
381            * @return the number of user notification deliveries
382            * @throws SystemException if a system exception occurred
383            */
384            public int countAll()
385                    throws com.liferay.portal.kernel.exception.SystemException;
386    }