001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.announcements.service.persistence;
016    
017    import com.liferay.portal.service.persistence.BasePersistence;
018    
019    import com.liferay.portlet.announcements.model.AnnouncementsEntry;
020    
021    /**
022     * The persistence interface for the announcements entry service.
023     *
024     * <p>
025     * Never modify or reference this interface directly. Always use {@link AnnouncementsEntryUtil} to access the announcements entry persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
026     * </p>
027     *
028     * <p>
029     * Caching information and settings can be found in <code>portal.properties</code>
030     * </p>
031     *
032     * @author Brian Wing Shun Chan
033     * @see AnnouncementsEntryPersistenceImpl
034     * @see AnnouncementsEntryUtil
035     * @generated
036     */
037    public interface AnnouncementsEntryPersistence extends BasePersistence<AnnouncementsEntry> {
038            /**
039            * Caches the announcements entry in the entity cache if it is enabled.
040            *
041            * @param announcementsEntry the announcements entry to cache
042            */
043            public void cacheResult(
044                    com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry);
045    
046            /**
047            * Caches the announcements entries in the entity cache if it is enabled.
048            *
049            * @param announcementsEntries the announcements entries to cache
050            */
051            public void cacheResult(
052                    java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> announcementsEntries);
053    
054            /**
055            * Creates a new announcements entry with the primary key. Does not add the announcements entry to the database.
056            *
057            * @param entryId the primary key for the new announcements entry
058            * @return the new announcements entry
059            */
060            public com.liferay.portlet.announcements.model.AnnouncementsEntry create(
061                    long entryId);
062    
063            /**
064            * Removes the announcements entry with the primary key from the database. Also notifies the appropriate model listeners.
065            *
066            * @param entryId the primary key of the announcements entry to remove
067            * @return the announcements entry that was removed
068            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public com.liferay.portlet.announcements.model.AnnouncementsEntry remove(
072                    long entryId)
073                    throws com.liferay.portal.kernel.exception.SystemException,
074                            com.liferay.portlet.announcements.NoSuchEntryException;
075    
076            public com.liferay.portlet.announcements.model.AnnouncementsEntry updateImpl(
077                    com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry,
078                    boolean merge)
079                    throws com.liferay.portal.kernel.exception.SystemException;
080    
081            /**
082            * Finds the announcements entry with the primary key or throws a {@link com.liferay.portlet.announcements.NoSuchEntryException} if it could not be found.
083            *
084            * @param entryId the primary key of the announcements entry to find
085            * @return the announcements entry
086            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
087            * @throws SystemException if a system exception occurred
088            */
089            public com.liferay.portlet.announcements.model.AnnouncementsEntry findByPrimaryKey(
090                    long entryId)
091                    throws com.liferay.portal.kernel.exception.SystemException,
092                            com.liferay.portlet.announcements.NoSuchEntryException;
093    
094            /**
095            * Finds the announcements entry with the primary key or returns <code>null</code> if it could not be found.
096            *
097            * @param entryId the primary key of the announcements entry to find
098            * @return the announcements entry, or <code>null</code> if a announcements entry with the primary key could not be found
099            * @throws SystemException if a system exception occurred
100            */
101            public com.liferay.portlet.announcements.model.AnnouncementsEntry fetchByPrimaryKey(
102                    long entryId)
103                    throws com.liferay.portal.kernel.exception.SystemException;
104    
105            /**
106            * Finds all the announcements entries where uuid = &#63;.
107            *
108            * @param uuid the uuid to search with
109            * @return the matching announcements entries
110            * @throws SystemException if a system exception occurred
111            */
112            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
113                    java.lang.String uuid)
114                    throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Finds a range of all the announcements entries where uuid = &#63;.
118            *
119            * <p>
120            * 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.
121            * </p>
122            *
123            * @param uuid the uuid to search with
124            * @param start the lower bound of the range of announcements entries to return
125            * @param end the upper bound of the range of announcements entries to return (not inclusive)
126            * @return the range of matching announcements entries
127            * @throws SystemException if a system exception occurred
128            */
129            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
130                    java.lang.String uuid, int start, int end)
131                    throws com.liferay.portal.kernel.exception.SystemException;
132    
133            /**
134            * Finds an ordered range of all the announcements entries where uuid = &#63;.
135            *
136            * <p>
137            * 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.
138            * </p>
139            *
140            * @param uuid the uuid to search with
141            * @param start the lower bound of the range of announcements entries to return
142            * @param end the upper bound of the range of announcements entries to return (not inclusive)
143            * @param orderByComparator the comparator to order the results by
144            * @return the ordered range of matching announcements entries
145            * @throws SystemException if a system exception occurred
146            */
147            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
148                    java.lang.String uuid, int start, int end,
149                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150                    throws com.liferay.portal.kernel.exception.SystemException;
151    
152            /**
153            * Finds the first announcements entry in the ordered set where uuid = &#63;.
154            *
155            * <p>
156            * 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.
157            * </p>
158            *
159            * @param uuid the uuid to search with
160            * @param orderByComparator the comparator to order the set by
161            * @return the first matching announcements entry
162            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
163            * @throws SystemException if a system exception occurred
164            */
165            public com.liferay.portlet.announcements.model.AnnouncementsEntry findByUuid_First(
166                    java.lang.String uuid,
167                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
168                    throws com.liferay.portal.kernel.exception.SystemException,
169                            com.liferay.portlet.announcements.NoSuchEntryException;
170    
171            /**
172            * Finds the last announcements entry in the ordered set where uuid = &#63;.
173            *
174            * <p>
175            * 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.
176            * </p>
177            *
178            * @param uuid the uuid to search with
179            * @param orderByComparator the comparator to order the set by
180            * @return the last matching announcements entry
181            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
182            * @throws SystemException if a system exception occurred
183            */
184            public com.liferay.portlet.announcements.model.AnnouncementsEntry findByUuid_Last(
185                    java.lang.String uuid,
186                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
187                    throws com.liferay.portal.kernel.exception.SystemException,
188                            com.liferay.portlet.announcements.NoSuchEntryException;
189    
190            /**
191            * Finds the announcements entries before and after the current announcements entry in the ordered set where uuid = &#63;.
192            *
193            * <p>
194            * 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.
195            * </p>
196            *
197            * @param entryId the primary key of the current announcements entry
198            * @param uuid the uuid to search with
199            * @param orderByComparator the comparator to order the set by
200            * @return the previous, current, and next announcements entry
201            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
202            * @throws SystemException if a system exception occurred
203            */
204            public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUuid_PrevAndNext(
205                    long entryId, java.lang.String uuid,
206                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207                    throws com.liferay.portal.kernel.exception.SystemException,
208                            com.liferay.portlet.announcements.NoSuchEntryException;
209    
210            /**
211            * Finds all the announcements entries where userId = &#63;.
212            *
213            * @param userId the user id to search with
214            * @return the matching announcements entries
215            * @throws SystemException if a system exception occurred
216            */
217            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
218                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
219    
220            /**
221            * Finds a range of all the announcements entries where userId = &#63;.
222            *
223            * <p>
224            * 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.
225            * </p>
226            *
227            * @param userId the user id to search with
228            * @param start the lower bound of the range of announcements entries to return
229            * @param end the upper bound of the range of announcements entries to return (not inclusive)
230            * @return the range of matching announcements entries
231            * @throws SystemException if a system exception occurred
232            */
233            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
234                    long userId, int start, int end)
235                    throws com.liferay.portal.kernel.exception.SystemException;
236    
237            /**
238            * Finds an ordered range of all the announcements entries where userId = &#63;.
239            *
240            * <p>
241            * 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.
242            * </p>
243            *
244            * @param userId the user id to search with
245            * @param start the lower bound of the range of announcements entries to return
246            * @param end the upper bound of the range of announcements entries to return (not inclusive)
247            * @param orderByComparator the comparator to order the results by
248            * @return the ordered range of matching announcements entries
249            * @throws SystemException if a system exception occurred
250            */
251            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
252                    long userId, int start, int end,
253                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
254                    throws com.liferay.portal.kernel.exception.SystemException;
255    
256            /**
257            * Finds the first announcements entry in the ordered set where userId = &#63;.
258            *
259            * <p>
260            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
261            * </p>
262            *
263            * @param userId the user id to search with
264            * @param orderByComparator the comparator to order the set by
265            * @return the first matching announcements entry
266            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
267            * @throws SystemException if a system exception occurred
268            */
269            public com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_First(
270                    long userId,
271                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272                    throws com.liferay.portal.kernel.exception.SystemException,
273                            com.liferay.portlet.announcements.NoSuchEntryException;
274    
275            /**
276            * Finds the last announcements entry in the ordered set where userId = &#63;.
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 userId the user id to search with
283            * @param orderByComparator the comparator to order the set by
284            * @return the last matching announcements entry
285            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
286            * @throws SystemException if a system exception occurred
287            */
288            public com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_Last(
289                    long userId,
290                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
291                    throws com.liferay.portal.kernel.exception.SystemException,
292                            com.liferay.portlet.announcements.NoSuchEntryException;
293    
294            /**
295            * Finds the announcements entries before and after the current announcements entry in the ordered set where userId = &#63;.
296            *
297            * <p>
298            * 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.
299            * </p>
300            *
301            * @param entryId the primary key of the current announcements entry
302            * @param userId the user id to search with
303            * @param orderByComparator the comparator to order the set by
304            * @return the previous, current, and next announcements entry
305            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
306            * @throws SystemException if a system exception occurred
307            */
308            public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUserId_PrevAndNext(
309                    long entryId, long userId,
310                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
311                    throws com.liferay.portal.kernel.exception.SystemException,
312                            com.liferay.portlet.announcements.NoSuchEntryException;
313    
314            /**
315            * Finds all the announcements entries where classNameId = &#63; and classPK = &#63;.
316            *
317            * @param classNameId the class name id to search with
318            * @param classPK the class p k to search with
319            * @return the matching announcements entries
320            * @throws SystemException if a system exception occurred
321            */
322            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
323                    long classNameId, long classPK)
324                    throws com.liferay.portal.kernel.exception.SystemException;
325    
326            /**
327            * Finds a range of all the announcements entries where classNameId = &#63; and classPK = &#63;.
328            *
329            * <p>
330            * 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.
331            * </p>
332            *
333            * @param classNameId the class name id to search with
334            * @param classPK the class p k to search with
335            * @param start the lower bound of the range of announcements entries to return
336            * @param end the upper bound of the range of announcements entries to return (not inclusive)
337            * @return the range of matching announcements entries
338            * @throws SystemException if a system exception occurred
339            */
340            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
341                    long classNameId, long classPK, int start, int end)
342                    throws com.liferay.portal.kernel.exception.SystemException;
343    
344            /**
345            * Finds an ordered range of all the announcements entries where classNameId = &#63; and classPK = &#63;.
346            *
347            * <p>
348            * 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.
349            * </p>
350            *
351            * @param classNameId the class name id to search with
352            * @param classPK the class p k to search with
353            * @param start the lower bound of the range of announcements entries to return
354            * @param end the upper bound of the range of announcements entries to return (not inclusive)
355            * @param orderByComparator the comparator to order the results by
356            * @return the ordered range of matching announcements entries
357            * @throws SystemException if a system exception occurred
358            */
359            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
360                    long classNameId, long classPK, int start, int end,
361                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
362                    throws com.liferay.portal.kernel.exception.SystemException;
363    
364            /**
365            * Finds the first announcements entry in the ordered set where classNameId = &#63; and classPK = &#63;.
366            *
367            * <p>
368            * 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.
369            * </p>
370            *
371            * @param classNameId the class name id to search with
372            * @param classPK the class p k to search with
373            * @param orderByComparator the comparator to order the set by
374            * @return the first matching announcements entry
375            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
376            * @throws SystemException if a system exception occurred
377            */
378            public com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_First(
379                    long classNameId, long classPK,
380                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
381                    throws com.liferay.portal.kernel.exception.SystemException,
382                            com.liferay.portlet.announcements.NoSuchEntryException;
383    
384            /**
385            * Finds the last announcements entry in the ordered set where classNameId = &#63; and classPK = &#63;.
386            *
387            * <p>
388            * 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.
389            * </p>
390            *
391            * @param classNameId the class name id to search with
392            * @param classPK the class p k to search with
393            * @param orderByComparator the comparator to order the set by
394            * @return the last matching announcements entry
395            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
396            * @throws SystemException if a system exception occurred
397            */
398            public com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_Last(
399                    long classNameId, long classPK,
400                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
401                    throws com.liferay.portal.kernel.exception.SystemException,
402                            com.liferay.portlet.announcements.NoSuchEntryException;
403    
404            /**
405            * Finds the announcements entries before and after the current announcements entry in the ordered set where classNameId = &#63; and classPK = &#63;.
406            *
407            * <p>
408            * 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.
409            * </p>
410            *
411            * @param entryId the primary key of the current announcements entry
412            * @param classNameId the class name id to search with
413            * @param classPK the class p k to search with
414            * @param orderByComparator the comparator to order the set by
415            * @return the previous, current, and next announcements entry
416            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
417            * @throws SystemException if a system exception occurred
418            */
419            public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_PrevAndNext(
420                    long entryId, long classNameId, long classPK,
421                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
422                    throws com.liferay.portal.kernel.exception.SystemException,
423                            com.liferay.portlet.announcements.NoSuchEntryException;
424    
425            /**
426            * Finds all the announcements entries where classNameId = &#63; and classPK = &#63; and alert = &#63;.
427            *
428            * @param classNameId the class name id to search with
429            * @param classPK the class p k to search with
430            * @param alert the alert to search with
431            * @return the matching announcements entries
432            * @throws SystemException if a system exception occurred
433            */
434            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
435                    long classNameId, long classPK, boolean alert)
436                    throws com.liferay.portal.kernel.exception.SystemException;
437    
438            /**
439            * Finds a range of all the announcements entries where classNameId = &#63; and classPK = &#63; and alert = &#63;.
440            *
441            * <p>
442            * 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.
443            * </p>
444            *
445            * @param classNameId the class name id to search with
446            * @param classPK the class p k to search with
447            * @param alert the alert to search with
448            * @param start the lower bound of the range of announcements entries to return
449            * @param end the upper bound of the range of announcements entries to return (not inclusive)
450            * @return the range of matching announcements entries
451            * @throws SystemException if a system exception occurred
452            */
453            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
454                    long classNameId, long classPK, boolean alert, int start, int end)
455                    throws com.liferay.portal.kernel.exception.SystemException;
456    
457            /**
458            * Finds an ordered range of all the announcements entries where classNameId = &#63; and classPK = &#63; and alert = &#63;.
459            *
460            * <p>
461            * 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.
462            * </p>
463            *
464            * @param classNameId the class name id to search with
465            * @param classPK the class p k to search with
466            * @param alert the alert to search with
467            * @param start the lower bound of the range of announcements entries to return
468            * @param end the upper bound of the range of announcements entries to return (not inclusive)
469            * @param orderByComparator the comparator to order the results by
470            * @return the ordered range of matching announcements entries
471            * @throws SystemException if a system exception occurred
472            */
473            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
474                    long classNameId, long classPK, boolean alert, int start, int end,
475                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
476                    throws com.liferay.portal.kernel.exception.SystemException;
477    
478            /**
479            * Finds the first announcements entry in the ordered set where classNameId = &#63; and classPK = &#63; and alert = &#63;.
480            *
481            * <p>
482            * 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.
483            * </p>
484            *
485            * @param classNameId the class name id to search with
486            * @param classPK the class p k to search with
487            * @param alert the alert to search with
488            * @param orderByComparator the comparator to order the set by
489            * @return the first matching announcements entry
490            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
491            * @throws SystemException if a system exception occurred
492            */
493            public com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_First(
494                    long classNameId, long classPK, boolean alert,
495                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
496                    throws com.liferay.portal.kernel.exception.SystemException,
497                            com.liferay.portlet.announcements.NoSuchEntryException;
498    
499            /**
500            * Finds the last announcements entry in the ordered set where classNameId = &#63; and classPK = &#63; and alert = &#63;.
501            *
502            * <p>
503            * 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.
504            * </p>
505            *
506            * @param classNameId the class name id to search with
507            * @param classPK the class p k to search with
508            * @param alert the alert to search with
509            * @param orderByComparator the comparator to order the set by
510            * @return the last matching announcements entry
511            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
512            * @throws SystemException if a system exception occurred
513            */
514            public com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_Last(
515                    long classNameId, long classPK, boolean alert,
516                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
517                    throws com.liferay.portal.kernel.exception.SystemException,
518                            com.liferay.portlet.announcements.NoSuchEntryException;
519    
520            /**
521            * Finds the announcements entries before and after the current announcements entry in the ordered set where classNameId = &#63; and classPK = &#63; and alert = &#63;.
522            *
523            * <p>
524            * 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.
525            * </p>
526            *
527            * @param entryId the primary key of the current announcements entry
528            * @param classNameId the class name id to search with
529            * @param classPK the class p k to search with
530            * @param alert the alert to search with
531            * @param orderByComparator the comparator to order the set by
532            * @return the previous, current, and next announcements entry
533            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
534            * @throws SystemException if a system exception occurred
535            */
536            public com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_A_PrevAndNext(
537                    long entryId, long classNameId, long classPK, boolean alert,
538                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
539                    throws com.liferay.portal.kernel.exception.SystemException,
540                            com.liferay.portlet.announcements.NoSuchEntryException;
541    
542            /**
543            * Finds all the announcements entries.
544            *
545            * @return the announcements entries
546            * @throws SystemException if a system exception occurred
547            */
548            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll()
549                    throws com.liferay.portal.kernel.exception.SystemException;
550    
551            /**
552            * Finds a range of all the announcements entries.
553            *
554            * <p>
555            * 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.
556            * </p>
557            *
558            * @param start the lower bound of the range of announcements entries to return
559            * @param end the upper bound of the range of announcements entries to return (not inclusive)
560            * @return the range of announcements entries
561            * @throws SystemException if a system exception occurred
562            */
563            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
564                    int start, int end)
565                    throws com.liferay.portal.kernel.exception.SystemException;
566    
567            /**
568            * Finds an ordered range of all the announcements entries.
569            *
570            * <p>
571            * 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.
572            * </p>
573            *
574            * @param start the lower bound of the range of announcements entries to return
575            * @param end the upper bound of the range of announcements entries to return (not inclusive)
576            * @param orderByComparator the comparator to order the results by
577            * @return the ordered range of announcements entries
578            * @throws SystemException if a system exception occurred
579            */
580            public java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
581                    int start, int end,
582                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
583                    throws com.liferay.portal.kernel.exception.SystemException;
584    
585            /**
586            * Removes all the announcements entries where uuid = &#63; from the database.
587            *
588            * @param uuid the uuid to search with
589            * @throws SystemException if a system exception occurred
590            */
591            public void removeByUuid(java.lang.String uuid)
592                    throws com.liferay.portal.kernel.exception.SystemException;
593    
594            /**
595            * Removes all the announcements entries where userId = &#63; from the database.
596            *
597            * @param userId the user id to search with
598            * @throws SystemException if a system exception occurred
599            */
600            public void removeByUserId(long userId)
601                    throws com.liferay.portal.kernel.exception.SystemException;
602    
603            /**
604            * Removes all the announcements entries where classNameId = &#63; and classPK = &#63; from the database.
605            *
606            * @param classNameId the class name id to search with
607            * @param classPK the class p k to search with
608            * @throws SystemException if a system exception occurred
609            */
610            public void removeByC_C(long classNameId, long classPK)
611                    throws com.liferay.portal.kernel.exception.SystemException;
612    
613            /**
614            * Removes all the announcements entries where classNameId = &#63; and classPK = &#63; and alert = &#63; from the database.
615            *
616            * @param classNameId the class name id to search with
617            * @param classPK the class p k to search with
618            * @param alert the alert to search with
619            * @throws SystemException if a system exception occurred
620            */
621            public void removeByC_C_A(long classNameId, long classPK, boolean alert)
622                    throws com.liferay.portal.kernel.exception.SystemException;
623    
624            /**
625            * Removes all the announcements entries from the database.
626            *
627            * @throws SystemException if a system exception occurred
628            */
629            public void removeAll()
630                    throws com.liferay.portal.kernel.exception.SystemException;
631    
632            /**
633            * Counts all the announcements entries where uuid = &#63;.
634            *
635            * @param uuid the uuid to search with
636            * @return the number of matching announcements entries
637            * @throws SystemException if a system exception occurred
638            */
639            public int countByUuid(java.lang.String uuid)
640                    throws com.liferay.portal.kernel.exception.SystemException;
641    
642            /**
643            * Counts all the announcements entries where userId = &#63;.
644            *
645            * @param userId the user id to search with
646            * @return the number of matching announcements entries
647            * @throws SystemException if a system exception occurred
648            */
649            public int countByUserId(long userId)
650                    throws com.liferay.portal.kernel.exception.SystemException;
651    
652            /**
653            * Counts all the announcements entries where classNameId = &#63; and classPK = &#63;.
654            *
655            * @param classNameId the class name id to search with
656            * @param classPK the class p k to search with
657            * @return the number of matching announcements entries
658            * @throws SystemException if a system exception occurred
659            */
660            public int countByC_C(long classNameId, long classPK)
661                    throws com.liferay.portal.kernel.exception.SystemException;
662    
663            /**
664            * Counts all the announcements entries where classNameId = &#63; and classPK = &#63; and alert = &#63;.
665            *
666            * @param classNameId the class name id to search with
667            * @param classPK the class p k to search with
668            * @param alert the alert to search with
669            * @return the number of matching announcements entries
670            * @throws SystemException if a system exception occurred
671            */
672            public int countByC_C_A(long classNameId, long classPK, boolean alert)
673                    throws com.liferay.portal.kernel.exception.SystemException;
674    
675            /**
676            * Counts all the announcements entries.
677            *
678            * @return the number of announcements entries
679            * @throws SystemException if a system exception occurred
680            */
681            public int countAll()
682                    throws com.liferay.portal.kernel.exception.SystemException;
683    }