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)
099             */
100            public static MBThreadFlag update(MBThreadFlag mbThreadFlag)
101                    throws SystemException {
102                    return getPersistence().update(mbThreadFlag);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
107             */
108            public static MBThreadFlag update(MBThreadFlag mbThreadFlag,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(mbThreadFlag, serviceContext);
111            }
112    
113            /**
114            * Returns all the message boards thread flags where uuid = &#63;.
115            *
116            * @param uuid the uuid
117            * @return the matching message boards thread flags
118            * @throws SystemException if a system exception occurred
119            */
120            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUuid(
121                    java.lang.String uuid)
122                    throws com.liferay.portal.kernel.exception.SystemException {
123                    return getPersistence().findByUuid(uuid);
124            }
125    
126            /**
127            * Returns a range of all the message boards thread flags where uuid = &#63;.
128            *
129            * <p>
130            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBThreadFlagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
131            * </p>
132            *
133            * @param uuid the uuid
134            * @param start the lower bound of the range of message boards thread flags
135            * @param end the upper bound of the range of message boards thread flags (not inclusive)
136            * @return the range of matching message boards thread flags
137            * @throws SystemException if a system exception occurred
138            */
139            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUuid(
140                    java.lang.String uuid, int start, int end)
141                    throws com.liferay.portal.kernel.exception.SystemException {
142                    return getPersistence().findByUuid(uuid, start, end);
143            }
144    
145            /**
146            * Returns an ordered range of all the message boards thread flags where uuid = &#63;.
147            *
148            * <p>
149            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBThreadFlagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
150            * </p>
151            *
152            * @param uuid the uuid
153            * @param start the lower bound of the range of message boards thread flags
154            * @param end the upper bound of the range of message boards thread flags (not inclusive)
155            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
156            * @return the ordered range of matching message boards thread flags
157            * @throws SystemException if a system exception occurred
158            */
159            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUuid(
160                    java.lang.String uuid, int start, int end,
161                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
164            }
165    
166            /**
167            * Returns the first message boards thread flag in the ordered set where uuid = &#63;.
168            *
169            * @param uuid the uuid
170            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
171            * @return the first matching message boards thread flag
172            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByUuid_First(
176                    java.lang.String uuid,
177                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178                    throws com.liferay.portal.kernel.exception.SystemException,
179                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
180                    return getPersistence().findByUuid_First(uuid, orderByComparator);
181            }
182    
183            /**
184            * Returns the first message boards thread flag in the ordered set where uuid = &#63;.
185            *
186            * @param uuid the uuid
187            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
188            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
189            * @throws SystemException if a system exception occurred
190            */
191            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUuid_First(
192                    java.lang.String uuid,
193                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
196            }
197    
198            /**
199            * Returns the last message boards thread flag in the ordered set where uuid = &#63;.
200            *
201            * @param uuid the uuid
202            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
203            * @return the last matching message boards thread flag
204            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
205            * @throws SystemException if a system exception occurred
206            */
207            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByUuid_Last(
208                    java.lang.String uuid,
209                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210                    throws com.liferay.portal.kernel.exception.SystemException,
211                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
212                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
213            }
214    
215            /**
216            * Returns the last message boards thread flag in the ordered set where uuid = &#63;.
217            *
218            * @param uuid the uuid
219            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
220            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
221            * @throws SystemException if a system exception occurred
222            */
223            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUuid_Last(
224                    java.lang.String uuid,
225                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
228            }
229    
230            /**
231            * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where uuid = &#63;.
232            *
233            * @param threadFlagId the primary key of the current message boards thread flag
234            * @param uuid the uuid
235            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
236            * @return the previous, current, and next message boards thread flag
237            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
238            * @throws SystemException if a system exception occurred
239            */
240            public static com.liferay.portlet.messageboards.model.MBThreadFlag[] findByUuid_PrevAndNext(
241                    long threadFlagId, java.lang.String uuid,
242                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
243                    throws com.liferay.portal.kernel.exception.SystemException,
244                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
245                    return getPersistence()
246                                       .findByUuid_PrevAndNext(threadFlagId, uuid, orderByComparator);
247            }
248    
249            /**
250            * Removes all the message boards thread flags where uuid = &#63; from the database.
251            *
252            * @param uuid the uuid
253            * @throws SystemException if a system exception occurred
254            */
255            public static void removeByUuid(java.lang.String uuid)
256                    throws com.liferay.portal.kernel.exception.SystemException {
257                    getPersistence().removeByUuid(uuid);
258            }
259    
260            /**
261            * Returns the number of message boards thread flags where uuid = &#63;.
262            *
263            * @param uuid the uuid
264            * @return the number of matching message boards thread flags
265            * @throws SystemException if a system exception occurred
266            */
267            public static int countByUuid(java.lang.String uuid)
268                    throws com.liferay.portal.kernel.exception.SystemException {
269                    return getPersistence().countByUuid(uuid);
270            }
271    
272            /**
273            * Returns the message boards thread flag where uuid = &#63; and groupId = &#63; or throws a {@link com.liferay.portlet.messageboards.NoSuchThreadFlagException} if it could not be found.
274            *
275            * @param uuid the uuid
276            * @param groupId the group ID
277            * @return the matching message boards thread flag
278            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
279            * @throws SystemException if a system exception occurred
280            */
281            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByUUID_G(
282                    java.lang.String uuid, long groupId)
283                    throws com.liferay.portal.kernel.exception.SystemException,
284                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
285                    return getPersistence().findByUUID_G(uuid, groupId);
286            }
287    
288            /**
289            * Returns the message boards thread flag where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
290            *
291            * @param uuid the uuid
292            * @param groupId the group ID
293            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
294            * @throws SystemException if a system exception occurred
295            */
296            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUUID_G(
297                    java.lang.String uuid, long groupId)
298                    throws com.liferay.portal.kernel.exception.SystemException {
299                    return getPersistence().fetchByUUID_G(uuid, groupId);
300            }
301    
302            /**
303            * Returns the message boards thread flag where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
304            *
305            * @param uuid the uuid
306            * @param groupId the group ID
307            * @param retrieveFromCache whether to use the finder cache
308            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
309            * @throws SystemException if a system exception occurred
310            */
311            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUUID_G(
312                    java.lang.String uuid, long groupId, boolean retrieveFromCache)
313                    throws com.liferay.portal.kernel.exception.SystemException {
314                    return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
315            }
316    
317            /**
318            * Removes the message boards thread flag where uuid = &#63; and groupId = &#63; from the database.
319            *
320            * @param uuid the uuid
321            * @param groupId the group ID
322            * @return the message boards thread flag that was removed
323            * @throws SystemException if a system exception occurred
324            */
325            public static com.liferay.portlet.messageboards.model.MBThreadFlag removeByUUID_G(
326                    java.lang.String uuid, long groupId)
327                    throws com.liferay.portal.kernel.exception.SystemException,
328                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
329                    return getPersistence().removeByUUID_G(uuid, groupId);
330            }
331    
332            /**
333            * Returns the number of message boards thread flags where uuid = &#63; and groupId = &#63;.
334            *
335            * @param uuid the uuid
336            * @param groupId the group ID
337            * @return the number of matching message boards thread flags
338            * @throws SystemException if a system exception occurred
339            */
340            public static int countByUUID_G(java.lang.String uuid, long groupId)
341                    throws com.liferay.portal.kernel.exception.SystemException {
342                    return getPersistence().countByUUID_G(uuid, groupId);
343            }
344    
345            /**
346            * Returns all the message boards thread flags where uuid = &#63; and companyId = &#63;.
347            *
348            * @param uuid the uuid
349            * @param companyId the company ID
350            * @return the matching message boards thread flags
351            * @throws SystemException if a system exception occurred
352            */
353            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUuid_C(
354                    java.lang.String uuid, long companyId)
355                    throws com.liferay.portal.kernel.exception.SystemException {
356                    return getPersistence().findByUuid_C(uuid, companyId);
357            }
358    
359            /**
360            * Returns a range of all the message boards thread flags where uuid = &#63; and companyId = &#63;.
361            *
362            * <p>
363            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBThreadFlagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
364            * </p>
365            *
366            * @param uuid the uuid
367            * @param companyId the company ID
368            * @param start the lower bound of the range of message boards thread flags
369            * @param end the upper bound of the range of message boards thread flags (not inclusive)
370            * @return the range of matching message boards thread flags
371            * @throws SystemException if a system exception occurred
372            */
373            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUuid_C(
374                    java.lang.String uuid, long companyId, int start, int end)
375                    throws com.liferay.portal.kernel.exception.SystemException {
376                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
377            }
378    
379            /**
380            * Returns an ordered range of all the message boards thread flags where uuid = &#63; and companyId = &#63;.
381            *
382            * <p>
383            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBThreadFlagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
384            * </p>
385            *
386            * @param uuid the uuid
387            * @param companyId the company ID
388            * @param start the lower bound of the range of message boards thread flags
389            * @param end the upper bound of the range of message boards thread flags (not inclusive)
390            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
391            * @return the ordered range of matching message boards thread flags
392            * @throws SystemException if a system exception occurred
393            */
394            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUuid_C(
395                    java.lang.String uuid, long companyId, int start, int end,
396                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
397                    throws com.liferay.portal.kernel.exception.SystemException {
398                    return getPersistence()
399                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
400            }
401    
402            /**
403            * Returns the first message boards thread flag in the ordered set where uuid = &#63; and companyId = &#63;.
404            *
405            * @param uuid the uuid
406            * @param companyId the company ID
407            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
408            * @return the first matching message boards thread flag
409            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
410            * @throws SystemException if a system exception occurred
411            */
412            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByUuid_C_First(
413                    java.lang.String uuid, long companyId,
414                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415                    throws com.liferay.portal.kernel.exception.SystemException,
416                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
417                    return getPersistence()
418                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
419            }
420    
421            /**
422            * Returns the first message boards thread flag in the ordered set where uuid = &#63; and companyId = &#63;.
423            *
424            * @param uuid the uuid
425            * @param companyId the company ID
426            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
427            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
428            * @throws SystemException if a system exception occurred
429            */
430            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUuid_C_First(
431                    java.lang.String uuid, long companyId,
432                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
433                    throws com.liferay.portal.kernel.exception.SystemException {
434                    return getPersistence()
435                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
436            }
437    
438            /**
439            * Returns the last message boards thread flag in the ordered set where uuid = &#63; and companyId = &#63;.
440            *
441            * @param uuid the uuid
442            * @param companyId the company ID
443            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
444            * @return the last matching message boards thread flag
445            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
446            * @throws SystemException if a system exception occurred
447            */
448            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByUuid_C_Last(
449                    java.lang.String uuid, long companyId,
450                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
451                    throws com.liferay.portal.kernel.exception.SystemException,
452                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
453                    return getPersistence()
454                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
455            }
456    
457            /**
458            * Returns the last message boards thread flag in the ordered set where uuid = &#63; and companyId = &#63;.
459            *
460            * @param uuid the uuid
461            * @param companyId the company ID
462            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
463            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
464            * @throws SystemException if a system exception occurred
465            */
466            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUuid_C_Last(
467                    java.lang.String uuid, long companyId,
468                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
469                    throws com.liferay.portal.kernel.exception.SystemException {
470                    return getPersistence()
471                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
472            }
473    
474            /**
475            * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where uuid = &#63; and companyId = &#63;.
476            *
477            * @param threadFlagId the primary key of the current message boards thread flag
478            * @param uuid the uuid
479            * @param companyId the company ID
480            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
481            * @return the previous, current, and next message boards thread flag
482            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
483            * @throws SystemException if a system exception occurred
484            */
485            public static com.liferay.portlet.messageboards.model.MBThreadFlag[] findByUuid_C_PrevAndNext(
486                    long threadFlagId, java.lang.String uuid, long companyId,
487                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
488                    throws com.liferay.portal.kernel.exception.SystemException,
489                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
490                    return getPersistence()
491                                       .findByUuid_C_PrevAndNext(threadFlagId, uuid, companyId,
492                            orderByComparator);
493            }
494    
495            /**
496            * Removes all the message boards thread flags where uuid = &#63; and companyId = &#63; from the database.
497            *
498            * @param uuid the uuid
499            * @param companyId the company ID
500            * @throws SystemException if a system exception occurred
501            */
502            public static void removeByUuid_C(java.lang.String uuid, long companyId)
503                    throws com.liferay.portal.kernel.exception.SystemException {
504                    getPersistence().removeByUuid_C(uuid, companyId);
505            }
506    
507            /**
508            * Returns the number of message boards thread flags where uuid = &#63; and companyId = &#63;.
509            *
510            * @param uuid the uuid
511            * @param companyId the company ID
512            * @return the number of matching message boards thread flags
513            * @throws SystemException if a system exception occurred
514            */
515            public static int countByUuid_C(java.lang.String uuid, long companyId)
516                    throws com.liferay.portal.kernel.exception.SystemException {
517                    return getPersistence().countByUuid_C(uuid, companyId);
518            }
519    
520            /**
521            * Returns all the message boards thread flags where userId = &#63;.
522            *
523            * @param userId the user ID
524            * @return the matching message boards thread flags
525            * @throws SystemException if a system exception occurred
526            */
527            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId(
528                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
529                    return getPersistence().findByUserId(userId);
530            }
531    
532            /**
533            * Returns a range of all the message boards thread flags where userId = &#63;.
534            *
535            * <p>
536            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBThreadFlagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
537            * </p>
538            *
539            * @param userId the user ID
540            * @param start the lower bound of the range of message boards thread flags
541            * @param end the upper bound of the range of message boards thread flags (not inclusive)
542            * @return the range of matching message boards thread flags
543            * @throws SystemException if a system exception occurred
544            */
545            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId(
546                    long userId, int start, int end)
547                    throws com.liferay.portal.kernel.exception.SystemException {
548                    return getPersistence().findByUserId(userId, start, end);
549            }
550    
551            /**
552            * Returns an ordered range of all the message boards thread flags where userId = &#63;.
553            *
554            * <p>
555            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBThreadFlagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
556            * </p>
557            *
558            * @param userId the user ID
559            * @param start the lower bound of the range of message boards thread flags
560            * @param end the upper bound of the range of message boards thread flags (not inclusive)
561            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
562            * @return the ordered range of matching message boards thread flags
563            * @throws SystemException if a system exception occurred
564            */
565            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId(
566                    long userId, int start, int end,
567                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
568                    throws com.liferay.portal.kernel.exception.SystemException {
569                    return getPersistence()
570                                       .findByUserId(userId, start, end, orderByComparator);
571            }
572    
573            /**
574            * Returns the first message boards thread flag in the ordered set where userId = &#63;.
575            *
576            * @param userId the user ID
577            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
578            * @return the first matching message boards thread flag
579            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
580            * @throws SystemException if a system exception occurred
581            */
582            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_First(
583                    long userId,
584                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
585                    throws com.liferay.portal.kernel.exception.SystemException,
586                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
587                    return getPersistence().findByUserId_First(userId, orderByComparator);
588            }
589    
590            /**
591            * Returns the first message boards thread flag in the ordered set where userId = &#63;.
592            *
593            * @param userId the user ID
594            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
595            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
596            * @throws SystemException if a system exception occurred
597            */
598            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUserId_First(
599                    long userId,
600                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
601                    throws com.liferay.portal.kernel.exception.SystemException {
602                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
603            }
604    
605            /**
606            * Returns the last message boards thread flag in the ordered set where userId = &#63;.
607            *
608            * @param userId the user ID
609            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
610            * @return the last matching message boards thread flag
611            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
612            * @throws SystemException if a system exception occurred
613            */
614            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_Last(
615                    long userId,
616                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
617                    throws com.liferay.portal.kernel.exception.SystemException,
618                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
619                    return getPersistence().findByUserId_Last(userId, orderByComparator);
620            }
621    
622            /**
623            * Returns the last message boards thread flag in the ordered set where userId = &#63;.
624            *
625            * @param userId the user ID
626            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
627            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
628            * @throws SystemException if a system exception occurred
629            */
630            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUserId_Last(
631                    long userId,
632                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
633                    throws com.liferay.portal.kernel.exception.SystemException {
634                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
635            }
636    
637            /**
638            * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where userId = &#63;.
639            *
640            * @param threadFlagId the primary key of the current message boards thread flag
641            * @param userId the user ID
642            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
643            * @return the previous, current, and next message boards thread flag
644            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
645            * @throws SystemException if a system exception occurred
646            */
647            public static com.liferay.portlet.messageboards.model.MBThreadFlag[] findByUserId_PrevAndNext(
648                    long threadFlagId, long userId,
649                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
650                    throws com.liferay.portal.kernel.exception.SystemException,
651                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
652                    return getPersistence()
653                                       .findByUserId_PrevAndNext(threadFlagId, userId,
654                            orderByComparator);
655            }
656    
657            /**
658            * Removes all the message boards thread flags where userId = &#63; from the database.
659            *
660            * @param userId the user ID
661            * @throws SystemException if a system exception occurred
662            */
663            public static void removeByUserId(long userId)
664                    throws com.liferay.portal.kernel.exception.SystemException {
665                    getPersistence().removeByUserId(userId);
666            }
667    
668            /**
669            * Returns the number of message boards thread flags where userId = &#63;.
670            *
671            * @param userId the user ID
672            * @return the number of matching message boards thread flags
673            * @throws SystemException if a system exception occurred
674            */
675            public static int countByUserId(long userId)
676                    throws com.liferay.portal.kernel.exception.SystemException {
677                    return getPersistence().countByUserId(userId);
678            }
679    
680            /**
681            * Returns all the message boards thread flags where threadId = &#63;.
682            *
683            * @param threadId the thread ID
684            * @return the matching message boards thread flags
685            * @throws SystemException if a system exception occurred
686            */
687            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId(
688                    long threadId)
689                    throws com.liferay.portal.kernel.exception.SystemException {
690                    return getPersistence().findByThreadId(threadId);
691            }
692    
693            /**
694            * Returns a range of all the message boards thread flags where threadId = &#63;.
695            *
696            * <p>
697            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBThreadFlagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
698            * </p>
699            *
700            * @param threadId the thread ID
701            * @param start the lower bound of the range of message boards thread flags
702            * @param end the upper bound of the range of message boards thread flags (not inclusive)
703            * @return the range of matching message boards thread flags
704            * @throws SystemException if a system exception occurred
705            */
706            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId(
707                    long threadId, int start, int end)
708                    throws com.liferay.portal.kernel.exception.SystemException {
709                    return getPersistence().findByThreadId(threadId, start, end);
710            }
711    
712            /**
713            * Returns an ordered range of all the message boards thread flags where threadId = &#63;.
714            *
715            * <p>
716            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBThreadFlagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
717            * </p>
718            *
719            * @param threadId the thread ID
720            * @param start the lower bound of the range of message boards thread flags
721            * @param end the upper bound of the range of message boards thread flags (not inclusive)
722            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
723            * @return the ordered range of matching message boards thread flags
724            * @throws SystemException if a system exception occurred
725            */
726            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId(
727                    long threadId, int start, int end,
728                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
729                    throws com.liferay.portal.kernel.exception.SystemException {
730                    return getPersistence()
731                                       .findByThreadId(threadId, start, end, orderByComparator);
732            }
733    
734            /**
735            * Returns the first message boards thread flag in the ordered set where threadId = &#63;.
736            *
737            * @param threadId the thread ID
738            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
739            * @return the first matching message boards thread flag
740            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
741            * @throws SystemException if a system exception occurred
742            */
743            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_First(
744                    long threadId,
745                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
746                    throws com.liferay.portal.kernel.exception.SystemException,
747                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
748                    return getPersistence().findByThreadId_First(threadId, orderByComparator);
749            }
750    
751            /**
752            * Returns the first message boards thread flag in the ordered set where threadId = &#63;.
753            *
754            * @param threadId the thread ID
755            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
756            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
757            * @throws SystemException if a system exception occurred
758            */
759            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByThreadId_First(
760                    long threadId,
761                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
762                    throws com.liferay.portal.kernel.exception.SystemException {
763                    return getPersistence()
764                                       .fetchByThreadId_First(threadId, orderByComparator);
765            }
766    
767            /**
768            * Returns the last message boards thread flag in the ordered set where threadId = &#63;.
769            *
770            * @param threadId the thread ID
771            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
772            * @return the last matching message boards thread flag
773            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
774            * @throws SystemException if a system exception occurred
775            */
776            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_Last(
777                    long threadId,
778                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
779                    throws com.liferay.portal.kernel.exception.SystemException,
780                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
781                    return getPersistence().findByThreadId_Last(threadId, orderByComparator);
782            }
783    
784            /**
785            * Returns the last message boards thread flag in the ordered set where threadId = &#63;.
786            *
787            * @param threadId the thread ID
788            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
789            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
790            * @throws SystemException if a system exception occurred
791            */
792            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByThreadId_Last(
793                    long threadId,
794                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
795                    throws com.liferay.portal.kernel.exception.SystemException {
796                    return getPersistence().fetchByThreadId_Last(threadId, orderByComparator);
797            }
798    
799            /**
800            * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where threadId = &#63;.
801            *
802            * @param threadFlagId the primary key of the current message boards thread flag
803            * @param threadId the thread ID
804            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
805            * @return the previous, current, and next message boards thread flag
806            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
807            * @throws SystemException if a system exception occurred
808            */
809            public static com.liferay.portlet.messageboards.model.MBThreadFlag[] findByThreadId_PrevAndNext(
810                    long threadFlagId, long threadId,
811                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
812                    throws com.liferay.portal.kernel.exception.SystemException,
813                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
814                    return getPersistence()
815                                       .findByThreadId_PrevAndNext(threadFlagId, threadId,
816                            orderByComparator);
817            }
818    
819            /**
820            * Removes all the message boards thread flags where threadId = &#63; from the database.
821            *
822            * @param threadId the thread ID
823            * @throws SystemException if a system exception occurred
824            */
825            public static void removeByThreadId(long threadId)
826                    throws com.liferay.portal.kernel.exception.SystemException {
827                    getPersistence().removeByThreadId(threadId);
828            }
829    
830            /**
831            * Returns the number of message boards thread flags where threadId = &#63;.
832            *
833            * @param threadId the thread ID
834            * @return the number of matching message boards thread flags
835            * @throws SystemException if a system exception occurred
836            */
837            public static int countByThreadId(long threadId)
838                    throws com.liferay.portal.kernel.exception.SystemException {
839                    return getPersistence().countByThreadId(threadId);
840            }
841    
842            /**
843            * 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.
844            *
845            * @param userId the user ID
846            * @param threadId the thread ID
847            * @return the matching message boards thread flag
848            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
849            * @throws SystemException if a system exception occurred
850            */
851            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByU_T(
852                    long userId, long threadId)
853                    throws com.liferay.portal.kernel.exception.SystemException,
854                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
855                    return getPersistence().findByU_T(userId, threadId);
856            }
857    
858            /**
859            * 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.
860            *
861            * @param userId the user ID
862            * @param threadId the thread ID
863            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
864            * @throws SystemException if a system exception occurred
865            */
866            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T(
867                    long userId, long threadId)
868                    throws com.liferay.portal.kernel.exception.SystemException {
869                    return getPersistence().fetchByU_T(userId, threadId);
870            }
871    
872            /**
873            * 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.
874            *
875            * @param userId the user ID
876            * @param threadId the thread ID
877            * @param retrieveFromCache whether to use the finder cache
878            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
879            * @throws SystemException if a system exception occurred
880            */
881            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T(
882                    long userId, long threadId, boolean retrieveFromCache)
883                    throws com.liferay.portal.kernel.exception.SystemException {
884                    return getPersistence().fetchByU_T(userId, threadId, retrieveFromCache);
885            }
886    
887            /**
888            * Removes the message boards thread flag where userId = &#63; and threadId = &#63; from the database.
889            *
890            * @param userId the user ID
891            * @param threadId the thread ID
892            * @return the message boards thread flag that was removed
893            * @throws SystemException if a system exception occurred
894            */
895            public static com.liferay.portlet.messageboards.model.MBThreadFlag removeByU_T(
896                    long userId, long threadId)
897                    throws com.liferay.portal.kernel.exception.SystemException,
898                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
899                    return getPersistence().removeByU_T(userId, threadId);
900            }
901    
902            /**
903            * Returns the number of message boards thread flags where userId = &#63; and threadId = &#63;.
904            *
905            * @param userId the user ID
906            * @param threadId the thread ID
907            * @return the number of matching message boards thread flags
908            * @throws SystemException if a system exception occurred
909            */
910            public static int countByU_T(long userId, long threadId)
911                    throws com.liferay.portal.kernel.exception.SystemException {
912                    return getPersistence().countByU_T(userId, threadId);
913            }
914    
915            /**
916            * Caches the message boards thread flag in the entity cache if it is enabled.
917            *
918            * @param mbThreadFlag the message boards thread flag
919            */
920            public static void cacheResult(
921                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag) {
922                    getPersistence().cacheResult(mbThreadFlag);
923            }
924    
925            /**
926            * Caches the message boards thread flags in the entity cache if it is enabled.
927            *
928            * @param mbThreadFlags the message boards thread flags
929            */
930            public static void cacheResult(
931                    java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> mbThreadFlags) {
932                    getPersistence().cacheResult(mbThreadFlags);
933            }
934    
935            /**
936            * Creates a new message boards thread flag with the primary key. Does not add the message boards thread flag to the database.
937            *
938            * @param threadFlagId the primary key for the new message boards thread flag
939            * @return the new message boards thread flag
940            */
941            public static com.liferay.portlet.messageboards.model.MBThreadFlag create(
942                    long threadFlagId) {
943                    return getPersistence().create(threadFlagId);
944            }
945    
946            /**
947            * Removes the message boards thread flag with the primary key from the database. Also notifies the appropriate model listeners.
948            *
949            * @param threadFlagId the primary key of the message boards thread flag
950            * @return the message boards thread flag that was removed
951            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
952            * @throws SystemException if a system exception occurred
953            */
954            public static com.liferay.portlet.messageboards.model.MBThreadFlag remove(
955                    long threadFlagId)
956                    throws com.liferay.portal.kernel.exception.SystemException,
957                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
958                    return getPersistence().remove(threadFlagId);
959            }
960    
961            public static com.liferay.portlet.messageboards.model.MBThreadFlag updateImpl(
962                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag)
963                    throws com.liferay.portal.kernel.exception.SystemException {
964                    return getPersistence().updateImpl(mbThreadFlag);
965            }
966    
967            /**
968            * 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.
969            *
970            * @param threadFlagId the primary key of the message boards thread flag
971            * @return the message boards thread flag
972            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
973            * @throws SystemException if a system exception occurred
974            */
975            public static com.liferay.portlet.messageboards.model.MBThreadFlag findByPrimaryKey(
976                    long threadFlagId)
977                    throws com.liferay.portal.kernel.exception.SystemException,
978                            com.liferay.portlet.messageboards.NoSuchThreadFlagException {
979                    return getPersistence().findByPrimaryKey(threadFlagId);
980            }
981    
982            /**
983            * Returns the message boards thread flag with the primary key or returns <code>null</code> if it could not be found.
984            *
985            * @param threadFlagId the primary key of the message boards thread flag
986            * @return the message boards thread flag, or <code>null</code> if a message boards thread flag with the primary key could not be found
987            * @throws SystemException if a system exception occurred
988            */
989            public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByPrimaryKey(
990                    long threadFlagId)
991                    throws com.liferay.portal.kernel.exception.SystemException {
992                    return getPersistence().fetchByPrimaryKey(threadFlagId);
993            }
994    
995            /**
996            * Returns all the message boards thread flags.
997            *
998            * @return the message boards thread flags
999            * @throws SystemException if a system exception occurred
1000            */
1001            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll()
1002                    throws com.liferay.portal.kernel.exception.SystemException {
1003                    return getPersistence().findAll();
1004            }
1005    
1006            /**
1007            * Returns a range of all the message boards thread flags.
1008            *
1009            * <p>
1010            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBThreadFlagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1011            * </p>
1012            *
1013            * @param start the lower bound of the range of message boards thread flags
1014            * @param end the upper bound of the range of message boards thread flags (not inclusive)
1015            * @return the range of message boards thread flags
1016            * @throws SystemException if a system exception occurred
1017            */
1018            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll(
1019                    int start, int end)
1020                    throws com.liferay.portal.kernel.exception.SystemException {
1021                    return getPersistence().findAll(start, end);
1022            }
1023    
1024            /**
1025            * Returns an ordered range of all the message boards thread flags.
1026            *
1027            * <p>
1028            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBThreadFlagModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1029            * </p>
1030            *
1031            * @param start the lower bound of the range of message boards thread flags
1032            * @param end the upper bound of the range of message boards thread flags (not inclusive)
1033            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1034            * @return the ordered range of message boards thread flags
1035            * @throws SystemException if a system exception occurred
1036            */
1037            public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll(
1038                    int start, int end,
1039                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1040                    throws com.liferay.portal.kernel.exception.SystemException {
1041                    return getPersistence().findAll(start, end, orderByComparator);
1042            }
1043    
1044            /**
1045            * Removes all the message boards thread flags from the database.
1046            *
1047            * @throws SystemException if a system exception occurred
1048            */
1049            public static void removeAll()
1050                    throws com.liferay.portal.kernel.exception.SystemException {
1051                    getPersistence().removeAll();
1052            }
1053    
1054            /**
1055            * Returns the number of message boards thread flags.
1056            *
1057            * @return the number of message boards thread flags
1058            * @throws SystemException if a system exception occurred
1059            */
1060            public static int countAll()
1061                    throws com.liferay.portal.kernel.exception.SystemException {
1062                    return getPersistence().countAll();
1063            }
1064    
1065            public static MBThreadFlagPersistence getPersistence() {
1066                    if (_persistence == null) {
1067                            _persistence = (MBThreadFlagPersistence)PortalBeanLocatorUtil.locate(MBThreadFlagPersistence.class.getName());
1068    
1069                            ReferenceRegistry.registerReference(MBThreadFlagUtil.class,
1070                                    "_persistence");
1071                    }
1072    
1073                    return _persistence;
1074            }
1075    
1076            /**
1077             * @deprecated As of 6.2.0
1078             */
1079            public void setPersistence(MBThreadFlagPersistence persistence) {
1080            }
1081    
1082            private static MBThreadFlagPersistence _persistence;
1083    }