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