001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.service.ServiceContext;
022    
023    import com.liferay.portlet.messageboards.model.MBMessageFlag;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the message boards message flag service.
029     *
030     * <p>
031     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see MBMessageFlagPersistence
036     * @see MBMessageFlagPersistenceImpl
037     * @generated
038     */
039    public class MBMessageFlagUtil {
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
042             */
043            public static void clearCache() {
044                    getPersistence().clearCache();
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
049             */
050            public static void clearCache(MBMessageFlag mbMessageFlag) {
051                    getPersistence().clearCache(mbMessageFlag);
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
056             */
057            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
058                    throws SystemException {
059                    return getPersistence().countWithDynamicQuery(dynamicQuery);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
064             */
065            public static List<MBMessageFlag> findWithDynamicQuery(
066                    DynamicQuery dynamicQuery) throws SystemException {
067                    return getPersistence().findWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
072             */
073            public static List<MBMessageFlag> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery, int start, int end)
075                    throws SystemException {
076                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
077            }
078    
079            /**
080             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
081             */
082            public static List<MBMessageFlag> findWithDynamicQuery(
083                    DynamicQuery dynamicQuery, int start, int end,
084                    OrderByComparator orderByComparator) throws SystemException {
085                    return getPersistence()
086                                       .findWithDynamicQuery(dynamicQuery, start, end,
087                            orderByComparator);
088            }
089    
090            /**
091             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
092             */
093            public static MBMessageFlag remove(MBMessageFlag mbMessageFlag)
094                    throws SystemException {
095                    return getPersistence().remove(mbMessageFlag);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
100             */
101            public static MBMessageFlag update(MBMessageFlag mbMessageFlag,
102                    boolean merge) throws SystemException {
103                    return getPersistence().update(mbMessageFlag, merge);
104            }
105    
106            /**
107             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
108             */
109            public static MBMessageFlag update(MBMessageFlag mbMessageFlag,
110                    boolean merge, ServiceContext serviceContext) throws SystemException {
111                    return getPersistence().update(mbMessageFlag, merge, serviceContext);
112            }
113    
114            /**
115            * Caches the message boards message flag in the entity cache if it is enabled.
116            *
117            * @param mbMessageFlag the message boards message flag to cache
118            */
119            public static void cacheResult(
120                    com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag) {
121                    getPersistence().cacheResult(mbMessageFlag);
122            }
123    
124            /**
125            * Caches the message boards message flags in the entity cache if it is enabled.
126            *
127            * @param mbMessageFlags the message boards message flags to cache
128            */
129            public static void cacheResult(
130                    java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> mbMessageFlags) {
131                    getPersistence().cacheResult(mbMessageFlags);
132            }
133    
134            /**
135            * Creates a new message boards message flag with the primary key.
136            *
137            * @param messageFlagId the primary key for the new message boards message flag
138            * @return the new message boards message flag
139            */
140            public static com.liferay.portlet.messageboards.model.MBMessageFlag create(
141                    long messageFlagId) {
142                    return getPersistence().create(messageFlagId);
143            }
144    
145            /**
146            * Removes the message boards message flag with the primary key from the database. Also notifies the appropriate model listeners.
147            *
148            * @param messageFlagId the primary key of the message boards message flag to remove
149            * @return the message boards message flag that was removed
150            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a message boards message flag with the primary key could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            public static com.liferay.portlet.messageboards.model.MBMessageFlag remove(
154                    long messageFlagId)
155                    throws com.liferay.portal.kernel.exception.SystemException,
156                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
157                    return getPersistence().remove(messageFlagId);
158            }
159    
160            public static com.liferay.portlet.messageboards.model.MBMessageFlag updateImpl(
161                    com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag,
162                    boolean merge)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getPersistence().updateImpl(mbMessageFlag, merge);
165            }
166    
167            /**
168            * Finds the message boards message flag with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchMessageFlagException} if it could not be found.
169            *
170            * @param messageFlagId the primary key of the message boards message flag to find
171            * @return the message boards message flag
172            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a message boards message flag with the primary key could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByPrimaryKey(
176                    long messageFlagId)
177                    throws com.liferay.portal.kernel.exception.SystemException,
178                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
179                    return getPersistence().findByPrimaryKey(messageFlagId);
180            }
181    
182            /**
183            * Finds the message boards message flag with the primary key or returns <code>null</code> if it could not be found.
184            *
185            * @param messageFlagId the primary key of the message boards message flag to find
186            * @return the message boards message flag, or <code>null</code> if a message boards message flag with the primary key could not be found
187            * @throws SystemException if a system exception occurred
188            */
189            public static com.liferay.portlet.messageboards.model.MBMessageFlag fetchByPrimaryKey(
190                    long messageFlagId)
191                    throws com.liferay.portal.kernel.exception.SystemException {
192                    return getPersistence().fetchByPrimaryKey(messageFlagId);
193            }
194    
195            /**
196            * Finds all the message boards message flags where userId = &#63;.
197            *
198            * @param userId the user id to search with
199            * @return the matching message boards message flags
200            * @throws SystemException if a system exception occurred
201            */
202            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByUserId(
203                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
204                    return getPersistence().findByUserId(userId);
205            }
206    
207            /**
208            * Finds a range of all the message boards message flags where userId = &#63;.
209            *
210            * <p>
211            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
212            * </p>
213            *
214            * @param userId the user id to search with
215            * @param start the lower bound of the range of message boards message flags to return
216            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
217            * @return the range of matching message boards message flags
218            * @throws SystemException if a system exception occurred
219            */
220            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByUserId(
221                    long userId, int start, int end)
222                    throws com.liferay.portal.kernel.exception.SystemException {
223                    return getPersistence().findByUserId(userId, start, end);
224            }
225    
226            /**
227            * Finds an ordered range of all the message boards message flags where userId = &#63;.
228            *
229            * <p>
230            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
231            * </p>
232            *
233            * @param userId the user id to search with
234            * @param start the lower bound of the range of message boards message flags to return
235            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
236            * @param orderByComparator the comparator to order the results by
237            * @return the ordered range of matching message boards message flags
238            * @throws SystemException if a system exception occurred
239            */
240            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByUserId(
241                    long userId, int start, int end,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence()
245                                       .findByUserId(userId, start, end, orderByComparator);
246            }
247    
248            /**
249            * Finds the first message boards message flag in the ordered set where userId = &#63;.
250            *
251            * <p>
252            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
253            * </p>
254            *
255            * @param userId the user id to search with
256            * @param orderByComparator the comparator to order the set by
257            * @return the first matching message boards message flag
258            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
259            * @throws SystemException if a system exception occurred
260            */
261            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByUserId_First(
262                    long userId,
263                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
264                    throws com.liferay.portal.kernel.exception.SystemException,
265                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
266                    return getPersistence().findByUserId_First(userId, orderByComparator);
267            }
268    
269            /**
270            * Finds the last message boards message flag in the ordered set where userId = &#63;.
271            *
272            * <p>
273            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
274            * </p>
275            *
276            * @param userId the user id to search with
277            * @param orderByComparator the comparator to order the set by
278            * @return the last matching message boards message flag
279            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
280            * @throws SystemException if a system exception occurred
281            */
282            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByUserId_Last(
283                    long userId,
284                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
285                    throws com.liferay.portal.kernel.exception.SystemException,
286                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
287                    return getPersistence().findByUserId_Last(userId, orderByComparator);
288            }
289    
290            /**
291            * Finds the message boards message flags before and after the current message boards message flag in the ordered set where userId = &#63;.
292            *
293            * <p>
294            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
295            * </p>
296            *
297            * @param messageFlagId the primary key of the current message boards message flag
298            * @param userId the user id to search with
299            * @param orderByComparator the comparator to order the set by
300            * @return the previous, current, and next message boards message flag
301            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a message boards message flag with the primary key could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByUserId_PrevAndNext(
305                    long messageFlagId, long userId,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.kernel.exception.SystemException,
308                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
309                    return getPersistence()
310                                       .findByUserId_PrevAndNext(messageFlagId, userId,
311                            orderByComparator);
312            }
313    
314            /**
315            * Finds all the message boards message flags where threadId = &#63;.
316            *
317            * @param threadId the thread id to search with
318            * @return the matching message boards message flags
319            * @throws SystemException if a system exception occurred
320            */
321            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByThreadId(
322                    long threadId)
323                    throws com.liferay.portal.kernel.exception.SystemException {
324                    return getPersistence().findByThreadId(threadId);
325            }
326    
327            /**
328            * Finds a range of all the message boards message flags where threadId = &#63;.
329            *
330            * <p>
331            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
332            * </p>
333            *
334            * @param threadId the thread id to search with
335            * @param start the lower bound of the range of message boards message flags to return
336            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
337            * @return the range of matching message boards message flags
338            * @throws SystemException if a system exception occurred
339            */
340            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByThreadId(
341                    long threadId, int start, int end)
342                    throws com.liferay.portal.kernel.exception.SystemException {
343                    return getPersistence().findByThreadId(threadId, start, end);
344            }
345    
346            /**
347            * Finds an ordered range of all the message boards message flags where threadId = &#63;.
348            *
349            * <p>
350            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
351            * </p>
352            *
353            * @param threadId the thread id to search with
354            * @param start the lower bound of the range of message boards message flags to return
355            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
356            * @param orderByComparator the comparator to order the results by
357            * @return the ordered range of matching message boards message flags
358            * @throws SystemException if a system exception occurred
359            */
360            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByThreadId(
361                    long threadId, int start, int end,
362                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
363                    throws com.liferay.portal.kernel.exception.SystemException {
364                    return getPersistence()
365                                       .findByThreadId(threadId, start, end, orderByComparator);
366            }
367    
368            /**
369            * Finds the first message boards message flag in the ordered set where threadId = &#63;.
370            *
371            * <p>
372            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
373            * </p>
374            *
375            * @param threadId the thread id to search with
376            * @param orderByComparator the comparator to order the set by
377            * @return the first matching message boards message flag
378            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
379            * @throws SystemException if a system exception occurred
380            */
381            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByThreadId_First(
382                    long threadId,
383                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
384                    throws com.liferay.portal.kernel.exception.SystemException,
385                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
386                    return getPersistence().findByThreadId_First(threadId, orderByComparator);
387            }
388    
389            /**
390            * Finds the last message boards message flag in the ordered set where threadId = &#63;.
391            *
392            * <p>
393            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
394            * </p>
395            *
396            * @param threadId the thread id to search with
397            * @param orderByComparator the comparator to order the set by
398            * @return the last matching message boards message flag
399            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
400            * @throws SystemException if a system exception occurred
401            */
402            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByThreadId_Last(
403                    long threadId,
404                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
405                    throws com.liferay.portal.kernel.exception.SystemException,
406                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
407                    return getPersistence().findByThreadId_Last(threadId, orderByComparator);
408            }
409    
410            /**
411            * Finds the message boards message flags before and after the current message boards message flag in the ordered set where threadId = &#63;.
412            *
413            * <p>
414            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
415            * </p>
416            *
417            * @param messageFlagId the primary key of the current message boards message flag
418            * @param threadId the thread id to search with
419            * @param orderByComparator the comparator to order the set by
420            * @return the previous, current, and next message boards message flag
421            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a message boards message flag with the primary key could not be found
422            * @throws SystemException if a system exception occurred
423            */
424            public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByThreadId_PrevAndNext(
425                    long messageFlagId, long threadId,
426                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
427                    throws com.liferay.portal.kernel.exception.SystemException,
428                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
429                    return getPersistence()
430                                       .findByThreadId_PrevAndNext(messageFlagId, threadId,
431                            orderByComparator);
432            }
433    
434            /**
435            * Finds all the message boards message flags where messageId = &#63;.
436            *
437            * @param messageId the message id to search with
438            * @return the matching message boards message flags
439            * @throws SystemException if a system exception occurred
440            */
441            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByMessageId(
442                    long messageId)
443                    throws com.liferay.portal.kernel.exception.SystemException {
444                    return getPersistence().findByMessageId(messageId);
445            }
446    
447            /**
448            * Finds a range of all the message boards message flags where messageId = &#63;.
449            *
450            * <p>
451            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
452            * </p>
453            *
454            * @param messageId the message id to search with
455            * @param start the lower bound of the range of message boards message flags to return
456            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
457            * @return the range of matching message boards message flags
458            * @throws SystemException if a system exception occurred
459            */
460            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByMessageId(
461                    long messageId, int start, int end)
462                    throws com.liferay.portal.kernel.exception.SystemException {
463                    return getPersistence().findByMessageId(messageId, start, end);
464            }
465    
466            /**
467            * Finds an ordered range of all the message boards message flags where messageId = &#63;.
468            *
469            * <p>
470            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
471            * </p>
472            *
473            * @param messageId the message id to search with
474            * @param start the lower bound of the range of message boards message flags to return
475            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
476            * @param orderByComparator the comparator to order the results by
477            * @return the ordered range of matching message boards message flags
478            * @throws SystemException if a system exception occurred
479            */
480            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByMessageId(
481                    long messageId, int start, int end,
482                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
483                    throws com.liferay.portal.kernel.exception.SystemException {
484                    return getPersistence()
485                                       .findByMessageId(messageId, start, end, orderByComparator);
486            }
487    
488            /**
489            * Finds the first message boards message flag in the ordered set where messageId = &#63;.
490            *
491            * <p>
492            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
493            * </p>
494            *
495            * @param messageId the message id to search with
496            * @param orderByComparator the comparator to order the set by
497            * @return the first matching message boards message flag
498            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
499            * @throws SystemException if a system exception occurred
500            */
501            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByMessageId_First(
502                    long messageId,
503                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
504                    throws com.liferay.portal.kernel.exception.SystemException,
505                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
506                    return getPersistence()
507                                       .findByMessageId_First(messageId, orderByComparator);
508            }
509    
510            /**
511            * Finds the last message boards message flag in the ordered set where messageId = &#63;.
512            *
513            * <p>
514            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
515            * </p>
516            *
517            * @param messageId the message id to search with
518            * @param orderByComparator the comparator to order the set by
519            * @return the last matching message boards message flag
520            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
521            * @throws SystemException if a system exception occurred
522            */
523            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByMessageId_Last(
524                    long messageId,
525                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
526                    throws com.liferay.portal.kernel.exception.SystemException,
527                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
528                    return getPersistence()
529                                       .findByMessageId_Last(messageId, orderByComparator);
530            }
531    
532            /**
533            * Finds the message boards message flags before and after the current message boards message flag in the ordered set where messageId = &#63;.
534            *
535            * <p>
536            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
537            * </p>
538            *
539            * @param messageFlagId the primary key of the current message boards message flag
540            * @param messageId the message id to search with
541            * @param orderByComparator the comparator to order the set by
542            * @return the previous, current, and next message boards message flag
543            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a message boards message flag with the primary key could not be found
544            * @throws SystemException if a system exception occurred
545            */
546            public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByMessageId_PrevAndNext(
547                    long messageFlagId, long messageId,
548                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
549                    throws com.liferay.portal.kernel.exception.SystemException,
550                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
551                    return getPersistence()
552                                       .findByMessageId_PrevAndNext(messageFlagId, messageId,
553                            orderByComparator);
554            }
555    
556            /**
557            * Finds all the message boards message flags where threadId = &#63; and flag = &#63;.
558            *
559            * @param threadId the thread id to search with
560            * @param flag the flag to search with
561            * @return the matching message boards message flags
562            * @throws SystemException if a system exception occurred
563            */
564            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByT_F(
565                    long threadId, int flag)
566                    throws com.liferay.portal.kernel.exception.SystemException {
567                    return getPersistence().findByT_F(threadId, flag);
568            }
569    
570            /**
571            * Finds a range of all the message boards message flags where threadId = &#63; and flag = &#63;.
572            *
573            * <p>
574            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
575            * </p>
576            *
577            * @param threadId the thread id to search with
578            * @param flag the flag to search with
579            * @param start the lower bound of the range of message boards message flags to return
580            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
581            * @return the range of matching message boards message flags
582            * @throws SystemException if a system exception occurred
583            */
584            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByT_F(
585                    long threadId, int flag, int start, int end)
586                    throws com.liferay.portal.kernel.exception.SystemException {
587                    return getPersistence().findByT_F(threadId, flag, start, end);
588            }
589    
590            /**
591            * Finds an ordered range of all the message boards message flags where threadId = &#63; and flag = &#63;.
592            *
593            * <p>
594            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
595            * </p>
596            *
597            * @param threadId the thread id to search with
598            * @param flag the flag to search with
599            * @param start the lower bound of the range of message boards message flags to return
600            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
601            * @param orderByComparator the comparator to order the results by
602            * @return the ordered range of matching message boards message flags
603            * @throws SystemException if a system exception occurred
604            */
605            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByT_F(
606                    long threadId, int flag, int start, int end,
607                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
608                    throws com.liferay.portal.kernel.exception.SystemException {
609                    return getPersistence()
610                                       .findByT_F(threadId, flag, start, end, orderByComparator);
611            }
612    
613            /**
614            * Finds the first message boards message flag in the ordered set where threadId = &#63; and flag = &#63;.
615            *
616            * <p>
617            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
618            * </p>
619            *
620            * @param threadId the thread id to search with
621            * @param flag the flag to search with
622            * @param orderByComparator the comparator to order the set by
623            * @return the first matching message boards message flag
624            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
625            * @throws SystemException if a system exception occurred
626            */
627            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByT_F_First(
628                    long threadId, int flag,
629                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
630                    throws com.liferay.portal.kernel.exception.SystemException,
631                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
632                    return getPersistence()
633                                       .findByT_F_First(threadId, flag, orderByComparator);
634            }
635    
636            /**
637            * Finds the last message boards message flag in the ordered set where threadId = &#63; and flag = &#63;.
638            *
639            * <p>
640            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
641            * </p>
642            *
643            * @param threadId the thread id to search with
644            * @param flag the flag to search with
645            * @param orderByComparator the comparator to order the set by
646            * @return the last matching message boards message flag
647            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
648            * @throws SystemException if a system exception occurred
649            */
650            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByT_F_Last(
651                    long threadId, int flag,
652                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
653                    throws com.liferay.portal.kernel.exception.SystemException,
654                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
655                    return getPersistence().findByT_F_Last(threadId, flag, orderByComparator);
656            }
657    
658            /**
659            * Finds the message boards message flags before and after the current message boards message flag in the ordered set where threadId = &#63; and flag = &#63;.
660            *
661            * <p>
662            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
663            * </p>
664            *
665            * @param messageFlagId the primary key of the current message boards message flag
666            * @param threadId the thread id to search with
667            * @param flag the flag to search with
668            * @param orderByComparator the comparator to order the set by
669            * @return the previous, current, and next message boards message flag
670            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a message boards message flag with the primary key could not be found
671            * @throws SystemException if a system exception occurred
672            */
673            public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByT_F_PrevAndNext(
674                    long messageFlagId, long threadId, int flag,
675                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
676                    throws com.liferay.portal.kernel.exception.SystemException,
677                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
678                    return getPersistence()
679                                       .findByT_F_PrevAndNext(messageFlagId, threadId, flag,
680                            orderByComparator);
681            }
682    
683            /**
684            * Finds all the message boards message flags where messageId = &#63; and flag = &#63;.
685            *
686            * @param messageId the message id to search with
687            * @param flag the flag to search with
688            * @return the matching message boards message flags
689            * @throws SystemException if a system exception occurred
690            */
691            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByM_F(
692                    long messageId, int flag)
693                    throws com.liferay.portal.kernel.exception.SystemException {
694                    return getPersistence().findByM_F(messageId, flag);
695            }
696    
697            /**
698            * Finds a range of all the message boards message flags where messageId = &#63; and flag = &#63;.
699            *
700            * <p>
701            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
702            * </p>
703            *
704            * @param messageId the message id to search with
705            * @param flag the flag to search with
706            * @param start the lower bound of the range of message boards message flags to return
707            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
708            * @return the range of matching message boards message flags
709            * @throws SystemException if a system exception occurred
710            */
711            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByM_F(
712                    long messageId, int flag, int start, int end)
713                    throws com.liferay.portal.kernel.exception.SystemException {
714                    return getPersistence().findByM_F(messageId, flag, start, end);
715            }
716    
717            /**
718            * Finds an ordered range of all the message boards message flags where messageId = &#63; and flag = &#63;.
719            *
720            * <p>
721            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
722            * </p>
723            *
724            * @param messageId the message id to search with
725            * @param flag the flag to search with
726            * @param start the lower bound of the range of message boards message flags to return
727            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
728            * @param orderByComparator the comparator to order the results by
729            * @return the ordered range of matching message boards message flags
730            * @throws SystemException if a system exception occurred
731            */
732            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByM_F(
733                    long messageId, int flag, int start, int end,
734                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
735                    throws com.liferay.portal.kernel.exception.SystemException {
736                    return getPersistence()
737                                       .findByM_F(messageId, flag, start, end, orderByComparator);
738            }
739    
740            /**
741            * Finds the first message boards message flag in the ordered set where messageId = &#63; and flag = &#63;.
742            *
743            * <p>
744            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
745            * </p>
746            *
747            * @param messageId the message id to search with
748            * @param flag the flag to search with
749            * @param orderByComparator the comparator to order the set by
750            * @return the first matching message boards message flag
751            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
752            * @throws SystemException if a system exception occurred
753            */
754            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByM_F_First(
755                    long messageId, int flag,
756                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
757                    throws com.liferay.portal.kernel.exception.SystemException,
758                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
759                    return getPersistence()
760                                       .findByM_F_First(messageId, flag, orderByComparator);
761            }
762    
763            /**
764            * Finds the last message boards message flag in the ordered set where messageId = &#63; and flag = &#63;.
765            *
766            * <p>
767            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
768            * </p>
769            *
770            * @param messageId the message id to search with
771            * @param flag the flag to search with
772            * @param orderByComparator the comparator to order the set by
773            * @return the last matching message boards message flag
774            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
775            * @throws SystemException if a system exception occurred
776            */
777            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByM_F_Last(
778                    long messageId, int flag,
779                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
780                    throws com.liferay.portal.kernel.exception.SystemException,
781                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
782                    return getPersistence()
783                                       .findByM_F_Last(messageId, flag, orderByComparator);
784            }
785    
786            /**
787            * Finds the message boards message flags before and after the current message boards message flag in the ordered set where messageId = &#63; and flag = &#63;.
788            *
789            * <p>
790            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
791            * </p>
792            *
793            * @param messageFlagId the primary key of the current message boards message flag
794            * @param messageId the message id to search with
795            * @param flag the flag to search with
796            * @param orderByComparator the comparator to order the set by
797            * @return the previous, current, and next message boards message flag
798            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a message boards message flag with the primary key could not be found
799            * @throws SystemException if a system exception occurred
800            */
801            public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByM_F_PrevAndNext(
802                    long messageFlagId, long messageId, int flag,
803                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
804                    throws com.liferay.portal.kernel.exception.SystemException,
805                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
806                    return getPersistence()
807                                       .findByM_F_PrevAndNext(messageFlagId, messageId, flag,
808                            orderByComparator);
809            }
810    
811            /**
812            * Finds all the message boards message flags where userId = &#63; and threadId = &#63; and flag = &#63;.
813            *
814            * @param userId the user id to search with
815            * @param threadId the thread id to search with
816            * @param flag the flag to search with
817            * @return the matching message boards message flags
818            * @throws SystemException if a system exception occurred
819            */
820            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByU_T_F(
821                    long userId, long threadId, int flag)
822                    throws com.liferay.portal.kernel.exception.SystemException {
823                    return getPersistence().findByU_T_F(userId, threadId, flag);
824            }
825    
826            /**
827            * Finds a range of all the message boards message flags where userId = &#63; and threadId = &#63; and flag = &#63;.
828            *
829            * <p>
830            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
831            * </p>
832            *
833            * @param userId the user id to search with
834            * @param threadId the thread id to search with
835            * @param flag the flag to search with
836            * @param start the lower bound of the range of message boards message flags to return
837            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
838            * @return the range of matching message boards message flags
839            * @throws SystemException if a system exception occurred
840            */
841            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByU_T_F(
842                    long userId, long threadId, int flag, int start, int end)
843                    throws com.liferay.portal.kernel.exception.SystemException {
844                    return getPersistence().findByU_T_F(userId, threadId, flag, start, end);
845            }
846    
847            /**
848            * Finds an ordered range of all the message boards message flags where userId = &#63; and threadId = &#63; and flag = &#63;.
849            *
850            * <p>
851            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
852            * </p>
853            *
854            * @param userId the user id to search with
855            * @param threadId the thread id to search with
856            * @param flag the flag to search with
857            * @param start the lower bound of the range of message boards message flags to return
858            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
859            * @param orderByComparator the comparator to order the results by
860            * @return the ordered range of matching message boards message flags
861            * @throws SystemException if a system exception occurred
862            */
863            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByU_T_F(
864                    long userId, long threadId, int flag, int start, int end,
865                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
866                    throws com.liferay.portal.kernel.exception.SystemException {
867                    return getPersistence()
868                                       .findByU_T_F(userId, threadId, flag, start, end,
869                            orderByComparator);
870            }
871    
872            /**
873            * Finds the first message boards message flag in the ordered set where userId = &#63; and threadId = &#63; and flag = &#63;.
874            *
875            * <p>
876            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
877            * </p>
878            *
879            * @param userId the user id to search with
880            * @param threadId the thread id to search with
881            * @param flag the flag to search with
882            * @param orderByComparator the comparator to order the set by
883            * @return the first matching message boards message flag
884            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
885            * @throws SystemException if a system exception occurred
886            */
887            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByU_T_F_First(
888                    long userId, long threadId, int flag,
889                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
890                    throws com.liferay.portal.kernel.exception.SystemException,
891                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
892                    return getPersistence()
893                                       .findByU_T_F_First(userId, threadId, flag, orderByComparator);
894            }
895    
896            /**
897            * Finds the last message boards message flag in the ordered set where userId = &#63; and threadId = &#63; and flag = &#63;.
898            *
899            * <p>
900            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
901            * </p>
902            *
903            * @param userId the user id to search with
904            * @param threadId the thread id to search with
905            * @param flag the flag to search with
906            * @param orderByComparator the comparator to order the set by
907            * @return the last matching message boards message flag
908            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
909            * @throws SystemException if a system exception occurred
910            */
911            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByU_T_F_Last(
912                    long userId, long threadId, int flag,
913                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
914                    throws com.liferay.portal.kernel.exception.SystemException,
915                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
916                    return getPersistence()
917                                       .findByU_T_F_Last(userId, threadId, flag, orderByComparator);
918            }
919    
920            /**
921            * Finds the message boards message flags before and after the current message boards message flag in the ordered set where userId = &#63; and threadId = &#63; and flag = &#63;.
922            *
923            * <p>
924            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
925            * </p>
926            *
927            * @param messageFlagId the primary key of the current message boards message flag
928            * @param userId the user id to search with
929            * @param threadId the thread id to search with
930            * @param flag the flag to search with
931            * @param orderByComparator the comparator to order the set by
932            * @return the previous, current, and next message boards message flag
933            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a message boards message flag with the primary key could not be found
934            * @throws SystemException if a system exception occurred
935            */
936            public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByU_T_F_PrevAndNext(
937                    long messageFlagId, long userId, long threadId, int flag,
938                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
939                    throws com.liferay.portal.kernel.exception.SystemException,
940                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
941                    return getPersistence()
942                                       .findByU_T_F_PrevAndNext(messageFlagId, userId, threadId,
943                            flag, orderByComparator);
944            }
945    
946            /**
947            * Finds the message boards message flag where userId = &#63; and messageId = &#63; and flag = &#63; or throws a {@link com.liferay.portlet.messageboards.NoSuchMessageFlagException} if it could not be found.
948            *
949            * @param userId the user id to search with
950            * @param messageId the message id to search with
951            * @param flag the flag to search with
952            * @return the matching message boards message flag
953            * @throws com.liferay.portlet.messageboards.NoSuchMessageFlagException if a matching message boards message flag could not be found
954            * @throws SystemException if a system exception occurred
955            */
956            public static com.liferay.portlet.messageboards.model.MBMessageFlag findByU_M_F(
957                    long userId, long messageId, int flag)
958                    throws com.liferay.portal.kernel.exception.SystemException,
959                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
960                    return getPersistence().findByU_M_F(userId, messageId, flag);
961            }
962    
963            /**
964            * Finds the message boards message flag where userId = &#63; and messageId = &#63; and flag = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
965            *
966            * @param userId the user id to search with
967            * @param messageId the message id to search with
968            * @param flag the flag to search with
969            * @return the matching message boards message flag, or <code>null</code> if a matching message boards message flag could not be found
970            * @throws SystemException if a system exception occurred
971            */
972            public static com.liferay.portlet.messageboards.model.MBMessageFlag fetchByU_M_F(
973                    long userId, long messageId, int flag)
974                    throws com.liferay.portal.kernel.exception.SystemException {
975                    return getPersistence().fetchByU_M_F(userId, messageId, flag);
976            }
977    
978            /**
979            * Finds the message boards message flag where userId = &#63; and messageId = &#63; and flag = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
980            *
981            * @param userId the user id to search with
982            * @param messageId the message id to search with
983            * @param flag the flag to search with
984            * @return the matching message boards message flag, or <code>null</code> if a matching message boards message flag could not be found
985            * @throws SystemException if a system exception occurred
986            */
987            public static com.liferay.portlet.messageboards.model.MBMessageFlag fetchByU_M_F(
988                    long userId, long messageId, int flag, boolean retrieveFromCache)
989                    throws com.liferay.portal.kernel.exception.SystemException {
990                    return getPersistence()
991                                       .fetchByU_M_F(userId, messageId, flag, retrieveFromCache);
992            }
993    
994            /**
995            * Finds all the message boards message flags.
996            *
997            * @return the message boards message flags
998            * @throws SystemException if a system exception occurred
999            */
1000            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findAll()
1001                    throws com.liferay.portal.kernel.exception.SystemException {
1002                    return getPersistence().findAll();
1003            }
1004    
1005            /**
1006            * Finds a range of all the message boards message flags.
1007            *
1008            * <p>
1009            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1010            * </p>
1011            *
1012            * @param start the lower bound of the range of message boards message flags to return
1013            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
1014            * @return the range of message boards message flags
1015            * @throws SystemException if a system exception occurred
1016            */
1017            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findAll(
1018                    int start, int end)
1019                    throws com.liferay.portal.kernel.exception.SystemException {
1020                    return getPersistence().findAll(start, end);
1021            }
1022    
1023            /**
1024            * Finds an ordered range of all the message boards message flags.
1025            *
1026            * <p>
1027            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1028            * </p>
1029            *
1030            * @param start the lower bound of the range of message boards message flags to return
1031            * @param end the upper bound of the range of message boards message flags to return (not inclusive)
1032            * @param orderByComparator the comparator to order the results by
1033            * @return the ordered range of message boards message flags
1034            * @throws SystemException if a system exception occurred
1035            */
1036            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findAll(
1037                    int start, int end,
1038                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1039                    throws com.liferay.portal.kernel.exception.SystemException {
1040                    return getPersistence().findAll(start, end, orderByComparator);
1041            }
1042    
1043            /**
1044            * Removes all the message boards message flags where userId = &#63; from the database.
1045            *
1046            * @param userId the user id to search with
1047            * @throws SystemException if a system exception occurred
1048            */
1049            public static void removeByUserId(long userId)
1050                    throws com.liferay.portal.kernel.exception.SystemException {
1051                    getPersistence().removeByUserId(userId);
1052            }
1053    
1054            /**
1055            * Removes all the message boards message flags where threadId = &#63; from the database.
1056            *
1057            * @param threadId the thread id to search with
1058            * @throws SystemException if a system exception occurred
1059            */
1060            public static void removeByThreadId(long threadId)
1061                    throws com.liferay.portal.kernel.exception.SystemException {
1062                    getPersistence().removeByThreadId(threadId);
1063            }
1064    
1065            /**
1066            * Removes all the message boards message flags where messageId = &#63; from the database.
1067            *
1068            * @param messageId the message id to search with
1069            * @throws SystemException if a system exception occurred
1070            */
1071            public static void removeByMessageId(long messageId)
1072                    throws com.liferay.portal.kernel.exception.SystemException {
1073                    getPersistence().removeByMessageId(messageId);
1074            }
1075    
1076            /**
1077            * Removes all the message boards message flags where threadId = &#63; and flag = &#63; from the database.
1078            *
1079            * @param threadId the thread id to search with
1080            * @param flag the flag to search with
1081            * @throws SystemException if a system exception occurred
1082            */
1083            public static void removeByT_F(long threadId, int flag)
1084                    throws com.liferay.portal.kernel.exception.SystemException {
1085                    getPersistence().removeByT_F(threadId, flag);
1086            }
1087    
1088            /**
1089            * Removes all the message boards message flags where messageId = &#63; and flag = &#63; from the database.
1090            *
1091            * @param messageId the message id to search with
1092            * @param flag the flag to search with
1093            * @throws SystemException if a system exception occurred
1094            */
1095            public static void removeByM_F(long messageId, int flag)
1096                    throws com.liferay.portal.kernel.exception.SystemException {
1097                    getPersistence().removeByM_F(messageId, flag);
1098            }
1099    
1100            /**
1101            * Removes all the message boards message flags where userId = &#63; and threadId = &#63; and flag = &#63; from the database.
1102            *
1103            * @param userId the user id to search with
1104            * @param threadId the thread id to search with
1105            * @param flag the flag to search with
1106            * @throws SystemException if a system exception occurred
1107            */
1108            public static void removeByU_T_F(long userId, long threadId, int flag)
1109                    throws com.liferay.portal.kernel.exception.SystemException {
1110                    getPersistence().removeByU_T_F(userId, threadId, flag);
1111            }
1112    
1113            /**
1114            * Removes the message boards message flag where userId = &#63; and messageId = &#63; and flag = &#63; from the database.
1115            *
1116            * @param userId the user id to search with
1117            * @param messageId the message id to search with
1118            * @param flag the flag to search with
1119            * @throws SystemException if a system exception occurred
1120            */
1121            public static void removeByU_M_F(long userId, long messageId, int flag)
1122                    throws com.liferay.portal.kernel.exception.SystemException,
1123                            com.liferay.portlet.messageboards.NoSuchMessageFlagException {
1124                    getPersistence().removeByU_M_F(userId, messageId, flag);
1125            }
1126    
1127            /**
1128            * Removes all the message boards message flags from the database.
1129            *
1130            * @throws SystemException if a system exception occurred
1131            */
1132            public static void removeAll()
1133                    throws com.liferay.portal.kernel.exception.SystemException {
1134                    getPersistence().removeAll();
1135            }
1136    
1137            /**
1138            * Counts all the message boards message flags where userId = &#63;.
1139            *
1140            * @param userId the user id to search with
1141            * @return the number of matching message boards message flags
1142            * @throws SystemException if a system exception occurred
1143            */
1144            public static int countByUserId(long userId)
1145                    throws com.liferay.portal.kernel.exception.SystemException {
1146                    return getPersistence().countByUserId(userId);
1147            }
1148    
1149            /**
1150            * Counts all the message boards message flags where threadId = &#63;.
1151            *
1152            * @param threadId the thread id to search with
1153            * @return the number of matching message boards message flags
1154            * @throws SystemException if a system exception occurred
1155            */
1156            public static int countByThreadId(long threadId)
1157                    throws com.liferay.portal.kernel.exception.SystemException {
1158                    return getPersistence().countByThreadId(threadId);
1159            }
1160    
1161            /**
1162            * Counts all the message boards message flags where messageId = &#63;.
1163            *
1164            * @param messageId the message id to search with
1165            * @return the number of matching message boards message flags
1166            * @throws SystemException if a system exception occurred
1167            */
1168            public static int countByMessageId(long messageId)
1169                    throws com.liferay.portal.kernel.exception.SystemException {
1170                    return getPersistence().countByMessageId(messageId);
1171            }
1172    
1173            /**
1174            * Counts all the message boards message flags where threadId = &#63; and flag = &#63;.
1175            *
1176            * @param threadId the thread id to search with
1177            * @param flag the flag to search with
1178            * @return the number of matching message boards message flags
1179            * @throws SystemException if a system exception occurred
1180            */
1181            public static int countByT_F(long threadId, int flag)
1182                    throws com.liferay.portal.kernel.exception.SystemException {
1183                    return getPersistence().countByT_F(threadId, flag);
1184            }
1185    
1186            /**
1187            * Counts all the message boards message flags where messageId = &#63; and flag = &#63;.
1188            *
1189            * @param messageId the message id to search with
1190            * @param flag the flag to search with
1191            * @return the number of matching message boards message flags
1192            * @throws SystemException if a system exception occurred
1193            */
1194            public static int countByM_F(long messageId, int flag)
1195                    throws com.liferay.portal.kernel.exception.SystemException {
1196                    return getPersistence().countByM_F(messageId, flag);
1197            }
1198    
1199            /**
1200            * Counts all the message boards message flags where userId = &#63; and threadId = &#63; and flag = &#63;.
1201            *
1202            * @param userId the user id to search with
1203            * @param threadId the thread id to search with
1204            * @param flag the flag to search with
1205            * @return the number of matching message boards message flags
1206            * @throws SystemException if a system exception occurred
1207            */
1208            public static int countByU_T_F(long userId, long threadId, int flag)
1209                    throws com.liferay.portal.kernel.exception.SystemException {
1210                    return getPersistence().countByU_T_F(userId, threadId, flag);
1211            }
1212    
1213            /**
1214            * Counts all the message boards message flags where userId = &#63; and messageId = &#63; and flag = &#63;.
1215            *
1216            * @param userId the user id to search with
1217            * @param messageId the message id to search with
1218            * @param flag the flag to search with
1219            * @return the number of matching message boards message flags
1220            * @throws SystemException if a system exception occurred
1221            */
1222            public static int countByU_M_F(long userId, long messageId, int flag)
1223                    throws com.liferay.portal.kernel.exception.SystemException {
1224                    return getPersistence().countByU_M_F(userId, messageId, flag);
1225            }
1226    
1227            /**
1228            * Counts all the message boards message flags.
1229            *
1230            * @return the number of message boards message flags
1231            * @throws SystemException if a system exception occurred
1232            */
1233            public static int countAll()
1234                    throws com.liferay.portal.kernel.exception.SystemException {
1235                    return getPersistence().countAll();
1236            }
1237    
1238            public static MBMessageFlagPersistence getPersistence() {
1239                    if (_persistence == null) {
1240                            _persistence = (MBMessageFlagPersistence)PortalBeanLocatorUtil.locate(MBMessageFlagPersistence.class.getName());
1241                    }
1242    
1243                    return _persistence;
1244            }
1245    
1246            public void setPersistence(MBMessageFlagPersistence persistence) {
1247                    _persistence = persistence;
1248            }
1249    
1250            private static MBMessageFlagPersistence _persistence;
1251    }