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