001    /**
002     * Copyright (c) 2000-2013 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.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.messageboards.model.MBThreadFlag;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the message boards thread flag service. This utility wraps {@link MBThreadFlagPersistenceImpl} 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 MBThreadFlagPersistence
037     * @see MBThreadFlagPersistenceImpl
038     * @generated
039     */
040    public class MBThreadFlagUtil {
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(MBThreadFlag mbThreadFlag) {
058                    getPersistence().clearCache(mbThreadFlag);
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<MBThreadFlag> 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<MBThreadFlag> 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<MBThreadFlag> 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#update(com.liferay.portal.model.BaseModel, boolean)
099             */
100            public static MBThreadFlag update(MBThreadFlag mbThreadFlag, boolean merge)
101                    throws SystemException {
102                    return getPersistence().update(mbThreadFlag, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static MBThreadFlag update(MBThreadFlag mbThreadFlag, boolean merge,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(mbThreadFlag, merge, serviceContext);
111            }
112    
113            /**
114            * Caches the message boards thread flag in the entity cache if it is enabled.
115            *
116            * @param mbThreadFlag the message boards thread flag
117            */
118            public static void cacheResult(
119                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag) {
120                    getPersistence().cacheResult(mbThreadFlag);
121            }
122    
123            /**
124            * Caches the message boards thread flags in the entity cache if it is enabled.
125            *
126            * @param mbThreadFlags the message boards thread flags
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> mbThreadFlags) {
130                    getPersistence().cacheResult(mbThreadFlags);
131            }
132    
133            /**
134            * Creates a new message boards thread flag with the primary key. Does not add the message boards thread flag to the database.
135            *
136            * @param threadFlagId the primary key for the new message boards thread flag
137            * @return the new message boards thread flag
138            */
139            public static com.liferay.portlet.messageboards.model.MBThreadFlag create(
140                    long threadFlagId) {
141                    return getPersistence().create(threadFlagId);
142            }
143    
144            /**
145            * Removes the message boards thread flag with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param threadFlagId the primary key of the message boards thread flag
148            * @return the message boards thread flag that was removed
149            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portlet.messageboards.model.MBThreadFlag remove(
153                    long threadFlagId)
154                    throws com.liferay.portal.kernel.exception.SystemException,
155                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
156                    return getPersistence().remove(threadFlagId);
157            }
158    
159            public static com.liferay.portlet.messageboards.model.MBThreadFlag updateImpl(
160                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag,
161                    boolean merge)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().updateImpl(mbThreadFlag, merge);
164            }
165    
166            /**
167            * Returns the message boards thread flag with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchThreadFlagException} if it could not be found.
168            *
169            * @param threadFlagId the primary key of the message boards thread flag
170            * @return the message boards thread flag
171            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
172            * @throws SystemException if a system exception occurred
173            */
174            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByPrimaryKey(
175                    long threadFlagId)
176                    throws com.liferay.portal.kernel.exception.SystemException,
177                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
178                    return getPersistence().findByPrimaryKey(threadFlagId);
179            }
180    
181            /**
182            * Returns the message boards thread flag with the primary key or returns <code>null</code> if it could not be found.
183            *
184            * @param threadFlagId the primary key of the message boards thread flag
185            * @return the message boards thread flag, or <code>null</code> if a message boards thread flag with the primary key could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByPrimaryKey(
189                    long threadFlagId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence().fetchByPrimaryKey(threadFlagId);
192            }
193    
194            /**
195            * Returns all the message boards thread flags where userId = &#63;.
196            *
197            * @param userId the user ID
198            * @return the matching message boards thread flags
199            * @throws SystemException if a system exception occurred
200            */
201            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId(
202                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().findByUserId(userId);
204            }
205    
206            /**
207            * Returns a range of all the message boards thread flags where userId = &#63;.
208            *
209            * <p>
210            * 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.
211            * </p>
212            *
213            * @param userId the user ID
214            * @param start the lower bound of the range of message boards thread flags
215            * @param end the upper bound of the range of message boards thread flags (not inclusive)
216            * @return the range of matching message boards thread flags
217            * @throws SystemException if a system exception occurred
218            */
219            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId(
220                    long userId, int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getPersistence().findByUserId(userId, start, end);
223            }
224    
225            /**
226            * Returns an ordered range of all the message boards thread flags where userId = &#63;.
227            *
228            * <p>
229            * 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.
230            * </p>
231            *
232            * @param userId the user ID
233            * @param start the lower bound of the range of message boards thread flags
234            * @param end the upper bound of the range of message boards thread flags (not inclusive)
235            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
236            * @return the ordered range of matching message boards thread flags
237            * @throws SystemException if a system exception occurred
238            */
239            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId(
240                    long userId, int start, int end,
241                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return getPersistence()
244                                       .findByUserId(userId, start, end, orderByComparator);
245            }
246    
247            /**
248            * Returns the first message boards thread flag in the ordered set where userId = &#63;.
249            *
250            * @param userId the user ID
251            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
252            * @return the first matching message boards thread flag
253            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
254            * @throws SystemException if a system exception occurred
255            */
256            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_First(
257                    long userId,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.kernel.exception.SystemException,
260                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
261                    return getPersistence().findByUserId_First(userId, orderByComparator);
262            }
263    
264            /**
265            * Returns the first message boards thread flag in the ordered set where userId = &#63;.
266            *
267            * @param userId the user ID
268            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
269            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
270            * @throws SystemException if a system exception occurred
271            */
272            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUserId_First(
273                    long userId,
274                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
275                    throws com.liferay.portal.kernel.exception.SystemException {
276                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
277            }
278    
279            /**
280            * Returns the last message boards thread flag in the ordered set where userId = &#63;.
281            *
282            * @param userId the user ID
283            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
284            * @return the last matching message boards thread flag
285            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
286            * @throws SystemException if a system exception occurred
287            */
288            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_Last(
289                    long userId,
290                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
291                    throws com.liferay.portal.kernel.exception.SystemException,
292                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
293                    return getPersistence().findByUserId_Last(userId, orderByComparator);
294            }
295    
296            /**
297            * Returns the last message boards thread flag in the ordered set where userId = &#63;.
298            *
299            * @param userId the user ID
300            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
301            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUserId_Last(
305                    long userId,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.kernel.exception.SystemException {
308                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
309            }
310    
311            /**
312            * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where userId = &#63;.
313            *
314            * @param threadFlagId the primary key of the current message boards thread flag
315            * @param userId the user ID
316            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
317            * @return the previous, current, and next message boards thread flag
318            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
319            * @throws SystemException if a system exception occurred
320            */
321            public static com.liferay.portlet.messageboards.model.MBThreadFlag[] findByUserId_PrevAndNext(
322                    long threadFlagId, long userId,
323                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
324                    throws com.liferay.portal.kernel.exception.SystemException,
325                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
326                    return getPersistence()
327                                       .findByUserId_PrevAndNext(threadFlagId, userId,
328                            orderByComparator);
329            }
330    
331            /**
332            * Returns all the message boards thread flags where threadId = &#63;.
333            *
334            * @param threadId the thread ID
335            * @return the matching message boards thread flags
336            * @throws SystemException if a system exception occurred
337            */
338            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId(
339                    long threadId)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence().findByThreadId(threadId);
342            }
343    
344            /**
345            * Returns a range of all the message boards thread flags where threadId = &#63;.
346            *
347            * <p>
348            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
349            * </p>
350            *
351            * @param threadId the thread ID
352            * @param start the lower bound of the range of message boards thread flags
353            * @param end the upper bound of the range of message boards thread flags (not inclusive)
354            * @return the range of matching message boards thread flags
355            * @throws SystemException if a system exception occurred
356            */
357            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId(
358                    long threadId, int start, int end)
359                    throws com.liferay.portal.kernel.exception.SystemException {
360                    return getPersistence().findByThreadId(threadId, start, end);
361            }
362    
363            /**
364            * Returns an ordered range of all the message boards thread flags where threadId = &#63;.
365            *
366            * <p>
367            * 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.
368            * </p>
369            *
370            * @param threadId the thread ID
371            * @param start the lower bound of the range of message boards thread flags
372            * @param end the upper bound of the range of message boards thread flags (not inclusive)
373            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
374            * @return the ordered range of matching message boards thread flags
375            * @throws SystemException if a system exception occurred
376            */
377            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId(
378                    long threadId, int start, int end,
379                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
380                    throws com.liferay.portal.kernel.exception.SystemException {
381                    return getPersistence()
382                                       .findByThreadId(threadId, start, end, orderByComparator);
383            }
384    
385            /**
386            * Returns the first message boards thread flag in the ordered set where threadId = &#63;.
387            *
388            * @param threadId the thread ID
389            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
390            * @return the first matching message boards thread flag
391            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
392            * @throws SystemException if a system exception occurred
393            */
394            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_First(
395                    long threadId,
396                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
397                    throws com.liferay.portal.kernel.exception.SystemException,
398                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
399                    return getPersistence().findByThreadId_First(threadId, orderByComparator);
400            }
401    
402            /**
403            * Returns the first message boards thread flag in the ordered set where threadId = &#63;.
404            *
405            * @param threadId the thread ID
406            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
407            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
408            * @throws SystemException if a system exception occurred
409            */
410            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByThreadId_First(
411                    long threadId,
412                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
413                    throws com.liferay.portal.kernel.exception.SystemException {
414                    return getPersistence()
415                                       .fetchByThreadId_First(threadId, orderByComparator);
416            }
417    
418            /**
419            * Returns the last message boards thread flag in the ordered set where threadId = &#63;.
420            *
421            * @param threadId the thread ID
422            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
423            * @return the last matching message boards thread flag
424            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
425            * @throws SystemException if a system exception occurred
426            */
427            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_Last(
428                    long threadId,
429                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
430                    throws com.liferay.portal.kernel.exception.SystemException,
431                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
432                    return getPersistence().findByThreadId_Last(threadId, orderByComparator);
433            }
434    
435            /**
436            * Returns the last message boards thread flag in the ordered set where threadId = &#63;.
437            *
438            * @param threadId the thread ID
439            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
440            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
441            * @throws SystemException if a system exception occurred
442            */
443            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByThreadId_Last(
444                    long threadId,
445                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
446                    throws com.liferay.portal.kernel.exception.SystemException {
447                    return getPersistence().fetchByThreadId_Last(threadId, orderByComparator);
448            }
449    
450            /**
451            * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where threadId = &#63;.
452            *
453            * @param threadFlagId the primary key of the current message boards thread flag
454            * @param threadId the thread ID
455            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
456            * @return the previous, current, and next message boards thread flag
457            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
458            * @throws SystemException if a system exception occurred
459            */
460            public static com.liferay.portlet.messageboards.model.MBThreadFlag[] findByThreadId_PrevAndNext(
461                    long threadFlagId, long threadId,
462                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
463                    throws com.liferay.portal.kernel.exception.SystemException,
464                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
465                    return getPersistence()
466                                       .findByThreadId_PrevAndNext(threadFlagId, threadId,
467                            orderByComparator);
468            }
469    
470            /**
471            * Returns the message boards thread flag where userId = &#63; and threadId = &#63; or throws a {@link com.liferay.portlet.messageboards.NoSuchThreadFlagException} if it could not be found.
472            *
473            * @param userId the user ID
474            * @param threadId the thread ID
475            * @return the matching message boards thread flag
476            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
477            * @throws SystemException if a system exception occurred
478            */
479            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByU_T(
480                    long userId, long threadId)
481                    throws com.liferay.portal.kernel.exception.SystemException,
482                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
483                    return getPersistence().findByU_T(userId, threadId);
484            }
485    
486            /**
487            * Returns the message boards thread flag where userId = &#63; and threadId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
488            *
489            * @param userId the user ID
490            * @param threadId the thread ID
491            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
492            * @throws SystemException if a system exception occurred
493            */
494            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T(
495                    long userId, long threadId)
496                    throws com.liferay.portal.kernel.exception.SystemException {
497                    return getPersistence().fetchByU_T(userId, threadId);
498            }
499    
500            /**
501            * Returns the message boards thread flag where userId = &#63; and threadId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
502            *
503            * @param userId the user ID
504            * @param threadId the thread ID
505            * @param retrieveFromCache whether to use the finder cache
506            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
507            * @throws SystemException if a system exception occurred
508            */
509            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T(
510                    long userId, long threadId, boolean retrieveFromCache)
511                    throws com.liferay.portal.kernel.exception.SystemException {
512                    return getPersistence().fetchByU_T(userId, threadId, retrieveFromCache);
513            }
514    
515            /**
516            * Returns all the message boards thread flags.
517            *
518            * @return the message boards thread flags
519            * @throws SystemException if a system exception occurred
520            */
521            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll()
522                    throws com.liferay.portal.kernel.exception.SystemException {
523                    return getPersistence().findAll();
524            }
525    
526            /**
527            * Returns a range of all the message boards thread flags.
528            *
529            * <p>
530            * 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.
531            * </p>
532            *
533            * @param start the lower bound of the range of message boards thread flags
534            * @param end the upper bound of the range of message boards thread flags (not inclusive)
535            * @return the range of message boards thread flags
536            * @throws SystemException if a system exception occurred
537            */
538            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll(
539                    int start, int end)
540                    throws com.liferay.portal.kernel.exception.SystemException {
541                    return getPersistence().findAll(start, end);
542            }
543    
544            /**
545            * Returns an ordered range of all the message boards thread flags.
546            *
547            * <p>
548            * 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.
549            * </p>
550            *
551            * @param start the lower bound of the range of message boards thread flags
552            * @param end the upper bound of the range of message boards thread flags (not inclusive)
553            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
554            * @return the ordered range of message boards thread flags
555            * @throws SystemException if a system exception occurred
556            */
557            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll(
558                    int start, int end,
559                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
560                    throws com.liferay.portal.kernel.exception.SystemException {
561                    return getPersistence().findAll(start, end, orderByComparator);
562            }
563    
564            /**
565            * Removes all the message boards thread flags where userId = &#63; from the database.
566            *
567            * @param userId the user ID
568            * @throws SystemException if a system exception occurred
569            */
570            public static void removeByUserId(long userId)
571                    throws com.liferay.portal.kernel.exception.SystemException {
572                    getPersistence().removeByUserId(userId);
573            }
574    
575            /**
576            * Removes all the message boards thread flags where threadId = &#63; from the database.
577            *
578            * @param threadId the thread ID
579            * @throws SystemException if a system exception occurred
580            */
581            public static void removeByThreadId(long threadId)
582                    throws com.liferay.portal.kernel.exception.SystemException {
583                    getPersistence().removeByThreadId(threadId);
584            }
585    
586            /**
587            * Removes the message boards thread flag where userId = &#63; and threadId = &#63; from the database.
588            *
589            * @param userId the user ID
590            * @param threadId the thread ID
591            * @return the message boards thread flag that was removed
592            * @throws SystemException if a system exception occurred
593            */
594            public static com.liferay.portlet.messageboards.model.MBThreadFlag removeByU_T(
595                    long userId, long threadId)
596                    throws com.liferay.portal.kernel.exception.SystemException,
597                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
598                    return getPersistence().removeByU_T(userId, threadId);
599            }
600    
601            /**
602            * Removes all the message boards thread flags from the database.
603            *
604            * @throws SystemException if a system exception occurred
605            */
606            public static void removeAll()
607                    throws com.liferay.portal.kernel.exception.SystemException {
608                    getPersistence().removeAll();
609            }
610    
611            /**
612            * Returns the number of message boards thread flags where userId = &#63;.
613            *
614            * @param userId the user ID
615            * @return the number of matching message boards thread flags
616            * @throws SystemException if a system exception occurred
617            */
618            public static int countByUserId(long userId)
619                    throws com.liferay.portal.kernel.exception.SystemException {
620                    return getPersistence().countByUserId(userId);
621            }
622    
623            /**
624            * Returns the number of message boards thread flags where threadId = &#63;.
625            *
626            * @param threadId the thread ID
627            * @return the number of matching message boards thread flags
628            * @throws SystemException if a system exception occurred
629            */
630            public static int countByThreadId(long threadId)
631                    throws com.liferay.portal.kernel.exception.SystemException {
632                    return getPersistence().countByThreadId(threadId);
633            }
634    
635            /**
636            * Returns the number of message boards thread flags where userId = &#63; and threadId = &#63;.
637            *
638            * @param userId the user ID
639            * @param threadId the thread ID
640            * @return the number of matching message boards thread flags
641            * @throws SystemException if a system exception occurred
642            */
643            public static int countByU_T(long userId, long threadId)
644                    throws com.liferay.portal.kernel.exception.SystemException {
645                    return getPersistence().countByU_T(userId, threadId);
646            }
647    
648            /**
649            * Returns the number of message boards thread flags.
650            *
651            * @return the number of message boards thread flags
652            * @throws SystemException if a system exception occurred
653            */
654            public static int countAll()
655                    throws com.liferay.portal.kernel.exception.SystemException {
656                    return getPersistence().countAll();
657            }
658    
659            public static MBThreadFlagPersistence getPersistence() {
660                    if (_persistence == null) {
661                            _persistence = (MBThreadFlagPersistence)PortalBeanLocatorUtil.locate(MBThreadFlagPersistence.class.getName());
662    
663                            ReferenceRegistry.registerReference(MBThreadFlagUtil.class,
664                                    "_persistence");
665                    }
666    
667                    return _persistence;
668            }
669    
670            /**
671             * @deprecated
672             */
673            public void setPersistence(MBThreadFlagPersistence persistence) {
674            }
675    
676            private static MBThreadFlagPersistence _persistence;
677    }