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