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.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.service.ServiceContext;
022    
023    import com.liferay.portlet.announcements.model.AnnouncementsEntry;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the announcements entry service. This utility wraps {@link AnnouncementsEntryPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
029     *
030     * <p>
031     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
032     * </p>
033     *
034     * <p>
035     * Caching information and settings can be found in <code>portal.properties</code>
036     * </p>
037     *
038     * @author Brian Wing Shun Chan
039     * @see AnnouncementsEntryPersistence
040     * @see AnnouncementsEntryPersistenceImpl
041     * @generated
042     */
043    public class AnnouncementsEntryUtil {
044            /**
045             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
046             */
047            public static void clearCache() {
048                    getPersistence().clearCache();
049            }
050    
051            /**
052             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
053             */
054            public static void clearCache(AnnouncementsEntry announcementsEntry) {
055                    getPersistence().clearCache(announcementsEntry);
056            }
057    
058            /**
059             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
060             */
061            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
062                    throws SystemException {
063                    return getPersistence().countWithDynamicQuery(dynamicQuery);
064            }
065    
066            /**
067             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
068             */
069            public static List<AnnouncementsEntry> findWithDynamicQuery(
070                    DynamicQuery dynamicQuery) throws SystemException {
071                    return getPersistence().findWithDynamicQuery(dynamicQuery);
072            }
073    
074            /**
075             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
076             */
077            public static List<AnnouncementsEntry> findWithDynamicQuery(
078                    DynamicQuery dynamicQuery, int start, int end)
079                    throws SystemException {
080                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
081            }
082    
083            /**
084             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
085             */
086            public static List<AnnouncementsEntry> findWithDynamicQuery(
087                    DynamicQuery dynamicQuery, int start, int end,
088                    OrderByComparator orderByComparator) throws SystemException {
089                    return getPersistence()
090                                       .findWithDynamicQuery(dynamicQuery, start, end,
091                            orderByComparator);
092            }
093    
094            /**
095             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
096             */
097            public static AnnouncementsEntry remove(
098                    AnnouncementsEntry announcementsEntry) throws SystemException {
099                    return getPersistence().remove(announcementsEntry);
100            }
101    
102            /**
103             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
104             */
105            public static AnnouncementsEntry update(
106                    AnnouncementsEntry announcementsEntry, boolean merge)
107                    throws SystemException {
108                    return getPersistence().update(announcementsEntry, merge);
109            }
110    
111            /**
112             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
113             */
114            public static AnnouncementsEntry update(
115                    AnnouncementsEntry announcementsEntry, boolean merge,
116                    ServiceContext serviceContext) throws SystemException {
117                    return getPersistence().update(announcementsEntry, merge, serviceContext);
118            }
119    
120            /**
121            * Caches the announcements entry in the entity cache if it is enabled.
122            *
123            * @param announcementsEntry the announcements entry to cache
124            */
125            public static void cacheResult(
126                    com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry) {
127                    getPersistence().cacheResult(announcementsEntry);
128            }
129    
130            /**
131            * Caches the announcements entries in the entity cache if it is enabled.
132            *
133            * @param announcementsEntries the announcements entries to cache
134            */
135            public static void cacheResult(
136                    java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> announcementsEntries) {
137                    getPersistence().cacheResult(announcementsEntries);
138            }
139    
140            /**
141            * Creates a new announcements entry with the primary key. Does not add the announcements entry to the database.
142            *
143            * @param entryId the primary key for the new announcements entry
144            * @return the new announcements entry
145            */
146            public static com.liferay.portlet.announcements.model.AnnouncementsEntry create(
147                    long entryId) {
148                    return getPersistence().create(entryId);
149            }
150    
151            /**
152            * Removes the announcements entry with the primary key from the database. Also notifies the appropriate model listeners.
153            *
154            * @param entryId the primary key of the announcements entry to remove
155            * @return the announcements entry that was removed
156            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
157            * @throws SystemException if a system exception occurred
158            */
159            public static com.liferay.portlet.announcements.model.AnnouncementsEntry remove(
160                    long entryId)
161                    throws com.liferay.portal.kernel.exception.SystemException,
162                            com.liferay.portlet.announcements.NoSuchEntryException {
163                    return getPersistence().remove(entryId);
164            }
165    
166            public static com.liferay.portlet.announcements.model.AnnouncementsEntry updateImpl(
167                    com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry,
168                    boolean merge)
169                    throws com.liferay.portal.kernel.exception.SystemException {
170                    return getPersistence().updateImpl(announcementsEntry, merge);
171            }
172    
173            /**
174            * Finds the announcements entry with the primary key or throws a {@link com.liferay.portlet.announcements.NoSuchEntryException} if it could not be found.
175            *
176            * @param entryId the primary key of the announcements entry to find
177            * @return the announcements entry
178            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
179            * @throws SystemException if a system exception occurred
180            */
181            public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByPrimaryKey(
182                    long entryId)
183                    throws com.liferay.portal.kernel.exception.SystemException,
184                            com.liferay.portlet.announcements.NoSuchEntryException {
185                    return getPersistence().findByPrimaryKey(entryId);
186            }
187    
188            /**
189            * Finds the announcements entry with the primary key or returns <code>null</code> if it could not be found.
190            *
191            * @param entryId the primary key of the announcements entry to find
192            * @return the announcements entry, or <code>null</code> if a announcements entry with the primary key could not be found
193            * @throws SystemException if a system exception occurred
194            */
195            public static com.liferay.portlet.announcements.model.AnnouncementsEntry fetchByPrimaryKey(
196                    long entryId)
197                    throws com.liferay.portal.kernel.exception.SystemException {
198                    return getPersistence().fetchByPrimaryKey(entryId);
199            }
200    
201            /**
202            * Finds all the announcements entries where uuid = &#63;.
203            *
204            * @param uuid the uuid to search with
205            * @return the matching announcements entries
206            * @throws SystemException if a system exception occurred
207            */
208            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
209                    java.lang.String uuid)
210                    throws com.liferay.portal.kernel.exception.SystemException {
211                    return getPersistence().findByUuid(uuid);
212            }
213    
214            /**
215            * Finds a range of all the announcements entries where uuid = &#63;.
216            *
217            * <p>
218            * 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.
219            * </p>
220            *
221            * @param uuid the uuid to search with
222            * @param start the lower bound of the range of announcements entries to return
223            * @param end the upper bound of the range of announcements entries to return (not inclusive)
224            * @return the range of matching announcements entries
225            * @throws SystemException if a system exception occurred
226            */
227            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
228                    java.lang.String uuid, int start, int end)
229                    throws com.liferay.portal.kernel.exception.SystemException {
230                    return getPersistence().findByUuid(uuid, start, end);
231            }
232    
233            /**
234            * Finds an ordered range of all the announcements entries where uuid = &#63;.
235            *
236            * <p>
237            * 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.
238            * </p>
239            *
240            * @param uuid the uuid to search with
241            * @param start the lower bound of the range of announcements entries to return
242            * @param end the upper bound of the range of announcements entries to return (not inclusive)
243            * @param orderByComparator the comparator to order the results by
244            * @return the ordered range of matching announcements entries
245            * @throws SystemException if a system exception occurred
246            */
247            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUuid(
248                    java.lang.String uuid, int start, int end,
249                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
250                    throws com.liferay.portal.kernel.exception.SystemException {
251                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
252            }
253    
254            /**
255            * Finds the first announcements entry in the ordered set where uuid = &#63;.
256            *
257            * <p>
258            * 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.
259            * </p>
260            *
261            * @param uuid the uuid to search with
262            * @param orderByComparator the comparator to order the set by
263            * @return the first matching announcements entry
264            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
265            * @throws SystemException if a system exception occurred
266            */
267            public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByUuid_First(
268                    java.lang.String uuid,
269                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
270                    throws com.liferay.portal.kernel.exception.SystemException,
271                            com.liferay.portlet.announcements.NoSuchEntryException {
272                    return getPersistence().findByUuid_First(uuid, orderByComparator);
273            }
274    
275            /**
276            * Finds the last announcements entry in the ordered set where uuid = &#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 uuid the uuid 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 static com.liferay.portlet.announcements.model.AnnouncementsEntry findByUuid_Last(
289                    java.lang.String uuid,
290                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
291                    throws com.liferay.portal.kernel.exception.SystemException,
292                            com.liferay.portlet.announcements.NoSuchEntryException {
293                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
294            }
295    
296            /**
297            * Finds the announcements entries before and after the current announcements entry in the ordered set where uuid = &#63;.
298            *
299            * <p>
300            * 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.
301            * </p>
302            *
303            * @param entryId the primary key of the current announcements entry
304            * @param uuid the uuid to search with
305            * @param orderByComparator the comparator to order the set by
306            * @return the previous, current, and next announcements entry
307            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
308            * @throws SystemException if a system exception occurred
309            */
310            public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUuid_PrevAndNext(
311                    long entryId, java.lang.String uuid,
312                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
313                    throws com.liferay.portal.kernel.exception.SystemException,
314                            com.liferay.portlet.announcements.NoSuchEntryException {
315                    return getPersistence()
316                                       .findByUuid_PrevAndNext(entryId, uuid, orderByComparator);
317            }
318    
319            /**
320            * Finds all the announcements entries where userId = &#63;.
321            *
322            * @param userId the user id to search with
323            * @return the matching announcements entries
324            * @throws SystemException if a system exception occurred
325            */
326            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
327                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
328                    return getPersistence().findByUserId(userId);
329            }
330    
331            /**
332            * Finds a range of all the announcements entries where userId = &#63;.
333            *
334            * <p>
335            * 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.
336            * </p>
337            *
338            * @param userId the user id to search with
339            * @param start the lower bound of the range of announcements entries to return
340            * @param end the upper bound of the range of announcements entries to return (not inclusive)
341            * @return the range of matching announcements entries
342            * @throws SystemException if a system exception occurred
343            */
344            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
345                    long userId, int start, int end)
346                    throws com.liferay.portal.kernel.exception.SystemException {
347                    return getPersistence().findByUserId(userId, start, end);
348            }
349    
350            /**
351            * Finds an ordered range of all the announcements entries where userId = &#63;.
352            *
353            * <p>
354            * 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.
355            * </p>
356            *
357            * @param userId the user id to search with
358            * @param start the lower bound of the range of announcements entries to return
359            * @param end the upper bound of the range of announcements entries to return (not inclusive)
360            * @param orderByComparator the comparator to order the results by
361            * @return the ordered range of matching announcements entries
362            * @throws SystemException if a system exception occurred
363            */
364            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByUserId(
365                    long userId, int start, int end,
366                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
367                    throws com.liferay.portal.kernel.exception.SystemException {
368                    return getPersistence()
369                                       .findByUserId(userId, start, end, orderByComparator);
370            }
371    
372            /**
373            * Finds the first announcements entry in the ordered set where userId = &#63;.
374            *
375            * <p>
376            * 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.
377            * </p>
378            *
379            * @param userId the user id to search with
380            * @param orderByComparator the comparator to order the set by
381            * @return the first matching announcements entry
382            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
383            * @throws SystemException if a system exception occurred
384            */
385            public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_First(
386                    long userId,
387                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
388                    throws com.liferay.portal.kernel.exception.SystemException,
389                            com.liferay.portlet.announcements.NoSuchEntryException {
390                    return getPersistence().findByUserId_First(userId, orderByComparator);
391            }
392    
393            /**
394            * Finds the last announcements entry in the ordered set where userId = &#63;.
395            *
396            * <p>
397            * 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.
398            * </p>
399            *
400            * @param userId the user id to search with
401            * @param orderByComparator the comparator to order the set by
402            * @return the last matching announcements entry
403            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
404            * @throws SystemException if a system exception occurred
405            */
406            public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByUserId_Last(
407                    long userId,
408                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
409                    throws com.liferay.portal.kernel.exception.SystemException,
410                            com.liferay.portlet.announcements.NoSuchEntryException {
411                    return getPersistence().findByUserId_Last(userId, orderByComparator);
412            }
413    
414            /**
415            * Finds the announcements entries before and after the current announcements entry in the ordered set where userId = &#63;.
416            *
417            * <p>
418            * 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.
419            * </p>
420            *
421            * @param entryId the primary key of the current announcements entry
422            * @param userId the user id to search with
423            * @param orderByComparator the comparator to order the set by
424            * @return the previous, current, and next announcements entry
425            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
426            * @throws SystemException if a system exception occurred
427            */
428            public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByUserId_PrevAndNext(
429                    long entryId, long userId,
430                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
431                    throws com.liferay.portal.kernel.exception.SystemException,
432                            com.liferay.portlet.announcements.NoSuchEntryException {
433                    return getPersistence()
434                                       .findByUserId_PrevAndNext(entryId, userId, orderByComparator);
435            }
436    
437            /**
438            * Finds all the announcements entries where classNameId = &#63; and classPK = &#63;.
439            *
440            * @param classNameId the class name id to search with
441            * @param classPK the class p k to search with
442            * @return the matching announcements entries
443            * @throws SystemException if a system exception occurred
444            */
445            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
446                    long classNameId, long classPK)
447                    throws com.liferay.portal.kernel.exception.SystemException {
448                    return getPersistence().findByC_C(classNameId, classPK);
449            }
450    
451            /**
452            * Finds a range of all the announcements entries where classNameId = &#63; and classPK = &#63;.
453            *
454            * <p>
455            * 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.
456            * </p>
457            *
458            * @param classNameId the class name id to search with
459            * @param classPK the class p k to search with
460            * @param start the lower bound of the range of announcements entries to return
461            * @param end the upper bound of the range of announcements entries to return (not inclusive)
462            * @return the range of matching announcements entries
463            * @throws SystemException if a system exception occurred
464            */
465            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
466                    long classNameId, long classPK, int start, int end)
467                    throws com.liferay.portal.kernel.exception.SystemException {
468                    return getPersistence().findByC_C(classNameId, classPK, start, end);
469            }
470    
471            /**
472            * Finds an ordered range of all the announcements entries where classNameId = &#63; and classPK = &#63;.
473            *
474            * <p>
475            * 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.
476            * </p>
477            *
478            * @param classNameId the class name id to search with
479            * @param classPK the class p k to search with
480            * @param start the lower bound of the range of announcements entries to return
481            * @param end the upper bound of the range of announcements entries to return (not inclusive)
482            * @param orderByComparator the comparator to order the results by
483            * @return the ordered range of matching announcements entries
484            * @throws SystemException if a system exception occurred
485            */
486            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C(
487                    long classNameId, long classPK, int start, int end,
488                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
489                    throws com.liferay.portal.kernel.exception.SystemException {
490                    return getPersistence()
491                                       .findByC_C(classNameId, classPK, start, end,
492                            orderByComparator);
493            }
494    
495            /**
496            * Finds the first announcements entry in the ordered set where classNameId = &#63; and classPK = &#63;.
497            *
498            * <p>
499            * 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.
500            * </p>
501            *
502            * @param classNameId the class name id to search with
503            * @param classPK the class p k to search with
504            * @param orderByComparator the comparator to order the set by
505            * @return the first matching announcements entry
506            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
507            * @throws SystemException if a system exception occurred
508            */
509            public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_First(
510                    long classNameId, long classPK,
511                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
512                    throws com.liferay.portal.kernel.exception.SystemException,
513                            com.liferay.portlet.announcements.NoSuchEntryException {
514                    return getPersistence()
515                                       .findByC_C_First(classNameId, classPK, orderByComparator);
516            }
517    
518            /**
519            * Finds the last announcements entry in the ordered set where classNameId = &#63; and classPK = &#63;.
520            *
521            * <p>
522            * 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.
523            * </p>
524            *
525            * @param classNameId the class name id to search with
526            * @param classPK the class p k to search with
527            * @param orderByComparator the comparator to order the set by
528            * @return the last matching announcements entry
529            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
530            * @throws SystemException if a system exception occurred
531            */
532            public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_Last(
533                    long classNameId, long classPK,
534                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
535                    throws com.liferay.portal.kernel.exception.SystemException,
536                            com.liferay.portlet.announcements.NoSuchEntryException {
537                    return getPersistence()
538                                       .findByC_C_Last(classNameId, classPK, orderByComparator);
539            }
540    
541            /**
542            * Finds the announcements entries before and after the current announcements entry in the ordered set where classNameId = &#63; and classPK = &#63;.
543            *
544            * <p>
545            * 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.
546            * </p>
547            *
548            * @param entryId the primary key of the current announcements entry
549            * @param classNameId the class name id to search with
550            * @param classPK the class p k to search with
551            * @param orderByComparator the comparator to order the set by
552            * @return the previous, current, and next announcements entry
553            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
554            * @throws SystemException if a system exception occurred
555            */
556            public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_PrevAndNext(
557                    long entryId, long classNameId, long classPK,
558                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
559                    throws com.liferay.portal.kernel.exception.SystemException,
560                            com.liferay.portlet.announcements.NoSuchEntryException {
561                    return getPersistence()
562                                       .findByC_C_PrevAndNext(entryId, classNameId, classPK,
563                            orderByComparator);
564            }
565    
566            /**
567            * Finds all the announcements entries where classNameId = &#63; and classPK = &#63; and alert = &#63;.
568            *
569            * @param classNameId the class name id to search with
570            * @param classPK the class p k to search with
571            * @param alert the alert to search with
572            * @return the matching announcements entries
573            * @throws SystemException if a system exception occurred
574            */
575            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
576                    long classNameId, long classPK, boolean alert)
577                    throws com.liferay.portal.kernel.exception.SystemException {
578                    return getPersistence().findByC_C_A(classNameId, classPK, alert);
579            }
580    
581            /**
582            * Finds a range of all the announcements entries where classNameId = &#63; and classPK = &#63; and alert = &#63;.
583            *
584            * <p>
585            * 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.
586            * </p>
587            *
588            * @param classNameId the class name id to search with
589            * @param classPK the class p k to search with
590            * @param alert the alert to search with
591            * @param start the lower bound of the range of announcements entries to return
592            * @param end the upper bound of the range of announcements entries to return (not inclusive)
593            * @return the range of matching announcements entries
594            * @throws SystemException if a system exception occurred
595            */
596            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
597                    long classNameId, long classPK, boolean alert, int start, int end)
598                    throws com.liferay.portal.kernel.exception.SystemException {
599                    return getPersistence()
600                                       .findByC_C_A(classNameId, classPK, alert, start, end);
601            }
602    
603            /**
604            * Finds an ordered range of all the announcements entries where classNameId = &#63; and classPK = &#63; and alert = &#63;.
605            *
606            * <p>
607            * 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.
608            * </p>
609            *
610            * @param classNameId the class name id to search with
611            * @param classPK the class p k to search with
612            * @param alert the alert to search with
613            * @param start the lower bound of the range of announcements entries to return
614            * @param end the upper bound of the range of announcements entries to return (not inclusive)
615            * @param orderByComparator the comparator to order the results by
616            * @return the ordered range of matching announcements entries
617            * @throws SystemException if a system exception occurred
618            */
619            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findByC_C_A(
620                    long classNameId, long classPK, boolean alert, int start, int end,
621                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
622                    throws com.liferay.portal.kernel.exception.SystemException {
623                    return getPersistence()
624                                       .findByC_C_A(classNameId, classPK, alert, start, end,
625                            orderByComparator);
626            }
627    
628            /**
629            * Finds the first announcements entry in the ordered set where classNameId = &#63; and classPK = &#63; and alert = &#63;.
630            *
631            * <p>
632            * 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.
633            * </p>
634            *
635            * @param classNameId the class name id to search with
636            * @param classPK the class p k to search with
637            * @param alert the alert to search with
638            * @param orderByComparator the comparator to order the set by
639            * @return the first matching announcements entry
640            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
641            * @throws SystemException if a system exception occurred
642            */
643            public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_First(
644                    long classNameId, long classPK, boolean alert,
645                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
646                    throws com.liferay.portal.kernel.exception.SystemException,
647                            com.liferay.portlet.announcements.NoSuchEntryException {
648                    return getPersistence()
649                                       .findByC_C_A_First(classNameId, classPK, alert,
650                            orderByComparator);
651            }
652    
653            /**
654            * Finds the last announcements entry in the ordered set where classNameId = &#63; and classPK = &#63; and alert = &#63;.
655            *
656            * <p>
657            * 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.
658            * </p>
659            *
660            * @param classNameId the class name id to search with
661            * @param classPK the class p k to search with
662            * @param alert the alert to search with
663            * @param orderByComparator the comparator to order the set by
664            * @return the last matching announcements entry
665            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a matching announcements entry could not be found
666            * @throws SystemException if a system exception occurred
667            */
668            public static com.liferay.portlet.announcements.model.AnnouncementsEntry findByC_C_A_Last(
669                    long classNameId, long classPK, boolean alert,
670                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
671                    throws com.liferay.portal.kernel.exception.SystemException,
672                            com.liferay.portlet.announcements.NoSuchEntryException {
673                    return getPersistence()
674                                       .findByC_C_A_Last(classNameId, classPK, alert,
675                            orderByComparator);
676            }
677    
678            /**
679            * Finds the announcements entries before and after the current announcements entry in the ordered set where classNameId = &#63; and classPK = &#63; and alert = &#63;.
680            *
681            * <p>
682            * 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.
683            * </p>
684            *
685            * @param entryId the primary key of the current announcements entry
686            * @param classNameId the class name id to search with
687            * @param classPK the class p k to search with
688            * @param alert the alert to search with
689            * @param orderByComparator the comparator to order the set by
690            * @return the previous, current, and next announcements entry
691            * @throws com.liferay.portlet.announcements.NoSuchEntryException if a announcements entry with the primary key could not be found
692            * @throws SystemException if a system exception occurred
693            */
694            public static com.liferay.portlet.announcements.model.AnnouncementsEntry[] findByC_C_A_PrevAndNext(
695                    long entryId, long classNameId, long classPK, boolean alert,
696                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
697                    throws com.liferay.portal.kernel.exception.SystemException,
698                            com.liferay.portlet.announcements.NoSuchEntryException {
699                    return getPersistence()
700                                       .findByC_C_A_PrevAndNext(entryId, classNameId, classPK,
701                            alert, orderByComparator);
702            }
703    
704            /**
705            * Finds all the announcements entries.
706            *
707            * @return the announcements entries
708            * @throws SystemException if a system exception occurred
709            */
710            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll()
711                    throws com.liferay.portal.kernel.exception.SystemException {
712                    return getPersistence().findAll();
713            }
714    
715            /**
716            * Finds a range of all the announcements entries.
717            *
718            * <p>
719            * 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.
720            * </p>
721            *
722            * @param start the lower bound of the range of announcements entries to return
723            * @param end the upper bound of the range of announcements entries to return (not inclusive)
724            * @return the range of announcements entries
725            * @throws SystemException if a system exception occurred
726            */
727            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
728                    int start, int end)
729                    throws com.liferay.portal.kernel.exception.SystemException {
730                    return getPersistence().findAll(start, end);
731            }
732    
733            /**
734            * Finds an ordered range of all the announcements entries.
735            *
736            * <p>
737            * 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.
738            * </p>
739            *
740            * @param start the lower bound of the range of announcements entries to return
741            * @param end the upper bound of the range of announcements entries to return (not inclusive)
742            * @param orderByComparator the comparator to order the results by
743            * @return the ordered range of announcements entries
744            * @throws SystemException if a system exception occurred
745            */
746            public static java.util.List<com.liferay.portlet.announcements.model.AnnouncementsEntry> findAll(
747                    int start, int end,
748                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
749                    throws com.liferay.portal.kernel.exception.SystemException {
750                    return getPersistence().findAll(start, end, orderByComparator);
751            }
752    
753            /**
754            * Removes all the announcements entries where uuid = &#63; from the database.
755            *
756            * @param uuid the uuid to search with
757            * @throws SystemException if a system exception occurred
758            */
759            public static void removeByUuid(java.lang.String uuid)
760                    throws com.liferay.portal.kernel.exception.SystemException {
761                    getPersistence().removeByUuid(uuid);
762            }
763    
764            /**
765            * Removes all the announcements entries where userId = &#63; from the database.
766            *
767            * @param userId the user id to search with
768            * @throws SystemException if a system exception occurred
769            */
770            public static void removeByUserId(long userId)
771                    throws com.liferay.portal.kernel.exception.SystemException {
772                    getPersistence().removeByUserId(userId);
773            }
774    
775            /**
776            * Removes all the announcements entries where classNameId = &#63; and classPK = &#63; from the database.
777            *
778            * @param classNameId the class name id to search with
779            * @param classPK the class p k to search with
780            * @throws SystemException if a system exception occurred
781            */
782            public static void removeByC_C(long classNameId, long classPK)
783                    throws com.liferay.portal.kernel.exception.SystemException {
784                    getPersistence().removeByC_C(classNameId, classPK);
785            }
786    
787            /**
788            * Removes all the announcements entries where classNameId = &#63; and classPK = &#63; and alert = &#63; from the database.
789            *
790            * @param classNameId the class name id to search with
791            * @param classPK the class p k to search with
792            * @param alert the alert to search with
793            * @throws SystemException if a system exception occurred
794            */
795            public static void removeByC_C_A(long classNameId, long classPK,
796                    boolean alert)
797                    throws com.liferay.portal.kernel.exception.SystemException {
798                    getPersistence().removeByC_C_A(classNameId, classPK, alert);
799            }
800    
801            /**
802            * Removes all the announcements entries from the database.
803            *
804            * @throws SystemException if a system exception occurred
805            */
806            public static void removeAll()
807                    throws com.liferay.portal.kernel.exception.SystemException {
808                    getPersistence().removeAll();
809            }
810    
811            /**
812            * Counts all the announcements entries where uuid = &#63;.
813            *
814            * @param uuid the uuid to search with
815            * @return the number of matching announcements entries
816            * @throws SystemException if a system exception occurred
817            */
818            public static int countByUuid(java.lang.String uuid)
819                    throws com.liferay.portal.kernel.exception.SystemException {
820                    return getPersistence().countByUuid(uuid);
821            }
822    
823            /**
824            * Counts all the announcements entries where userId = &#63;.
825            *
826            * @param userId the user id to search with
827            * @return the number of matching announcements entries
828            * @throws SystemException if a system exception occurred
829            */
830            public static int countByUserId(long userId)
831                    throws com.liferay.portal.kernel.exception.SystemException {
832                    return getPersistence().countByUserId(userId);
833            }
834    
835            /**
836            * Counts all the announcements entries where classNameId = &#63; and classPK = &#63;.
837            *
838            * @param classNameId the class name id to search with
839            * @param classPK the class p k to search with
840            * @return the number of matching announcements entries
841            * @throws SystemException if a system exception occurred
842            */
843            public static int countByC_C(long classNameId, long classPK)
844                    throws com.liferay.portal.kernel.exception.SystemException {
845                    return getPersistence().countByC_C(classNameId, classPK);
846            }
847    
848            /**
849            * Counts all the announcements entries where classNameId = &#63; and classPK = &#63; and alert = &#63;.
850            *
851            * @param classNameId the class name id to search with
852            * @param classPK the class p k to search with
853            * @param alert the alert to search with
854            * @return the number of matching announcements entries
855            * @throws SystemException if a system exception occurred
856            */
857            public static int countByC_C_A(long classNameId, long classPK, boolean alert)
858                    throws com.liferay.portal.kernel.exception.SystemException {
859                    return getPersistence().countByC_C_A(classNameId, classPK, alert);
860            }
861    
862            /**
863            * Counts all the announcements entries.
864            *
865            * @return the number of announcements entries
866            * @throws SystemException if a system exception occurred
867            */
868            public static int countAll()
869                    throws com.liferay.portal.kernel.exception.SystemException {
870                    return getPersistence().countAll();
871            }
872    
873            public static AnnouncementsEntryPersistence getPersistence() {
874                    if (_persistence == null) {
875                            _persistence = (AnnouncementsEntryPersistence)PortalBeanLocatorUtil.locate(AnnouncementsEntryPersistence.class.getName());
876                    }
877    
878                    return _persistence;
879            }
880    
881            public void setPersistence(AnnouncementsEntryPersistence persistence) {
882                    _persistence = persistence;
883            }
884    
885            private static AnnouncementsEntryPersistence _persistence;
886    }