001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import com.liferay.portlet.messageboards.model.MBDiscussion;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the message boards discussion service. This utility wraps {@link MBDiscussionPersistenceImpl} 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.
031     *
032     * <p>
033     * Caching information and settings can be found in <code>portal.properties</code>
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see MBDiscussionPersistence
038     * @see MBDiscussionPersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class MBDiscussionUtil {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
047             */
048    
049            /**
050             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
051             */
052            public static void clearCache() {
053                    getPersistence().clearCache();
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
058             */
059            public static void clearCache(MBDiscussion mbDiscussion) {
060                    getPersistence().clearCache(mbDiscussion);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
065             */
066            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
067                    return getPersistence().countWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
072             */
073            public static List<MBDiscussion> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery) {
075                    return getPersistence().findWithDynamicQuery(dynamicQuery);
076            }
077    
078            /**
079             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
080             */
081            public static List<MBDiscussion> findWithDynamicQuery(
082                    DynamicQuery dynamicQuery, int start, int end) {
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<MBDiscussion> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator<MBDiscussion> orderByComparator) {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
099             */
100            public static MBDiscussion update(MBDiscussion mbDiscussion) {
101                    return getPersistence().update(mbDiscussion);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static MBDiscussion update(MBDiscussion mbDiscussion,
108                    ServiceContext serviceContext) {
109                    return getPersistence().update(mbDiscussion, serviceContext);
110            }
111    
112            /**
113            * Returns all the message boards discussions where uuid = &#63;.
114            *
115            * @param uuid the uuid
116            * @return the matching message boards discussions
117            */
118            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByUuid(
119                    java.lang.String uuid) {
120                    return getPersistence().findByUuid(uuid);
121            }
122    
123            /**
124            * Returns a range of all the message boards discussions where uuid = &#63;.
125            *
126            * <p>
127            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
128            * </p>
129            *
130            * @param uuid the uuid
131            * @param start the lower bound of the range of message boards discussions
132            * @param end the upper bound of the range of message boards discussions (not inclusive)
133            * @return the range of matching message boards discussions
134            */
135            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByUuid(
136                    java.lang.String uuid, int start, int end) {
137                    return getPersistence().findByUuid(uuid, start, end);
138            }
139    
140            /**
141            * Returns an ordered range of all the message boards discussions where uuid = &#63;.
142            *
143            * <p>
144            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
145            * </p>
146            *
147            * @param uuid the uuid
148            * @param start the lower bound of the range of message boards discussions
149            * @param end the upper bound of the range of message boards discussions (not inclusive)
150            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
151            * @return the ordered range of matching message boards discussions
152            */
153            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByUuid(
154                    java.lang.String uuid, int start, int end,
155                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator) {
156                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
157            }
158    
159            /**
160            * Returns the first message boards discussion in the ordered set where uuid = &#63;.
161            *
162            * @param uuid the uuid
163            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
164            * @return the first matching message boards discussion
165            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found
166            */
167            public static com.liferay.portlet.messageboards.model.MBDiscussion findByUuid_First(
168                    java.lang.String uuid,
169                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator)
170                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
171                    return getPersistence().findByUuid_First(uuid, orderByComparator);
172            }
173    
174            /**
175            * Returns the first message boards discussion in the ordered set where uuid = &#63;.
176            *
177            * @param uuid the uuid
178            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
179            * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
180            */
181            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByUuid_First(
182                    java.lang.String uuid,
183                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator) {
184                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
185            }
186    
187            /**
188            * Returns the last message boards discussion in the ordered set where uuid = &#63;.
189            *
190            * @param uuid the uuid
191            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
192            * @return the last matching message boards discussion
193            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found
194            */
195            public static com.liferay.portlet.messageboards.model.MBDiscussion findByUuid_Last(
196                    java.lang.String uuid,
197                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator)
198                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
199                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
200            }
201    
202            /**
203            * Returns the last message boards discussion in the ordered set where uuid = &#63;.
204            *
205            * @param uuid the uuid
206            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
207            * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
208            */
209            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByUuid_Last(
210                    java.lang.String uuid,
211                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator) {
212                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
213            }
214    
215            /**
216            * Returns the message boards discussions before and after the current message boards discussion in the ordered set where uuid = &#63;.
217            *
218            * @param discussionId the primary key of the current message boards discussion
219            * @param uuid the uuid
220            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
221            * @return the previous, current, and next message boards discussion
222            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a message boards discussion with the primary key could not be found
223            */
224            public static com.liferay.portlet.messageboards.model.MBDiscussion[] findByUuid_PrevAndNext(
225                    long discussionId, java.lang.String uuid,
226                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator)
227                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
228                    return getPersistence()
229                                       .findByUuid_PrevAndNext(discussionId, uuid, orderByComparator);
230            }
231    
232            /**
233            * Removes all the message boards discussions where uuid = &#63; from the database.
234            *
235            * @param uuid the uuid
236            */
237            public static void removeByUuid(java.lang.String uuid) {
238                    getPersistence().removeByUuid(uuid);
239            }
240    
241            /**
242            * Returns the number of message boards discussions where uuid = &#63;.
243            *
244            * @param uuid the uuid
245            * @return the number of matching message boards discussions
246            */
247            public static int countByUuid(java.lang.String uuid) {
248                    return getPersistence().countByUuid(uuid);
249            }
250    
251            /**
252            * Returns the message boards discussion where uuid = &#63; and groupId = &#63; or throws a {@link com.liferay.portlet.messageboards.NoSuchDiscussionException} if it could not be found.
253            *
254            * @param uuid the uuid
255            * @param groupId the group ID
256            * @return the matching message boards discussion
257            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found
258            */
259            public static com.liferay.portlet.messageboards.model.MBDiscussion findByUUID_G(
260                    java.lang.String uuid, long groupId)
261                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
262                    return getPersistence().findByUUID_G(uuid, groupId);
263            }
264    
265            /**
266            * Returns the message boards discussion where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
267            *
268            * @param uuid the uuid
269            * @param groupId the group ID
270            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
271            */
272            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByUUID_G(
273                    java.lang.String uuid, long groupId) {
274                    return getPersistence().fetchByUUID_G(uuid, groupId);
275            }
276    
277            /**
278            * Returns the message boards discussion where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
279            *
280            * @param uuid the uuid
281            * @param groupId the group ID
282            * @param retrieveFromCache whether to use the finder cache
283            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
284            */
285            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByUUID_G(
286                    java.lang.String uuid, long groupId, boolean retrieveFromCache) {
287                    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
288            }
289    
290            /**
291            * Removes the message boards discussion where uuid = &#63; and groupId = &#63; from the database.
292            *
293            * @param uuid the uuid
294            * @param groupId the group ID
295            * @return the message boards discussion that was removed
296            */
297            public static com.liferay.portlet.messageboards.model.MBDiscussion removeByUUID_G(
298                    java.lang.String uuid, long groupId)
299                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
300                    return getPersistence().removeByUUID_G(uuid, groupId);
301            }
302    
303            /**
304            * Returns the number of message boards discussions where uuid = &#63; and groupId = &#63;.
305            *
306            * @param uuid the uuid
307            * @param groupId the group ID
308            * @return the number of matching message boards discussions
309            */
310            public static int countByUUID_G(java.lang.String uuid, long groupId) {
311                    return getPersistence().countByUUID_G(uuid, groupId);
312            }
313    
314            /**
315            * Returns all the message boards discussions where uuid = &#63; and companyId = &#63;.
316            *
317            * @param uuid the uuid
318            * @param companyId the company ID
319            * @return the matching message boards discussions
320            */
321            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByUuid_C(
322                    java.lang.String uuid, long companyId) {
323                    return getPersistence().findByUuid_C(uuid, companyId);
324            }
325    
326            /**
327            * Returns a range of all the message boards discussions where uuid = &#63; and companyId = &#63;.
328            *
329            * <p>
330            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
331            * </p>
332            *
333            * @param uuid the uuid
334            * @param companyId the company ID
335            * @param start the lower bound of the range of message boards discussions
336            * @param end the upper bound of the range of message boards discussions (not inclusive)
337            * @return the range of matching message boards discussions
338            */
339            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByUuid_C(
340                    java.lang.String uuid, long companyId, int start, int end) {
341                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
342            }
343    
344            /**
345            * Returns an ordered range of all the message boards discussions where uuid = &#63; and companyId = &#63;.
346            *
347            * <p>
348            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
349            * </p>
350            *
351            * @param uuid the uuid
352            * @param companyId the company ID
353            * @param start the lower bound of the range of message boards discussions
354            * @param end the upper bound of the range of message boards discussions (not inclusive)
355            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
356            * @return the ordered range of matching message boards discussions
357            */
358            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByUuid_C(
359                    java.lang.String uuid, long companyId, int start, int end,
360                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator) {
361                    return getPersistence()
362                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
363            }
364    
365            /**
366            * Returns the first message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
367            *
368            * @param uuid the uuid
369            * @param companyId the company ID
370            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
371            * @return the first matching message boards discussion
372            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found
373            */
374            public static com.liferay.portlet.messageboards.model.MBDiscussion findByUuid_C_First(
375                    java.lang.String uuid, long companyId,
376                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator)
377                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
378                    return getPersistence()
379                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
380            }
381    
382            /**
383            * Returns the first message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
384            *
385            * @param uuid the uuid
386            * @param companyId the company ID
387            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
388            * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
389            */
390            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByUuid_C_First(
391                    java.lang.String uuid, long companyId,
392                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator) {
393                    return getPersistence()
394                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
395            }
396    
397            /**
398            * Returns the last message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
399            *
400            * @param uuid the uuid
401            * @param companyId the company ID
402            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
403            * @return the last matching message boards discussion
404            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found
405            */
406            public static com.liferay.portlet.messageboards.model.MBDiscussion findByUuid_C_Last(
407                    java.lang.String uuid, long companyId,
408                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator)
409                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
410                    return getPersistence()
411                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
412            }
413    
414            /**
415            * Returns the last message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
416            *
417            * @param uuid the uuid
418            * @param companyId the company ID
419            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
420            * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
421            */
422            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByUuid_C_Last(
423                    java.lang.String uuid, long companyId,
424                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator) {
425                    return getPersistence()
426                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
427            }
428    
429            /**
430            * Returns the message boards discussions before and after the current message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
431            *
432            * @param discussionId the primary key of the current message boards discussion
433            * @param uuid the uuid
434            * @param companyId the company ID
435            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
436            * @return the previous, current, and next message boards discussion
437            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a message boards discussion with the primary key could not be found
438            */
439            public static com.liferay.portlet.messageboards.model.MBDiscussion[] findByUuid_C_PrevAndNext(
440                    long discussionId, java.lang.String uuid, long companyId,
441                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator)
442                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
443                    return getPersistence()
444                                       .findByUuid_C_PrevAndNext(discussionId, uuid, companyId,
445                            orderByComparator);
446            }
447    
448            /**
449            * Removes all the message boards discussions where uuid = &#63; and companyId = &#63; from the database.
450            *
451            * @param uuid the uuid
452            * @param companyId the company ID
453            */
454            public static void removeByUuid_C(java.lang.String uuid, long companyId) {
455                    getPersistence().removeByUuid_C(uuid, companyId);
456            }
457    
458            /**
459            * Returns the number of message boards discussions where uuid = &#63; and companyId = &#63;.
460            *
461            * @param uuid the uuid
462            * @param companyId the company ID
463            * @return the number of matching message boards discussions
464            */
465            public static int countByUuid_C(java.lang.String uuid, long companyId) {
466                    return getPersistence().countByUuid_C(uuid, companyId);
467            }
468    
469            /**
470            * Returns all the message boards discussions where classNameId = &#63;.
471            *
472            * @param classNameId the class name ID
473            * @return the matching message boards discussions
474            */
475            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
476                    long classNameId) {
477                    return getPersistence().findByClassNameId(classNameId);
478            }
479    
480            /**
481            * Returns a range of all the message boards discussions where classNameId = &#63;.
482            *
483            * <p>
484            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
485            * </p>
486            *
487            * @param classNameId the class name ID
488            * @param start the lower bound of the range of message boards discussions
489            * @param end the upper bound of the range of message boards discussions (not inclusive)
490            * @return the range of matching message boards discussions
491            */
492            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
493                    long classNameId, int start, int end) {
494                    return getPersistence().findByClassNameId(classNameId, start, end);
495            }
496    
497            /**
498            * Returns an ordered range of all the message boards discussions where classNameId = &#63;.
499            *
500            * <p>
501            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
502            * </p>
503            *
504            * @param classNameId the class name ID
505            * @param start the lower bound of the range of message boards discussions
506            * @param end the upper bound of the range of message boards discussions (not inclusive)
507            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
508            * @return the ordered range of matching message boards discussions
509            */
510            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId(
511                    long classNameId, int start, int end,
512                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator) {
513                    return getPersistence()
514                                       .findByClassNameId(classNameId, start, end, orderByComparator);
515            }
516    
517            /**
518            * Returns the first message boards discussion in the ordered set where classNameId = &#63;.
519            *
520            * @param classNameId the class name ID
521            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
522            * @return the first matching message boards discussion
523            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found
524            */
525            public static com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_First(
526                    long classNameId,
527                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator)
528                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
529                    return getPersistence()
530                                       .findByClassNameId_First(classNameId, orderByComparator);
531            }
532    
533            /**
534            * Returns the first message boards discussion in the ordered set where classNameId = &#63;.
535            *
536            * @param classNameId the class name ID
537            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
538            * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
539            */
540            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByClassNameId_First(
541                    long classNameId,
542                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator) {
543                    return getPersistence()
544                                       .fetchByClassNameId_First(classNameId, orderByComparator);
545            }
546    
547            /**
548            * Returns the last message boards discussion in the ordered set where classNameId = &#63;.
549            *
550            * @param classNameId the class name ID
551            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
552            * @return the last matching message boards discussion
553            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found
554            */
555            public static com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_Last(
556                    long classNameId,
557                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator)
558                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
559                    return getPersistence()
560                                       .findByClassNameId_Last(classNameId, orderByComparator);
561            }
562    
563            /**
564            * Returns the last message boards discussion in the ordered set where classNameId = &#63;.
565            *
566            * @param classNameId the class name ID
567            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
568            * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
569            */
570            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByClassNameId_Last(
571                    long classNameId,
572                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator) {
573                    return getPersistence()
574                                       .fetchByClassNameId_Last(classNameId, orderByComparator);
575            }
576    
577            /**
578            * Returns the message boards discussions before and after the current message boards discussion in the ordered set where classNameId = &#63;.
579            *
580            * @param discussionId the primary key of the current message boards discussion
581            * @param classNameId the class name ID
582            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
583            * @return the previous, current, and next message boards discussion
584            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a message boards discussion with the primary key could not be found
585            */
586            public static com.liferay.portlet.messageboards.model.MBDiscussion[] findByClassNameId_PrevAndNext(
587                    long discussionId, long classNameId,
588                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator)
589                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
590                    return getPersistence()
591                                       .findByClassNameId_PrevAndNext(discussionId, classNameId,
592                            orderByComparator);
593            }
594    
595            /**
596            * Removes all the message boards discussions where classNameId = &#63; from the database.
597            *
598            * @param classNameId the class name ID
599            */
600            public static void removeByClassNameId(long classNameId) {
601                    getPersistence().removeByClassNameId(classNameId);
602            }
603    
604            /**
605            * Returns the number of message boards discussions where classNameId = &#63;.
606            *
607            * @param classNameId the class name ID
608            * @return the number of matching message boards discussions
609            */
610            public static int countByClassNameId(long classNameId) {
611                    return getPersistence().countByClassNameId(classNameId);
612            }
613    
614            /**
615            * Returns the message boards discussion where threadId = &#63; or throws a {@link com.liferay.portlet.messageboards.NoSuchDiscussionException} if it could not be found.
616            *
617            * @param threadId the thread ID
618            * @return the matching message boards discussion
619            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found
620            */
621            public static com.liferay.portlet.messageboards.model.MBDiscussion findByThreadId(
622                    long threadId)
623                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
624                    return getPersistence().findByThreadId(threadId);
625            }
626    
627            /**
628            * Returns the message boards discussion where threadId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
629            *
630            * @param threadId the thread ID
631            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
632            */
633            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId(
634                    long threadId) {
635                    return getPersistence().fetchByThreadId(threadId);
636            }
637    
638            /**
639            * Returns the message boards discussion where threadId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
640            *
641            * @param threadId the thread ID
642            * @param retrieveFromCache whether to use the finder cache
643            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
644            */
645            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId(
646                    long threadId, boolean retrieveFromCache) {
647                    return getPersistence().fetchByThreadId(threadId, retrieveFromCache);
648            }
649    
650            /**
651            * Removes the message boards discussion where threadId = &#63; from the database.
652            *
653            * @param threadId the thread ID
654            * @return the message boards discussion that was removed
655            */
656            public static com.liferay.portlet.messageboards.model.MBDiscussion removeByThreadId(
657                    long threadId)
658                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
659                    return getPersistence().removeByThreadId(threadId);
660            }
661    
662            /**
663            * Returns the number of message boards discussions where threadId = &#63;.
664            *
665            * @param threadId the thread ID
666            * @return the number of matching message boards discussions
667            */
668            public static int countByThreadId(long threadId) {
669                    return getPersistence().countByThreadId(threadId);
670            }
671    
672            /**
673            * Returns the message boards discussion where classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portlet.messageboards.NoSuchDiscussionException} if it could not be found.
674            *
675            * @param classNameId the class name ID
676            * @param classPK the class p k
677            * @return the matching message boards discussion
678            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found
679            */
680            public static com.liferay.portlet.messageboards.model.MBDiscussion findByC_C(
681                    long classNameId, long classPK)
682                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
683                    return getPersistence().findByC_C(classNameId, classPK);
684            }
685    
686            /**
687            * Returns the message boards discussion where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
688            *
689            * @param classNameId the class name ID
690            * @param classPK the class p k
691            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
692            */
693            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C(
694                    long classNameId, long classPK) {
695                    return getPersistence().fetchByC_C(classNameId, classPK);
696            }
697    
698            /**
699            * Returns the message boards discussion where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
700            *
701            * @param classNameId the class name ID
702            * @param classPK the class p k
703            * @param retrieveFromCache whether to use the finder cache
704            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
705            */
706            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C(
707                    long classNameId, long classPK, boolean retrieveFromCache) {
708                    return getPersistence()
709                                       .fetchByC_C(classNameId, classPK, retrieveFromCache);
710            }
711    
712            /**
713            * Removes the message boards discussion where classNameId = &#63; and classPK = &#63; from the database.
714            *
715            * @param classNameId the class name ID
716            * @param classPK the class p k
717            * @return the message boards discussion that was removed
718            */
719            public static com.liferay.portlet.messageboards.model.MBDiscussion removeByC_C(
720                    long classNameId, long classPK)
721                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
722                    return getPersistence().removeByC_C(classNameId, classPK);
723            }
724    
725            /**
726            * Returns the number of message boards discussions where classNameId = &#63; and classPK = &#63;.
727            *
728            * @param classNameId the class name ID
729            * @param classPK the class p k
730            * @return the number of matching message boards discussions
731            */
732            public static int countByC_C(long classNameId, long classPK) {
733                    return getPersistence().countByC_C(classNameId, classPK);
734            }
735    
736            /**
737            * Caches the message boards discussion in the entity cache if it is enabled.
738            *
739            * @param mbDiscussion the message boards discussion
740            */
741            public static void cacheResult(
742                    com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion) {
743                    getPersistence().cacheResult(mbDiscussion);
744            }
745    
746            /**
747            * Caches the message boards discussions in the entity cache if it is enabled.
748            *
749            * @param mbDiscussions the message boards discussions
750            */
751            public static void cacheResult(
752                    java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> mbDiscussions) {
753                    getPersistence().cacheResult(mbDiscussions);
754            }
755    
756            /**
757            * Creates a new message boards discussion with the primary key. Does not add the message boards discussion to the database.
758            *
759            * @param discussionId the primary key for the new message boards discussion
760            * @return the new message boards discussion
761            */
762            public static com.liferay.portlet.messageboards.model.MBDiscussion create(
763                    long discussionId) {
764                    return getPersistence().create(discussionId);
765            }
766    
767            /**
768            * Removes the message boards discussion with the primary key from the database. Also notifies the appropriate model listeners.
769            *
770            * @param discussionId the primary key of the message boards discussion
771            * @return the message boards discussion that was removed
772            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a message boards discussion with the primary key could not be found
773            */
774            public static com.liferay.portlet.messageboards.model.MBDiscussion remove(
775                    long discussionId)
776                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
777                    return getPersistence().remove(discussionId);
778            }
779    
780            public static com.liferay.portlet.messageboards.model.MBDiscussion updateImpl(
781                    com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion) {
782                    return getPersistence().updateImpl(mbDiscussion);
783            }
784    
785            /**
786            * Returns the message boards discussion with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchDiscussionException} if it could not be found.
787            *
788            * @param discussionId the primary key of the message boards discussion
789            * @return the message boards discussion
790            * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a message boards discussion with the primary key could not be found
791            */
792            public static com.liferay.portlet.messageboards.model.MBDiscussion findByPrimaryKey(
793                    long discussionId)
794                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException {
795                    return getPersistence().findByPrimaryKey(discussionId);
796            }
797    
798            /**
799            * Returns the message boards discussion with the primary key or returns <code>null</code> if it could not be found.
800            *
801            * @param discussionId the primary key of the message boards discussion
802            * @return the message boards discussion, or <code>null</code> if a message boards discussion with the primary key could not be found
803            */
804            public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByPrimaryKey(
805                    long discussionId) {
806                    return getPersistence().fetchByPrimaryKey(discussionId);
807            }
808    
809            public static java.util.Map<java.io.Serializable, com.liferay.portlet.messageboards.model.MBDiscussion> fetchByPrimaryKeys(
810                    java.util.Set<java.io.Serializable> primaryKeys) {
811                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
812            }
813    
814            /**
815            * Returns all the message boards discussions.
816            *
817            * @return the message boards discussions
818            */
819            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll() {
820                    return getPersistence().findAll();
821            }
822    
823            /**
824            * Returns a range of all the message boards discussions.
825            *
826            * <p>
827            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
828            * </p>
829            *
830            * @param start the lower bound of the range of message boards discussions
831            * @param end the upper bound of the range of message boards discussions (not inclusive)
832            * @return the range of message boards discussions
833            */
834            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll(
835                    int start, int end) {
836                    return getPersistence().findAll(start, end);
837            }
838    
839            /**
840            * Returns an ordered range of all the message boards discussions.
841            *
842            * <p>
843            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
844            * </p>
845            *
846            * @param start the lower bound of the range of message boards discussions
847            * @param end the upper bound of the range of message boards discussions (not inclusive)
848            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
849            * @return the ordered range of message boards discussions
850            */
851            public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll(
852                    int start, int end,
853                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBDiscussion> orderByComparator) {
854                    return getPersistence().findAll(start, end, orderByComparator);
855            }
856    
857            /**
858            * Removes all the message boards discussions from the database.
859            */
860            public static void removeAll() {
861                    getPersistence().removeAll();
862            }
863    
864            /**
865            * Returns the number of message boards discussions.
866            *
867            * @return the number of message boards discussions
868            */
869            public static int countAll() {
870                    return getPersistence().countAll();
871            }
872    
873            public static MBDiscussionPersistence getPersistence() {
874                    if (_persistence == null) {
875                            _persistence = (MBDiscussionPersistence)PortalBeanLocatorUtil.locate(MBDiscussionPersistence.class.getName());
876    
877                            ReferenceRegistry.registerReference(MBDiscussionUtil.class,
878                                    "_persistence");
879                    }
880    
881                    return _persistence;
882            }
883    
884            /**
885             * @deprecated As of 6.2.0
886             */
887            @Deprecated
888            public void setPersistence(MBDiscussionPersistence persistence) {
889            }
890    
891            private static MBDiscussionPersistence _persistence;
892    }