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