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