001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.messageboards.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.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.messageboards.model.MBMailingList;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the message boards mailing list service. This utility wraps {@link MBMailingListPersistenceImpl} 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.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see MBMailingListPersistence
037     * @see MBMailingListPersistenceImpl
038     * @generated
039     */
040    public class MBMailingListUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(MBMailingList mbMailingList) {
058                    getPersistence().clearCache(mbMailingList);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<MBMailingList> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<MBMailingList> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<MBMailingList> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
099             */
100            public static MBMailingList remove(MBMailingList mbMailingList)
101                    throws SystemException {
102                    return getPersistence().remove(mbMailingList);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
107             */
108            public static MBMailingList update(MBMailingList mbMailingList,
109                    boolean merge) throws SystemException {
110                    return getPersistence().update(mbMailingList, merge);
111            }
112    
113            /**
114             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
115             */
116            public static MBMailingList update(MBMailingList mbMailingList,
117                    boolean merge, ServiceContext serviceContext) throws SystemException {
118                    return getPersistence().update(mbMailingList, merge, serviceContext);
119            }
120    
121            /**
122            * Caches the message boards mailing list in the entity cache if it is enabled.
123            *
124            * @param mbMailingList the message boards mailing list
125            */
126            public static void cacheResult(
127                    com.liferay.portlet.messageboards.model.MBMailingList mbMailingList) {
128                    getPersistence().cacheResult(mbMailingList);
129            }
130    
131            /**
132            * Caches the message boards mailing lists in the entity cache if it is enabled.
133            *
134            * @param mbMailingLists the message boards mailing lists
135            */
136            public static void cacheResult(
137                    java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> mbMailingLists) {
138                    getPersistence().cacheResult(mbMailingLists);
139            }
140    
141            /**
142            * Creates a new message boards mailing list with the primary key. Does not add the message boards mailing list to the database.
143            *
144            * @param mailingListId the primary key for the new message boards mailing list
145            * @return the new message boards mailing list
146            */
147            public static com.liferay.portlet.messageboards.model.MBMailingList create(
148                    long mailingListId) {
149                    return getPersistence().create(mailingListId);
150            }
151    
152            /**
153            * Removes the message boards mailing list with the primary key from the database. Also notifies the appropriate model listeners.
154            *
155            * @param mailingListId the primary key of the message boards mailing list
156            * @return the message boards mailing list that was removed
157            * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a message boards mailing list with the primary key could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            public static com.liferay.portlet.messageboards.model.MBMailingList remove(
161                    long mailingListId)
162                    throws com.liferay.portal.kernel.exception.SystemException,
163                            com.liferay.portlet.messageboards.NoSuchMailingListException {
164                    return getPersistence().remove(mailingListId);
165            }
166    
167            public static com.liferay.portlet.messageboards.model.MBMailingList updateImpl(
168                    com.liferay.portlet.messageboards.model.MBMailingList mbMailingList,
169                    boolean merge)
170                    throws com.liferay.portal.kernel.exception.SystemException {
171                    return getPersistence().updateImpl(mbMailingList, merge);
172            }
173    
174            /**
175            * Returns the message boards mailing list with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchMailingListException} if it could not be found.
176            *
177            * @param mailingListId the primary key of the message boards mailing list
178            * @return the message boards mailing list
179            * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a message boards mailing list with the primary key could not be found
180            * @throws SystemException if a system exception occurred
181            */
182            public static com.liferay.portlet.messageboards.model.MBMailingList findByPrimaryKey(
183                    long mailingListId)
184                    throws com.liferay.portal.kernel.exception.SystemException,
185                            com.liferay.portlet.messageboards.NoSuchMailingListException {
186                    return getPersistence().findByPrimaryKey(mailingListId);
187            }
188    
189            /**
190            * Returns the message boards mailing list with the primary key or returns <code>null</code> if it could not be found.
191            *
192            * @param mailingListId the primary key of the message boards mailing list
193            * @return the message boards mailing list, or <code>null</code> if a message boards mailing list with the primary key could not be found
194            * @throws SystemException if a system exception occurred
195            */
196            public static com.liferay.portlet.messageboards.model.MBMailingList fetchByPrimaryKey(
197                    long mailingListId)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getPersistence().fetchByPrimaryKey(mailingListId);
200            }
201    
202            /**
203            * Returns all the message boards mailing lists where uuid = &#63;.
204            *
205            * @param uuid the uuid
206            * @return the matching message boards mailing lists
207            * @throws SystemException if a system exception occurred
208            */
209            public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
210                    java.lang.String uuid)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getPersistence().findByUuid(uuid);
213            }
214    
215            /**
216            * Returns a range of all the message boards mailing lists where uuid = &#63;.
217            *
218            * <p>
219            * 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.
220            * </p>
221            *
222            * @param uuid the uuid
223            * @param start the lower bound of the range of message boards mailing lists
224            * @param end the upper bound of the range of message boards mailing lists (not inclusive)
225            * @return the range of matching message boards mailing lists
226            * @throws SystemException if a system exception occurred
227            */
228            public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
229                    java.lang.String uuid, int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getPersistence().findByUuid(uuid, start, end);
232            }
233    
234            /**
235            * Returns an ordered range of all the message boards mailing lists where uuid = &#63;.
236            *
237            * <p>
238            * 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.
239            * </p>
240            *
241            * @param uuid the uuid
242            * @param start the lower bound of the range of message boards mailing lists
243            * @param end the upper bound of the range of message boards mailing lists (not inclusive)
244            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
245            * @return the ordered range of matching message boards mailing lists
246            * @throws SystemException if a system exception occurred
247            */
248            public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid(
249                    java.lang.String uuid, int start, int end,
250                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251                    throws com.liferay.portal.kernel.exception.SystemException {
252                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
253            }
254    
255            /**
256            * Returns the first message boards mailing list in the ordered set where uuid = &#63;.
257            *
258            * <p>
259            * 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.
260            * </p>
261            *
262            * @param uuid the uuid
263            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
264            * @return the first matching message boards mailing list
265            * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found
266            * @throws SystemException if a system exception occurred
267            */
268            public static com.liferay.portlet.messageboards.model.MBMailingList findByUuid_First(
269                    java.lang.String uuid,
270                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
271                    throws com.liferay.portal.kernel.exception.SystemException,
272                            com.liferay.portlet.messageboards.NoSuchMailingListException {
273                    return getPersistence().findByUuid_First(uuid, orderByComparator);
274            }
275    
276            /**
277            * Returns the last message boards mailing list in the ordered set where uuid = &#63;.
278            *
279            * <p>
280            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
281            * </p>
282            *
283            * @param uuid the uuid
284            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
285            * @return the last matching message boards mailing list
286            * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found
287            * @throws SystemException if a system exception occurred
288            */
289            public static com.liferay.portlet.messageboards.model.MBMailingList findByUuid_Last(
290                    java.lang.String uuid,
291                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
292                    throws com.liferay.portal.kernel.exception.SystemException,
293                            com.liferay.portlet.messageboards.NoSuchMailingListException {
294                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
295            }
296    
297            /**
298            * Returns the message boards mailing lists before and after the current message boards mailing list in the ordered set where uuid = &#63;.
299            *
300            * <p>
301            * 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.
302            * </p>
303            *
304            * @param mailingListId the primary key of the current message boards mailing list
305            * @param uuid the uuid
306            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
307            * @return the previous, current, and next message boards mailing list
308            * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a message boards mailing list with the primary key could not be found
309            * @throws SystemException if a system exception occurred
310            */
311            public static com.liferay.portlet.messageboards.model.MBMailingList[] findByUuid_PrevAndNext(
312                    long mailingListId, java.lang.String uuid,
313                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
314                    throws com.liferay.portal.kernel.exception.SystemException,
315                            com.liferay.portlet.messageboards.NoSuchMailingListException {
316                    return getPersistence()
317                                       .findByUuid_PrevAndNext(mailingListId, uuid,
318                            orderByComparator);
319            }
320    
321            /**
322            * Returns the message boards mailing list where uuid = &#63; and groupId = &#63; or throws a {@link com.liferay.portlet.messageboards.NoSuchMailingListException} if it could not be found.
323            *
324            * @param uuid the uuid
325            * @param groupId the group ID
326            * @return the matching message boards mailing list
327            * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found
328            * @throws SystemException if a system exception occurred
329            */
330            public static com.liferay.portlet.messageboards.model.MBMailingList findByUUID_G(
331                    java.lang.String uuid, long groupId)
332                    throws com.liferay.portal.kernel.exception.SystemException,
333                            com.liferay.portlet.messageboards.NoSuchMailingListException {
334                    return getPersistence().findByUUID_G(uuid, groupId);
335            }
336    
337            /**
338            * Returns the message boards mailing list where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
339            *
340            * @param uuid the uuid
341            * @param groupId the group ID
342            * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found
343            * @throws SystemException if a system exception occurred
344            */
345            public static com.liferay.portlet.messageboards.model.MBMailingList fetchByUUID_G(
346                    java.lang.String uuid, long groupId)
347                    throws com.liferay.portal.kernel.exception.SystemException {
348                    return getPersistence().fetchByUUID_G(uuid, groupId);
349            }
350    
351            /**
352            * Returns the message boards mailing list where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
353            *
354            * @param uuid the uuid
355            * @param groupId the group ID
356            * @param retrieveFromCache whether to use the finder cache
357            * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found
358            * @throws SystemException if a system exception occurred
359            */
360            public static com.liferay.portlet.messageboards.model.MBMailingList fetchByUUID_G(
361                    java.lang.String uuid, long groupId, boolean retrieveFromCache)
362                    throws com.liferay.portal.kernel.exception.SystemException {
363                    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
364            }
365    
366            /**
367            * Returns all the message boards mailing lists where active = &#63;.
368            *
369            * @param active the active
370            * @return the matching message boards mailing lists
371            * @throws SystemException if a system exception occurred
372            */
373            public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
374                    boolean active)
375                    throws com.liferay.portal.kernel.exception.SystemException {
376                    return getPersistence().findByActive(active);
377            }
378    
379            /**
380            * Returns a range of all the message boards mailing lists where active = &#63;.
381            *
382            * <p>
383            * 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.
384            * </p>
385            *
386            * @param active the active
387            * @param start the lower bound of the range of message boards mailing lists
388            * @param end the upper bound of the range of message boards mailing lists (not inclusive)
389            * @return the range of matching message boards mailing lists
390            * @throws SystemException if a system exception occurred
391            */
392            public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
393                    boolean active, int start, int end)
394                    throws com.liferay.portal.kernel.exception.SystemException {
395                    return getPersistence().findByActive(active, start, end);
396            }
397    
398            /**
399            * Returns an ordered range of all the message boards mailing lists where active = &#63;.
400            *
401            * <p>
402            * 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.
403            * </p>
404            *
405            * @param active the active
406            * @param start the lower bound of the range of message boards mailing lists
407            * @param end the upper bound of the range of message boards mailing lists (not inclusive)
408            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
409            * @return the ordered range of matching message boards mailing lists
410            * @throws SystemException if a system exception occurred
411            */
412            public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive(
413                    boolean active, int start, int end,
414                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415                    throws com.liferay.portal.kernel.exception.SystemException {
416                    return getPersistence()
417                                       .findByActive(active, start, end, orderByComparator);
418            }
419    
420            /**
421            * Returns the first message boards mailing list in the ordered set where active = &#63;.
422            *
423            * <p>
424            * 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.
425            * </p>
426            *
427            * @param active the active
428            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
429            * @return the first matching message boards mailing list
430            * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found
431            * @throws SystemException if a system exception occurred
432            */
433            public static com.liferay.portlet.messageboards.model.MBMailingList findByActive_First(
434                    boolean active,
435                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
436                    throws com.liferay.portal.kernel.exception.SystemException,
437                            com.liferay.portlet.messageboards.NoSuchMailingListException {
438                    return getPersistence().findByActive_First(active, orderByComparator);
439            }
440    
441            /**
442            * Returns the last message boards mailing list in the ordered set where active = &#63;.
443            *
444            * <p>
445            * 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.
446            * </p>
447            *
448            * @param active the active
449            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
450            * @return the last matching message boards mailing list
451            * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found
452            * @throws SystemException if a system exception occurred
453            */
454            public static com.liferay.portlet.messageboards.model.MBMailingList findByActive_Last(
455                    boolean active,
456                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
457                    throws com.liferay.portal.kernel.exception.SystemException,
458                            com.liferay.portlet.messageboards.NoSuchMailingListException {
459                    return getPersistence().findByActive_Last(active, orderByComparator);
460            }
461    
462            /**
463            * Returns the message boards mailing lists before and after the current message boards mailing list in the ordered set where active = &#63;.
464            *
465            * <p>
466            * 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.
467            * </p>
468            *
469            * @param mailingListId the primary key of the current message boards mailing list
470            * @param active the active
471            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
472            * @return the previous, current, and next message boards mailing list
473            * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a message boards mailing list with the primary key could not be found
474            * @throws SystemException if a system exception occurred
475            */
476            public static com.liferay.portlet.messageboards.model.MBMailingList[] findByActive_PrevAndNext(
477                    long mailingListId, boolean active,
478                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
479                    throws com.liferay.portal.kernel.exception.SystemException,
480                            com.liferay.portlet.messageboards.NoSuchMailingListException {
481                    return getPersistence()
482                                       .findByActive_PrevAndNext(mailingListId, active,
483                            orderByComparator);
484            }
485    
486            /**
487            * Returns the message boards mailing list where groupId = &#63; and categoryId = &#63; or throws a {@link com.liferay.portlet.messageboards.NoSuchMailingListException} if it could not be found.
488            *
489            * @param groupId the group ID
490            * @param categoryId the category ID
491            * @return the matching message boards mailing list
492            * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found
493            * @throws SystemException if a system exception occurred
494            */
495            public static com.liferay.portlet.messageboards.model.MBMailingList findByG_C(
496                    long groupId, long categoryId)
497                    throws com.liferay.portal.kernel.exception.SystemException,
498                            com.liferay.portlet.messageboards.NoSuchMailingListException {
499                    return getPersistence().findByG_C(groupId, categoryId);
500            }
501    
502            /**
503            * Returns the message boards mailing list where groupId = &#63; and categoryId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
504            *
505            * @param groupId the group ID
506            * @param categoryId the category ID
507            * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found
508            * @throws SystemException if a system exception occurred
509            */
510            public static com.liferay.portlet.messageboards.model.MBMailingList fetchByG_C(
511                    long groupId, long categoryId)
512                    throws com.liferay.portal.kernel.exception.SystemException {
513                    return getPersistence().fetchByG_C(groupId, categoryId);
514            }
515    
516            /**
517            * Returns the message boards mailing list where groupId = &#63; and categoryId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
518            *
519            * @param groupId the group ID
520            * @param categoryId the category ID
521            * @param retrieveFromCache whether to use the finder cache
522            * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found
523            * @throws SystemException if a system exception occurred
524            */
525            public static com.liferay.portlet.messageboards.model.MBMailingList fetchByG_C(
526                    long groupId, long categoryId, boolean retrieveFromCache)
527                    throws com.liferay.portal.kernel.exception.SystemException {
528                    return getPersistence()
529                                       .fetchByG_C(groupId, categoryId, retrieveFromCache);
530            }
531    
532            /**
533            * Returns all the message boards mailing lists.
534            *
535            * @return the message boards mailing lists
536            * @throws SystemException if a system exception occurred
537            */
538            public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll()
539                    throws com.liferay.portal.kernel.exception.SystemException {
540                    return getPersistence().findAll();
541            }
542    
543            /**
544            * Returns a range of all the message boards mailing lists.
545            *
546            * <p>
547            * 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.
548            * </p>
549            *
550            * @param start the lower bound of the range of message boards mailing lists
551            * @param end the upper bound of the range of message boards mailing lists (not inclusive)
552            * @return the range of message boards mailing lists
553            * @throws SystemException if a system exception occurred
554            */
555            public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll(
556                    int start, int end)
557                    throws com.liferay.portal.kernel.exception.SystemException {
558                    return getPersistence().findAll(start, end);
559            }
560    
561            /**
562            * Returns an ordered range of all the message boards mailing lists.
563            *
564            * <p>
565            * 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.
566            * </p>
567            *
568            * @param start the lower bound of the range of message boards mailing lists
569            * @param end the upper bound of the range of message boards mailing lists (not inclusive)
570            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
571            * @return the ordered range of message boards mailing lists
572            * @throws SystemException if a system exception occurred
573            */
574            public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll(
575                    int start, int end,
576                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
577                    throws com.liferay.portal.kernel.exception.SystemException {
578                    return getPersistence().findAll(start, end, orderByComparator);
579            }
580    
581            /**
582            * Removes all the message boards mailing lists where uuid = &#63; from the database.
583            *
584            * @param uuid the uuid
585            * @throws SystemException if a system exception occurred
586            */
587            public static void removeByUuid(java.lang.String uuid)
588                    throws com.liferay.portal.kernel.exception.SystemException {
589                    getPersistence().removeByUuid(uuid);
590            }
591    
592            /**
593            * Removes the message boards mailing list where uuid = &#63; and groupId = &#63; from the database.
594            *
595            * @param uuid the uuid
596            * @param groupId the group ID
597            * @throws SystemException if a system exception occurred
598            */
599            public static void removeByUUID_G(java.lang.String uuid, long groupId)
600                    throws com.liferay.portal.kernel.exception.SystemException,
601                            com.liferay.portlet.messageboards.NoSuchMailingListException {
602                    getPersistence().removeByUUID_G(uuid, groupId);
603            }
604    
605            /**
606            * Removes all the message boards mailing lists where active = &#63; from the database.
607            *
608            * @param active the active
609            * @throws SystemException if a system exception occurred
610            */
611            public static void removeByActive(boolean active)
612                    throws com.liferay.portal.kernel.exception.SystemException {
613                    getPersistence().removeByActive(active);
614            }
615    
616            /**
617            * Removes the message boards mailing list where groupId = &#63; and categoryId = &#63; from the database.
618            *
619            * @param groupId the group ID
620            * @param categoryId the category ID
621            * @throws SystemException if a system exception occurred
622            */
623            public static void removeByG_C(long groupId, long categoryId)
624                    throws com.liferay.portal.kernel.exception.SystemException,
625                            com.liferay.portlet.messageboards.NoSuchMailingListException {
626                    getPersistence().removeByG_C(groupId, categoryId);
627            }
628    
629            /**
630            * Removes all the message boards mailing lists from the database.
631            *
632            * @throws SystemException if a system exception occurred
633            */
634            public static void removeAll()
635                    throws com.liferay.portal.kernel.exception.SystemException {
636                    getPersistence().removeAll();
637            }
638    
639            /**
640            * Returns the number of message boards mailing lists where uuid = &#63;.
641            *
642            * @param uuid the uuid
643            * @return the number of matching message boards mailing lists
644            * @throws SystemException if a system exception occurred
645            */
646            public static int countByUuid(java.lang.String uuid)
647                    throws com.liferay.portal.kernel.exception.SystemException {
648                    return getPersistence().countByUuid(uuid);
649            }
650    
651            /**
652            * Returns the number of message boards mailing lists where uuid = &#63; and groupId = &#63;.
653            *
654            * @param uuid the uuid
655            * @param groupId the group ID
656            * @return the number of matching message boards mailing lists
657            * @throws SystemException if a system exception occurred
658            */
659            public static int countByUUID_G(java.lang.String uuid, long groupId)
660                    throws com.liferay.portal.kernel.exception.SystemException {
661                    return getPersistence().countByUUID_G(uuid, groupId);
662            }
663    
664            /**
665            * Returns the number of message boards mailing lists where active = &#63;.
666            *
667            * @param active the active
668            * @return the number of matching message boards mailing lists
669            * @throws SystemException if a system exception occurred
670            */
671            public static int countByActive(boolean active)
672                    throws com.liferay.portal.kernel.exception.SystemException {
673                    return getPersistence().countByActive(active);
674            }
675    
676            /**
677            * Returns the number of message boards mailing lists where groupId = &#63; and categoryId = &#63;.
678            *
679            * @param groupId the group ID
680            * @param categoryId the category ID
681            * @return the number of matching message boards mailing lists
682            * @throws SystemException if a system exception occurred
683            */
684            public static int countByG_C(long groupId, long categoryId)
685                    throws com.liferay.portal.kernel.exception.SystemException {
686                    return getPersistence().countByG_C(groupId, categoryId);
687            }
688    
689            /**
690            * Returns the number of message boards mailing lists.
691            *
692            * @return the number of message boards mailing lists
693            * @throws SystemException if a system exception occurred
694            */
695            public static int countAll()
696                    throws com.liferay.portal.kernel.exception.SystemException {
697                    return getPersistence().countAll();
698            }
699    
700            public static MBMailingListPersistence getPersistence() {
701                    if (_persistence == null) {
702                            _persistence = (MBMailingListPersistence)PortalBeanLocatorUtil.locate(MBMailingListPersistence.class.getName());
703    
704                            ReferenceRegistry.registerReference(MBMailingListUtil.class,
705                                    "_persistence");
706                    }
707    
708                    return _persistence;
709            }
710    
711            public void setPersistence(MBMailingListPersistence persistence) {
712                    _persistence = persistence;
713    
714                    ReferenceRegistry.registerReference(MBMailingListUtil.class,
715                            "_persistence");
716            }
717    
718            private static MBMailingListPersistence _persistence;
719    }