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