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.MBMessage;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the message-boards message service. This utility wraps {@link com.liferay.portlet.messageboards.service.persistence.impl.MBMessagePersistenceImpl} 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 MBMessagePersistence
038     * @see com.liferay.portlet.messageboards.service.persistence.impl.MBMessagePersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class MBMessageUtil {
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(MBMessage mbMessage) {
060                    getPersistence().clearCache(mbMessage);
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<MBMessage> 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<MBMessage> 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<MBMessage> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator<MBMessage> 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 MBMessage update(MBMessage mbMessage) {
101                    return getPersistence().update(mbMessage);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
106             */
107            public static MBMessage update(MBMessage mbMessage,
108                    ServiceContext serviceContext) {
109                    return getPersistence().update(mbMessage, serviceContext);
110            }
111    
112            /**
113            * Returns all the message-boards messages where uuid = &#63;.
114            *
115            * @param uuid the uuid
116            * @return the matching message-boards messages
117            */
118            public static List<MBMessage> findByUuid(java.lang.String uuid) {
119                    return getPersistence().findByUuid(uuid);
120            }
121    
122            /**
123            * Returns a range of all the message-boards messages where uuid = &#63;.
124            *
125            * <p>
126            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
127            * </p>
128            *
129            * @param uuid the uuid
130            * @param start the lower bound of the range of message-boards messages
131            * @param end the upper bound of the range of message-boards messages (not inclusive)
132            * @return the range of matching message-boards messages
133            */
134            public static List<MBMessage> findByUuid(java.lang.String uuid, int start,
135                    int end) {
136                    return getPersistence().findByUuid(uuid, start, end);
137            }
138    
139            /**
140            * Returns an ordered range of all the message-boards messages where uuid = &#63;.
141            *
142            * <p>
143            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
144            * </p>
145            *
146            * @param uuid the uuid
147            * @param start the lower bound of the range of message-boards messages
148            * @param end the upper bound of the range of message-boards messages (not inclusive)
149            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
150            * @return the ordered range of matching message-boards messages
151            */
152            public static List<MBMessage> findByUuid(java.lang.String uuid, int start,
153                    int end, OrderByComparator<MBMessage> orderByComparator) {
154                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
155            }
156    
157            /**
158            * Returns the first message-boards message in the ordered set where uuid = &#63;.
159            *
160            * @param uuid the uuid
161            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
162            * @return the first matching message-boards message
163            * @throws NoSuchMessageException if a matching message-boards message could not be found
164            */
165            public static MBMessage findByUuid_First(java.lang.String uuid,
166                    OrderByComparator<MBMessage> orderByComparator)
167                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
168                    return getPersistence().findByUuid_First(uuid, orderByComparator);
169            }
170    
171            /**
172            * Returns the first message-boards message in the ordered set where uuid = &#63;.
173            *
174            * @param uuid the uuid
175            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
176            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
177            */
178            public static MBMessage fetchByUuid_First(java.lang.String uuid,
179                    OrderByComparator<MBMessage> orderByComparator) {
180                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
181            }
182    
183            /**
184            * Returns the last message-boards message in the ordered set where uuid = &#63;.
185            *
186            * @param uuid the uuid
187            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
188            * @return the last matching message-boards message
189            * @throws NoSuchMessageException if a matching message-boards message could not be found
190            */
191            public static MBMessage findByUuid_Last(java.lang.String uuid,
192                    OrderByComparator<MBMessage> orderByComparator)
193                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
194                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
195            }
196    
197            /**
198            * Returns the last message-boards message in the ordered set where uuid = &#63;.
199            *
200            * @param uuid the uuid
201            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
202            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
203            */
204            public static MBMessage fetchByUuid_Last(java.lang.String uuid,
205                    OrderByComparator<MBMessage> orderByComparator) {
206                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
207            }
208    
209            /**
210            * Returns the message-boards messages before and after the current message-boards message in the ordered set where uuid = &#63;.
211            *
212            * @param messageId the primary key of the current message-boards message
213            * @param uuid the uuid
214            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
215            * @return the previous, current, and next message-boards message
216            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
217            */
218            public static MBMessage[] findByUuid_PrevAndNext(long messageId,
219                    java.lang.String uuid, OrderByComparator<MBMessage> orderByComparator)
220                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
221                    return getPersistence()
222                                       .findByUuid_PrevAndNext(messageId, uuid, orderByComparator);
223            }
224    
225            /**
226            * Removes all the message-boards messages where uuid = &#63; from the database.
227            *
228            * @param uuid the uuid
229            */
230            public static void removeByUuid(java.lang.String uuid) {
231                    getPersistence().removeByUuid(uuid);
232            }
233    
234            /**
235            * Returns the number of message-boards messages where uuid = &#63;.
236            *
237            * @param uuid the uuid
238            * @return the number of matching message-boards messages
239            */
240            public static int countByUuid(java.lang.String uuid) {
241                    return getPersistence().countByUuid(uuid);
242            }
243    
244            /**
245            * Returns the message-boards message where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchMessageException} if it could not be found.
246            *
247            * @param uuid the uuid
248            * @param groupId the group ID
249            * @return the matching message-boards message
250            * @throws NoSuchMessageException if a matching message-boards message could not be found
251            */
252            public static MBMessage findByUUID_G(java.lang.String uuid, long groupId)
253                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
254                    return getPersistence().findByUUID_G(uuid, groupId);
255            }
256    
257            /**
258            * Returns the message-boards message where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
259            *
260            * @param uuid the uuid
261            * @param groupId the group ID
262            * @return the matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
263            */
264            public static MBMessage fetchByUUID_G(java.lang.String uuid, long groupId) {
265                    return getPersistence().fetchByUUID_G(uuid, groupId);
266            }
267    
268            /**
269            * Returns the message-boards message where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
270            *
271            * @param uuid the uuid
272            * @param groupId the group ID
273            * @param retrieveFromCache whether to use the finder cache
274            * @return the matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
275            */
276            public static MBMessage fetchByUUID_G(java.lang.String uuid, long groupId,
277                    boolean retrieveFromCache) {
278                    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
279            }
280    
281            /**
282            * Removes the message-boards message where uuid = &#63; and groupId = &#63; from the database.
283            *
284            * @param uuid the uuid
285            * @param groupId the group ID
286            * @return the message-boards message that was removed
287            */
288            public static MBMessage removeByUUID_G(java.lang.String uuid, long groupId)
289                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
290                    return getPersistence().removeByUUID_G(uuid, groupId);
291            }
292    
293            /**
294            * Returns the number of message-boards messages where uuid = &#63; and groupId = &#63;.
295            *
296            * @param uuid the uuid
297            * @param groupId the group ID
298            * @return the number of matching message-boards messages
299            */
300            public static int countByUUID_G(java.lang.String uuid, long groupId) {
301                    return getPersistence().countByUUID_G(uuid, groupId);
302            }
303    
304            /**
305            * Returns all the message-boards messages where uuid = &#63; and companyId = &#63;.
306            *
307            * @param uuid the uuid
308            * @param companyId the company ID
309            * @return the matching message-boards messages
310            */
311            public static List<MBMessage> findByUuid_C(java.lang.String uuid,
312                    long companyId) {
313                    return getPersistence().findByUuid_C(uuid, companyId);
314            }
315    
316            /**
317            * Returns a range of all the message-boards messages where uuid = &#63; and companyId = &#63;.
318            *
319            * <p>
320            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
321            * </p>
322            *
323            * @param uuid the uuid
324            * @param companyId the company ID
325            * @param start the lower bound of the range of message-boards messages
326            * @param end the upper bound of the range of message-boards messages (not inclusive)
327            * @return the range of matching message-boards messages
328            */
329            public static List<MBMessage> findByUuid_C(java.lang.String uuid,
330                    long companyId, int start, int end) {
331                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
332            }
333    
334            /**
335            * Returns an ordered range of all the message-boards messages where uuid = &#63; and companyId = &#63;.
336            *
337            * <p>
338            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
339            * </p>
340            *
341            * @param uuid the uuid
342            * @param companyId the company ID
343            * @param start the lower bound of the range of message-boards messages
344            * @param end the upper bound of the range of message-boards messages (not inclusive)
345            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
346            * @return the ordered range of matching message-boards messages
347            */
348            public static List<MBMessage> findByUuid_C(java.lang.String uuid,
349                    long companyId, int start, int end,
350                    OrderByComparator<MBMessage> orderByComparator) {
351                    return getPersistence()
352                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
353            }
354    
355            /**
356            * Returns the first message-boards message in the ordered set where uuid = &#63; and companyId = &#63;.
357            *
358            * @param uuid the uuid
359            * @param companyId the company ID
360            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
361            * @return the first matching message-boards message
362            * @throws NoSuchMessageException if a matching message-boards message could not be found
363            */
364            public static MBMessage findByUuid_C_First(java.lang.String uuid,
365                    long companyId, OrderByComparator<MBMessage> orderByComparator)
366                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
367                    return getPersistence()
368                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
369            }
370    
371            /**
372            * Returns the first message-boards message in the ordered set where uuid = &#63; and companyId = &#63;.
373            *
374            * @param uuid the uuid
375            * @param companyId the company ID
376            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
377            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
378            */
379            public static MBMessage fetchByUuid_C_First(java.lang.String uuid,
380                    long companyId, OrderByComparator<MBMessage> orderByComparator) {
381                    return getPersistence()
382                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
383            }
384    
385            /**
386            * Returns the last message-boards message in the ordered set where uuid = &#63; and companyId = &#63;.
387            *
388            * @param uuid the uuid
389            * @param companyId the company ID
390            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
391            * @return the last matching message-boards message
392            * @throws NoSuchMessageException if a matching message-boards message could not be found
393            */
394            public static MBMessage findByUuid_C_Last(java.lang.String uuid,
395                    long companyId, OrderByComparator<MBMessage> orderByComparator)
396                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
397                    return getPersistence()
398                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
399            }
400    
401            /**
402            * Returns the last message-boards message in the ordered set where uuid = &#63; and companyId = &#63;.
403            *
404            * @param uuid the uuid
405            * @param companyId the company ID
406            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
407            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
408            */
409            public static MBMessage fetchByUuid_C_Last(java.lang.String uuid,
410                    long companyId, OrderByComparator<MBMessage> orderByComparator) {
411                    return getPersistence()
412                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
413            }
414    
415            /**
416            * Returns the message-boards messages before and after the current message-boards message in the ordered set where uuid = &#63; and companyId = &#63;.
417            *
418            * @param messageId the primary key of the current message-boards message
419            * @param uuid the uuid
420            * @param companyId the company ID
421            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
422            * @return the previous, current, and next message-boards message
423            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
424            */
425            public static MBMessage[] findByUuid_C_PrevAndNext(long messageId,
426                    java.lang.String uuid, long companyId,
427                    OrderByComparator<MBMessage> orderByComparator)
428                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
429                    return getPersistence()
430                                       .findByUuid_C_PrevAndNext(messageId, uuid, companyId,
431                            orderByComparator);
432            }
433    
434            /**
435            * Removes all the message-boards messages where uuid = &#63; and companyId = &#63; from the database.
436            *
437            * @param uuid the uuid
438            * @param companyId the company ID
439            */
440            public static void removeByUuid_C(java.lang.String uuid, long companyId) {
441                    getPersistence().removeByUuid_C(uuid, companyId);
442            }
443    
444            /**
445            * Returns the number of message-boards messages where uuid = &#63; and companyId = &#63;.
446            *
447            * @param uuid the uuid
448            * @param companyId the company ID
449            * @return the number of matching message-boards messages
450            */
451            public static int countByUuid_C(java.lang.String uuid, long companyId) {
452                    return getPersistence().countByUuid_C(uuid, companyId);
453            }
454    
455            /**
456            * Returns all the message-boards messages where groupId = &#63;.
457            *
458            * @param groupId the group ID
459            * @return the matching message-boards messages
460            */
461            public static List<MBMessage> findByGroupId(long groupId) {
462                    return getPersistence().findByGroupId(groupId);
463            }
464    
465            /**
466            * Returns a range of all the message-boards messages where groupId = &#63;.
467            *
468            * <p>
469            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
470            * </p>
471            *
472            * @param groupId the group ID
473            * @param start the lower bound of the range of message-boards messages
474            * @param end the upper bound of the range of message-boards messages (not inclusive)
475            * @return the range of matching message-boards messages
476            */
477            public static List<MBMessage> findByGroupId(long groupId, int start, int end) {
478                    return getPersistence().findByGroupId(groupId, start, end);
479            }
480    
481            /**
482            * Returns an ordered range of all the message-boards messages where groupId = &#63;.
483            *
484            * <p>
485            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
486            * </p>
487            *
488            * @param groupId the group ID
489            * @param start the lower bound of the range of message-boards messages
490            * @param end the upper bound of the range of message-boards messages (not inclusive)
491            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
492            * @return the ordered range of matching message-boards messages
493            */
494            public static List<MBMessage> findByGroupId(long groupId, int start,
495                    int end, OrderByComparator<MBMessage> orderByComparator) {
496                    return getPersistence()
497                                       .findByGroupId(groupId, start, end, orderByComparator);
498            }
499    
500            /**
501            * Returns the first message-boards message in the ordered set where groupId = &#63;.
502            *
503            * @param groupId the group ID
504            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
505            * @return the first matching message-boards message
506            * @throws NoSuchMessageException if a matching message-boards message could not be found
507            */
508            public static MBMessage findByGroupId_First(long groupId,
509                    OrderByComparator<MBMessage> orderByComparator)
510                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
511                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
512            }
513    
514            /**
515            * Returns the first message-boards message in the ordered set where groupId = &#63;.
516            *
517            * @param groupId the group ID
518            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
519            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
520            */
521            public static MBMessage fetchByGroupId_First(long groupId,
522                    OrderByComparator<MBMessage> orderByComparator) {
523                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
524            }
525    
526            /**
527            * Returns the last message-boards message in the ordered set where groupId = &#63;.
528            *
529            * @param groupId the group ID
530            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
531            * @return the last matching message-boards message
532            * @throws NoSuchMessageException if a matching message-boards message could not be found
533            */
534            public static MBMessage findByGroupId_Last(long groupId,
535                    OrderByComparator<MBMessage> orderByComparator)
536                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
537                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
538            }
539    
540            /**
541            * Returns the last message-boards message in the ordered set where groupId = &#63;.
542            *
543            * @param groupId the group ID
544            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
545            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
546            */
547            public static MBMessage fetchByGroupId_Last(long groupId,
548                    OrderByComparator<MBMessage> orderByComparator) {
549                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
550            }
551    
552            /**
553            * Returns the message-boards messages before and after the current message-boards message in the ordered set where groupId = &#63;.
554            *
555            * @param messageId the primary key of the current message-boards message
556            * @param groupId the group ID
557            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
558            * @return the previous, current, and next message-boards message
559            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
560            */
561            public static MBMessage[] findByGroupId_PrevAndNext(long messageId,
562                    long groupId, OrderByComparator<MBMessage> orderByComparator)
563                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
564                    return getPersistence()
565                                       .findByGroupId_PrevAndNext(messageId, groupId,
566                            orderByComparator);
567            }
568    
569            /**
570            * Returns all the message-boards messages that the user has permission to view where groupId = &#63;.
571            *
572            * @param groupId the group ID
573            * @return the matching message-boards messages that the user has permission to view
574            */
575            public static List<MBMessage> filterFindByGroupId(long groupId) {
576                    return getPersistence().filterFindByGroupId(groupId);
577            }
578    
579            /**
580            * Returns a range of all the message-boards messages that the user has permission to view where groupId = &#63;.
581            *
582            * <p>
583            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
584            * </p>
585            *
586            * @param groupId the group ID
587            * @param start the lower bound of the range of message-boards messages
588            * @param end the upper bound of the range of message-boards messages (not inclusive)
589            * @return the range of matching message-boards messages that the user has permission to view
590            */
591            public static List<MBMessage> filterFindByGroupId(long groupId, int start,
592                    int end) {
593                    return getPersistence().filterFindByGroupId(groupId, start, end);
594            }
595    
596            /**
597            * Returns an ordered range of all the message-boards messages that the user has permissions to view where groupId = &#63;.
598            *
599            * <p>
600            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
601            * </p>
602            *
603            * @param groupId the group ID
604            * @param start the lower bound of the range of message-boards messages
605            * @param end the upper bound of the range of message-boards messages (not inclusive)
606            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
607            * @return the ordered range of matching message-boards messages that the user has permission to view
608            */
609            public static List<MBMessage> filterFindByGroupId(long groupId, int start,
610                    int end, OrderByComparator<MBMessage> orderByComparator) {
611                    return getPersistence()
612                                       .filterFindByGroupId(groupId, start, end, orderByComparator);
613            }
614    
615            /**
616            * Returns the message-boards messages before and after the current message-boards message in the ordered set of message-boards messages that the user has permission to view where groupId = &#63;.
617            *
618            * @param messageId the primary key of the current message-boards message
619            * @param groupId the group ID
620            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
621            * @return the previous, current, and next message-boards message
622            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
623            */
624            public static MBMessage[] filterFindByGroupId_PrevAndNext(long messageId,
625                    long groupId, OrderByComparator<MBMessage> orderByComparator)
626                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
627                    return getPersistence()
628                                       .filterFindByGroupId_PrevAndNext(messageId, groupId,
629                            orderByComparator);
630            }
631    
632            /**
633            * Removes all the message-boards messages where groupId = &#63; from the database.
634            *
635            * @param groupId the group ID
636            */
637            public static void removeByGroupId(long groupId) {
638                    getPersistence().removeByGroupId(groupId);
639            }
640    
641            /**
642            * Returns the number of message-boards messages where groupId = &#63;.
643            *
644            * @param groupId the group ID
645            * @return the number of matching message-boards messages
646            */
647            public static int countByGroupId(long groupId) {
648                    return getPersistence().countByGroupId(groupId);
649            }
650    
651            /**
652            * Returns the number of message-boards messages that the user has permission to view where groupId = &#63;.
653            *
654            * @param groupId the group ID
655            * @return the number of matching message-boards messages that the user has permission to view
656            */
657            public static int filterCountByGroupId(long groupId) {
658                    return getPersistence().filterCountByGroupId(groupId);
659            }
660    
661            /**
662            * Returns all the message-boards messages where companyId = &#63;.
663            *
664            * @param companyId the company ID
665            * @return the matching message-boards messages
666            */
667            public static List<MBMessage> findByCompanyId(long companyId) {
668                    return getPersistence().findByCompanyId(companyId);
669            }
670    
671            /**
672            * Returns a range of all the message-boards messages where companyId = &#63;.
673            *
674            * <p>
675            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
676            * </p>
677            *
678            * @param companyId the company ID
679            * @param start the lower bound of the range of message-boards messages
680            * @param end the upper bound of the range of message-boards messages (not inclusive)
681            * @return the range of matching message-boards messages
682            */
683            public static List<MBMessage> findByCompanyId(long companyId, int start,
684                    int end) {
685                    return getPersistence().findByCompanyId(companyId, start, end);
686            }
687    
688            /**
689            * Returns an ordered range of all the message-boards messages where companyId = &#63;.
690            *
691            * <p>
692            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
693            * </p>
694            *
695            * @param companyId the company ID
696            * @param start the lower bound of the range of message-boards messages
697            * @param end the upper bound of the range of message-boards messages (not inclusive)
698            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
699            * @return the ordered range of matching message-boards messages
700            */
701            public static List<MBMessage> findByCompanyId(long companyId, int start,
702                    int end, OrderByComparator<MBMessage> orderByComparator) {
703                    return getPersistence()
704                                       .findByCompanyId(companyId, start, end, orderByComparator);
705            }
706    
707            /**
708            * Returns the first message-boards message in the ordered set where companyId = &#63;.
709            *
710            * @param companyId the company ID
711            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
712            * @return the first matching message-boards message
713            * @throws NoSuchMessageException if a matching message-boards message could not be found
714            */
715            public static MBMessage findByCompanyId_First(long companyId,
716                    OrderByComparator<MBMessage> orderByComparator)
717                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
718                    return getPersistence()
719                                       .findByCompanyId_First(companyId, orderByComparator);
720            }
721    
722            /**
723            * Returns the first message-boards message in the ordered set where companyId = &#63;.
724            *
725            * @param companyId the company ID
726            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
727            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
728            */
729            public static MBMessage fetchByCompanyId_First(long companyId,
730                    OrderByComparator<MBMessage> orderByComparator) {
731                    return getPersistence()
732                                       .fetchByCompanyId_First(companyId, orderByComparator);
733            }
734    
735            /**
736            * Returns the last message-boards message in the ordered set where companyId = &#63;.
737            *
738            * @param companyId the company ID
739            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
740            * @return the last matching message-boards message
741            * @throws NoSuchMessageException if a matching message-boards message could not be found
742            */
743            public static MBMessage findByCompanyId_Last(long companyId,
744                    OrderByComparator<MBMessage> orderByComparator)
745                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
746                    return getPersistence()
747                                       .findByCompanyId_Last(companyId, orderByComparator);
748            }
749    
750            /**
751            * Returns the last message-boards message in the ordered set where companyId = &#63;.
752            *
753            * @param companyId the company ID
754            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
755            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
756            */
757            public static MBMessage fetchByCompanyId_Last(long companyId,
758                    OrderByComparator<MBMessage> orderByComparator) {
759                    return getPersistence()
760                                       .fetchByCompanyId_Last(companyId, orderByComparator);
761            }
762    
763            /**
764            * Returns the message-boards messages before and after the current message-boards message in the ordered set where companyId = &#63;.
765            *
766            * @param messageId the primary key of the current message-boards message
767            * @param companyId the company ID
768            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
769            * @return the previous, current, and next message-boards message
770            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
771            */
772            public static MBMessage[] findByCompanyId_PrevAndNext(long messageId,
773                    long companyId, OrderByComparator<MBMessage> orderByComparator)
774                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
775                    return getPersistence()
776                                       .findByCompanyId_PrevAndNext(messageId, companyId,
777                            orderByComparator);
778            }
779    
780            /**
781            * Removes all the message-boards messages where companyId = &#63; from the database.
782            *
783            * @param companyId the company ID
784            */
785            public static void removeByCompanyId(long companyId) {
786                    getPersistence().removeByCompanyId(companyId);
787            }
788    
789            /**
790            * Returns the number of message-boards messages where companyId = &#63;.
791            *
792            * @param companyId the company ID
793            * @return the number of matching message-boards messages
794            */
795            public static int countByCompanyId(long companyId) {
796                    return getPersistence().countByCompanyId(companyId);
797            }
798    
799            /**
800            * Returns all the message-boards messages where userId = &#63;.
801            *
802            * @param userId the user ID
803            * @return the matching message-boards messages
804            */
805            public static List<MBMessage> findByUserId(long userId) {
806                    return getPersistence().findByUserId(userId);
807            }
808    
809            /**
810            * Returns a range of all the message-boards messages where userId = &#63;.
811            *
812            * <p>
813            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
814            * </p>
815            *
816            * @param userId the user ID
817            * @param start the lower bound of the range of message-boards messages
818            * @param end the upper bound of the range of message-boards messages (not inclusive)
819            * @return the range of matching message-boards messages
820            */
821            public static List<MBMessage> findByUserId(long userId, int start, int end) {
822                    return getPersistence().findByUserId(userId, start, end);
823            }
824    
825            /**
826            * Returns an ordered range of all the message-boards messages where userId = &#63;.
827            *
828            * <p>
829            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
830            * </p>
831            *
832            * @param userId the user ID
833            * @param start the lower bound of the range of message-boards messages
834            * @param end the upper bound of the range of message-boards messages (not inclusive)
835            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
836            * @return the ordered range of matching message-boards messages
837            */
838            public static List<MBMessage> findByUserId(long userId, int start, int end,
839                    OrderByComparator<MBMessage> orderByComparator) {
840                    return getPersistence()
841                                       .findByUserId(userId, start, end, orderByComparator);
842            }
843    
844            /**
845            * Returns the first message-boards message in the ordered set where userId = &#63;.
846            *
847            * @param userId the user ID
848            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
849            * @return the first matching message-boards message
850            * @throws NoSuchMessageException if a matching message-boards message could not be found
851            */
852            public static MBMessage findByUserId_First(long userId,
853                    OrderByComparator<MBMessage> orderByComparator)
854                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
855                    return getPersistence().findByUserId_First(userId, orderByComparator);
856            }
857    
858            /**
859            * Returns the first message-boards message in the ordered set where userId = &#63;.
860            *
861            * @param userId the user ID
862            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
863            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
864            */
865            public static MBMessage fetchByUserId_First(long userId,
866                    OrderByComparator<MBMessage> orderByComparator) {
867                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
868            }
869    
870            /**
871            * Returns the last message-boards message in the ordered set where userId = &#63;.
872            *
873            * @param userId the user ID
874            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
875            * @return the last matching message-boards message
876            * @throws NoSuchMessageException if a matching message-boards message could not be found
877            */
878            public static MBMessage findByUserId_Last(long userId,
879                    OrderByComparator<MBMessage> orderByComparator)
880                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
881                    return getPersistence().findByUserId_Last(userId, orderByComparator);
882            }
883    
884            /**
885            * Returns the last message-boards message in the ordered set where userId = &#63;.
886            *
887            * @param userId the user ID
888            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
889            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
890            */
891            public static MBMessage fetchByUserId_Last(long userId,
892                    OrderByComparator<MBMessage> orderByComparator) {
893                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
894            }
895    
896            /**
897            * Returns the message-boards messages before and after the current message-boards message in the ordered set where userId = &#63;.
898            *
899            * @param messageId the primary key of the current message-boards message
900            * @param userId the user ID
901            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
902            * @return the previous, current, and next message-boards message
903            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
904            */
905            public static MBMessage[] findByUserId_PrevAndNext(long messageId,
906                    long userId, OrderByComparator<MBMessage> orderByComparator)
907                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
908                    return getPersistence()
909                                       .findByUserId_PrevAndNext(messageId, userId,
910                            orderByComparator);
911            }
912    
913            /**
914            * Removes all the message-boards messages where userId = &#63; from the database.
915            *
916            * @param userId the user ID
917            */
918            public static void removeByUserId(long userId) {
919                    getPersistence().removeByUserId(userId);
920            }
921    
922            /**
923            * Returns the number of message-boards messages where userId = &#63;.
924            *
925            * @param userId the user ID
926            * @return the number of matching message-boards messages
927            */
928            public static int countByUserId(long userId) {
929                    return getPersistence().countByUserId(userId);
930            }
931    
932            /**
933            * Returns all the message-boards messages where threadId = &#63;.
934            *
935            * @param threadId the thread ID
936            * @return the matching message-boards messages
937            */
938            public static List<MBMessage> findByThreadId(long threadId) {
939                    return getPersistence().findByThreadId(threadId);
940            }
941    
942            /**
943            * Returns a range of all the message-boards messages where threadId = &#63;.
944            *
945            * <p>
946            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
947            * </p>
948            *
949            * @param threadId the thread ID
950            * @param start the lower bound of the range of message-boards messages
951            * @param end the upper bound of the range of message-boards messages (not inclusive)
952            * @return the range of matching message-boards messages
953            */
954            public static List<MBMessage> findByThreadId(long threadId, int start,
955                    int end) {
956                    return getPersistence().findByThreadId(threadId, start, end);
957            }
958    
959            /**
960            * Returns an ordered range of all the message-boards messages where threadId = &#63;.
961            *
962            * <p>
963            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
964            * </p>
965            *
966            * @param threadId the thread ID
967            * @param start the lower bound of the range of message-boards messages
968            * @param end the upper bound of the range of message-boards messages (not inclusive)
969            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
970            * @return the ordered range of matching message-boards messages
971            */
972            public static List<MBMessage> findByThreadId(long threadId, int start,
973                    int end, OrderByComparator<MBMessage> orderByComparator) {
974                    return getPersistence()
975                                       .findByThreadId(threadId, start, end, orderByComparator);
976            }
977    
978            /**
979            * Returns the first message-boards message in the ordered set where threadId = &#63;.
980            *
981            * @param threadId the thread ID
982            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
983            * @return the first matching message-boards message
984            * @throws NoSuchMessageException if a matching message-boards message could not be found
985            */
986            public static MBMessage findByThreadId_First(long threadId,
987                    OrderByComparator<MBMessage> orderByComparator)
988                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
989                    return getPersistence().findByThreadId_First(threadId, orderByComparator);
990            }
991    
992            /**
993            * Returns the first message-boards message in the ordered set where threadId = &#63;.
994            *
995            * @param threadId the thread ID
996            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
997            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
998            */
999            public static MBMessage fetchByThreadId_First(long threadId,
1000                    OrderByComparator<MBMessage> orderByComparator) {
1001                    return getPersistence()
1002                                       .fetchByThreadId_First(threadId, orderByComparator);
1003            }
1004    
1005            /**
1006            * Returns the last message-boards message in the ordered set where threadId = &#63;.
1007            *
1008            * @param threadId the thread ID
1009            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1010            * @return the last matching message-boards message
1011            * @throws NoSuchMessageException if a matching message-boards message could not be found
1012            */
1013            public static MBMessage findByThreadId_Last(long threadId,
1014                    OrderByComparator<MBMessage> orderByComparator)
1015                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1016                    return getPersistence().findByThreadId_Last(threadId, orderByComparator);
1017            }
1018    
1019            /**
1020            * Returns the last message-boards message in the ordered set where threadId = &#63;.
1021            *
1022            * @param threadId the thread ID
1023            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1024            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
1025            */
1026            public static MBMessage fetchByThreadId_Last(long threadId,
1027                    OrderByComparator<MBMessage> orderByComparator) {
1028                    return getPersistence().fetchByThreadId_Last(threadId, orderByComparator);
1029            }
1030    
1031            /**
1032            * Returns the message-boards messages before and after the current message-boards message in the ordered set where threadId = &#63;.
1033            *
1034            * @param messageId the primary key of the current message-boards message
1035            * @param threadId the thread ID
1036            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1037            * @return the previous, current, and next message-boards message
1038            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
1039            */
1040            public static MBMessage[] findByThreadId_PrevAndNext(long messageId,
1041                    long threadId, OrderByComparator<MBMessage> orderByComparator)
1042                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1043                    return getPersistence()
1044                                       .findByThreadId_PrevAndNext(messageId, threadId,
1045                            orderByComparator);
1046            }
1047    
1048            /**
1049            * Removes all the message-boards messages where threadId = &#63; from the database.
1050            *
1051            * @param threadId the thread ID
1052            */
1053            public static void removeByThreadId(long threadId) {
1054                    getPersistence().removeByThreadId(threadId);
1055            }
1056    
1057            /**
1058            * Returns the number of message-boards messages where threadId = &#63;.
1059            *
1060            * @param threadId the thread ID
1061            * @return the number of matching message-boards messages
1062            */
1063            public static int countByThreadId(long threadId) {
1064                    return getPersistence().countByThreadId(threadId);
1065            }
1066    
1067            /**
1068            * Returns all the message-boards messages where threadId = &#63;.
1069            *
1070            * @param threadId the thread ID
1071            * @return the matching message-boards messages
1072            */
1073            public static List<MBMessage> findByThreadReplies(long threadId) {
1074                    return getPersistence().findByThreadReplies(threadId);
1075            }
1076    
1077            /**
1078            * Returns a range of all the message-boards messages where threadId = &#63;.
1079            *
1080            * <p>
1081            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1082            * </p>
1083            *
1084            * @param threadId the thread ID
1085            * @param start the lower bound of the range of message-boards messages
1086            * @param end the upper bound of the range of message-boards messages (not inclusive)
1087            * @return the range of matching message-boards messages
1088            */
1089            public static List<MBMessage> findByThreadReplies(long threadId, int start,
1090                    int end) {
1091                    return getPersistence().findByThreadReplies(threadId, start, end);
1092            }
1093    
1094            /**
1095            * Returns an ordered range of all the message-boards messages where threadId = &#63;.
1096            *
1097            * <p>
1098            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1099            * </p>
1100            *
1101            * @param threadId the thread ID
1102            * @param start the lower bound of the range of message-boards messages
1103            * @param end the upper bound of the range of message-boards messages (not inclusive)
1104            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1105            * @return the ordered range of matching message-boards messages
1106            */
1107            public static List<MBMessage> findByThreadReplies(long threadId, int start,
1108                    int end, OrderByComparator<MBMessage> orderByComparator) {
1109                    return getPersistence()
1110                                       .findByThreadReplies(threadId, start, end, orderByComparator);
1111            }
1112    
1113            /**
1114            * Returns the first message-boards message in the ordered set where threadId = &#63;.
1115            *
1116            * @param threadId the thread ID
1117            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1118            * @return the first matching message-boards message
1119            * @throws NoSuchMessageException if a matching message-boards message could not be found
1120            */
1121            public static MBMessage findByThreadReplies_First(long threadId,
1122                    OrderByComparator<MBMessage> orderByComparator)
1123                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1124                    return getPersistence()
1125                                       .findByThreadReplies_First(threadId, orderByComparator);
1126            }
1127    
1128            /**
1129            * Returns the first message-boards message in the ordered set where threadId = &#63;.
1130            *
1131            * @param threadId the thread ID
1132            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1133            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
1134            */
1135            public static MBMessage fetchByThreadReplies_First(long threadId,
1136                    OrderByComparator<MBMessage> orderByComparator) {
1137                    return getPersistence()
1138                                       .fetchByThreadReplies_First(threadId, orderByComparator);
1139            }
1140    
1141            /**
1142            * Returns the last message-boards message in the ordered set where threadId = &#63;.
1143            *
1144            * @param threadId the thread ID
1145            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1146            * @return the last matching message-boards message
1147            * @throws NoSuchMessageException if a matching message-boards message could not be found
1148            */
1149            public static MBMessage findByThreadReplies_Last(long threadId,
1150                    OrderByComparator<MBMessage> orderByComparator)
1151                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1152                    return getPersistence()
1153                                       .findByThreadReplies_Last(threadId, orderByComparator);
1154            }
1155    
1156            /**
1157            * Returns the last message-boards message in the ordered set where threadId = &#63;.
1158            *
1159            * @param threadId the thread ID
1160            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1161            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
1162            */
1163            public static MBMessage fetchByThreadReplies_Last(long threadId,
1164                    OrderByComparator<MBMessage> orderByComparator) {
1165                    return getPersistence()
1166                                       .fetchByThreadReplies_Last(threadId, orderByComparator);
1167            }
1168    
1169            /**
1170            * Returns the message-boards messages before and after the current message-boards message in the ordered set where threadId = &#63;.
1171            *
1172            * @param messageId the primary key of the current message-boards message
1173            * @param threadId the thread ID
1174            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1175            * @return the previous, current, and next message-boards message
1176            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
1177            */
1178            public static MBMessage[] findByThreadReplies_PrevAndNext(long messageId,
1179                    long threadId, OrderByComparator<MBMessage> orderByComparator)
1180                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1181                    return getPersistence()
1182                                       .findByThreadReplies_PrevAndNext(messageId, threadId,
1183                            orderByComparator);
1184            }
1185    
1186            /**
1187            * Removes all the message-boards messages where threadId = &#63; from the database.
1188            *
1189            * @param threadId the thread ID
1190            */
1191            public static void removeByThreadReplies(long threadId) {
1192                    getPersistence().removeByThreadReplies(threadId);
1193            }
1194    
1195            /**
1196            * Returns the number of message-boards messages where threadId = &#63;.
1197            *
1198            * @param threadId the thread ID
1199            * @return the number of matching message-boards messages
1200            */
1201            public static int countByThreadReplies(long threadId) {
1202                    return getPersistence().countByThreadReplies(threadId);
1203            }
1204    
1205            /**
1206            * Returns all the message-boards messages where groupId = &#63; and userId = &#63;.
1207            *
1208            * @param groupId the group ID
1209            * @param userId the user ID
1210            * @return the matching message-boards messages
1211            */
1212            public static List<MBMessage> findByG_U(long groupId, long userId) {
1213                    return getPersistence().findByG_U(groupId, userId);
1214            }
1215    
1216            /**
1217            * Returns a range of all the message-boards messages where groupId = &#63; and userId = &#63;.
1218            *
1219            * <p>
1220            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1221            * </p>
1222            *
1223            * @param groupId the group ID
1224            * @param userId the user ID
1225            * @param start the lower bound of the range of message-boards messages
1226            * @param end the upper bound of the range of message-boards messages (not inclusive)
1227            * @return the range of matching message-boards messages
1228            */
1229            public static List<MBMessage> findByG_U(long groupId, long userId,
1230                    int start, int end) {
1231                    return getPersistence().findByG_U(groupId, userId, start, end);
1232            }
1233    
1234            /**
1235            * Returns an ordered range of all the message-boards messages where groupId = &#63; and userId = &#63;.
1236            *
1237            * <p>
1238            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1239            * </p>
1240            *
1241            * @param groupId the group ID
1242            * @param userId the user ID
1243            * @param start the lower bound of the range of message-boards messages
1244            * @param end the upper bound of the range of message-boards messages (not inclusive)
1245            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1246            * @return the ordered range of matching message-boards messages
1247            */
1248            public static List<MBMessage> findByG_U(long groupId, long userId,
1249                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
1250                    return getPersistence()
1251                                       .findByG_U(groupId, userId, start, end, orderByComparator);
1252            }
1253    
1254            /**
1255            * Returns the first message-boards message in the ordered set where groupId = &#63; and userId = &#63;.
1256            *
1257            * @param groupId the group ID
1258            * @param userId the user ID
1259            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1260            * @return the first matching message-boards message
1261            * @throws NoSuchMessageException if a matching message-boards message could not be found
1262            */
1263            public static MBMessage findByG_U_First(long groupId, long userId,
1264                    OrderByComparator<MBMessage> orderByComparator)
1265                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1266                    return getPersistence()
1267                                       .findByG_U_First(groupId, userId, orderByComparator);
1268            }
1269    
1270            /**
1271            * Returns the first message-boards message in the ordered set where groupId = &#63; and userId = &#63;.
1272            *
1273            * @param groupId the group ID
1274            * @param userId the user ID
1275            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1276            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
1277            */
1278            public static MBMessage fetchByG_U_First(long groupId, long userId,
1279                    OrderByComparator<MBMessage> orderByComparator) {
1280                    return getPersistence()
1281                                       .fetchByG_U_First(groupId, userId, orderByComparator);
1282            }
1283    
1284            /**
1285            * Returns the last message-boards message in the ordered set where groupId = &#63; and userId = &#63;.
1286            *
1287            * @param groupId the group ID
1288            * @param userId the user ID
1289            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1290            * @return the last matching message-boards message
1291            * @throws NoSuchMessageException if a matching message-boards message could not be found
1292            */
1293            public static MBMessage findByG_U_Last(long groupId, long userId,
1294                    OrderByComparator<MBMessage> orderByComparator)
1295                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1296                    return getPersistence()
1297                                       .findByG_U_Last(groupId, userId, orderByComparator);
1298            }
1299    
1300            /**
1301            * Returns the last message-boards message in the ordered set where groupId = &#63; and userId = &#63;.
1302            *
1303            * @param groupId the group ID
1304            * @param userId the user ID
1305            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1306            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
1307            */
1308            public static MBMessage fetchByG_U_Last(long groupId, long userId,
1309                    OrderByComparator<MBMessage> orderByComparator) {
1310                    return getPersistence()
1311                                       .fetchByG_U_Last(groupId, userId, orderByComparator);
1312            }
1313    
1314            /**
1315            * Returns the message-boards messages before and after the current message-boards message in the ordered set where groupId = &#63; and userId = &#63;.
1316            *
1317            * @param messageId the primary key of the current message-boards message
1318            * @param groupId the group ID
1319            * @param userId the user ID
1320            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1321            * @return the previous, current, and next message-boards message
1322            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
1323            */
1324            public static MBMessage[] findByG_U_PrevAndNext(long messageId,
1325                    long groupId, long userId,
1326                    OrderByComparator<MBMessage> orderByComparator)
1327                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1328                    return getPersistence()
1329                                       .findByG_U_PrevAndNext(messageId, groupId, userId,
1330                            orderByComparator);
1331            }
1332    
1333            /**
1334            * Returns all the message-boards messages that the user has permission to view where groupId = &#63; and userId = &#63;.
1335            *
1336            * @param groupId the group ID
1337            * @param userId the user ID
1338            * @return the matching message-boards messages that the user has permission to view
1339            */
1340            public static List<MBMessage> filterFindByG_U(long groupId, long userId) {
1341                    return getPersistence().filterFindByG_U(groupId, userId);
1342            }
1343    
1344            /**
1345            * Returns a range of all the message-boards messages that the user has permission to view where groupId = &#63; and userId = &#63;.
1346            *
1347            * <p>
1348            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1349            * </p>
1350            *
1351            * @param groupId the group ID
1352            * @param userId the user ID
1353            * @param start the lower bound of the range of message-boards messages
1354            * @param end the upper bound of the range of message-boards messages (not inclusive)
1355            * @return the range of matching message-boards messages that the user has permission to view
1356            */
1357            public static List<MBMessage> filterFindByG_U(long groupId, long userId,
1358                    int start, int end) {
1359                    return getPersistence().filterFindByG_U(groupId, userId, start, end);
1360            }
1361    
1362            /**
1363            * Returns an ordered range of all the message-boards messages that the user has permissions to view where groupId = &#63; and userId = &#63;.
1364            *
1365            * <p>
1366            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1367            * </p>
1368            *
1369            * @param groupId the group ID
1370            * @param userId the user ID
1371            * @param start the lower bound of the range of message-boards messages
1372            * @param end the upper bound of the range of message-boards messages (not inclusive)
1373            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1374            * @return the ordered range of matching message-boards messages that the user has permission to view
1375            */
1376            public static List<MBMessage> filterFindByG_U(long groupId, long userId,
1377                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
1378                    return getPersistence()
1379                                       .filterFindByG_U(groupId, userId, start, end,
1380                            orderByComparator);
1381            }
1382    
1383            /**
1384            * Returns the message-boards messages before and after the current message-boards message in the ordered set of message-boards messages that the user has permission to view where groupId = &#63; and userId = &#63;.
1385            *
1386            * @param messageId the primary key of the current message-boards message
1387            * @param groupId the group ID
1388            * @param userId the user ID
1389            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1390            * @return the previous, current, and next message-boards message
1391            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
1392            */
1393            public static MBMessage[] filterFindByG_U_PrevAndNext(long messageId,
1394                    long groupId, long userId,
1395                    OrderByComparator<MBMessage> orderByComparator)
1396                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1397                    return getPersistence()
1398                                       .filterFindByG_U_PrevAndNext(messageId, groupId, userId,
1399                            orderByComparator);
1400            }
1401    
1402            /**
1403            * Removes all the message-boards messages where groupId = &#63; and userId = &#63; from the database.
1404            *
1405            * @param groupId the group ID
1406            * @param userId the user ID
1407            */
1408            public static void removeByG_U(long groupId, long userId) {
1409                    getPersistence().removeByG_U(groupId, userId);
1410            }
1411    
1412            /**
1413            * Returns the number of message-boards messages where groupId = &#63; and userId = &#63;.
1414            *
1415            * @param groupId the group ID
1416            * @param userId the user ID
1417            * @return the number of matching message-boards messages
1418            */
1419            public static int countByG_U(long groupId, long userId) {
1420                    return getPersistence().countByG_U(groupId, userId);
1421            }
1422    
1423            /**
1424            * Returns the number of message-boards messages that the user has permission to view where groupId = &#63; and userId = &#63;.
1425            *
1426            * @param groupId the group ID
1427            * @param userId the user ID
1428            * @return the number of matching message-boards messages that the user has permission to view
1429            */
1430            public static int filterCountByG_U(long groupId, long userId) {
1431                    return getPersistence().filterCountByG_U(groupId, userId);
1432            }
1433    
1434            /**
1435            * Returns all the message-boards messages where groupId = &#63; and categoryId = &#63;.
1436            *
1437            * @param groupId the group ID
1438            * @param categoryId the category ID
1439            * @return the matching message-boards messages
1440            */
1441            public static List<MBMessage> findByG_C(long groupId, long categoryId) {
1442                    return getPersistence().findByG_C(groupId, categoryId);
1443            }
1444    
1445            /**
1446            * Returns a range of all the message-boards messages where groupId = &#63; and categoryId = &#63;.
1447            *
1448            * <p>
1449            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1450            * </p>
1451            *
1452            * @param groupId the group ID
1453            * @param categoryId the category ID
1454            * @param start the lower bound of the range of message-boards messages
1455            * @param end the upper bound of the range of message-boards messages (not inclusive)
1456            * @return the range of matching message-boards messages
1457            */
1458            public static List<MBMessage> findByG_C(long groupId, long categoryId,
1459                    int start, int end) {
1460                    return getPersistence().findByG_C(groupId, categoryId, start, end);
1461            }
1462    
1463            /**
1464            * Returns an ordered range of all the message-boards messages where groupId = &#63; and categoryId = &#63;.
1465            *
1466            * <p>
1467            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1468            * </p>
1469            *
1470            * @param groupId the group ID
1471            * @param categoryId the category ID
1472            * @param start the lower bound of the range of message-boards messages
1473            * @param end the upper bound of the range of message-boards messages (not inclusive)
1474            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1475            * @return the ordered range of matching message-boards messages
1476            */
1477            public static List<MBMessage> findByG_C(long groupId, long categoryId,
1478                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
1479                    return getPersistence()
1480                                       .findByG_C(groupId, categoryId, start, end, orderByComparator);
1481            }
1482    
1483            /**
1484            * Returns the first message-boards message in the ordered set where groupId = &#63; and categoryId = &#63;.
1485            *
1486            * @param groupId the group ID
1487            * @param categoryId the category ID
1488            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1489            * @return the first matching message-boards message
1490            * @throws NoSuchMessageException if a matching message-boards message could not be found
1491            */
1492            public static MBMessage findByG_C_First(long groupId, long categoryId,
1493                    OrderByComparator<MBMessage> orderByComparator)
1494                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1495                    return getPersistence()
1496                                       .findByG_C_First(groupId, categoryId, orderByComparator);
1497            }
1498    
1499            /**
1500            * Returns the first message-boards message in the ordered set where groupId = &#63; and categoryId = &#63;.
1501            *
1502            * @param groupId the group ID
1503            * @param categoryId the category ID
1504            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1505            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
1506            */
1507            public static MBMessage fetchByG_C_First(long groupId, long categoryId,
1508                    OrderByComparator<MBMessage> orderByComparator) {
1509                    return getPersistence()
1510                                       .fetchByG_C_First(groupId, categoryId, orderByComparator);
1511            }
1512    
1513            /**
1514            * Returns the last message-boards message in the ordered set where groupId = &#63; and categoryId = &#63;.
1515            *
1516            * @param groupId the group ID
1517            * @param categoryId the category ID
1518            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1519            * @return the last matching message-boards message
1520            * @throws NoSuchMessageException if a matching message-boards message could not be found
1521            */
1522            public static MBMessage findByG_C_Last(long groupId, long categoryId,
1523                    OrderByComparator<MBMessage> orderByComparator)
1524                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1525                    return getPersistence()
1526                                       .findByG_C_Last(groupId, categoryId, orderByComparator);
1527            }
1528    
1529            /**
1530            * Returns the last message-boards message in the ordered set where groupId = &#63; and categoryId = &#63;.
1531            *
1532            * @param groupId the group ID
1533            * @param categoryId the category ID
1534            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1535            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
1536            */
1537            public static MBMessage fetchByG_C_Last(long groupId, long categoryId,
1538                    OrderByComparator<MBMessage> orderByComparator) {
1539                    return getPersistence()
1540                                       .fetchByG_C_Last(groupId, categoryId, orderByComparator);
1541            }
1542    
1543            /**
1544            * Returns the message-boards messages before and after the current message-boards message in the ordered set where groupId = &#63; and categoryId = &#63;.
1545            *
1546            * @param messageId the primary key of the current message-boards message
1547            * @param groupId the group ID
1548            * @param categoryId the category ID
1549            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1550            * @return the previous, current, and next message-boards message
1551            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
1552            */
1553            public static MBMessage[] findByG_C_PrevAndNext(long messageId,
1554                    long groupId, long categoryId,
1555                    OrderByComparator<MBMessage> orderByComparator)
1556                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1557                    return getPersistence()
1558                                       .findByG_C_PrevAndNext(messageId, groupId, categoryId,
1559                            orderByComparator);
1560            }
1561    
1562            /**
1563            * Returns all the message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63;.
1564            *
1565            * @param groupId the group ID
1566            * @param categoryId the category ID
1567            * @return the matching message-boards messages that the user has permission to view
1568            */
1569            public static List<MBMessage> filterFindByG_C(long groupId, long categoryId) {
1570                    return getPersistence().filterFindByG_C(groupId, categoryId);
1571            }
1572    
1573            /**
1574            * Returns a range of all the message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63;.
1575            *
1576            * <p>
1577            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1578            * </p>
1579            *
1580            * @param groupId the group ID
1581            * @param categoryId the category ID
1582            * @param start the lower bound of the range of message-boards messages
1583            * @param end the upper bound of the range of message-boards messages (not inclusive)
1584            * @return the range of matching message-boards messages that the user has permission to view
1585            */
1586            public static List<MBMessage> filterFindByG_C(long groupId,
1587                    long categoryId, int start, int end) {
1588                    return getPersistence().filterFindByG_C(groupId, categoryId, start, end);
1589            }
1590    
1591            /**
1592            * Returns an ordered range of all the message-boards messages that the user has permissions to view where groupId = &#63; and categoryId = &#63;.
1593            *
1594            * <p>
1595            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1596            * </p>
1597            *
1598            * @param groupId the group ID
1599            * @param categoryId the category ID
1600            * @param start the lower bound of the range of message-boards messages
1601            * @param end the upper bound of the range of message-boards messages (not inclusive)
1602            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1603            * @return the ordered range of matching message-boards messages that the user has permission to view
1604            */
1605            public static List<MBMessage> filterFindByG_C(long groupId,
1606                    long categoryId, int start, int end,
1607                    OrderByComparator<MBMessage> orderByComparator) {
1608                    return getPersistence()
1609                                       .filterFindByG_C(groupId, categoryId, start, end,
1610                            orderByComparator);
1611            }
1612    
1613            /**
1614            * Returns the message-boards messages before and after the current message-boards message in the ordered set of message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63;.
1615            *
1616            * @param messageId the primary key of the current message-boards message
1617            * @param groupId the group ID
1618            * @param categoryId the category ID
1619            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1620            * @return the previous, current, and next message-boards message
1621            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
1622            */
1623            public static MBMessage[] filterFindByG_C_PrevAndNext(long messageId,
1624                    long groupId, long categoryId,
1625                    OrderByComparator<MBMessage> orderByComparator)
1626                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1627                    return getPersistence()
1628                                       .filterFindByG_C_PrevAndNext(messageId, groupId, categoryId,
1629                            orderByComparator);
1630            }
1631    
1632            /**
1633            * Removes all the message-boards messages where groupId = &#63; and categoryId = &#63; from the database.
1634            *
1635            * @param groupId the group ID
1636            * @param categoryId the category ID
1637            */
1638            public static void removeByG_C(long groupId, long categoryId) {
1639                    getPersistence().removeByG_C(groupId, categoryId);
1640            }
1641    
1642            /**
1643            * Returns the number of message-boards messages where groupId = &#63; and categoryId = &#63;.
1644            *
1645            * @param groupId the group ID
1646            * @param categoryId the category ID
1647            * @return the number of matching message-boards messages
1648            */
1649            public static int countByG_C(long groupId, long categoryId) {
1650                    return getPersistence().countByG_C(groupId, categoryId);
1651            }
1652    
1653            /**
1654            * Returns the number of message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63;.
1655            *
1656            * @param groupId the group ID
1657            * @param categoryId the category ID
1658            * @return the number of matching message-boards messages that the user has permission to view
1659            */
1660            public static int filterCountByG_C(long groupId, long categoryId) {
1661                    return getPersistence().filterCountByG_C(groupId, categoryId);
1662            }
1663    
1664            /**
1665            * Returns all the message-boards messages where groupId = &#63; and status = &#63;.
1666            *
1667            * @param groupId the group ID
1668            * @param status the status
1669            * @return the matching message-boards messages
1670            */
1671            public static List<MBMessage> findByG_S(long groupId, int status) {
1672                    return getPersistence().findByG_S(groupId, status);
1673            }
1674    
1675            /**
1676            * Returns a range of all the message-boards messages where groupId = &#63; and status = &#63;.
1677            *
1678            * <p>
1679            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1680            * </p>
1681            *
1682            * @param groupId the group ID
1683            * @param status the status
1684            * @param start the lower bound of the range of message-boards messages
1685            * @param end the upper bound of the range of message-boards messages (not inclusive)
1686            * @return the range of matching message-boards messages
1687            */
1688            public static List<MBMessage> findByG_S(long groupId, int status,
1689                    int start, int end) {
1690                    return getPersistence().findByG_S(groupId, status, start, end);
1691            }
1692    
1693            /**
1694            * Returns an ordered range of all the message-boards messages where groupId = &#63; and status = &#63;.
1695            *
1696            * <p>
1697            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1698            * </p>
1699            *
1700            * @param groupId the group ID
1701            * @param status the status
1702            * @param start the lower bound of the range of message-boards messages
1703            * @param end the upper bound of the range of message-boards messages (not inclusive)
1704            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1705            * @return the ordered range of matching message-boards messages
1706            */
1707            public static List<MBMessage> findByG_S(long groupId, int status,
1708                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
1709                    return getPersistence()
1710                                       .findByG_S(groupId, status, start, end, orderByComparator);
1711            }
1712    
1713            /**
1714            * Returns the first message-boards message in the ordered set where groupId = &#63; and status = &#63;.
1715            *
1716            * @param groupId the group ID
1717            * @param status the status
1718            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1719            * @return the first matching message-boards message
1720            * @throws NoSuchMessageException if a matching message-boards message could not be found
1721            */
1722            public static MBMessage findByG_S_First(long groupId, int status,
1723                    OrderByComparator<MBMessage> orderByComparator)
1724                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1725                    return getPersistence()
1726                                       .findByG_S_First(groupId, status, orderByComparator);
1727            }
1728    
1729            /**
1730            * Returns the first message-boards message in the ordered set where groupId = &#63; and status = &#63;.
1731            *
1732            * @param groupId the group ID
1733            * @param status the status
1734            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1735            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
1736            */
1737            public static MBMessage fetchByG_S_First(long groupId, int status,
1738                    OrderByComparator<MBMessage> orderByComparator) {
1739                    return getPersistence()
1740                                       .fetchByG_S_First(groupId, status, orderByComparator);
1741            }
1742    
1743            /**
1744            * Returns the last message-boards message in the ordered set where groupId = &#63; and status = &#63;.
1745            *
1746            * @param groupId the group ID
1747            * @param status the status
1748            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1749            * @return the last matching message-boards message
1750            * @throws NoSuchMessageException if a matching message-boards message could not be found
1751            */
1752            public static MBMessage findByG_S_Last(long groupId, int status,
1753                    OrderByComparator<MBMessage> orderByComparator)
1754                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1755                    return getPersistence()
1756                                       .findByG_S_Last(groupId, status, orderByComparator);
1757            }
1758    
1759            /**
1760            * Returns the last message-boards message in the ordered set where groupId = &#63; and status = &#63;.
1761            *
1762            * @param groupId the group ID
1763            * @param status the status
1764            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1765            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
1766            */
1767            public static MBMessage fetchByG_S_Last(long groupId, int status,
1768                    OrderByComparator<MBMessage> orderByComparator) {
1769                    return getPersistence()
1770                                       .fetchByG_S_Last(groupId, status, orderByComparator);
1771            }
1772    
1773            /**
1774            * Returns the message-boards messages before and after the current message-boards message in the ordered set where groupId = &#63; and status = &#63;.
1775            *
1776            * @param messageId the primary key of the current message-boards message
1777            * @param groupId the group ID
1778            * @param status the status
1779            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1780            * @return the previous, current, and next message-boards message
1781            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
1782            */
1783            public static MBMessage[] findByG_S_PrevAndNext(long messageId,
1784                    long groupId, int status, OrderByComparator<MBMessage> orderByComparator)
1785                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1786                    return getPersistence()
1787                                       .findByG_S_PrevAndNext(messageId, groupId, status,
1788                            orderByComparator);
1789            }
1790    
1791            /**
1792            * Returns all the message-boards messages that the user has permission to view where groupId = &#63; and status = &#63;.
1793            *
1794            * @param groupId the group ID
1795            * @param status the status
1796            * @return the matching message-boards messages that the user has permission to view
1797            */
1798            public static List<MBMessage> filterFindByG_S(long groupId, int status) {
1799                    return getPersistence().filterFindByG_S(groupId, status);
1800            }
1801    
1802            /**
1803            * Returns a range of all the message-boards messages that the user has permission to view where groupId = &#63; and status = &#63;.
1804            *
1805            * <p>
1806            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1807            * </p>
1808            *
1809            * @param groupId the group ID
1810            * @param status the status
1811            * @param start the lower bound of the range of message-boards messages
1812            * @param end the upper bound of the range of message-boards messages (not inclusive)
1813            * @return the range of matching message-boards messages that the user has permission to view
1814            */
1815            public static List<MBMessage> filterFindByG_S(long groupId, int status,
1816                    int start, int end) {
1817                    return getPersistence().filterFindByG_S(groupId, status, start, end);
1818            }
1819    
1820            /**
1821            * Returns an ordered range of all the message-boards messages that the user has permissions to view where groupId = &#63; and status = &#63;.
1822            *
1823            * <p>
1824            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1825            * </p>
1826            *
1827            * @param groupId the group ID
1828            * @param status the status
1829            * @param start the lower bound of the range of message-boards messages
1830            * @param end the upper bound of the range of message-boards messages (not inclusive)
1831            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1832            * @return the ordered range of matching message-boards messages that the user has permission to view
1833            */
1834            public static List<MBMessage> filterFindByG_S(long groupId, int status,
1835                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
1836                    return getPersistence()
1837                                       .filterFindByG_S(groupId, status, start, end,
1838                            orderByComparator);
1839            }
1840    
1841            /**
1842            * Returns the message-boards messages before and after the current message-boards message in the ordered set of message-boards messages that the user has permission to view where groupId = &#63; and status = &#63;.
1843            *
1844            * @param messageId the primary key of the current message-boards message
1845            * @param groupId the group ID
1846            * @param status the status
1847            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1848            * @return the previous, current, and next message-boards message
1849            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
1850            */
1851            public static MBMessage[] filterFindByG_S_PrevAndNext(long messageId,
1852                    long groupId, int status, OrderByComparator<MBMessage> orderByComparator)
1853                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1854                    return getPersistence()
1855                                       .filterFindByG_S_PrevAndNext(messageId, groupId, status,
1856                            orderByComparator);
1857            }
1858    
1859            /**
1860            * Removes all the message-boards messages where groupId = &#63; and status = &#63; from the database.
1861            *
1862            * @param groupId the group ID
1863            * @param status the status
1864            */
1865            public static void removeByG_S(long groupId, int status) {
1866                    getPersistence().removeByG_S(groupId, status);
1867            }
1868    
1869            /**
1870            * Returns the number of message-boards messages where groupId = &#63; and status = &#63;.
1871            *
1872            * @param groupId the group ID
1873            * @param status the status
1874            * @return the number of matching message-boards messages
1875            */
1876            public static int countByG_S(long groupId, int status) {
1877                    return getPersistence().countByG_S(groupId, status);
1878            }
1879    
1880            /**
1881            * Returns the number of message-boards messages that the user has permission to view where groupId = &#63; and status = &#63;.
1882            *
1883            * @param groupId the group ID
1884            * @param status the status
1885            * @return the number of matching message-boards messages that the user has permission to view
1886            */
1887            public static int filterCountByG_S(long groupId, int status) {
1888                    return getPersistence().filterCountByG_S(groupId, status);
1889            }
1890    
1891            /**
1892            * Returns all the message-boards messages where companyId = &#63; and status = &#63;.
1893            *
1894            * @param companyId the company ID
1895            * @param status the status
1896            * @return the matching message-boards messages
1897            */
1898            public static List<MBMessage> findByC_S(long companyId, int status) {
1899                    return getPersistence().findByC_S(companyId, status);
1900            }
1901    
1902            /**
1903            * Returns a range of all the message-boards messages where companyId = &#63; and status = &#63;.
1904            *
1905            * <p>
1906            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1907            * </p>
1908            *
1909            * @param companyId the company ID
1910            * @param status the status
1911            * @param start the lower bound of the range of message-boards messages
1912            * @param end the upper bound of the range of message-boards messages (not inclusive)
1913            * @return the range of matching message-boards messages
1914            */
1915            public static List<MBMessage> findByC_S(long companyId, int status,
1916                    int start, int end) {
1917                    return getPersistence().findByC_S(companyId, status, start, end);
1918            }
1919    
1920            /**
1921            * Returns an ordered range of all the message-boards messages where companyId = &#63; and status = &#63;.
1922            *
1923            * <p>
1924            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
1925            * </p>
1926            *
1927            * @param companyId the company ID
1928            * @param status the status
1929            * @param start the lower bound of the range of message-boards messages
1930            * @param end the upper bound of the range of message-boards messages (not inclusive)
1931            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1932            * @return the ordered range of matching message-boards messages
1933            */
1934            public static List<MBMessage> findByC_S(long companyId, int status,
1935                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
1936                    return getPersistence()
1937                                       .findByC_S(companyId, status, start, end, orderByComparator);
1938            }
1939    
1940            /**
1941            * Returns the first message-boards message in the ordered set where companyId = &#63; and status = &#63;.
1942            *
1943            * @param companyId the company ID
1944            * @param status the status
1945            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1946            * @return the first matching message-boards message
1947            * @throws NoSuchMessageException if a matching message-boards message could not be found
1948            */
1949            public static MBMessage findByC_S_First(long companyId, int status,
1950                    OrderByComparator<MBMessage> orderByComparator)
1951                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1952                    return getPersistence()
1953                                       .findByC_S_First(companyId, status, orderByComparator);
1954            }
1955    
1956            /**
1957            * Returns the first message-boards message in the ordered set where companyId = &#63; and status = &#63;.
1958            *
1959            * @param companyId the company ID
1960            * @param status the status
1961            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1962            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
1963            */
1964            public static MBMessage fetchByC_S_First(long companyId, int status,
1965                    OrderByComparator<MBMessage> orderByComparator) {
1966                    return getPersistence()
1967                                       .fetchByC_S_First(companyId, status, orderByComparator);
1968            }
1969    
1970            /**
1971            * Returns the last message-boards message in the ordered set where companyId = &#63; and status = &#63;.
1972            *
1973            * @param companyId the company ID
1974            * @param status the status
1975            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1976            * @return the last matching message-boards message
1977            * @throws NoSuchMessageException if a matching message-boards message could not be found
1978            */
1979            public static MBMessage findByC_S_Last(long companyId, int status,
1980                    OrderByComparator<MBMessage> orderByComparator)
1981                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
1982                    return getPersistence()
1983                                       .findByC_S_Last(companyId, status, orderByComparator);
1984            }
1985    
1986            /**
1987            * Returns the last message-boards message in the ordered set where companyId = &#63; and status = &#63;.
1988            *
1989            * @param companyId the company ID
1990            * @param status the status
1991            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1992            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
1993            */
1994            public static MBMessage fetchByC_S_Last(long companyId, int status,
1995                    OrderByComparator<MBMessage> orderByComparator) {
1996                    return getPersistence()
1997                                       .fetchByC_S_Last(companyId, status, orderByComparator);
1998            }
1999    
2000            /**
2001            * Returns the message-boards messages before and after the current message-boards message in the ordered set where companyId = &#63; and status = &#63;.
2002            *
2003            * @param messageId the primary key of the current message-boards message
2004            * @param companyId the company ID
2005            * @param status the status
2006            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2007            * @return the previous, current, and next message-boards message
2008            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
2009            */
2010            public static MBMessage[] findByC_S_PrevAndNext(long messageId,
2011                    long companyId, int status,
2012                    OrderByComparator<MBMessage> orderByComparator)
2013                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2014                    return getPersistence()
2015                                       .findByC_S_PrevAndNext(messageId, companyId, status,
2016                            orderByComparator);
2017            }
2018    
2019            /**
2020            * Removes all the message-boards messages where companyId = &#63; and status = &#63; from the database.
2021            *
2022            * @param companyId the company ID
2023            * @param status the status
2024            */
2025            public static void removeByC_S(long companyId, int status) {
2026                    getPersistence().removeByC_S(companyId, status);
2027            }
2028    
2029            /**
2030            * Returns the number of message-boards messages where companyId = &#63; and status = &#63;.
2031            *
2032            * @param companyId the company ID
2033            * @param status the status
2034            * @return the number of matching message-boards messages
2035            */
2036            public static int countByC_S(long companyId, int status) {
2037                    return getPersistence().countByC_S(companyId, status);
2038            }
2039    
2040            /**
2041            * Returns all the message-boards messages where userId = &#63; and classNameId = &#63;.
2042            *
2043            * @param userId the user ID
2044            * @param classNameId the class name ID
2045            * @return the matching message-boards messages
2046            */
2047            public static List<MBMessage> findByU_C(long userId, long classNameId) {
2048                    return getPersistence().findByU_C(userId, classNameId);
2049            }
2050    
2051            /**
2052            * Returns a range of all the message-boards messages where userId = &#63; and classNameId = &#63;.
2053            *
2054            * <p>
2055            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2056            * </p>
2057            *
2058            * @param userId the user ID
2059            * @param classNameId the class name ID
2060            * @param start the lower bound of the range of message-boards messages
2061            * @param end the upper bound of the range of message-boards messages (not inclusive)
2062            * @return the range of matching message-boards messages
2063            */
2064            public static List<MBMessage> findByU_C(long userId, long classNameId,
2065                    int start, int end) {
2066                    return getPersistence().findByU_C(userId, classNameId, start, end);
2067            }
2068    
2069            /**
2070            * Returns an ordered range of all the message-boards messages where userId = &#63; and classNameId = &#63;.
2071            *
2072            * <p>
2073            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2074            * </p>
2075            *
2076            * @param userId the user ID
2077            * @param classNameId the class name ID
2078            * @param start the lower bound of the range of message-boards messages
2079            * @param end the upper bound of the range of message-boards messages (not inclusive)
2080            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2081            * @return the ordered range of matching message-boards messages
2082            */
2083            public static List<MBMessage> findByU_C(long userId, long classNameId,
2084                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
2085                    return getPersistence()
2086                                       .findByU_C(userId, classNameId, start, end, orderByComparator);
2087            }
2088    
2089            /**
2090            * Returns the first message-boards message in the ordered set where userId = &#63; and classNameId = &#63;.
2091            *
2092            * @param userId the user ID
2093            * @param classNameId the class name ID
2094            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2095            * @return the first matching message-boards message
2096            * @throws NoSuchMessageException if a matching message-boards message could not be found
2097            */
2098            public static MBMessage findByU_C_First(long userId, long classNameId,
2099                    OrderByComparator<MBMessage> orderByComparator)
2100                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2101                    return getPersistence()
2102                                       .findByU_C_First(userId, classNameId, orderByComparator);
2103            }
2104    
2105            /**
2106            * Returns the first message-boards message in the ordered set where userId = &#63; and classNameId = &#63;.
2107            *
2108            * @param userId the user ID
2109            * @param classNameId the class name ID
2110            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2111            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2112            */
2113            public static MBMessage fetchByU_C_First(long userId, long classNameId,
2114                    OrderByComparator<MBMessage> orderByComparator) {
2115                    return getPersistence()
2116                                       .fetchByU_C_First(userId, classNameId, orderByComparator);
2117            }
2118    
2119            /**
2120            * Returns the last message-boards message in the ordered set where userId = &#63; and classNameId = &#63;.
2121            *
2122            * @param userId the user ID
2123            * @param classNameId the class name ID
2124            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2125            * @return the last matching message-boards message
2126            * @throws NoSuchMessageException if a matching message-boards message could not be found
2127            */
2128            public static MBMessage findByU_C_Last(long userId, long classNameId,
2129                    OrderByComparator<MBMessage> orderByComparator)
2130                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2131                    return getPersistence()
2132                                       .findByU_C_Last(userId, classNameId, orderByComparator);
2133            }
2134    
2135            /**
2136            * Returns the last message-boards message in the ordered set where userId = &#63; and classNameId = &#63;.
2137            *
2138            * @param userId the user ID
2139            * @param classNameId the class name ID
2140            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2141            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2142            */
2143            public static MBMessage fetchByU_C_Last(long userId, long classNameId,
2144                    OrderByComparator<MBMessage> orderByComparator) {
2145                    return getPersistence()
2146                                       .fetchByU_C_Last(userId, classNameId, orderByComparator);
2147            }
2148    
2149            /**
2150            * Returns the message-boards messages before and after the current message-boards message in the ordered set where userId = &#63; and classNameId = &#63;.
2151            *
2152            * @param messageId the primary key of the current message-boards message
2153            * @param userId the user ID
2154            * @param classNameId the class name ID
2155            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2156            * @return the previous, current, and next message-boards message
2157            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
2158            */
2159            public static MBMessage[] findByU_C_PrevAndNext(long messageId,
2160                    long userId, long classNameId,
2161                    OrderByComparator<MBMessage> orderByComparator)
2162                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2163                    return getPersistence()
2164                                       .findByU_C_PrevAndNext(messageId, userId, classNameId,
2165                            orderByComparator);
2166            }
2167    
2168            /**
2169            * Returns all the message-boards messages where userId = &#63; and classNameId = any &#63;.
2170            *
2171            * <p>
2172            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2173            * </p>
2174            *
2175            * @param userId the user ID
2176            * @param classNameIds the class name IDs
2177            * @return the matching message-boards messages
2178            */
2179            public static List<MBMessage> findByU_C(long userId, long[] classNameIds) {
2180                    return getPersistence().findByU_C(userId, classNameIds);
2181            }
2182    
2183            /**
2184            * Returns a range of all the message-boards messages where userId = &#63; and classNameId = any &#63;.
2185            *
2186            * <p>
2187            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2188            * </p>
2189            *
2190            * @param userId the user ID
2191            * @param classNameIds the class name IDs
2192            * @param start the lower bound of the range of message-boards messages
2193            * @param end the upper bound of the range of message-boards messages (not inclusive)
2194            * @return the range of matching message-boards messages
2195            */
2196            public static List<MBMessage> findByU_C(long userId, long[] classNameIds,
2197                    int start, int end) {
2198                    return getPersistence().findByU_C(userId, classNameIds, start, end);
2199            }
2200    
2201            /**
2202            * Returns an ordered range of all the message-boards messages where userId = &#63; and classNameId = any &#63;.
2203            *
2204            * <p>
2205            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2206            * </p>
2207            *
2208            * @param userId the user ID
2209            * @param classNameIds the class name IDs
2210            * @param start the lower bound of the range of message-boards messages
2211            * @param end the upper bound of the range of message-boards messages (not inclusive)
2212            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2213            * @return the ordered range of matching message-boards messages
2214            */
2215            public static List<MBMessage> findByU_C(long userId, long[] classNameIds,
2216                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
2217                    return getPersistence()
2218                                       .findByU_C(userId, classNameIds, start, end,
2219                            orderByComparator);
2220            }
2221    
2222            /**
2223            * Removes all the message-boards messages where userId = &#63; and classNameId = &#63; from the database.
2224            *
2225            * @param userId the user ID
2226            * @param classNameId the class name ID
2227            */
2228            public static void removeByU_C(long userId, long classNameId) {
2229                    getPersistence().removeByU_C(userId, classNameId);
2230            }
2231    
2232            /**
2233            * Returns the number of message-boards messages where userId = &#63; and classNameId = &#63;.
2234            *
2235            * @param userId the user ID
2236            * @param classNameId the class name ID
2237            * @return the number of matching message-boards messages
2238            */
2239            public static int countByU_C(long userId, long classNameId) {
2240                    return getPersistence().countByU_C(userId, classNameId);
2241            }
2242    
2243            /**
2244            * Returns the number of message-boards messages where userId = &#63; and classNameId = any &#63;.
2245            *
2246            * @param userId the user ID
2247            * @param classNameIds the class name IDs
2248            * @return the number of matching message-boards messages
2249            */
2250            public static int countByU_C(long userId, long[] classNameIds) {
2251                    return getPersistence().countByU_C(userId, classNameIds);
2252            }
2253    
2254            /**
2255            * Returns all the message-boards messages where classNameId = &#63; and classPK = &#63;.
2256            *
2257            * @param classNameId the class name ID
2258            * @param classPK the class p k
2259            * @return the matching message-boards messages
2260            */
2261            public static List<MBMessage> findByC_C(long classNameId, long classPK) {
2262                    return getPersistence().findByC_C(classNameId, classPK);
2263            }
2264    
2265            /**
2266            * Returns a range of all the message-boards messages where classNameId = &#63; and classPK = &#63;.
2267            *
2268            * <p>
2269            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2270            * </p>
2271            *
2272            * @param classNameId the class name ID
2273            * @param classPK the class p k
2274            * @param start the lower bound of the range of message-boards messages
2275            * @param end the upper bound of the range of message-boards messages (not inclusive)
2276            * @return the range of matching message-boards messages
2277            */
2278            public static List<MBMessage> findByC_C(long classNameId, long classPK,
2279                    int start, int end) {
2280                    return getPersistence().findByC_C(classNameId, classPK, start, end);
2281            }
2282    
2283            /**
2284            * Returns an ordered range of all the message-boards messages where classNameId = &#63; and classPK = &#63;.
2285            *
2286            * <p>
2287            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2288            * </p>
2289            *
2290            * @param classNameId the class name ID
2291            * @param classPK the class p k
2292            * @param start the lower bound of the range of message-boards messages
2293            * @param end the upper bound of the range of message-boards messages (not inclusive)
2294            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2295            * @return the ordered range of matching message-boards messages
2296            */
2297            public static List<MBMessage> findByC_C(long classNameId, long classPK,
2298                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
2299                    return getPersistence()
2300                                       .findByC_C(classNameId, classPK, start, end,
2301                            orderByComparator);
2302            }
2303    
2304            /**
2305            * Returns the first message-boards message in the ordered set where classNameId = &#63; and classPK = &#63;.
2306            *
2307            * @param classNameId the class name ID
2308            * @param classPK the class p k
2309            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2310            * @return the first matching message-boards message
2311            * @throws NoSuchMessageException if a matching message-boards message could not be found
2312            */
2313            public static MBMessage findByC_C_First(long classNameId, long classPK,
2314                    OrderByComparator<MBMessage> orderByComparator)
2315                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2316                    return getPersistence()
2317                                       .findByC_C_First(classNameId, classPK, orderByComparator);
2318            }
2319    
2320            /**
2321            * Returns the first message-boards message in the ordered set where classNameId = &#63; and classPK = &#63;.
2322            *
2323            * @param classNameId the class name ID
2324            * @param classPK the class p k
2325            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2326            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2327            */
2328            public static MBMessage fetchByC_C_First(long classNameId, long classPK,
2329                    OrderByComparator<MBMessage> orderByComparator) {
2330                    return getPersistence()
2331                                       .fetchByC_C_First(classNameId, classPK, orderByComparator);
2332            }
2333    
2334            /**
2335            * Returns the last message-boards message in the ordered set where classNameId = &#63; and classPK = &#63;.
2336            *
2337            * @param classNameId the class name ID
2338            * @param classPK the class p k
2339            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2340            * @return the last matching message-boards message
2341            * @throws NoSuchMessageException if a matching message-boards message could not be found
2342            */
2343            public static MBMessage findByC_C_Last(long classNameId, long classPK,
2344                    OrderByComparator<MBMessage> orderByComparator)
2345                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2346                    return getPersistence()
2347                                       .findByC_C_Last(classNameId, classPK, orderByComparator);
2348            }
2349    
2350            /**
2351            * Returns the last message-boards message in the ordered set where classNameId = &#63; and classPK = &#63;.
2352            *
2353            * @param classNameId the class name ID
2354            * @param classPK the class p k
2355            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2356            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2357            */
2358            public static MBMessage fetchByC_C_Last(long classNameId, long classPK,
2359                    OrderByComparator<MBMessage> orderByComparator) {
2360                    return getPersistence()
2361                                       .fetchByC_C_Last(classNameId, classPK, orderByComparator);
2362            }
2363    
2364            /**
2365            * Returns the message-boards messages before and after the current message-boards message in the ordered set where classNameId = &#63; and classPK = &#63;.
2366            *
2367            * @param messageId the primary key of the current message-boards message
2368            * @param classNameId the class name ID
2369            * @param classPK the class p k
2370            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2371            * @return the previous, current, and next message-boards message
2372            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
2373            */
2374            public static MBMessage[] findByC_C_PrevAndNext(long messageId,
2375                    long classNameId, long classPK,
2376                    OrderByComparator<MBMessage> orderByComparator)
2377                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2378                    return getPersistence()
2379                                       .findByC_C_PrevAndNext(messageId, classNameId, classPK,
2380                            orderByComparator);
2381            }
2382    
2383            /**
2384            * Removes all the message-boards messages where classNameId = &#63; and classPK = &#63; from the database.
2385            *
2386            * @param classNameId the class name ID
2387            * @param classPK the class p k
2388            */
2389            public static void removeByC_C(long classNameId, long classPK) {
2390                    getPersistence().removeByC_C(classNameId, classPK);
2391            }
2392    
2393            /**
2394            * Returns the number of message-boards messages where classNameId = &#63; and classPK = &#63;.
2395            *
2396            * @param classNameId the class name ID
2397            * @param classPK the class p k
2398            * @return the number of matching message-boards messages
2399            */
2400            public static int countByC_C(long classNameId, long classPK) {
2401                    return getPersistence().countByC_C(classNameId, classPK);
2402            }
2403    
2404            /**
2405            * Returns all the message-boards messages where threadId = &#63; and parentMessageId = &#63;.
2406            *
2407            * @param threadId the thread ID
2408            * @param parentMessageId the parent message ID
2409            * @return the matching message-boards messages
2410            */
2411            public static List<MBMessage> findByT_P(long threadId, long parentMessageId) {
2412                    return getPersistence().findByT_P(threadId, parentMessageId);
2413            }
2414    
2415            /**
2416            * Returns a range of all the message-boards messages where threadId = &#63; and parentMessageId = &#63;.
2417            *
2418            * <p>
2419            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2420            * </p>
2421            *
2422            * @param threadId the thread ID
2423            * @param parentMessageId the parent message ID
2424            * @param start the lower bound of the range of message-boards messages
2425            * @param end the upper bound of the range of message-boards messages (not inclusive)
2426            * @return the range of matching message-boards messages
2427            */
2428            public static List<MBMessage> findByT_P(long threadId,
2429                    long parentMessageId, int start, int end) {
2430                    return getPersistence().findByT_P(threadId, parentMessageId, start, end);
2431            }
2432    
2433            /**
2434            * Returns an ordered range of all the message-boards messages where threadId = &#63; and parentMessageId = &#63;.
2435            *
2436            * <p>
2437            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2438            * </p>
2439            *
2440            * @param threadId the thread ID
2441            * @param parentMessageId the parent message ID
2442            * @param start the lower bound of the range of message-boards messages
2443            * @param end the upper bound of the range of message-boards messages (not inclusive)
2444            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2445            * @return the ordered range of matching message-boards messages
2446            */
2447            public static List<MBMessage> findByT_P(long threadId,
2448                    long parentMessageId, int start, int end,
2449                    OrderByComparator<MBMessage> orderByComparator) {
2450                    return getPersistence()
2451                                       .findByT_P(threadId, parentMessageId, start, end,
2452                            orderByComparator);
2453            }
2454    
2455            /**
2456            * Returns the first message-boards message in the ordered set where threadId = &#63; and parentMessageId = &#63;.
2457            *
2458            * @param threadId the thread ID
2459            * @param parentMessageId the parent message ID
2460            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2461            * @return the first matching message-boards message
2462            * @throws NoSuchMessageException if a matching message-boards message could not be found
2463            */
2464            public static MBMessage findByT_P_First(long threadId,
2465                    long parentMessageId, OrderByComparator<MBMessage> orderByComparator)
2466                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2467                    return getPersistence()
2468                                       .findByT_P_First(threadId, parentMessageId, orderByComparator);
2469            }
2470    
2471            /**
2472            * Returns the first message-boards message in the ordered set where threadId = &#63; and parentMessageId = &#63;.
2473            *
2474            * @param threadId the thread ID
2475            * @param parentMessageId the parent message ID
2476            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2477            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2478            */
2479            public static MBMessage fetchByT_P_First(long threadId,
2480                    long parentMessageId, OrderByComparator<MBMessage> orderByComparator) {
2481                    return getPersistence()
2482                                       .fetchByT_P_First(threadId, parentMessageId,
2483                            orderByComparator);
2484            }
2485    
2486            /**
2487            * Returns the last message-boards message in the ordered set where threadId = &#63; and parentMessageId = &#63;.
2488            *
2489            * @param threadId the thread ID
2490            * @param parentMessageId the parent message ID
2491            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2492            * @return the last matching message-boards message
2493            * @throws NoSuchMessageException if a matching message-boards message could not be found
2494            */
2495            public static MBMessage findByT_P_Last(long threadId, long parentMessageId,
2496                    OrderByComparator<MBMessage> orderByComparator)
2497                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2498                    return getPersistence()
2499                                       .findByT_P_Last(threadId, parentMessageId, orderByComparator);
2500            }
2501    
2502            /**
2503            * Returns the last message-boards message in the ordered set where threadId = &#63; and parentMessageId = &#63;.
2504            *
2505            * @param threadId the thread ID
2506            * @param parentMessageId the parent message ID
2507            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2508            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2509            */
2510            public static MBMessage fetchByT_P_Last(long threadId,
2511                    long parentMessageId, OrderByComparator<MBMessage> orderByComparator) {
2512                    return getPersistence()
2513                                       .fetchByT_P_Last(threadId, parentMessageId, orderByComparator);
2514            }
2515    
2516            /**
2517            * Returns the message-boards messages before and after the current message-boards message in the ordered set where threadId = &#63; and parentMessageId = &#63;.
2518            *
2519            * @param messageId the primary key of the current message-boards message
2520            * @param threadId the thread ID
2521            * @param parentMessageId the parent message ID
2522            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2523            * @return the previous, current, and next message-boards message
2524            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
2525            */
2526            public static MBMessage[] findByT_P_PrevAndNext(long messageId,
2527                    long threadId, long parentMessageId,
2528                    OrderByComparator<MBMessage> orderByComparator)
2529                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2530                    return getPersistence()
2531                                       .findByT_P_PrevAndNext(messageId, threadId, parentMessageId,
2532                            orderByComparator);
2533            }
2534    
2535            /**
2536            * Removes all the message-boards messages where threadId = &#63; and parentMessageId = &#63; from the database.
2537            *
2538            * @param threadId the thread ID
2539            * @param parentMessageId the parent message ID
2540            */
2541            public static void removeByT_P(long threadId, long parentMessageId) {
2542                    getPersistence().removeByT_P(threadId, parentMessageId);
2543            }
2544    
2545            /**
2546            * Returns the number of message-boards messages where threadId = &#63; and parentMessageId = &#63;.
2547            *
2548            * @param threadId the thread ID
2549            * @param parentMessageId the parent message ID
2550            * @return the number of matching message-boards messages
2551            */
2552            public static int countByT_P(long threadId, long parentMessageId) {
2553                    return getPersistence().countByT_P(threadId, parentMessageId);
2554            }
2555    
2556            /**
2557            * Returns all the message-boards messages where threadId = &#63; and answer = &#63;.
2558            *
2559            * @param threadId the thread ID
2560            * @param answer the answer
2561            * @return the matching message-boards messages
2562            */
2563            public static List<MBMessage> findByT_A(long threadId, boolean answer) {
2564                    return getPersistence().findByT_A(threadId, answer);
2565            }
2566    
2567            /**
2568            * Returns a range of all the message-boards messages where threadId = &#63; and answer = &#63;.
2569            *
2570            * <p>
2571            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2572            * </p>
2573            *
2574            * @param threadId the thread ID
2575            * @param answer the answer
2576            * @param start the lower bound of the range of message-boards messages
2577            * @param end the upper bound of the range of message-boards messages (not inclusive)
2578            * @return the range of matching message-boards messages
2579            */
2580            public static List<MBMessage> findByT_A(long threadId, boolean answer,
2581                    int start, int end) {
2582                    return getPersistence().findByT_A(threadId, answer, start, end);
2583            }
2584    
2585            /**
2586            * Returns an ordered range of all the message-boards messages where threadId = &#63; and answer = &#63;.
2587            *
2588            * <p>
2589            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2590            * </p>
2591            *
2592            * @param threadId the thread ID
2593            * @param answer the answer
2594            * @param start the lower bound of the range of message-boards messages
2595            * @param end the upper bound of the range of message-boards messages (not inclusive)
2596            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2597            * @return the ordered range of matching message-boards messages
2598            */
2599            public static List<MBMessage> findByT_A(long threadId, boolean answer,
2600                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
2601                    return getPersistence()
2602                                       .findByT_A(threadId, answer, start, end, orderByComparator);
2603            }
2604    
2605            /**
2606            * Returns the first message-boards message in the ordered set where threadId = &#63; and answer = &#63;.
2607            *
2608            * @param threadId the thread ID
2609            * @param answer the answer
2610            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2611            * @return the first matching message-boards message
2612            * @throws NoSuchMessageException if a matching message-boards message could not be found
2613            */
2614            public static MBMessage findByT_A_First(long threadId, boolean answer,
2615                    OrderByComparator<MBMessage> orderByComparator)
2616                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2617                    return getPersistence()
2618                                       .findByT_A_First(threadId, answer, orderByComparator);
2619            }
2620    
2621            /**
2622            * Returns the first message-boards message in the ordered set where threadId = &#63; and answer = &#63;.
2623            *
2624            * @param threadId the thread ID
2625            * @param answer the answer
2626            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2627            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2628            */
2629            public static MBMessage fetchByT_A_First(long threadId, boolean answer,
2630                    OrderByComparator<MBMessage> orderByComparator) {
2631                    return getPersistence()
2632                                       .fetchByT_A_First(threadId, answer, orderByComparator);
2633            }
2634    
2635            /**
2636            * Returns the last message-boards message in the ordered set where threadId = &#63; and answer = &#63;.
2637            *
2638            * @param threadId the thread ID
2639            * @param answer the answer
2640            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2641            * @return the last matching message-boards message
2642            * @throws NoSuchMessageException if a matching message-boards message could not be found
2643            */
2644            public static MBMessage findByT_A_Last(long threadId, boolean answer,
2645                    OrderByComparator<MBMessage> orderByComparator)
2646                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2647                    return getPersistence()
2648                                       .findByT_A_Last(threadId, answer, orderByComparator);
2649            }
2650    
2651            /**
2652            * Returns the last message-boards message in the ordered set where threadId = &#63; and answer = &#63;.
2653            *
2654            * @param threadId the thread ID
2655            * @param answer the answer
2656            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2657            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2658            */
2659            public static MBMessage fetchByT_A_Last(long threadId, boolean answer,
2660                    OrderByComparator<MBMessage> orderByComparator) {
2661                    return getPersistence()
2662                                       .fetchByT_A_Last(threadId, answer, orderByComparator);
2663            }
2664    
2665            /**
2666            * Returns the message-boards messages before and after the current message-boards message in the ordered set where threadId = &#63; and answer = &#63;.
2667            *
2668            * @param messageId the primary key of the current message-boards message
2669            * @param threadId the thread ID
2670            * @param answer the answer
2671            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2672            * @return the previous, current, and next message-boards message
2673            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
2674            */
2675            public static MBMessage[] findByT_A_PrevAndNext(long messageId,
2676                    long threadId, boolean answer,
2677                    OrderByComparator<MBMessage> orderByComparator)
2678                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2679                    return getPersistence()
2680                                       .findByT_A_PrevAndNext(messageId, threadId, answer,
2681                            orderByComparator);
2682            }
2683    
2684            /**
2685            * Removes all the message-boards messages where threadId = &#63; and answer = &#63; from the database.
2686            *
2687            * @param threadId the thread ID
2688            * @param answer the answer
2689            */
2690            public static void removeByT_A(long threadId, boolean answer) {
2691                    getPersistence().removeByT_A(threadId, answer);
2692            }
2693    
2694            /**
2695            * Returns the number of message-boards messages where threadId = &#63; and answer = &#63;.
2696            *
2697            * @param threadId the thread ID
2698            * @param answer the answer
2699            * @return the number of matching message-boards messages
2700            */
2701            public static int countByT_A(long threadId, boolean answer) {
2702                    return getPersistence().countByT_A(threadId, answer);
2703            }
2704    
2705            /**
2706            * Returns all the message-boards messages where threadId = &#63; and status = &#63;.
2707            *
2708            * @param threadId the thread ID
2709            * @param status the status
2710            * @return the matching message-boards messages
2711            */
2712            public static List<MBMessage> findByT_S(long threadId, int status) {
2713                    return getPersistence().findByT_S(threadId, status);
2714            }
2715    
2716            /**
2717            * Returns a range of all the message-boards messages where threadId = &#63; and status = &#63;.
2718            *
2719            * <p>
2720            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2721            * </p>
2722            *
2723            * @param threadId the thread ID
2724            * @param status the status
2725            * @param start the lower bound of the range of message-boards messages
2726            * @param end the upper bound of the range of message-boards messages (not inclusive)
2727            * @return the range of matching message-boards messages
2728            */
2729            public static List<MBMessage> findByT_S(long threadId, int status,
2730                    int start, int end) {
2731                    return getPersistence().findByT_S(threadId, status, start, end);
2732            }
2733    
2734            /**
2735            * Returns an ordered range of all the message-boards messages where threadId = &#63; and status = &#63;.
2736            *
2737            * <p>
2738            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2739            * </p>
2740            *
2741            * @param threadId the thread ID
2742            * @param status the status
2743            * @param start the lower bound of the range of message-boards messages
2744            * @param end the upper bound of the range of message-boards messages (not inclusive)
2745            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2746            * @return the ordered range of matching message-boards messages
2747            */
2748            public static List<MBMessage> findByT_S(long threadId, int status,
2749                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
2750                    return getPersistence()
2751                                       .findByT_S(threadId, status, start, end, orderByComparator);
2752            }
2753    
2754            /**
2755            * Returns the first message-boards message in the ordered set where threadId = &#63; and status = &#63;.
2756            *
2757            * @param threadId the thread ID
2758            * @param status the status
2759            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2760            * @return the first matching message-boards message
2761            * @throws NoSuchMessageException if a matching message-boards message could not be found
2762            */
2763            public static MBMessage findByT_S_First(long threadId, int status,
2764                    OrderByComparator<MBMessage> orderByComparator)
2765                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2766                    return getPersistence()
2767                                       .findByT_S_First(threadId, status, orderByComparator);
2768            }
2769    
2770            /**
2771            * Returns the first message-boards message in the ordered set where threadId = &#63; and status = &#63;.
2772            *
2773            * @param threadId the thread ID
2774            * @param status the status
2775            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2776            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2777            */
2778            public static MBMessage fetchByT_S_First(long threadId, int status,
2779                    OrderByComparator<MBMessage> orderByComparator) {
2780                    return getPersistence()
2781                                       .fetchByT_S_First(threadId, status, orderByComparator);
2782            }
2783    
2784            /**
2785            * Returns the last message-boards message in the ordered set where threadId = &#63; and status = &#63;.
2786            *
2787            * @param threadId the thread ID
2788            * @param status the status
2789            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2790            * @return the last matching message-boards message
2791            * @throws NoSuchMessageException if a matching message-boards message could not be found
2792            */
2793            public static MBMessage findByT_S_Last(long threadId, int status,
2794                    OrderByComparator<MBMessage> orderByComparator)
2795                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2796                    return getPersistence()
2797                                       .findByT_S_Last(threadId, status, orderByComparator);
2798            }
2799    
2800            /**
2801            * Returns the last message-boards message in the ordered set where threadId = &#63; and status = &#63;.
2802            *
2803            * @param threadId the thread ID
2804            * @param status the status
2805            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2806            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2807            */
2808            public static MBMessage fetchByT_S_Last(long threadId, int status,
2809                    OrderByComparator<MBMessage> orderByComparator) {
2810                    return getPersistence()
2811                                       .fetchByT_S_Last(threadId, status, orderByComparator);
2812            }
2813    
2814            /**
2815            * Returns the message-boards messages before and after the current message-boards message in the ordered set where threadId = &#63; and status = &#63;.
2816            *
2817            * @param messageId the primary key of the current message-boards message
2818            * @param threadId the thread ID
2819            * @param status the status
2820            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2821            * @return the previous, current, and next message-boards message
2822            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
2823            */
2824            public static MBMessage[] findByT_S_PrevAndNext(long messageId,
2825                    long threadId, int status,
2826                    OrderByComparator<MBMessage> orderByComparator)
2827                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2828                    return getPersistence()
2829                                       .findByT_S_PrevAndNext(messageId, threadId, status,
2830                            orderByComparator);
2831            }
2832    
2833            /**
2834            * Removes all the message-boards messages where threadId = &#63; and status = &#63; from the database.
2835            *
2836            * @param threadId the thread ID
2837            * @param status the status
2838            */
2839            public static void removeByT_S(long threadId, int status) {
2840                    getPersistence().removeByT_S(threadId, status);
2841            }
2842    
2843            /**
2844            * Returns the number of message-boards messages where threadId = &#63; and status = &#63;.
2845            *
2846            * @param threadId the thread ID
2847            * @param status the status
2848            * @return the number of matching message-boards messages
2849            */
2850            public static int countByT_S(long threadId, int status) {
2851                    return getPersistence().countByT_S(threadId, status);
2852            }
2853    
2854            /**
2855            * Returns all the message-boards messages where threadId = &#63; and status = &#63;.
2856            *
2857            * @param threadId the thread ID
2858            * @param status the status
2859            * @return the matching message-boards messages
2860            */
2861            public static List<MBMessage> findByTR_S(long threadId, int status) {
2862                    return getPersistence().findByTR_S(threadId, status);
2863            }
2864    
2865            /**
2866            * Returns a range of all the message-boards messages where threadId = &#63; and status = &#63;.
2867            *
2868            * <p>
2869            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2870            * </p>
2871            *
2872            * @param threadId the thread ID
2873            * @param status the status
2874            * @param start the lower bound of the range of message-boards messages
2875            * @param end the upper bound of the range of message-boards messages (not inclusive)
2876            * @return the range of matching message-boards messages
2877            */
2878            public static List<MBMessage> findByTR_S(long threadId, int status,
2879                    int start, int end) {
2880                    return getPersistence().findByTR_S(threadId, status, start, end);
2881            }
2882    
2883            /**
2884            * Returns an ordered range of all the message-boards messages where threadId = &#63; and status = &#63;.
2885            *
2886            * <p>
2887            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
2888            * </p>
2889            *
2890            * @param threadId the thread ID
2891            * @param status the status
2892            * @param start the lower bound of the range of message-boards messages
2893            * @param end the upper bound of the range of message-boards messages (not inclusive)
2894            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
2895            * @return the ordered range of matching message-boards messages
2896            */
2897            public static List<MBMessage> findByTR_S(long threadId, int status,
2898                    int start, int end, OrderByComparator<MBMessage> orderByComparator) {
2899                    return getPersistence()
2900                                       .findByTR_S(threadId, status, start, end, orderByComparator);
2901            }
2902    
2903            /**
2904            * Returns the first message-boards message in the ordered set where threadId = &#63; and status = &#63;.
2905            *
2906            * @param threadId the thread ID
2907            * @param status the status
2908            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2909            * @return the first matching message-boards message
2910            * @throws NoSuchMessageException if a matching message-boards message could not be found
2911            */
2912            public static MBMessage findByTR_S_First(long threadId, int status,
2913                    OrderByComparator<MBMessage> orderByComparator)
2914                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2915                    return getPersistence()
2916                                       .findByTR_S_First(threadId, status, orderByComparator);
2917            }
2918    
2919            /**
2920            * Returns the first message-boards message in the ordered set where threadId = &#63; and status = &#63;.
2921            *
2922            * @param threadId the thread ID
2923            * @param status the status
2924            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2925            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2926            */
2927            public static MBMessage fetchByTR_S_First(long threadId, int status,
2928                    OrderByComparator<MBMessage> orderByComparator) {
2929                    return getPersistence()
2930                                       .fetchByTR_S_First(threadId, status, orderByComparator);
2931            }
2932    
2933            /**
2934            * Returns the last message-boards message in the ordered set where threadId = &#63; and status = &#63;.
2935            *
2936            * @param threadId the thread ID
2937            * @param status the status
2938            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2939            * @return the last matching message-boards message
2940            * @throws NoSuchMessageException if a matching message-boards message could not be found
2941            */
2942            public static MBMessage findByTR_S_Last(long threadId, int status,
2943                    OrderByComparator<MBMessage> orderByComparator)
2944                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2945                    return getPersistence()
2946                                       .findByTR_S_Last(threadId, status, orderByComparator);
2947            }
2948    
2949            /**
2950            * Returns the last message-boards message in the ordered set where threadId = &#63; and status = &#63;.
2951            *
2952            * @param threadId the thread ID
2953            * @param status the status
2954            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2955            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
2956            */
2957            public static MBMessage fetchByTR_S_Last(long threadId, int status,
2958                    OrderByComparator<MBMessage> orderByComparator) {
2959                    return getPersistence()
2960                                       .fetchByTR_S_Last(threadId, status, orderByComparator);
2961            }
2962    
2963            /**
2964            * Returns the message-boards messages before and after the current message-boards message in the ordered set where threadId = &#63; and status = &#63;.
2965            *
2966            * @param messageId the primary key of the current message-boards message
2967            * @param threadId the thread ID
2968            * @param status the status
2969            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
2970            * @return the previous, current, and next message-boards message
2971            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
2972            */
2973            public static MBMessage[] findByTR_S_PrevAndNext(long messageId,
2974                    long threadId, int status,
2975                    OrderByComparator<MBMessage> orderByComparator)
2976                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
2977                    return getPersistence()
2978                                       .findByTR_S_PrevAndNext(messageId, threadId, status,
2979                            orderByComparator);
2980            }
2981    
2982            /**
2983            * Removes all the message-boards messages where threadId = &#63; and status = &#63; from the database.
2984            *
2985            * @param threadId the thread ID
2986            * @param status the status
2987            */
2988            public static void removeByTR_S(long threadId, int status) {
2989                    getPersistence().removeByTR_S(threadId, status);
2990            }
2991    
2992            /**
2993            * Returns the number of message-boards messages where threadId = &#63; and status = &#63;.
2994            *
2995            * @param threadId the thread ID
2996            * @param status the status
2997            * @return the number of matching message-boards messages
2998            */
2999            public static int countByTR_S(long threadId, int status) {
3000                    return getPersistence().countByTR_S(threadId, status);
3001            }
3002    
3003            /**
3004            * Returns all the message-boards messages where groupId = &#63; and userId = &#63; and status = &#63;.
3005            *
3006            * @param groupId the group ID
3007            * @param userId the user ID
3008            * @param status the status
3009            * @return the matching message-boards messages
3010            */
3011            public static List<MBMessage> findByG_U_S(long groupId, long userId,
3012                    int status) {
3013                    return getPersistence().findByG_U_S(groupId, userId, status);
3014            }
3015    
3016            /**
3017            * Returns a range of all the message-boards messages where groupId = &#63; and userId = &#63; and status = &#63;.
3018            *
3019            * <p>
3020            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3021            * </p>
3022            *
3023            * @param groupId the group ID
3024            * @param userId the user ID
3025            * @param status the status
3026            * @param start the lower bound of the range of message-boards messages
3027            * @param end the upper bound of the range of message-boards messages (not inclusive)
3028            * @return the range of matching message-boards messages
3029            */
3030            public static List<MBMessage> findByG_U_S(long groupId, long userId,
3031                    int status, int start, int end) {
3032                    return getPersistence().findByG_U_S(groupId, userId, status, start, end);
3033            }
3034    
3035            /**
3036            * Returns an ordered range of all the message-boards messages where groupId = &#63; and userId = &#63; and status = &#63;.
3037            *
3038            * <p>
3039            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3040            * </p>
3041            *
3042            * @param groupId the group ID
3043            * @param userId the user ID
3044            * @param status the status
3045            * @param start the lower bound of the range of message-boards messages
3046            * @param end the upper bound of the range of message-boards messages (not inclusive)
3047            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
3048            * @return the ordered range of matching message-boards messages
3049            */
3050            public static List<MBMessage> findByG_U_S(long groupId, long userId,
3051                    int status, int start, int end,
3052                    OrderByComparator<MBMessage> orderByComparator) {
3053                    return getPersistence()
3054                                       .findByG_U_S(groupId, userId, status, start, end,
3055                            orderByComparator);
3056            }
3057    
3058            /**
3059            * Returns the first message-boards message in the ordered set where groupId = &#63; and userId = &#63; and status = &#63;.
3060            *
3061            * @param groupId the group ID
3062            * @param userId the user ID
3063            * @param status the status
3064            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3065            * @return the first matching message-boards message
3066            * @throws NoSuchMessageException if a matching message-boards message could not be found
3067            */
3068            public static MBMessage findByG_U_S_First(long groupId, long userId,
3069                    int status, OrderByComparator<MBMessage> orderByComparator)
3070                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3071                    return getPersistence()
3072                                       .findByG_U_S_First(groupId, userId, status, orderByComparator);
3073            }
3074    
3075            /**
3076            * Returns the first message-boards message in the ordered set where groupId = &#63; and userId = &#63; and status = &#63;.
3077            *
3078            * @param groupId the group ID
3079            * @param userId the user ID
3080            * @param status the status
3081            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3082            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
3083            */
3084            public static MBMessage fetchByG_U_S_First(long groupId, long userId,
3085                    int status, OrderByComparator<MBMessage> orderByComparator) {
3086                    return getPersistence()
3087                                       .fetchByG_U_S_First(groupId, userId, status,
3088                            orderByComparator);
3089            }
3090    
3091            /**
3092            * Returns the last message-boards message in the ordered set where groupId = &#63; and userId = &#63; and status = &#63;.
3093            *
3094            * @param groupId the group ID
3095            * @param userId the user ID
3096            * @param status the status
3097            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3098            * @return the last matching message-boards message
3099            * @throws NoSuchMessageException if a matching message-boards message could not be found
3100            */
3101            public static MBMessage findByG_U_S_Last(long groupId, long userId,
3102                    int status, OrderByComparator<MBMessage> orderByComparator)
3103                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3104                    return getPersistence()
3105                                       .findByG_U_S_Last(groupId, userId, status, orderByComparator);
3106            }
3107    
3108            /**
3109            * Returns the last message-boards message in the ordered set where groupId = &#63; and userId = &#63; and status = &#63;.
3110            *
3111            * @param groupId the group ID
3112            * @param userId the user ID
3113            * @param status the status
3114            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3115            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
3116            */
3117            public static MBMessage fetchByG_U_S_Last(long groupId, long userId,
3118                    int status, OrderByComparator<MBMessage> orderByComparator) {
3119                    return getPersistence()
3120                                       .fetchByG_U_S_Last(groupId, userId, status, orderByComparator);
3121            }
3122    
3123            /**
3124            * Returns the message-boards messages before and after the current message-boards message in the ordered set where groupId = &#63; and userId = &#63; and status = &#63;.
3125            *
3126            * @param messageId the primary key of the current message-boards message
3127            * @param groupId the group ID
3128            * @param userId the user ID
3129            * @param status the status
3130            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3131            * @return the previous, current, and next message-boards message
3132            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
3133            */
3134            public static MBMessage[] findByG_U_S_PrevAndNext(long messageId,
3135                    long groupId, long userId, int status,
3136                    OrderByComparator<MBMessage> orderByComparator)
3137                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3138                    return getPersistence()
3139                                       .findByG_U_S_PrevAndNext(messageId, groupId, userId, status,
3140                            orderByComparator);
3141            }
3142    
3143            /**
3144            * Returns all the message-boards messages that the user has permission to view where groupId = &#63; and userId = &#63; and status = &#63;.
3145            *
3146            * @param groupId the group ID
3147            * @param userId the user ID
3148            * @param status the status
3149            * @return the matching message-boards messages that the user has permission to view
3150            */
3151            public static List<MBMessage> filterFindByG_U_S(long groupId, long userId,
3152                    int status) {
3153                    return getPersistence().filterFindByG_U_S(groupId, userId, status);
3154            }
3155    
3156            /**
3157            * Returns a range of all the message-boards messages that the user has permission to view where groupId = &#63; and userId = &#63; and status = &#63;.
3158            *
3159            * <p>
3160            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3161            * </p>
3162            *
3163            * @param groupId the group ID
3164            * @param userId the user ID
3165            * @param status the status
3166            * @param start the lower bound of the range of message-boards messages
3167            * @param end the upper bound of the range of message-boards messages (not inclusive)
3168            * @return the range of matching message-boards messages that the user has permission to view
3169            */
3170            public static List<MBMessage> filterFindByG_U_S(long groupId, long userId,
3171                    int status, int start, int end) {
3172                    return getPersistence()
3173                                       .filterFindByG_U_S(groupId, userId, status, start, end);
3174            }
3175    
3176            /**
3177            * Returns an ordered range of all the message-boards messages that the user has permissions to view where groupId = &#63; and userId = &#63; and status = &#63;.
3178            *
3179            * <p>
3180            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3181            * </p>
3182            *
3183            * @param groupId the group ID
3184            * @param userId the user ID
3185            * @param status the status
3186            * @param start the lower bound of the range of message-boards messages
3187            * @param end the upper bound of the range of message-boards messages (not inclusive)
3188            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
3189            * @return the ordered range of matching message-boards messages that the user has permission to view
3190            */
3191            public static List<MBMessage> filterFindByG_U_S(long groupId, long userId,
3192                    int status, int start, int end,
3193                    OrderByComparator<MBMessage> orderByComparator) {
3194                    return getPersistence()
3195                                       .filterFindByG_U_S(groupId, userId, status, start, end,
3196                            orderByComparator);
3197            }
3198    
3199            /**
3200            * Returns the message-boards messages before and after the current message-boards message in the ordered set of message-boards messages that the user has permission to view where groupId = &#63; and userId = &#63; and status = &#63;.
3201            *
3202            * @param messageId the primary key of the current message-boards message
3203            * @param groupId the group ID
3204            * @param userId the user ID
3205            * @param status the status
3206            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3207            * @return the previous, current, and next message-boards message
3208            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
3209            */
3210            public static MBMessage[] filterFindByG_U_S_PrevAndNext(long messageId,
3211                    long groupId, long userId, int status,
3212                    OrderByComparator<MBMessage> orderByComparator)
3213                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3214                    return getPersistence()
3215                                       .filterFindByG_U_S_PrevAndNext(messageId, groupId, userId,
3216                            status, orderByComparator);
3217            }
3218    
3219            /**
3220            * Removes all the message-boards messages where groupId = &#63; and userId = &#63; and status = &#63; from the database.
3221            *
3222            * @param groupId the group ID
3223            * @param userId the user ID
3224            * @param status the status
3225            */
3226            public static void removeByG_U_S(long groupId, long userId, int status) {
3227                    getPersistence().removeByG_U_S(groupId, userId, status);
3228            }
3229    
3230            /**
3231            * Returns the number of message-boards messages where groupId = &#63; and userId = &#63; and status = &#63;.
3232            *
3233            * @param groupId the group ID
3234            * @param userId the user ID
3235            * @param status the status
3236            * @return the number of matching message-boards messages
3237            */
3238            public static int countByG_U_S(long groupId, long userId, int status) {
3239                    return getPersistence().countByG_U_S(groupId, userId, status);
3240            }
3241    
3242            /**
3243            * Returns the number of message-boards messages that the user has permission to view where groupId = &#63; and userId = &#63; and status = &#63;.
3244            *
3245            * @param groupId the group ID
3246            * @param userId the user ID
3247            * @param status the status
3248            * @return the number of matching message-boards messages that the user has permission to view
3249            */
3250            public static int filterCountByG_U_S(long groupId, long userId, int status) {
3251                    return getPersistence().filterCountByG_U_S(groupId, userId, status);
3252            }
3253    
3254            /**
3255            * Returns all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3256            *
3257            * @param groupId the group ID
3258            * @param categoryId the category ID
3259            * @param threadId the thread ID
3260            * @return the matching message-boards messages
3261            */
3262            public static List<MBMessage> findByG_C_T(long groupId, long categoryId,
3263                    long threadId) {
3264                    return getPersistence().findByG_C_T(groupId, categoryId, threadId);
3265            }
3266    
3267            /**
3268            * Returns a range of all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3269            *
3270            * <p>
3271            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3272            * </p>
3273            *
3274            * @param groupId the group ID
3275            * @param categoryId the category ID
3276            * @param threadId the thread ID
3277            * @param start the lower bound of the range of message-boards messages
3278            * @param end the upper bound of the range of message-boards messages (not inclusive)
3279            * @return the range of matching message-boards messages
3280            */
3281            public static List<MBMessage> findByG_C_T(long groupId, long categoryId,
3282                    long threadId, int start, int end) {
3283                    return getPersistence()
3284                                       .findByG_C_T(groupId, categoryId, threadId, start, end);
3285            }
3286    
3287            /**
3288            * Returns an ordered range of all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3289            *
3290            * <p>
3291            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3292            * </p>
3293            *
3294            * @param groupId the group ID
3295            * @param categoryId the category ID
3296            * @param threadId the thread ID
3297            * @param start the lower bound of the range of message-boards messages
3298            * @param end the upper bound of the range of message-boards messages (not inclusive)
3299            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
3300            * @return the ordered range of matching message-boards messages
3301            */
3302            public static List<MBMessage> findByG_C_T(long groupId, long categoryId,
3303                    long threadId, int start, int end,
3304                    OrderByComparator<MBMessage> orderByComparator) {
3305                    return getPersistence()
3306                                       .findByG_C_T(groupId, categoryId, threadId, start, end,
3307                            orderByComparator);
3308            }
3309    
3310            /**
3311            * Returns the first message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3312            *
3313            * @param groupId the group ID
3314            * @param categoryId the category ID
3315            * @param threadId the thread ID
3316            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3317            * @return the first matching message-boards message
3318            * @throws NoSuchMessageException if a matching message-boards message could not be found
3319            */
3320            public static MBMessage findByG_C_T_First(long groupId, long categoryId,
3321                    long threadId, OrderByComparator<MBMessage> orderByComparator)
3322                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3323                    return getPersistence()
3324                                       .findByG_C_T_First(groupId, categoryId, threadId,
3325                            orderByComparator);
3326            }
3327    
3328            /**
3329            * Returns the first message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3330            *
3331            * @param groupId the group ID
3332            * @param categoryId the category ID
3333            * @param threadId the thread ID
3334            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3335            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
3336            */
3337            public static MBMessage fetchByG_C_T_First(long groupId, long categoryId,
3338                    long threadId, OrderByComparator<MBMessage> orderByComparator) {
3339                    return getPersistence()
3340                                       .fetchByG_C_T_First(groupId, categoryId, threadId,
3341                            orderByComparator);
3342            }
3343    
3344            /**
3345            * Returns the last message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3346            *
3347            * @param groupId the group ID
3348            * @param categoryId the category ID
3349            * @param threadId the thread ID
3350            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3351            * @return the last matching message-boards message
3352            * @throws NoSuchMessageException if a matching message-boards message could not be found
3353            */
3354            public static MBMessage findByG_C_T_Last(long groupId, long categoryId,
3355                    long threadId, OrderByComparator<MBMessage> orderByComparator)
3356                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3357                    return getPersistence()
3358                                       .findByG_C_T_Last(groupId, categoryId, threadId,
3359                            orderByComparator);
3360            }
3361    
3362            /**
3363            * Returns the last message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3364            *
3365            * @param groupId the group ID
3366            * @param categoryId the category ID
3367            * @param threadId the thread ID
3368            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3369            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
3370            */
3371            public static MBMessage fetchByG_C_T_Last(long groupId, long categoryId,
3372                    long threadId, OrderByComparator<MBMessage> orderByComparator) {
3373                    return getPersistence()
3374                                       .fetchByG_C_T_Last(groupId, categoryId, threadId,
3375                            orderByComparator);
3376            }
3377    
3378            /**
3379            * Returns the message-boards messages before and after the current message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3380            *
3381            * @param messageId the primary key of the current message-boards message
3382            * @param groupId the group ID
3383            * @param categoryId the category ID
3384            * @param threadId the thread ID
3385            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3386            * @return the previous, current, and next message-boards message
3387            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
3388            */
3389            public static MBMessage[] findByG_C_T_PrevAndNext(long messageId,
3390                    long groupId, long categoryId, long threadId,
3391                    OrderByComparator<MBMessage> orderByComparator)
3392                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3393                    return getPersistence()
3394                                       .findByG_C_T_PrevAndNext(messageId, groupId, categoryId,
3395                            threadId, orderByComparator);
3396            }
3397    
3398            /**
3399            * Returns all the message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3400            *
3401            * @param groupId the group ID
3402            * @param categoryId the category ID
3403            * @param threadId the thread ID
3404            * @return the matching message-boards messages that the user has permission to view
3405            */
3406            public static List<MBMessage> filterFindByG_C_T(long groupId,
3407                    long categoryId, long threadId) {
3408                    return getPersistence().filterFindByG_C_T(groupId, categoryId, threadId);
3409            }
3410    
3411            /**
3412            * Returns a range of all the message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3413            *
3414            * <p>
3415            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3416            * </p>
3417            *
3418            * @param groupId the group ID
3419            * @param categoryId the category ID
3420            * @param threadId the thread ID
3421            * @param start the lower bound of the range of message-boards messages
3422            * @param end the upper bound of the range of message-boards messages (not inclusive)
3423            * @return the range of matching message-boards messages that the user has permission to view
3424            */
3425            public static List<MBMessage> filterFindByG_C_T(long groupId,
3426                    long categoryId, long threadId, int start, int end) {
3427                    return getPersistence()
3428                                       .filterFindByG_C_T(groupId, categoryId, threadId, start, end);
3429            }
3430    
3431            /**
3432            * Returns an ordered range of all the message-boards messages that the user has permissions to view where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3433            *
3434            * <p>
3435            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3436            * </p>
3437            *
3438            * @param groupId the group ID
3439            * @param categoryId the category ID
3440            * @param threadId the thread ID
3441            * @param start the lower bound of the range of message-boards messages
3442            * @param end the upper bound of the range of message-boards messages (not inclusive)
3443            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
3444            * @return the ordered range of matching message-boards messages that the user has permission to view
3445            */
3446            public static List<MBMessage> filterFindByG_C_T(long groupId,
3447                    long categoryId, long threadId, int start, int end,
3448                    OrderByComparator<MBMessage> orderByComparator) {
3449                    return getPersistence()
3450                                       .filterFindByG_C_T(groupId, categoryId, threadId, start,
3451                            end, orderByComparator);
3452            }
3453    
3454            /**
3455            * Returns the message-boards messages before and after the current message-boards message in the ordered set of message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3456            *
3457            * @param messageId the primary key of the current message-boards message
3458            * @param groupId the group ID
3459            * @param categoryId the category ID
3460            * @param threadId the thread ID
3461            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3462            * @return the previous, current, and next message-boards message
3463            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
3464            */
3465            public static MBMessage[] filterFindByG_C_T_PrevAndNext(long messageId,
3466                    long groupId, long categoryId, long threadId,
3467                    OrderByComparator<MBMessage> orderByComparator)
3468                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3469                    return getPersistence()
3470                                       .filterFindByG_C_T_PrevAndNext(messageId, groupId,
3471                            categoryId, threadId, orderByComparator);
3472            }
3473    
3474            /**
3475            * Removes all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63; from the database.
3476            *
3477            * @param groupId the group ID
3478            * @param categoryId the category ID
3479            * @param threadId the thread ID
3480            */
3481            public static void removeByG_C_T(long groupId, long categoryId,
3482                    long threadId) {
3483                    getPersistence().removeByG_C_T(groupId, categoryId, threadId);
3484            }
3485    
3486            /**
3487            * Returns the number of message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3488            *
3489            * @param groupId the group ID
3490            * @param categoryId the category ID
3491            * @param threadId the thread ID
3492            * @return the number of matching message-boards messages
3493            */
3494            public static int countByG_C_T(long groupId, long categoryId, long threadId) {
3495                    return getPersistence().countByG_C_T(groupId, categoryId, threadId);
3496            }
3497    
3498            /**
3499            * Returns the number of message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63;.
3500            *
3501            * @param groupId the group ID
3502            * @param categoryId the category ID
3503            * @param threadId the thread ID
3504            * @return the number of matching message-boards messages that the user has permission to view
3505            */
3506            public static int filterCountByG_C_T(long groupId, long categoryId,
3507                    long threadId) {
3508                    return getPersistence().filterCountByG_C_T(groupId, categoryId, threadId);
3509            }
3510    
3511            /**
3512            * Returns all the message-boards messages where groupId = &#63; and categoryId = &#63; and status = &#63;.
3513            *
3514            * @param groupId the group ID
3515            * @param categoryId the category ID
3516            * @param status the status
3517            * @return the matching message-boards messages
3518            */
3519            public static List<MBMessage> findByG_C_S(long groupId, long categoryId,
3520                    int status) {
3521                    return getPersistence().findByG_C_S(groupId, categoryId, status);
3522            }
3523    
3524            /**
3525            * Returns a range of all the message-boards messages where groupId = &#63; and categoryId = &#63; and status = &#63;.
3526            *
3527            * <p>
3528            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3529            * </p>
3530            *
3531            * @param groupId the group ID
3532            * @param categoryId the category ID
3533            * @param status the status
3534            * @param start the lower bound of the range of message-boards messages
3535            * @param end the upper bound of the range of message-boards messages (not inclusive)
3536            * @return the range of matching message-boards messages
3537            */
3538            public static List<MBMessage> findByG_C_S(long groupId, long categoryId,
3539                    int status, int start, int end) {
3540                    return getPersistence()
3541                                       .findByG_C_S(groupId, categoryId, status, start, end);
3542            }
3543    
3544            /**
3545            * Returns an ordered range of all the message-boards messages where groupId = &#63; and categoryId = &#63; and status = &#63;.
3546            *
3547            * <p>
3548            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3549            * </p>
3550            *
3551            * @param groupId the group ID
3552            * @param categoryId the category ID
3553            * @param status the status
3554            * @param start the lower bound of the range of message-boards messages
3555            * @param end the upper bound of the range of message-boards messages (not inclusive)
3556            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
3557            * @return the ordered range of matching message-boards messages
3558            */
3559            public static List<MBMessage> findByG_C_S(long groupId, long categoryId,
3560                    int status, int start, int end,
3561                    OrderByComparator<MBMessage> orderByComparator) {
3562                    return getPersistence()
3563                                       .findByG_C_S(groupId, categoryId, status, start, end,
3564                            orderByComparator);
3565            }
3566    
3567            /**
3568            * Returns the first message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and status = &#63;.
3569            *
3570            * @param groupId the group ID
3571            * @param categoryId the category ID
3572            * @param status the status
3573            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3574            * @return the first matching message-boards message
3575            * @throws NoSuchMessageException if a matching message-boards message could not be found
3576            */
3577            public static MBMessage findByG_C_S_First(long groupId, long categoryId,
3578                    int status, OrderByComparator<MBMessage> orderByComparator)
3579                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3580                    return getPersistence()
3581                                       .findByG_C_S_First(groupId, categoryId, status,
3582                            orderByComparator);
3583            }
3584    
3585            /**
3586            * Returns the first message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and status = &#63;.
3587            *
3588            * @param groupId the group ID
3589            * @param categoryId the category ID
3590            * @param status the status
3591            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3592            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
3593            */
3594            public static MBMessage fetchByG_C_S_First(long groupId, long categoryId,
3595                    int status, OrderByComparator<MBMessage> orderByComparator) {
3596                    return getPersistence()
3597                                       .fetchByG_C_S_First(groupId, categoryId, status,
3598                            orderByComparator);
3599            }
3600    
3601            /**
3602            * Returns the last message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and status = &#63;.
3603            *
3604            * @param groupId the group ID
3605            * @param categoryId the category ID
3606            * @param status the status
3607            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3608            * @return the last matching message-boards message
3609            * @throws NoSuchMessageException if a matching message-boards message could not be found
3610            */
3611            public static MBMessage findByG_C_S_Last(long groupId, long categoryId,
3612                    int status, OrderByComparator<MBMessage> orderByComparator)
3613                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3614                    return getPersistence()
3615                                       .findByG_C_S_Last(groupId, categoryId, status,
3616                            orderByComparator);
3617            }
3618    
3619            /**
3620            * Returns the last message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and status = &#63;.
3621            *
3622            * @param groupId the group ID
3623            * @param categoryId the category ID
3624            * @param status the status
3625            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3626            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
3627            */
3628            public static MBMessage fetchByG_C_S_Last(long groupId, long categoryId,
3629                    int status, OrderByComparator<MBMessage> orderByComparator) {
3630                    return getPersistence()
3631                                       .fetchByG_C_S_Last(groupId, categoryId, status,
3632                            orderByComparator);
3633            }
3634    
3635            /**
3636            * Returns the message-boards messages before and after the current message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and status = &#63;.
3637            *
3638            * @param messageId the primary key of the current message-boards message
3639            * @param groupId the group ID
3640            * @param categoryId the category ID
3641            * @param status the status
3642            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3643            * @return the previous, current, and next message-boards message
3644            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
3645            */
3646            public static MBMessage[] findByG_C_S_PrevAndNext(long messageId,
3647                    long groupId, long categoryId, int status,
3648                    OrderByComparator<MBMessage> orderByComparator)
3649                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3650                    return getPersistence()
3651                                       .findByG_C_S_PrevAndNext(messageId, groupId, categoryId,
3652                            status, orderByComparator);
3653            }
3654    
3655            /**
3656            * Returns all the message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and status = &#63;.
3657            *
3658            * @param groupId the group ID
3659            * @param categoryId the category ID
3660            * @param status the status
3661            * @return the matching message-boards messages that the user has permission to view
3662            */
3663            public static List<MBMessage> filterFindByG_C_S(long groupId,
3664                    long categoryId, int status) {
3665                    return getPersistence().filterFindByG_C_S(groupId, categoryId, status);
3666            }
3667    
3668            /**
3669            * Returns a range of all the message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and status = &#63;.
3670            *
3671            * <p>
3672            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3673            * </p>
3674            *
3675            * @param groupId the group ID
3676            * @param categoryId the category ID
3677            * @param status the status
3678            * @param start the lower bound of the range of message-boards messages
3679            * @param end the upper bound of the range of message-boards messages (not inclusive)
3680            * @return the range of matching message-boards messages that the user has permission to view
3681            */
3682            public static List<MBMessage> filterFindByG_C_S(long groupId,
3683                    long categoryId, int status, int start, int end) {
3684                    return getPersistence()
3685                                       .filterFindByG_C_S(groupId, categoryId, status, start, end);
3686            }
3687    
3688            /**
3689            * Returns an ordered range of all the message-boards messages that the user has permissions to view where groupId = &#63; and categoryId = &#63; and status = &#63;.
3690            *
3691            * <p>
3692            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3693            * </p>
3694            *
3695            * @param groupId the group ID
3696            * @param categoryId the category ID
3697            * @param status the status
3698            * @param start the lower bound of the range of message-boards messages
3699            * @param end the upper bound of the range of message-boards messages (not inclusive)
3700            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
3701            * @return the ordered range of matching message-boards messages that the user has permission to view
3702            */
3703            public static List<MBMessage> filterFindByG_C_S(long groupId,
3704                    long categoryId, int status, int start, int end,
3705                    OrderByComparator<MBMessage> orderByComparator) {
3706                    return getPersistence()
3707                                       .filterFindByG_C_S(groupId, categoryId, status, start, end,
3708                            orderByComparator);
3709            }
3710    
3711            /**
3712            * Returns the message-boards messages before and after the current message-boards message in the ordered set of message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and status = &#63;.
3713            *
3714            * @param messageId the primary key of the current message-boards message
3715            * @param groupId the group ID
3716            * @param categoryId the category ID
3717            * @param status the status
3718            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3719            * @return the previous, current, and next message-boards message
3720            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
3721            */
3722            public static MBMessage[] filterFindByG_C_S_PrevAndNext(long messageId,
3723                    long groupId, long categoryId, int status,
3724                    OrderByComparator<MBMessage> orderByComparator)
3725                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3726                    return getPersistence()
3727                                       .filterFindByG_C_S_PrevAndNext(messageId, groupId,
3728                            categoryId, status, orderByComparator);
3729            }
3730    
3731            /**
3732            * Removes all the message-boards messages where groupId = &#63; and categoryId = &#63; and status = &#63; from the database.
3733            *
3734            * @param groupId the group ID
3735            * @param categoryId the category ID
3736            * @param status the status
3737            */
3738            public static void removeByG_C_S(long groupId, long categoryId, int status) {
3739                    getPersistence().removeByG_C_S(groupId, categoryId, status);
3740            }
3741    
3742            /**
3743            * Returns the number of message-boards messages where groupId = &#63; and categoryId = &#63; and status = &#63;.
3744            *
3745            * @param groupId the group ID
3746            * @param categoryId the category ID
3747            * @param status the status
3748            * @return the number of matching message-boards messages
3749            */
3750            public static int countByG_C_S(long groupId, long categoryId, int status) {
3751                    return getPersistence().countByG_C_S(groupId, categoryId, status);
3752            }
3753    
3754            /**
3755            * Returns the number of message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and status = &#63;.
3756            *
3757            * @param groupId the group ID
3758            * @param categoryId the category ID
3759            * @param status the status
3760            * @return the number of matching message-boards messages that the user has permission to view
3761            */
3762            public static int filterCountByG_C_S(long groupId, long categoryId,
3763                    int status) {
3764                    return getPersistence().filterCountByG_C_S(groupId, categoryId, status);
3765            }
3766    
3767            /**
3768            * Returns all the message-boards messages where userId = &#63; and classNameId = &#63; and classPK = &#63;.
3769            *
3770            * @param userId the user ID
3771            * @param classNameId the class name ID
3772            * @param classPK the class p k
3773            * @return the matching message-boards messages
3774            */
3775            public static List<MBMessage> findByU_C_C(long userId, long classNameId,
3776                    long classPK) {
3777                    return getPersistence().findByU_C_C(userId, classNameId, classPK);
3778            }
3779    
3780            /**
3781            * Returns a range of all the message-boards messages where userId = &#63; and classNameId = &#63; and classPK = &#63;.
3782            *
3783            * <p>
3784            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3785            * </p>
3786            *
3787            * @param userId the user ID
3788            * @param classNameId the class name ID
3789            * @param classPK the class p k
3790            * @param start the lower bound of the range of message-boards messages
3791            * @param end the upper bound of the range of message-boards messages (not inclusive)
3792            * @return the range of matching message-boards messages
3793            */
3794            public static List<MBMessage> findByU_C_C(long userId, long classNameId,
3795                    long classPK, int start, int end) {
3796                    return getPersistence()
3797                                       .findByU_C_C(userId, classNameId, classPK, start, end);
3798            }
3799    
3800            /**
3801            * Returns an ordered range of all the message-boards messages where userId = &#63; and classNameId = &#63; and classPK = &#63;.
3802            *
3803            * <p>
3804            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3805            * </p>
3806            *
3807            * @param userId the user ID
3808            * @param classNameId the class name ID
3809            * @param classPK the class p k
3810            * @param start the lower bound of the range of message-boards messages
3811            * @param end the upper bound of the range of message-boards messages (not inclusive)
3812            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
3813            * @return the ordered range of matching message-boards messages
3814            */
3815            public static List<MBMessage> findByU_C_C(long userId, long classNameId,
3816                    long classPK, int start, int end,
3817                    OrderByComparator<MBMessage> orderByComparator) {
3818                    return getPersistence()
3819                                       .findByU_C_C(userId, classNameId, classPK, start, end,
3820                            orderByComparator);
3821            }
3822    
3823            /**
3824            * Returns the first message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and classPK = &#63;.
3825            *
3826            * @param userId the user ID
3827            * @param classNameId the class name ID
3828            * @param classPK the class p k
3829            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3830            * @return the first matching message-boards message
3831            * @throws NoSuchMessageException if a matching message-boards message could not be found
3832            */
3833            public static MBMessage findByU_C_C_First(long userId, long classNameId,
3834                    long classPK, OrderByComparator<MBMessage> orderByComparator)
3835                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3836                    return getPersistence()
3837                                       .findByU_C_C_First(userId, classNameId, classPK,
3838                            orderByComparator);
3839            }
3840    
3841            /**
3842            * Returns the first message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and classPK = &#63;.
3843            *
3844            * @param userId the user ID
3845            * @param classNameId the class name ID
3846            * @param classPK the class p k
3847            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3848            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
3849            */
3850            public static MBMessage fetchByU_C_C_First(long userId, long classNameId,
3851                    long classPK, OrderByComparator<MBMessage> orderByComparator) {
3852                    return getPersistence()
3853                                       .fetchByU_C_C_First(userId, classNameId, classPK,
3854                            orderByComparator);
3855            }
3856    
3857            /**
3858            * Returns the last message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and classPK = &#63;.
3859            *
3860            * @param userId the user ID
3861            * @param classNameId the class name ID
3862            * @param classPK the class p k
3863            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3864            * @return the last matching message-boards message
3865            * @throws NoSuchMessageException if a matching message-boards message could not be found
3866            */
3867            public static MBMessage findByU_C_C_Last(long userId, long classNameId,
3868                    long classPK, OrderByComparator<MBMessage> orderByComparator)
3869                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3870                    return getPersistence()
3871                                       .findByU_C_C_Last(userId, classNameId, classPK,
3872                            orderByComparator);
3873            }
3874    
3875            /**
3876            * Returns the last message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and classPK = &#63;.
3877            *
3878            * @param userId the user ID
3879            * @param classNameId the class name ID
3880            * @param classPK the class p k
3881            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3882            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
3883            */
3884            public static MBMessage fetchByU_C_C_Last(long userId, long classNameId,
3885                    long classPK, OrderByComparator<MBMessage> orderByComparator) {
3886                    return getPersistence()
3887                                       .fetchByU_C_C_Last(userId, classNameId, classPK,
3888                            orderByComparator);
3889            }
3890    
3891            /**
3892            * Returns the message-boards messages before and after the current message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and classPK = &#63;.
3893            *
3894            * @param messageId the primary key of the current message-boards message
3895            * @param userId the user ID
3896            * @param classNameId the class name ID
3897            * @param classPK the class p k
3898            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3899            * @return the previous, current, and next message-boards message
3900            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
3901            */
3902            public static MBMessage[] findByU_C_C_PrevAndNext(long messageId,
3903                    long userId, long classNameId, long classPK,
3904                    OrderByComparator<MBMessage> orderByComparator)
3905                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
3906                    return getPersistence()
3907                                       .findByU_C_C_PrevAndNext(messageId, userId, classNameId,
3908                            classPK, orderByComparator);
3909            }
3910    
3911            /**
3912            * Removes all the message-boards messages where userId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
3913            *
3914            * @param userId the user ID
3915            * @param classNameId the class name ID
3916            * @param classPK the class p k
3917            */
3918            public static void removeByU_C_C(long userId, long classNameId, long classPK) {
3919                    getPersistence().removeByU_C_C(userId, classNameId, classPK);
3920            }
3921    
3922            /**
3923            * Returns the number of message-boards messages where userId = &#63; and classNameId = &#63; and classPK = &#63;.
3924            *
3925            * @param userId the user ID
3926            * @param classNameId the class name ID
3927            * @param classPK the class p k
3928            * @return the number of matching message-boards messages
3929            */
3930            public static int countByU_C_C(long userId, long classNameId, long classPK) {
3931                    return getPersistence().countByU_C_C(userId, classNameId, classPK);
3932            }
3933    
3934            /**
3935            * Returns all the message-boards messages where userId = &#63; and classNameId = &#63; and status = &#63;.
3936            *
3937            * @param userId the user ID
3938            * @param classNameId the class name ID
3939            * @param status the status
3940            * @return the matching message-boards messages
3941            */
3942            public static List<MBMessage> findByU_C_S(long userId, long classNameId,
3943                    int status) {
3944                    return getPersistence().findByU_C_S(userId, classNameId, status);
3945            }
3946    
3947            /**
3948            * Returns a range of all the message-boards messages where userId = &#63; and classNameId = &#63; and status = &#63;.
3949            *
3950            * <p>
3951            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3952            * </p>
3953            *
3954            * @param userId the user ID
3955            * @param classNameId the class name ID
3956            * @param status the status
3957            * @param start the lower bound of the range of message-boards messages
3958            * @param end the upper bound of the range of message-boards messages (not inclusive)
3959            * @return the range of matching message-boards messages
3960            */
3961            public static List<MBMessage> findByU_C_S(long userId, long classNameId,
3962                    int status, int start, int end) {
3963                    return getPersistence()
3964                                       .findByU_C_S(userId, classNameId, status, start, end);
3965            }
3966    
3967            /**
3968            * Returns an ordered range of all the message-boards messages where userId = &#63; and classNameId = &#63; and status = &#63;.
3969            *
3970            * <p>
3971            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
3972            * </p>
3973            *
3974            * @param userId the user ID
3975            * @param classNameId the class name ID
3976            * @param status the status
3977            * @param start the lower bound of the range of message-boards messages
3978            * @param end the upper bound of the range of message-boards messages (not inclusive)
3979            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
3980            * @return the ordered range of matching message-boards messages
3981            */
3982            public static List<MBMessage> findByU_C_S(long userId, long classNameId,
3983                    int status, int start, int end,
3984                    OrderByComparator<MBMessage> orderByComparator) {
3985                    return getPersistence()
3986                                       .findByU_C_S(userId, classNameId, status, start, end,
3987                            orderByComparator);
3988            }
3989    
3990            /**
3991            * Returns the first message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and status = &#63;.
3992            *
3993            * @param userId the user ID
3994            * @param classNameId the class name ID
3995            * @param status the status
3996            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
3997            * @return the first matching message-boards message
3998            * @throws NoSuchMessageException if a matching message-boards message could not be found
3999            */
4000            public static MBMessage findByU_C_S_First(long userId, long classNameId,
4001                    int status, OrderByComparator<MBMessage> orderByComparator)
4002                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4003                    return getPersistence()
4004                                       .findByU_C_S_First(userId, classNameId, status,
4005                            orderByComparator);
4006            }
4007    
4008            /**
4009            * Returns the first message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and status = &#63;.
4010            *
4011            * @param userId the user ID
4012            * @param classNameId the class name ID
4013            * @param status the status
4014            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4015            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
4016            */
4017            public static MBMessage fetchByU_C_S_First(long userId, long classNameId,
4018                    int status, OrderByComparator<MBMessage> orderByComparator) {
4019                    return getPersistence()
4020                                       .fetchByU_C_S_First(userId, classNameId, status,
4021                            orderByComparator);
4022            }
4023    
4024            /**
4025            * Returns the last message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and status = &#63;.
4026            *
4027            * @param userId the user ID
4028            * @param classNameId the class name ID
4029            * @param status the status
4030            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4031            * @return the last matching message-boards message
4032            * @throws NoSuchMessageException if a matching message-boards message could not be found
4033            */
4034            public static MBMessage findByU_C_S_Last(long userId, long classNameId,
4035                    int status, OrderByComparator<MBMessage> orderByComparator)
4036                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4037                    return getPersistence()
4038                                       .findByU_C_S_Last(userId, classNameId, status,
4039                            orderByComparator);
4040            }
4041    
4042            /**
4043            * Returns the last message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and status = &#63;.
4044            *
4045            * @param userId the user ID
4046            * @param classNameId the class name ID
4047            * @param status the status
4048            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4049            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
4050            */
4051            public static MBMessage fetchByU_C_S_Last(long userId, long classNameId,
4052                    int status, OrderByComparator<MBMessage> orderByComparator) {
4053                    return getPersistence()
4054                                       .fetchByU_C_S_Last(userId, classNameId, status,
4055                            orderByComparator);
4056            }
4057    
4058            /**
4059            * Returns the message-boards messages before and after the current message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and status = &#63;.
4060            *
4061            * @param messageId the primary key of the current message-boards message
4062            * @param userId the user ID
4063            * @param classNameId the class name ID
4064            * @param status the status
4065            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4066            * @return the previous, current, and next message-boards message
4067            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
4068            */
4069            public static MBMessage[] findByU_C_S_PrevAndNext(long messageId,
4070                    long userId, long classNameId, int status,
4071                    OrderByComparator<MBMessage> orderByComparator)
4072                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4073                    return getPersistence()
4074                                       .findByU_C_S_PrevAndNext(messageId, userId, classNameId,
4075                            status, orderByComparator);
4076            }
4077    
4078            /**
4079            * Returns all the message-boards messages where userId = &#63; and classNameId = any &#63; and status = &#63;.
4080            *
4081            * <p>
4082            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4083            * </p>
4084            *
4085            * @param userId the user ID
4086            * @param classNameIds the class name IDs
4087            * @param status the status
4088            * @return the matching message-boards messages
4089            */
4090            public static List<MBMessage> findByU_C_S(long userId, long[] classNameIds,
4091                    int status) {
4092                    return getPersistence().findByU_C_S(userId, classNameIds, status);
4093            }
4094    
4095            /**
4096            * Returns a range of all the message-boards messages where userId = &#63; and classNameId = any &#63; and status = &#63;.
4097            *
4098            * <p>
4099            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4100            * </p>
4101            *
4102            * @param userId the user ID
4103            * @param classNameIds the class name IDs
4104            * @param status the status
4105            * @param start the lower bound of the range of message-boards messages
4106            * @param end the upper bound of the range of message-boards messages (not inclusive)
4107            * @return the range of matching message-boards messages
4108            */
4109            public static List<MBMessage> findByU_C_S(long userId, long[] classNameIds,
4110                    int status, int start, int end) {
4111                    return getPersistence()
4112                                       .findByU_C_S(userId, classNameIds, status, start, end);
4113            }
4114    
4115            /**
4116            * Returns an ordered range of all the message-boards messages where userId = &#63; and classNameId = any &#63; and status = &#63;.
4117            *
4118            * <p>
4119            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4120            * </p>
4121            *
4122            * @param userId the user ID
4123            * @param classNameIds the class name IDs
4124            * @param status the status
4125            * @param start the lower bound of the range of message-boards messages
4126            * @param end the upper bound of the range of message-boards messages (not inclusive)
4127            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
4128            * @return the ordered range of matching message-boards messages
4129            */
4130            public static List<MBMessage> findByU_C_S(long userId, long[] classNameIds,
4131                    int status, int start, int end,
4132                    OrderByComparator<MBMessage> orderByComparator) {
4133                    return getPersistence()
4134                                       .findByU_C_S(userId, classNameIds, status, start, end,
4135                            orderByComparator);
4136            }
4137    
4138            /**
4139            * Removes all the message-boards messages where userId = &#63; and classNameId = &#63; and status = &#63; from the database.
4140            *
4141            * @param userId the user ID
4142            * @param classNameId the class name ID
4143            * @param status the status
4144            */
4145            public static void removeByU_C_S(long userId, long classNameId, int status) {
4146                    getPersistence().removeByU_C_S(userId, classNameId, status);
4147            }
4148    
4149            /**
4150            * Returns the number of message-boards messages where userId = &#63; and classNameId = &#63; and status = &#63;.
4151            *
4152            * @param userId the user ID
4153            * @param classNameId the class name ID
4154            * @param status the status
4155            * @return the number of matching message-boards messages
4156            */
4157            public static int countByU_C_S(long userId, long classNameId, int status) {
4158                    return getPersistence().countByU_C_S(userId, classNameId, status);
4159            }
4160    
4161            /**
4162            * Returns the number of message-boards messages where userId = &#63; and classNameId = any &#63; and status = &#63;.
4163            *
4164            * @param userId the user ID
4165            * @param classNameIds the class name IDs
4166            * @param status the status
4167            * @return the number of matching message-boards messages
4168            */
4169            public static int countByU_C_S(long userId, long[] classNameIds, int status) {
4170                    return getPersistence().countByU_C_S(userId, classNameIds, status);
4171            }
4172    
4173            /**
4174            * Returns all the message-boards messages where classNameId = &#63; and classPK = &#63; and status = &#63;.
4175            *
4176            * @param classNameId the class name ID
4177            * @param classPK the class p k
4178            * @param status the status
4179            * @return the matching message-boards messages
4180            */
4181            public static List<MBMessage> findByC_C_S(long classNameId, long classPK,
4182                    int status) {
4183                    return getPersistence().findByC_C_S(classNameId, classPK, status);
4184            }
4185    
4186            /**
4187            * Returns a range of all the message-boards messages where classNameId = &#63; and classPK = &#63; and status = &#63;.
4188            *
4189            * <p>
4190            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4191            * </p>
4192            *
4193            * @param classNameId the class name ID
4194            * @param classPK the class p k
4195            * @param status the status
4196            * @param start the lower bound of the range of message-boards messages
4197            * @param end the upper bound of the range of message-boards messages (not inclusive)
4198            * @return the range of matching message-boards messages
4199            */
4200            public static List<MBMessage> findByC_C_S(long classNameId, long classPK,
4201                    int status, int start, int end) {
4202                    return getPersistence()
4203                                       .findByC_C_S(classNameId, classPK, status, start, end);
4204            }
4205    
4206            /**
4207            * Returns an ordered range of all the message-boards messages where classNameId = &#63; and classPK = &#63; and status = &#63;.
4208            *
4209            * <p>
4210            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4211            * </p>
4212            *
4213            * @param classNameId the class name ID
4214            * @param classPK the class p k
4215            * @param status the status
4216            * @param start the lower bound of the range of message-boards messages
4217            * @param end the upper bound of the range of message-boards messages (not inclusive)
4218            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
4219            * @return the ordered range of matching message-boards messages
4220            */
4221            public static List<MBMessage> findByC_C_S(long classNameId, long classPK,
4222                    int status, int start, int end,
4223                    OrderByComparator<MBMessage> orderByComparator) {
4224                    return getPersistence()
4225                                       .findByC_C_S(classNameId, classPK, status, start, end,
4226                            orderByComparator);
4227            }
4228    
4229            /**
4230            * Returns the first message-boards message in the ordered set where classNameId = &#63; and classPK = &#63; and status = &#63;.
4231            *
4232            * @param classNameId the class name ID
4233            * @param classPK the class p k
4234            * @param status the status
4235            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4236            * @return the first matching message-boards message
4237            * @throws NoSuchMessageException if a matching message-boards message could not be found
4238            */
4239            public static MBMessage findByC_C_S_First(long classNameId, long classPK,
4240                    int status, OrderByComparator<MBMessage> orderByComparator)
4241                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4242                    return getPersistence()
4243                                       .findByC_C_S_First(classNameId, classPK, status,
4244                            orderByComparator);
4245            }
4246    
4247            /**
4248            * Returns the first message-boards message in the ordered set where classNameId = &#63; and classPK = &#63; and status = &#63;.
4249            *
4250            * @param classNameId the class name ID
4251            * @param classPK the class p k
4252            * @param status the status
4253            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4254            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
4255            */
4256            public static MBMessage fetchByC_C_S_First(long classNameId, long classPK,
4257                    int status, OrderByComparator<MBMessage> orderByComparator) {
4258                    return getPersistence()
4259                                       .fetchByC_C_S_First(classNameId, classPK, status,
4260                            orderByComparator);
4261            }
4262    
4263            /**
4264            * Returns the last message-boards message in the ordered set where classNameId = &#63; and classPK = &#63; and status = &#63;.
4265            *
4266            * @param classNameId the class name ID
4267            * @param classPK the class p k
4268            * @param status the status
4269            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4270            * @return the last matching message-boards message
4271            * @throws NoSuchMessageException if a matching message-boards message could not be found
4272            */
4273            public static MBMessage findByC_C_S_Last(long classNameId, long classPK,
4274                    int status, OrderByComparator<MBMessage> orderByComparator)
4275                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4276                    return getPersistence()
4277                                       .findByC_C_S_Last(classNameId, classPK, status,
4278                            orderByComparator);
4279            }
4280    
4281            /**
4282            * Returns the last message-boards message in the ordered set where classNameId = &#63; and classPK = &#63; and status = &#63;.
4283            *
4284            * @param classNameId the class name ID
4285            * @param classPK the class p k
4286            * @param status the status
4287            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4288            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
4289            */
4290            public static MBMessage fetchByC_C_S_Last(long classNameId, long classPK,
4291                    int status, OrderByComparator<MBMessage> orderByComparator) {
4292                    return getPersistence()
4293                                       .fetchByC_C_S_Last(classNameId, classPK, status,
4294                            orderByComparator);
4295            }
4296    
4297            /**
4298            * Returns the message-boards messages before and after the current message-boards message in the ordered set where classNameId = &#63; and classPK = &#63; and status = &#63;.
4299            *
4300            * @param messageId the primary key of the current message-boards message
4301            * @param classNameId the class name ID
4302            * @param classPK the class p k
4303            * @param status the status
4304            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4305            * @return the previous, current, and next message-boards message
4306            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
4307            */
4308            public static MBMessage[] findByC_C_S_PrevAndNext(long messageId,
4309                    long classNameId, long classPK, int status,
4310                    OrderByComparator<MBMessage> orderByComparator)
4311                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4312                    return getPersistence()
4313                                       .findByC_C_S_PrevAndNext(messageId, classNameId, classPK,
4314                            status, orderByComparator);
4315            }
4316    
4317            /**
4318            * Removes all the message-boards messages where classNameId = &#63; and classPK = &#63; and status = &#63; from the database.
4319            *
4320            * @param classNameId the class name ID
4321            * @param classPK the class p k
4322            * @param status the status
4323            */
4324            public static void removeByC_C_S(long classNameId, long classPK, int status) {
4325                    getPersistence().removeByC_C_S(classNameId, classPK, status);
4326            }
4327    
4328            /**
4329            * Returns the number of message-boards messages where classNameId = &#63; and classPK = &#63; and status = &#63;.
4330            *
4331            * @param classNameId the class name ID
4332            * @param classPK the class p k
4333            * @param status the status
4334            * @return the number of matching message-boards messages
4335            */
4336            public static int countByC_C_S(long classNameId, long classPK, int status) {
4337                    return getPersistence().countByC_C_S(classNameId, classPK, status);
4338            }
4339    
4340            /**
4341            * Returns all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4342            *
4343            * @param groupId the group ID
4344            * @param categoryId the category ID
4345            * @param threadId the thread ID
4346            * @param answer the answer
4347            * @return the matching message-boards messages
4348            */
4349            public static List<MBMessage> findByG_C_T_A(long groupId, long categoryId,
4350                    long threadId, boolean answer) {
4351                    return getPersistence()
4352                                       .findByG_C_T_A(groupId, categoryId, threadId, answer);
4353            }
4354    
4355            /**
4356            * Returns a range of all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4357            *
4358            * <p>
4359            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4360            * </p>
4361            *
4362            * @param groupId the group ID
4363            * @param categoryId the category ID
4364            * @param threadId the thread ID
4365            * @param answer the answer
4366            * @param start the lower bound of the range of message-boards messages
4367            * @param end the upper bound of the range of message-boards messages (not inclusive)
4368            * @return the range of matching message-boards messages
4369            */
4370            public static List<MBMessage> findByG_C_T_A(long groupId, long categoryId,
4371                    long threadId, boolean answer, int start, int end) {
4372                    return getPersistence()
4373                                       .findByG_C_T_A(groupId, categoryId, threadId, answer, start,
4374                            end);
4375            }
4376    
4377            /**
4378            * Returns an ordered range of all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4379            *
4380            * <p>
4381            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4382            * </p>
4383            *
4384            * @param groupId the group ID
4385            * @param categoryId the category ID
4386            * @param threadId the thread ID
4387            * @param answer the answer
4388            * @param start the lower bound of the range of message-boards messages
4389            * @param end the upper bound of the range of message-boards messages (not inclusive)
4390            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
4391            * @return the ordered range of matching message-boards messages
4392            */
4393            public static List<MBMessage> findByG_C_T_A(long groupId, long categoryId,
4394                    long threadId, boolean answer, int start, int end,
4395                    OrderByComparator<MBMessage> orderByComparator) {
4396                    return getPersistence()
4397                                       .findByG_C_T_A(groupId, categoryId, threadId, answer, start,
4398                            end, orderByComparator);
4399            }
4400    
4401            /**
4402            * Returns the first message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4403            *
4404            * @param groupId the group ID
4405            * @param categoryId the category ID
4406            * @param threadId the thread ID
4407            * @param answer the answer
4408            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4409            * @return the first matching message-boards message
4410            * @throws NoSuchMessageException if a matching message-boards message could not be found
4411            */
4412            public static MBMessage findByG_C_T_A_First(long groupId, long categoryId,
4413                    long threadId, boolean answer,
4414                    OrderByComparator<MBMessage> orderByComparator)
4415                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4416                    return getPersistence()
4417                                       .findByG_C_T_A_First(groupId, categoryId, threadId, answer,
4418                            orderByComparator);
4419            }
4420    
4421            /**
4422            * Returns the first message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4423            *
4424            * @param groupId the group ID
4425            * @param categoryId the category ID
4426            * @param threadId the thread ID
4427            * @param answer the answer
4428            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4429            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
4430            */
4431            public static MBMessage fetchByG_C_T_A_First(long groupId, long categoryId,
4432                    long threadId, boolean answer,
4433                    OrderByComparator<MBMessage> orderByComparator) {
4434                    return getPersistence()
4435                                       .fetchByG_C_T_A_First(groupId, categoryId, threadId, answer,
4436                            orderByComparator);
4437            }
4438    
4439            /**
4440            * Returns the last message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4441            *
4442            * @param groupId the group ID
4443            * @param categoryId the category ID
4444            * @param threadId the thread ID
4445            * @param answer the answer
4446            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4447            * @return the last matching message-boards message
4448            * @throws NoSuchMessageException if a matching message-boards message could not be found
4449            */
4450            public static MBMessage findByG_C_T_A_Last(long groupId, long categoryId,
4451                    long threadId, boolean answer,
4452                    OrderByComparator<MBMessage> orderByComparator)
4453                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4454                    return getPersistence()
4455                                       .findByG_C_T_A_Last(groupId, categoryId, threadId, answer,
4456                            orderByComparator);
4457            }
4458    
4459            /**
4460            * Returns the last message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4461            *
4462            * @param groupId the group ID
4463            * @param categoryId the category ID
4464            * @param threadId the thread ID
4465            * @param answer the answer
4466            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4467            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
4468            */
4469            public static MBMessage fetchByG_C_T_A_Last(long groupId, long categoryId,
4470                    long threadId, boolean answer,
4471                    OrderByComparator<MBMessage> orderByComparator) {
4472                    return getPersistence()
4473                                       .fetchByG_C_T_A_Last(groupId, categoryId, threadId, answer,
4474                            orderByComparator);
4475            }
4476    
4477            /**
4478            * Returns the message-boards messages before and after the current message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4479            *
4480            * @param messageId the primary key of the current message-boards message
4481            * @param groupId the group ID
4482            * @param categoryId the category ID
4483            * @param threadId the thread ID
4484            * @param answer the answer
4485            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4486            * @return the previous, current, and next message-boards message
4487            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
4488            */
4489            public static MBMessage[] findByG_C_T_A_PrevAndNext(long messageId,
4490                    long groupId, long categoryId, long threadId, boolean answer,
4491                    OrderByComparator<MBMessage> orderByComparator)
4492                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4493                    return getPersistence()
4494                                       .findByG_C_T_A_PrevAndNext(messageId, groupId, categoryId,
4495                            threadId, answer, orderByComparator);
4496            }
4497    
4498            /**
4499            * Returns all the message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4500            *
4501            * @param groupId the group ID
4502            * @param categoryId the category ID
4503            * @param threadId the thread ID
4504            * @param answer the answer
4505            * @return the matching message-boards messages that the user has permission to view
4506            */
4507            public static List<MBMessage> filterFindByG_C_T_A(long groupId,
4508                    long categoryId, long threadId, boolean answer) {
4509                    return getPersistence()
4510                                       .filterFindByG_C_T_A(groupId, categoryId, threadId, answer);
4511            }
4512    
4513            /**
4514            * Returns a range of all the message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4515            *
4516            * <p>
4517            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4518            * </p>
4519            *
4520            * @param groupId the group ID
4521            * @param categoryId the category ID
4522            * @param threadId the thread ID
4523            * @param answer the answer
4524            * @param start the lower bound of the range of message-boards messages
4525            * @param end the upper bound of the range of message-boards messages (not inclusive)
4526            * @return the range of matching message-boards messages that the user has permission to view
4527            */
4528            public static List<MBMessage> filterFindByG_C_T_A(long groupId,
4529                    long categoryId, long threadId, boolean answer, int start, int end) {
4530                    return getPersistence()
4531                                       .filterFindByG_C_T_A(groupId, categoryId, threadId, answer,
4532                            start, end);
4533            }
4534    
4535            /**
4536            * Returns an ordered range of all the message-boards messages that the user has permissions to view where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4537            *
4538            * <p>
4539            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4540            * </p>
4541            *
4542            * @param groupId the group ID
4543            * @param categoryId the category ID
4544            * @param threadId the thread ID
4545            * @param answer the answer
4546            * @param start the lower bound of the range of message-boards messages
4547            * @param end the upper bound of the range of message-boards messages (not inclusive)
4548            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
4549            * @return the ordered range of matching message-boards messages that the user has permission to view
4550            */
4551            public static List<MBMessage> filterFindByG_C_T_A(long groupId,
4552                    long categoryId, long threadId, boolean answer, int start, int end,
4553                    OrderByComparator<MBMessage> orderByComparator) {
4554                    return getPersistence()
4555                                       .filterFindByG_C_T_A(groupId, categoryId, threadId, answer,
4556                            start, end, orderByComparator);
4557            }
4558    
4559            /**
4560            * Returns the message-boards messages before and after the current message-boards message in the ordered set of message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4561            *
4562            * @param messageId the primary key of the current message-boards message
4563            * @param groupId the group ID
4564            * @param categoryId the category ID
4565            * @param threadId the thread ID
4566            * @param answer the answer
4567            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4568            * @return the previous, current, and next message-boards message
4569            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
4570            */
4571            public static MBMessage[] filterFindByG_C_T_A_PrevAndNext(long messageId,
4572                    long groupId, long categoryId, long threadId, boolean answer,
4573                    OrderByComparator<MBMessage> orderByComparator)
4574                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4575                    return getPersistence()
4576                                       .filterFindByG_C_T_A_PrevAndNext(messageId, groupId,
4577                            categoryId, threadId, answer, orderByComparator);
4578            }
4579    
4580            /**
4581            * Removes all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63; from the database.
4582            *
4583            * @param groupId the group ID
4584            * @param categoryId the category ID
4585            * @param threadId the thread ID
4586            * @param answer the answer
4587            */
4588            public static void removeByG_C_T_A(long groupId, long categoryId,
4589                    long threadId, boolean answer) {
4590                    getPersistence().removeByG_C_T_A(groupId, categoryId, threadId, answer);
4591            }
4592    
4593            /**
4594            * Returns the number of message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4595            *
4596            * @param groupId the group ID
4597            * @param categoryId the category ID
4598            * @param threadId the thread ID
4599            * @param answer the answer
4600            * @return the number of matching message-boards messages
4601            */
4602            public static int countByG_C_T_A(long groupId, long categoryId,
4603                    long threadId, boolean answer) {
4604                    return getPersistence()
4605                                       .countByG_C_T_A(groupId, categoryId, threadId, answer);
4606            }
4607    
4608            /**
4609            * Returns the number of message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63; and answer = &#63;.
4610            *
4611            * @param groupId the group ID
4612            * @param categoryId the category ID
4613            * @param threadId the thread ID
4614            * @param answer the answer
4615            * @return the number of matching message-boards messages that the user has permission to view
4616            */
4617            public static int filterCountByG_C_T_A(long groupId, long categoryId,
4618                    long threadId, boolean answer) {
4619                    return getPersistence()
4620                                       .filterCountByG_C_T_A(groupId, categoryId, threadId, answer);
4621            }
4622    
4623            /**
4624            * Returns all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4625            *
4626            * @param groupId the group ID
4627            * @param categoryId the category ID
4628            * @param threadId the thread ID
4629            * @param status the status
4630            * @return the matching message-boards messages
4631            */
4632            public static List<MBMessage> findByG_C_T_S(long groupId, long categoryId,
4633                    long threadId, int status) {
4634                    return getPersistence()
4635                                       .findByG_C_T_S(groupId, categoryId, threadId, status);
4636            }
4637    
4638            /**
4639            * Returns a range of all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4640            *
4641            * <p>
4642            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4643            * </p>
4644            *
4645            * @param groupId the group ID
4646            * @param categoryId the category ID
4647            * @param threadId the thread ID
4648            * @param status the status
4649            * @param start the lower bound of the range of message-boards messages
4650            * @param end the upper bound of the range of message-boards messages (not inclusive)
4651            * @return the range of matching message-boards messages
4652            */
4653            public static List<MBMessage> findByG_C_T_S(long groupId, long categoryId,
4654                    long threadId, int status, int start, int end) {
4655                    return getPersistence()
4656                                       .findByG_C_T_S(groupId, categoryId, threadId, status, start,
4657                            end);
4658            }
4659    
4660            /**
4661            * Returns an ordered range of all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4662            *
4663            * <p>
4664            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4665            * </p>
4666            *
4667            * @param groupId the group ID
4668            * @param categoryId the category ID
4669            * @param threadId the thread ID
4670            * @param status the status
4671            * @param start the lower bound of the range of message-boards messages
4672            * @param end the upper bound of the range of message-boards messages (not inclusive)
4673            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
4674            * @return the ordered range of matching message-boards messages
4675            */
4676            public static List<MBMessage> findByG_C_T_S(long groupId, long categoryId,
4677                    long threadId, int status, int start, int end,
4678                    OrderByComparator<MBMessage> orderByComparator) {
4679                    return getPersistence()
4680                                       .findByG_C_T_S(groupId, categoryId, threadId, status, start,
4681                            end, orderByComparator);
4682            }
4683    
4684            /**
4685            * Returns the first message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4686            *
4687            * @param groupId the group ID
4688            * @param categoryId the category ID
4689            * @param threadId the thread ID
4690            * @param status the status
4691            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4692            * @return the first matching message-boards message
4693            * @throws NoSuchMessageException if a matching message-boards message could not be found
4694            */
4695            public static MBMessage findByG_C_T_S_First(long groupId, long categoryId,
4696                    long threadId, int status,
4697                    OrderByComparator<MBMessage> orderByComparator)
4698                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4699                    return getPersistence()
4700                                       .findByG_C_T_S_First(groupId, categoryId, threadId, status,
4701                            orderByComparator);
4702            }
4703    
4704            /**
4705            * Returns the first message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4706            *
4707            * @param groupId the group ID
4708            * @param categoryId the category ID
4709            * @param threadId the thread ID
4710            * @param status the status
4711            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4712            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
4713            */
4714            public static MBMessage fetchByG_C_T_S_First(long groupId, long categoryId,
4715                    long threadId, int status,
4716                    OrderByComparator<MBMessage> orderByComparator) {
4717                    return getPersistence()
4718                                       .fetchByG_C_T_S_First(groupId, categoryId, threadId, status,
4719                            orderByComparator);
4720            }
4721    
4722            /**
4723            * Returns the last message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4724            *
4725            * @param groupId the group ID
4726            * @param categoryId the category ID
4727            * @param threadId the thread ID
4728            * @param status the status
4729            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4730            * @return the last matching message-boards message
4731            * @throws NoSuchMessageException if a matching message-boards message could not be found
4732            */
4733            public static MBMessage findByG_C_T_S_Last(long groupId, long categoryId,
4734                    long threadId, int status,
4735                    OrderByComparator<MBMessage> orderByComparator)
4736                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4737                    return getPersistence()
4738                                       .findByG_C_T_S_Last(groupId, categoryId, threadId, status,
4739                            orderByComparator);
4740            }
4741    
4742            /**
4743            * Returns the last message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4744            *
4745            * @param groupId the group ID
4746            * @param categoryId the category ID
4747            * @param threadId the thread ID
4748            * @param status the status
4749            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4750            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
4751            */
4752            public static MBMessage fetchByG_C_T_S_Last(long groupId, long categoryId,
4753                    long threadId, int status,
4754                    OrderByComparator<MBMessage> orderByComparator) {
4755                    return getPersistence()
4756                                       .fetchByG_C_T_S_Last(groupId, categoryId, threadId, status,
4757                            orderByComparator);
4758            }
4759    
4760            /**
4761            * Returns the message-boards messages before and after the current message-boards message in the ordered set where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4762            *
4763            * @param messageId the primary key of the current message-boards message
4764            * @param groupId the group ID
4765            * @param categoryId the category ID
4766            * @param threadId the thread ID
4767            * @param status the status
4768            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4769            * @return the previous, current, and next message-boards message
4770            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
4771            */
4772            public static MBMessage[] findByG_C_T_S_PrevAndNext(long messageId,
4773                    long groupId, long categoryId, long threadId, int status,
4774                    OrderByComparator<MBMessage> orderByComparator)
4775                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4776                    return getPersistence()
4777                                       .findByG_C_T_S_PrevAndNext(messageId, groupId, categoryId,
4778                            threadId, status, orderByComparator);
4779            }
4780    
4781            /**
4782            * Returns all the message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4783            *
4784            * @param groupId the group ID
4785            * @param categoryId the category ID
4786            * @param threadId the thread ID
4787            * @param status the status
4788            * @return the matching message-boards messages that the user has permission to view
4789            */
4790            public static List<MBMessage> filterFindByG_C_T_S(long groupId,
4791                    long categoryId, long threadId, int status) {
4792                    return getPersistence()
4793                                       .filterFindByG_C_T_S(groupId, categoryId, threadId, status);
4794            }
4795    
4796            /**
4797            * Returns a range of all the message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4798            *
4799            * <p>
4800            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4801            * </p>
4802            *
4803            * @param groupId the group ID
4804            * @param categoryId the category ID
4805            * @param threadId the thread ID
4806            * @param status the status
4807            * @param start the lower bound of the range of message-boards messages
4808            * @param end the upper bound of the range of message-boards messages (not inclusive)
4809            * @return the range of matching message-boards messages that the user has permission to view
4810            */
4811            public static List<MBMessage> filterFindByG_C_T_S(long groupId,
4812                    long categoryId, long threadId, int status, int start, int end) {
4813                    return getPersistence()
4814                                       .filterFindByG_C_T_S(groupId, categoryId, threadId, status,
4815                            start, end);
4816            }
4817    
4818            /**
4819            * Returns an ordered range of all the message-boards messages that the user has permissions to view where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4820            *
4821            * <p>
4822            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4823            * </p>
4824            *
4825            * @param groupId the group ID
4826            * @param categoryId the category ID
4827            * @param threadId the thread ID
4828            * @param status the status
4829            * @param start the lower bound of the range of message-boards messages
4830            * @param end the upper bound of the range of message-boards messages (not inclusive)
4831            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
4832            * @return the ordered range of matching message-boards messages that the user has permission to view
4833            */
4834            public static List<MBMessage> filterFindByG_C_T_S(long groupId,
4835                    long categoryId, long threadId, int status, int start, int end,
4836                    OrderByComparator<MBMessage> orderByComparator) {
4837                    return getPersistence()
4838                                       .filterFindByG_C_T_S(groupId, categoryId, threadId, status,
4839                            start, end, orderByComparator);
4840            }
4841    
4842            /**
4843            * Returns the message-boards messages before and after the current message-boards message in the ordered set of message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4844            *
4845            * @param messageId the primary key of the current message-boards message
4846            * @param groupId the group ID
4847            * @param categoryId the category ID
4848            * @param threadId the thread ID
4849            * @param status the status
4850            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4851            * @return the previous, current, and next message-boards message
4852            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
4853            */
4854            public static MBMessage[] filterFindByG_C_T_S_PrevAndNext(long messageId,
4855                    long groupId, long categoryId, long threadId, int status,
4856                    OrderByComparator<MBMessage> orderByComparator)
4857                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4858                    return getPersistence()
4859                                       .filterFindByG_C_T_S_PrevAndNext(messageId, groupId,
4860                            categoryId, threadId, status, orderByComparator);
4861            }
4862    
4863            /**
4864            * Removes all the message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63; from the database.
4865            *
4866            * @param groupId the group ID
4867            * @param categoryId the category ID
4868            * @param threadId the thread ID
4869            * @param status the status
4870            */
4871            public static void removeByG_C_T_S(long groupId, long categoryId,
4872                    long threadId, int status) {
4873                    getPersistence().removeByG_C_T_S(groupId, categoryId, threadId, status);
4874            }
4875    
4876            /**
4877            * Returns the number of message-boards messages where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4878            *
4879            * @param groupId the group ID
4880            * @param categoryId the category ID
4881            * @param threadId the thread ID
4882            * @param status the status
4883            * @return the number of matching message-boards messages
4884            */
4885            public static int countByG_C_T_S(long groupId, long categoryId,
4886                    long threadId, int status) {
4887                    return getPersistence()
4888                                       .countByG_C_T_S(groupId, categoryId, threadId, status);
4889            }
4890    
4891            /**
4892            * Returns the number of message-boards messages that the user has permission to view where groupId = &#63; and categoryId = &#63; and threadId = &#63; and status = &#63;.
4893            *
4894            * @param groupId the group ID
4895            * @param categoryId the category ID
4896            * @param threadId the thread ID
4897            * @param status the status
4898            * @return the number of matching message-boards messages that the user has permission to view
4899            */
4900            public static int filterCountByG_C_T_S(long groupId, long categoryId,
4901                    long threadId, int status) {
4902                    return getPersistence()
4903                                       .filterCountByG_C_T_S(groupId, categoryId, threadId, status);
4904            }
4905    
4906            /**
4907            * Returns all the message-boards messages where userId = &#63; and classNameId = &#63; and classPK = &#63; and status = &#63;.
4908            *
4909            * @param userId the user ID
4910            * @param classNameId the class name ID
4911            * @param classPK the class p k
4912            * @param status the status
4913            * @return the matching message-boards messages
4914            */
4915            public static List<MBMessage> findByU_C_C_S(long userId, long classNameId,
4916                    long classPK, int status) {
4917                    return getPersistence()
4918                                       .findByU_C_C_S(userId, classNameId, classPK, status);
4919            }
4920    
4921            /**
4922            * Returns a range of all the message-boards messages where userId = &#63; and classNameId = &#63; and classPK = &#63; and status = &#63;.
4923            *
4924            * <p>
4925            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4926            * </p>
4927            *
4928            * @param userId the user ID
4929            * @param classNameId the class name ID
4930            * @param classPK the class p k
4931            * @param status the status
4932            * @param start the lower bound of the range of message-boards messages
4933            * @param end the upper bound of the range of message-boards messages (not inclusive)
4934            * @return the range of matching message-boards messages
4935            */
4936            public static List<MBMessage> findByU_C_C_S(long userId, long classNameId,
4937                    long classPK, int status, int start, int end) {
4938                    return getPersistence()
4939                                       .findByU_C_C_S(userId, classNameId, classPK, status, start,
4940                            end);
4941            }
4942    
4943            /**
4944            * Returns an ordered range of all the message-boards messages where userId = &#63; and classNameId = &#63; and classPK = &#63; and status = &#63;.
4945            *
4946            * <p>
4947            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
4948            * </p>
4949            *
4950            * @param userId the user ID
4951            * @param classNameId the class name ID
4952            * @param classPK the class p k
4953            * @param status the status
4954            * @param start the lower bound of the range of message-boards messages
4955            * @param end the upper bound of the range of message-boards messages (not inclusive)
4956            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
4957            * @return the ordered range of matching message-boards messages
4958            */
4959            public static List<MBMessage> findByU_C_C_S(long userId, long classNameId,
4960                    long classPK, int status, int start, int end,
4961                    OrderByComparator<MBMessage> orderByComparator) {
4962                    return getPersistence()
4963                                       .findByU_C_C_S(userId, classNameId, classPK, status, start,
4964                            end, orderByComparator);
4965            }
4966    
4967            /**
4968            * Returns the first message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and classPK = &#63; and status = &#63;.
4969            *
4970            * @param userId the user ID
4971            * @param classNameId the class name ID
4972            * @param classPK the class p k
4973            * @param status the status
4974            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4975            * @return the first matching message-boards message
4976            * @throws NoSuchMessageException if a matching message-boards message could not be found
4977            */
4978            public static MBMessage findByU_C_C_S_First(long userId, long classNameId,
4979                    long classPK, int status, OrderByComparator<MBMessage> orderByComparator)
4980                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
4981                    return getPersistence()
4982                                       .findByU_C_C_S_First(userId, classNameId, classPK, status,
4983                            orderByComparator);
4984            }
4985    
4986            /**
4987            * Returns the first message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and classPK = &#63; and status = &#63;.
4988            *
4989            * @param userId the user ID
4990            * @param classNameId the class name ID
4991            * @param classPK the class p k
4992            * @param status the status
4993            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
4994            * @return the first matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
4995            */
4996            public static MBMessage fetchByU_C_C_S_First(long userId, long classNameId,
4997                    long classPK, int status, OrderByComparator<MBMessage> orderByComparator) {
4998                    return getPersistence()
4999                                       .fetchByU_C_C_S_First(userId, classNameId, classPK, status,
5000                            orderByComparator);
5001            }
5002    
5003            /**
5004            * Returns the last message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and classPK = &#63; and status = &#63;.
5005            *
5006            * @param userId the user ID
5007            * @param classNameId the class name ID
5008            * @param classPK the class p k
5009            * @param status the status
5010            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
5011            * @return the last matching message-boards message
5012            * @throws NoSuchMessageException if a matching message-boards message could not be found
5013            */
5014            public static MBMessage findByU_C_C_S_Last(long userId, long classNameId,
5015                    long classPK, int status, OrderByComparator<MBMessage> orderByComparator)
5016                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
5017                    return getPersistence()
5018                                       .findByU_C_C_S_Last(userId, classNameId, classPK, status,
5019                            orderByComparator);
5020            }
5021    
5022            /**
5023            * Returns the last message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and classPK = &#63; and status = &#63;.
5024            *
5025            * @param userId the user ID
5026            * @param classNameId the class name ID
5027            * @param classPK the class p k
5028            * @param status the status
5029            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
5030            * @return the last matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
5031            */
5032            public static MBMessage fetchByU_C_C_S_Last(long userId, long classNameId,
5033                    long classPK, int status, OrderByComparator<MBMessage> orderByComparator) {
5034                    return getPersistence()
5035                                       .fetchByU_C_C_S_Last(userId, classNameId, classPK, status,
5036                            orderByComparator);
5037            }
5038    
5039            /**
5040            * Returns the message-boards messages before and after the current message-boards message in the ordered set where userId = &#63; and classNameId = &#63; and classPK = &#63; and status = &#63;.
5041            *
5042            * @param messageId the primary key of the current message-boards message
5043            * @param userId the user ID
5044            * @param classNameId the class name ID
5045            * @param classPK the class p k
5046            * @param status the status
5047            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
5048            * @return the previous, current, and next message-boards message
5049            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
5050            */
5051            public static MBMessage[] findByU_C_C_S_PrevAndNext(long messageId,
5052                    long userId, long classNameId, long classPK, int status,
5053                    OrderByComparator<MBMessage> orderByComparator)
5054                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
5055                    return getPersistence()
5056                                       .findByU_C_C_S_PrevAndNext(messageId, userId, classNameId,
5057                            classPK, status, orderByComparator);
5058            }
5059    
5060            /**
5061            * Removes all the message-boards messages where userId = &#63; and classNameId = &#63; and classPK = &#63; and status = &#63; from the database.
5062            *
5063            * @param userId the user ID
5064            * @param classNameId the class name ID
5065            * @param classPK the class p k
5066            * @param status the status
5067            */
5068            public static void removeByU_C_C_S(long userId, long classNameId,
5069                    long classPK, int status) {
5070                    getPersistence().removeByU_C_C_S(userId, classNameId, classPK, status);
5071            }
5072    
5073            /**
5074            * Returns the number of message-boards messages where userId = &#63; and classNameId = &#63; and classPK = &#63; and status = &#63;.
5075            *
5076            * @param userId the user ID
5077            * @param classNameId the class name ID
5078            * @param classPK the class p k
5079            * @param status the status
5080            * @return the number of matching message-boards messages
5081            */
5082            public static int countByU_C_C_S(long userId, long classNameId,
5083                    long classPK, int status) {
5084                    return getPersistence()
5085                                       .countByU_C_C_S(userId, classNameId, classPK, status);
5086            }
5087    
5088            /**
5089            * Caches the message-boards message in the entity cache if it is enabled.
5090            *
5091            * @param mbMessage the message-boards message
5092            */
5093            public static void cacheResult(MBMessage mbMessage) {
5094                    getPersistence().cacheResult(mbMessage);
5095            }
5096    
5097            /**
5098            * Caches the message-boards messages in the entity cache if it is enabled.
5099            *
5100            * @param mbMessages the message-boards messages
5101            */
5102            public static void cacheResult(List<MBMessage> mbMessages) {
5103                    getPersistence().cacheResult(mbMessages);
5104            }
5105    
5106            /**
5107            * Creates a new message-boards message with the primary key. Does not add the message-boards message to the database.
5108            *
5109            * @param messageId the primary key for the new message-boards message
5110            * @return the new message-boards message
5111            */
5112            public static MBMessage create(long messageId) {
5113                    return getPersistence().create(messageId);
5114            }
5115    
5116            /**
5117            * Removes the message-boards message with the primary key from the database. Also notifies the appropriate model listeners.
5118            *
5119            * @param messageId the primary key of the message-boards message
5120            * @return the message-boards message that was removed
5121            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
5122            */
5123            public static MBMessage remove(long messageId)
5124                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
5125                    return getPersistence().remove(messageId);
5126            }
5127    
5128            public static MBMessage updateImpl(MBMessage mbMessage) {
5129                    return getPersistence().updateImpl(mbMessage);
5130            }
5131    
5132            /**
5133            * Returns the message-boards message with the primary key or throws a {@link NoSuchMessageException} if it could not be found.
5134            *
5135            * @param messageId the primary key of the message-boards message
5136            * @return the message-boards message
5137            * @throws NoSuchMessageException if a message-boards message with the primary key could not be found
5138            */
5139            public static MBMessage findByPrimaryKey(long messageId)
5140                    throws com.liferay.portlet.messageboards.NoSuchMessageException {
5141                    return getPersistence().findByPrimaryKey(messageId);
5142            }
5143    
5144            /**
5145            * Returns the message-boards message with the primary key or returns <code>null</code> if it could not be found.
5146            *
5147            * @param messageId the primary key of the message-boards message
5148            * @return the message-boards message, or <code>null</code> if a message-boards message with the primary key could not be found
5149            */
5150            public static MBMessage fetchByPrimaryKey(long messageId) {
5151                    return getPersistence().fetchByPrimaryKey(messageId);
5152            }
5153    
5154            public static java.util.Map<java.io.Serializable, MBMessage> fetchByPrimaryKeys(
5155                    java.util.Set<java.io.Serializable> primaryKeys) {
5156                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
5157            }
5158    
5159            /**
5160            * Returns all the message-boards messages.
5161            *
5162            * @return the message-boards messages
5163            */
5164            public static List<MBMessage> findAll() {
5165                    return getPersistence().findAll();
5166            }
5167    
5168            /**
5169            * Returns a range of all the message-boards messages.
5170            *
5171            * <p>
5172            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
5173            * </p>
5174            *
5175            * @param start the lower bound of the range of message-boards messages
5176            * @param end the upper bound of the range of message-boards messages (not inclusive)
5177            * @return the range of message-boards messages
5178            */
5179            public static List<MBMessage> findAll(int start, int end) {
5180                    return getPersistence().findAll(start, end);
5181            }
5182    
5183            /**
5184            * Returns an ordered range of all the message-boards messages.
5185            *
5186            * <p>
5187            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMessageModelImpl}. 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.
5188            * </p>
5189            *
5190            * @param start the lower bound of the range of message-boards messages
5191            * @param end the upper bound of the range of message-boards messages (not inclusive)
5192            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
5193            * @return the ordered range of message-boards messages
5194            */
5195            public static List<MBMessage> findAll(int start, int end,
5196                    OrderByComparator<MBMessage> orderByComparator) {
5197                    return getPersistence().findAll(start, end, orderByComparator);
5198            }
5199    
5200            /**
5201            * Removes all the message-boards messages from the database.
5202            */
5203            public static void removeAll() {
5204                    getPersistence().removeAll();
5205            }
5206    
5207            /**
5208            * Returns the number of message-boards messages.
5209            *
5210            * @return the number of message-boards messages
5211            */
5212            public static int countAll() {
5213                    return getPersistence().countAll();
5214            }
5215    
5216            public static MBMessagePersistence getPersistence() {
5217                    if (_persistence == null) {
5218                            _persistence = (MBMessagePersistence)PortalBeanLocatorUtil.locate(MBMessagePersistence.class.getName());
5219    
5220                            ReferenceRegistry.registerReference(MBMessageUtil.class,
5221                                    "_persistence");
5222                    }
5223    
5224                    return _persistence;
5225            }
5226    
5227            /**
5228             * @deprecated As of 6.2.0
5229             */
5230            @Deprecated
5231            public void setPersistence(MBMessagePersistence persistence) {
5232            }
5233    
5234            private static MBMessagePersistence _persistence;
5235    }