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