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
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
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
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            * Returns 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
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            * Returns 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
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            * Returns all the announcements deliveries where userId = &#63;.
110            *
111            * @param userId the user ID
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            * Returns 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
126            * @param start the lower bound of the range of announcements deliveries
127            * @param end the upper bound of the range of announcements deliveries (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            * Returns 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
143            * @param start the lower bound of the range of announcements deliveries
144            * @param end the upper bound of the range of announcements deliveries (not inclusive)
145            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
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            * Returns 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
162            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
181            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
201            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
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            * Returns 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
216            * @param type the type
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            * Returns 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
230            * @param type the type
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            * Returns 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
242            * @param type the type
243            * @param retrieveFromCache whether to use the finder cache
244            * @return the matching announcements delivery, or <code>null</code> if a matching announcements delivery could not be found
245            * @throws SystemException if a system exception occurred
246            */
247            public com.liferay.portlet.announcements.model.AnnouncementsDelivery fetchByU_T(
248                    long userId, java.lang.String type, boolean retrieveFromCache)
249                    throws com.liferay.portal.kernel.exception.SystemException;
250    
251            /**
252            * Returns all the announcements deliveries.
253            *
254            * @return the announcements deliveries
255            * @throws SystemException if a system exception occurred
256            */
257            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll()
258                    throws com.liferay.portal.kernel.exception.SystemException;
259    
260            /**
261            * Returns a range of all the announcements deliveries.
262            *
263            * <p>
264            * 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.
265            * </p>
266            *
267            * @param start the lower bound of the range of announcements deliveries
268            * @param end the upper bound of the range of announcements deliveries (not inclusive)
269            * @return the range of announcements deliveries
270            * @throws SystemException if a system exception occurred
271            */
272            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll(
273                    int start, int end)
274                    throws com.liferay.portal.kernel.exception.SystemException;
275    
276            /**
277            * Returns an ordered range of all the announcements deliveries.
278            *
279            * <p>
280            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
281            * </p>
282            *
283            * @param start the lower bound of the range of announcements deliveries
284            * @param end the upper bound of the range of announcements deliveries (not inclusive)
285            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
286            * @return the ordered range of announcements deliveries
287            * @throws SystemException if a system exception occurred
288            */
289            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> findAll(
290                    int start, int end,
291                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
292                    throws com.liferay.portal.kernel.exception.SystemException;
293    
294            /**
295            * Removes all the announcements deliveries where userId = &#63; from the database.
296            *
297            * @param userId the user ID
298            * @throws SystemException if a system exception occurred
299            */
300            public void removeByUserId(long userId)
301                    throws com.liferay.portal.kernel.exception.SystemException;
302    
303            /**
304            * Removes the announcements delivery where userId = &#63; and type = &#63; from the database.
305            *
306            * @param userId the user ID
307            * @param type the type
308            * @throws SystemException if a system exception occurred
309            */
310            public void removeByU_T(long userId, java.lang.String type)
311                    throws com.liferay.portal.kernel.exception.SystemException,
312                            com.liferay.portlet.announcements.NoSuchDeliveryException;
313    
314            /**
315            * Removes all the announcements deliveries from the database.
316            *
317            * @throws SystemException if a system exception occurred
318            */
319            public void removeAll()
320                    throws com.liferay.portal.kernel.exception.SystemException;
321    
322            /**
323            * Returns the number of announcements deliveries where userId = &#63;.
324            *
325            * @param userId the user ID
326            * @return the number of matching announcements deliveries
327            * @throws SystemException if a system exception occurred
328            */
329            public int countByUserId(long userId)
330                    throws com.liferay.portal.kernel.exception.SystemException;
331    
332            /**
333            * Returns the number of announcements deliveries where userId = &#63; and type = &#63;.
334            *
335            * @param userId the user ID
336            * @param type the type
337            * @return the number of matching announcements deliveries
338            * @throws SystemException if a system exception occurred
339            */
340            public int countByU_T(long userId, java.lang.String type)
341                    throws com.liferay.portal.kernel.exception.SystemException;
342    
343            /**
344            * Returns the number of announcements deliveries.
345            *
346            * @return the number of announcements deliveries
347            * @throws SystemException if a system exception occurred
348            */
349            public int countAll()
350                    throws com.liferay.portal.kernel.exception.SystemException;
351    
352            public AnnouncementsDelivery remove(
353                    AnnouncementsDelivery announcementsDelivery) throws SystemException;
354    }