001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.service.persistence.BasePersistence;
020    
021    import com.liferay.portlet.messageboards.model.MBThreadFlag;
022    
023    /**
024     * The persistence interface for the message boards thread flag service.
025     *
026     * <p>
027     * Caching information and settings can be found in <code>portal.properties</code>
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see com.liferay.portlet.messageboards.service.persistence.impl.MBThreadFlagPersistenceImpl
032     * @see MBThreadFlagUtil
033     * @generated
034     */
035    @ProviderType
036    public interface MBThreadFlagPersistence extends BasePersistence<MBThreadFlag> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify or reference this interface directly. Always use {@link MBThreadFlagUtil} to access the message boards thread flag persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
041             */
042    
043            /**
044            * Returns all the message boards thread flags where uuid = &#63;.
045            *
046            * @param uuid the uuid
047            * @return the matching message boards thread flags
048            */
049            public java.util.List<MBThreadFlag> findByUuid(java.lang.String uuid);
050    
051            /**
052            * Returns a range of all the message boards thread flags where uuid = &#63;.
053            *
054            * <p>
055            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
056            * </p>
057            *
058            * @param uuid the uuid
059            * @param start the lower bound of the range of message boards thread flags
060            * @param end the upper bound of the range of message boards thread flags (not inclusive)
061            * @return the range of matching message boards thread flags
062            */
063            public java.util.List<MBThreadFlag> findByUuid(java.lang.String uuid,
064                    int start, int end);
065    
066            /**
067            * Returns an ordered range of all the message boards thread flags where uuid = &#63;.
068            *
069            * <p>
070            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
071            * </p>
072            *
073            * @param uuid the uuid
074            * @param start the lower bound of the range of message boards thread flags
075            * @param end the upper bound of the range of message boards thread flags (not inclusive)
076            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
077            * @return the ordered range of matching message boards thread flags
078            */
079            public java.util.List<MBThreadFlag> findByUuid(java.lang.String uuid,
080                    int start, int end,
081                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
082    
083            /**
084            * Returns an ordered range of all the message boards thread flags where uuid = &#63;.
085            *
086            * <p>
087            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
088            * </p>
089            *
090            * @param uuid the uuid
091            * @param start the lower bound of the range of message boards thread flags
092            * @param end the upper bound of the range of message boards thread flags (not inclusive)
093            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
094            * @param retrieveFromCache whether to retrieve from the finder cache
095            * @return the ordered range of matching message boards thread flags
096            */
097            public java.util.List<MBThreadFlag> findByUuid(java.lang.String uuid,
098                    int start, int end,
099                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator,
100                    boolean retrieveFromCache);
101    
102            /**
103            * Returns the first message boards thread flag in the ordered set where uuid = &#63;.
104            *
105            * @param uuid the uuid
106            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
107            * @return the first matching message boards thread flag
108            * @throws NoSuchThreadFlagException if a matching message boards thread flag could not be found
109            */
110            public MBThreadFlag findByUuid_First(java.lang.String uuid,
111                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
112                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
113    
114            /**
115            * Returns the first message boards thread flag in the ordered set where uuid = &#63;.
116            *
117            * @param uuid the uuid
118            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
119            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
120            */
121            public MBThreadFlag fetchByUuid_First(java.lang.String uuid,
122                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
123    
124            /**
125            * Returns the last message boards thread flag in the ordered set where uuid = &#63;.
126            *
127            * @param uuid the uuid
128            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
129            * @return the last matching message boards thread flag
130            * @throws NoSuchThreadFlagException if a matching message boards thread flag could not be found
131            */
132            public MBThreadFlag findByUuid_Last(java.lang.String uuid,
133                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
134                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
135    
136            /**
137            * Returns the last message boards thread flag in the ordered set where uuid = &#63;.
138            *
139            * @param uuid the uuid
140            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
141            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
142            */
143            public MBThreadFlag fetchByUuid_Last(java.lang.String uuid,
144                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
145    
146            /**
147            * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where uuid = &#63;.
148            *
149            * @param threadFlagId the primary key of the current message boards thread flag
150            * @param uuid the uuid
151            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
152            * @return the previous, current, and next message boards thread flag
153            * @throws NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
154            */
155            public MBThreadFlag[] findByUuid_PrevAndNext(long threadFlagId,
156                    java.lang.String uuid,
157                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
158                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
159    
160            /**
161            * Removes all the message boards thread flags where uuid = &#63; from the database.
162            *
163            * @param uuid the uuid
164            */
165            public void removeByUuid(java.lang.String uuid);
166    
167            /**
168            * Returns the number of message boards thread flags where uuid = &#63;.
169            *
170            * @param uuid the uuid
171            * @return the number of matching message boards thread flags
172            */
173            public int countByUuid(java.lang.String uuid);
174    
175            /**
176            * Returns the message boards thread flag where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchThreadFlagException} if it could not be found.
177            *
178            * @param uuid the uuid
179            * @param groupId the group ID
180            * @return the matching message boards thread flag
181            * @throws NoSuchThreadFlagException if a matching message boards thread flag could not be found
182            */
183            public MBThreadFlag findByUUID_G(java.lang.String uuid, long groupId)
184                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
185    
186            /**
187            * 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.
188            *
189            * @param uuid the uuid
190            * @param groupId the group ID
191            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
192            */
193            public MBThreadFlag fetchByUUID_G(java.lang.String uuid, long groupId);
194    
195            /**
196            * 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.
197            *
198            * @param uuid the uuid
199            * @param groupId the group ID
200            * @param retrieveFromCache whether to retrieve from the finder cache
201            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
202            */
203            public MBThreadFlag fetchByUUID_G(java.lang.String uuid, long groupId,
204                    boolean retrieveFromCache);
205    
206            /**
207            * Removes the message boards thread flag where uuid = &#63; and groupId = &#63; from the database.
208            *
209            * @param uuid the uuid
210            * @param groupId the group ID
211            * @return the message boards thread flag that was removed
212            */
213            public MBThreadFlag removeByUUID_G(java.lang.String uuid, long groupId)
214                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
215    
216            /**
217            * Returns the number of message boards thread flags where uuid = &#63; and groupId = &#63;.
218            *
219            * @param uuid the uuid
220            * @param groupId the group ID
221            * @return the number of matching message boards thread flags
222            */
223            public int countByUUID_G(java.lang.String uuid, long groupId);
224    
225            /**
226            * Returns all the message boards thread flags where uuid = &#63; and companyId = &#63;.
227            *
228            * @param uuid the uuid
229            * @param companyId the company ID
230            * @return the matching message boards thread flags
231            */
232            public java.util.List<MBThreadFlag> findByUuid_C(java.lang.String uuid,
233                    long companyId);
234    
235            /**
236            * Returns a range of all the message boards thread flags where uuid = &#63; and companyId = &#63;.
237            *
238            * <p>
239            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
240            * </p>
241            *
242            * @param uuid the uuid
243            * @param companyId the company ID
244            * @param start the lower bound of the range of message boards thread flags
245            * @param end the upper bound of the range of message boards thread flags (not inclusive)
246            * @return the range of matching message boards thread flags
247            */
248            public java.util.List<MBThreadFlag> findByUuid_C(java.lang.String uuid,
249                    long companyId, int start, int end);
250    
251            /**
252            * Returns an ordered range of all the message boards thread flags where uuid = &#63; and companyId = &#63;.
253            *
254            * <p>
255            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
256            * </p>
257            *
258            * @param uuid the uuid
259            * @param companyId the company ID
260            * @param start the lower bound of the range of message boards thread flags
261            * @param end the upper bound of the range of message boards thread flags (not inclusive)
262            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
263            * @return the ordered range of matching message boards thread flags
264            */
265            public java.util.List<MBThreadFlag> findByUuid_C(java.lang.String uuid,
266                    long companyId, int start, int end,
267                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
268    
269            /**
270            * Returns an ordered range of all the message boards thread flags where uuid = &#63; and companyId = &#63;.
271            *
272            * <p>
273            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
274            * </p>
275            *
276            * @param uuid the uuid
277            * @param companyId the company ID
278            * @param start the lower bound of the range of message boards thread flags
279            * @param end the upper bound of the range of message boards thread flags (not inclusive)
280            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
281            * @param retrieveFromCache whether to retrieve from the finder cache
282            * @return the ordered range of matching message boards thread flags
283            */
284            public java.util.List<MBThreadFlag> findByUuid_C(java.lang.String uuid,
285                    long companyId, int start, int end,
286                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator,
287                    boolean retrieveFromCache);
288    
289            /**
290            * Returns the first message boards thread flag in the ordered set where uuid = &#63; and companyId = &#63;.
291            *
292            * @param uuid the uuid
293            * @param companyId the company ID
294            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
295            * @return the first matching message boards thread flag
296            * @throws NoSuchThreadFlagException if a matching message boards thread flag could not be found
297            */
298            public MBThreadFlag findByUuid_C_First(java.lang.String uuid,
299                    long companyId,
300                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
301                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
302    
303            /**
304            * Returns the first message boards thread flag in the ordered set where uuid = &#63; and companyId = &#63;.
305            *
306            * @param uuid the uuid
307            * @param companyId the company ID
308            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
309            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
310            */
311            public MBThreadFlag fetchByUuid_C_First(java.lang.String uuid,
312                    long companyId,
313                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
314    
315            /**
316            * Returns the last message boards thread flag in the ordered set where uuid = &#63; and companyId = &#63;.
317            *
318            * @param uuid the uuid
319            * @param companyId the company ID
320            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
321            * @return the last matching message boards thread flag
322            * @throws NoSuchThreadFlagException if a matching message boards thread flag could not be found
323            */
324            public MBThreadFlag findByUuid_C_Last(java.lang.String uuid,
325                    long companyId,
326                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
327                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
328    
329            /**
330            * Returns the last message boards thread flag in the ordered set where uuid = &#63; and companyId = &#63;.
331            *
332            * @param uuid the uuid
333            * @param companyId the company ID
334            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
335            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
336            */
337            public MBThreadFlag fetchByUuid_C_Last(java.lang.String uuid,
338                    long companyId,
339                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
340    
341            /**
342            * 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;.
343            *
344            * @param threadFlagId the primary key of the current message boards thread flag
345            * @param uuid the uuid
346            * @param companyId the company ID
347            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
348            * @return the previous, current, and next message boards thread flag
349            * @throws NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
350            */
351            public MBThreadFlag[] findByUuid_C_PrevAndNext(long threadFlagId,
352                    java.lang.String uuid, long companyId,
353                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
354                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
355    
356            /**
357            * Removes all the message boards thread flags where uuid = &#63; and companyId = &#63; from the database.
358            *
359            * @param uuid the uuid
360            * @param companyId the company ID
361            */
362            public void removeByUuid_C(java.lang.String uuid, long companyId);
363    
364            /**
365            * Returns the number of message boards thread flags where uuid = &#63; and companyId = &#63;.
366            *
367            * @param uuid the uuid
368            * @param companyId the company ID
369            * @return the number of matching message boards thread flags
370            */
371            public int countByUuid_C(java.lang.String uuid, long companyId);
372    
373            /**
374            * Returns all the message boards thread flags where userId = &#63;.
375            *
376            * @param userId the user ID
377            * @return the matching message boards thread flags
378            */
379            public java.util.List<MBThreadFlag> findByUserId(long userId);
380    
381            /**
382            * Returns a range of all the message boards thread flags where userId = &#63;.
383            *
384            * <p>
385            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
386            * </p>
387            *
388            * @param userId the user ID
389            * @param start the lower bound of the range of message boards thread flags
390            * @param end the upper bound of the range of message boards thread flags (not inclusive)
391            * @return the range of matching message boards thread flags
392            */
393            public java.util.List<MBThreadFlag> findByUserId(long userId, int start,
394                    int end);
395    
396            /**
397            * Returns an ordered range of all the message boards thread flags where userId = &#63;.
398            *
399            * <p>
400            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
401            * </p>
402            *
403            * @param userId the user ID
404            * @param start the lower bound of the range of message boards thread flags
405            * @param end the upper bound of the range of message boards thread flags (not inclusive)
406            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
407            * @return the ordered range of matching message boards thread flags
408            */
409            public java.util.List<MBThreadFlag> findByUserId(long userId, int start,
410                    int end,
411                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
412    
413            /**
414            * Returns an ordered range of all the message boards thread flags where userId = &#63;.
415            *
416            * <p>
417            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
418            * </p>
419            *
420            * @param userId the user ID
421            * @param start the lower bound of the range of message boards thread flags
422            * @param end the upper bound of the range of message boards thread flags (not inclusive)
423            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
424            * @param retrieveFromCache whether to retrieve from the finder cache
425            * @return the ordered range of matching message boards thread flags
426            */
427            public java.util.List<MBThreadFlag> findByUserId(long userId, int start,
428                    int end,
429                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator,
430                    boolean retrieveFromCache);
431    
432            /**
433            * Returns the first message boards thread flag in the ordered set where userId = &#63;.
434            *
435            * @param userId the user ID
436            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
437            * @return the first matching message boards thread flag
438            * @throws NoSuchThreadFlagException if a matching message boards thread flag could not be found
439            */
440            public MBThreadFlag findByUserId_First(long userId,
441                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
442                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
443    
444            /**
445            * Returns the first message boards thread flag in the ordered set where userId = &#63;.
446            *
447            * @param userId the user ID
448            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
449            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
450            */
451            public MBThreadFlag fetchByUserId_First(long userId,
452                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
453    
454            /**
455            * Returns the last message boards thread flag in the ordered set where userId = &#63;.
456            *
457            * @param userId the user ID
458            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
459            * @return the last matching message boards thread flag
460            * @throws NoSuchThreadFlagException if a matching message boards thread flag could not be found
461            */
462            public MBThreadFlag findByUserId_Last(long userId,
463                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
464                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
465    
466            /**
467            * Returns the last message boards thread flag in the ordered set where userId = &#63;.
468            *
469            * @param userId the user ID
470            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
471            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
472            */
473            public MBThreadFlag fetchByUserId_Last(long userId,
474                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
475    
476            /**
477            * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where userId = &#63;.
478            *
479            * @param threadFlagId the primary key of the current message boards thread flag
480            * @param userId the user ID
481            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
482            * @return the previous, current, and next message boards thread flag
483            * @throws NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
484            */
485            public MBThreadFlag[] findByUserId_PrevAndNext(long threadFlagId,
486                    long userId,
487                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
488                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
489    
490            /**
491            * Removes all the message boards thread flags where userId = &#63; from the database.
492            *
493            * @param userId the user ID
494            */
495            public void removeByUserId(long userId);
496    
497            /**
498            * Returns the number of message boards thread flags where userId = &#63;.
499            *
500            * @param userId the user ID
501            * @return the number of matching message boards thread flags
502            */
503            public int countByUserId(long userId);
504    
505            /**
506            * Returns all the message boards thread flags where threadId = &#63;.
507            *
508            * @param threadId the thread ID
509            * @return the matching message boards thread flags
510            */
511            public java.util.List<MBThreadFlag> findByThreadId(long threadId);
512    
513            /**
514            * Returns a range of all the message boards thread flags where threadId = &#63;.
515            *
516            * <p>
517            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
518            * </p>
519            *
520            * @param threadId the thread ID
521            * @param start the lower bound of the range of message boards thread flags
522            * @param end the upper bound of the range of message boards thread flags (not inclusive)
523            * @return the range of matching message boards thread flags
524            */
525            public java.util.List<MBThreadFlag> findByThreadId(long threadId,
526                    int start, int end);
527    
528            /**
529            * Returns an ordered range of all the message boards thread flags where threadId = &#63;.
530            *
531            * <p>
532            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
533            * </p>
534            *
535            * @param threadId the thread ID
536            * @param start the lower bound of the range of message boards thread flags
537            * @param end the upper bound of the range of message boards thread flags (not inclusive)
538            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
539            * @return the ordered range of matching message boards thread flags
540            */
541            public java.util.List<MBThreadFlag> findByThreadId(long threadId,
542                    int start, int end,
543                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
544    
545            /**
546            * Returns an ordered range of all the message boards thread flags where threadId = &#63;.
547            *
548            * <p>
549            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
550            * </p>
551            *
552            * @param threadId the thread ID
553            * @param start the lower bound of the range of message boards thread flags
554            * @param end the upper bound of the range of message boards thread flags (not inclusive)
555            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
556            * @param retrieveFromCache whether to retrieve from the finder cache
557            * @return the ordered range of matching message boards thread flags
558            */
559            public java.util.List<MBThreadFlag> findByThreadId(long threadId,
560                    int start, int end,
561                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator,
562                    boolean retrieveFromCache);
563    
564            /**
565            * Returns the first message boards thread flag in the ordered set where threadId = &#63;.
566            *
567            * @param threadId the thread ID
568            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
569            * @return the first matching message boards thread flag
570            * @throws NoSuchThreadFlagException if a matching message boards thread flag could not be found
571            */
572            public MBThreadFlag findByThreadId_First(long threadId,
573                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
574                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
575    
576            /**
577            * Returns the first message boards thread flag in the ordered set where threadId = &#63;.
578            *
579            * @param threadId the thread ID
580            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
581            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
582            */
583            public MBThreadFlag fetchByThreadId_First(long threadId,
584                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
585    
586            /**
587            * Returns the last message boards thread flag in the ordered set where threadId = &#63;.
588            *
589            * @param threadId the thread ID
590            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
591            * @return the last matching message boards thread flag
592            * @throws NoSuchThreadFlagException if a matching message boards thread flag could not be found
593            */
594            public MBThreadFlag findByThreadId_Last(long threadId,
595                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
596                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
597    
598            /**
599            * Returns the last message boards thread flag in the ordered set where threadId = &#63;.
600            *
601            * @param threadId the thread ID
602            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
603            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
604            */
605            public MBThreadFlag fetchByThreadId_Last(long threadId,
606                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
607    
608            /**
609            * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where threadId = &#63;.
610            *
611            * @param threadFlagId the primary key of the current message boards thread flag
612            * @param threadId the thread ID
613            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
614            * @return the previous, current, and next message boards thread flag
615            * @throws NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
616            */
617            public MBThreadFlag[] findByThreadId_PrevAndNext(long threadFlagId,
618                    long threadId,
619                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator)
620                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
621    
622            /**
623            * Removes all the message boards thread flags where threadId = &#63; from the database.
624            *
625            * @param threadId the thread ID
626            */
627            public void removeByThreadId(long threadId);
628    
629            /**
630            * Returns the number of message boards thread flags where threadId = &#63;.
631            *
632            * @param threadId the thread ID
633            * @return the number of matching message boards thread flags
634            */
635            public int countByThreadId(long threadId);
636    
637            /**
638            * Returns the message boards thread flag where userId = &#63; and threadId = &#63; or throws a {@link NoSuchThreadFlagException} if it could not be found.
639            *
640            * @param userId the user ID
641            * @param threadId the thread ID
642            * @return the matching message boards thread flag
643            * @throws NoSuchThreadFlagException if a matching message boards thread flag could not be found
644            */
645            public MBThreadFlag findByU_T(long userId, long threadId)
646                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
647    
648            /**
649            * 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.
650            *
651            * @param userId the user ID
652            * @param threadId the thread ID
653            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
654            */
655            public MBThreadFlag fetchByU_T(long userId, long threadId);
656    
657            /**
658            * 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.
659            *
660            * @param userId the user ID
661            * @param threadId the thread ID
662            * @param retrieveFromCache whether to retrieve from the finder cache
663            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
664            */
665            public MBThreadFlag fetchByU_T(long userId, long threadId,
666                    boolean retrieveFromCache);
667    
668            /**
669            * Removes the message boards thread flag where userId = &#63; and threadId = &#63; from the database.
670            *
671            * @param userId the user ID
672            * @param threadId the thread ID
673            * @return the message boards thread flag that was removed
674            */
675            public MBThreadFlag removeByU_T(long userId, long threadId)
676                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
677    
678            /**
679            * Returns the number of message boards thread flags where userId = &#63; and threadId = &#63;.
680            *
681            * @param userId the user ID
682            * @param threadId the thread ID
683            * @return the number of matching message boards thread flags
684            */
685            public int countByU_T(long userId, long threadId);
686    
687            /**
688            * Caches the message boards thread flag in the entity cache if it is enabled.
689            *
690            * @param mbThreadFlag the message boards thread flag
691            */
692            public void cacheResult(MBThreadFlag mbThreadFlag);
693    
694            /**
695            * Caches the message boards thread flags in the entity cache if it is enabled.
696            *
697            * @param mbThreadFlags the message boards thread flags
698            */
699            public void cacheResult(java.util.List<MBThreadFlag> mbThreadFlags);
700    
701            /**
702            * Creates a new message boards thread flag with the primary key. Does not add the message boards thread flag to the database.
703            *
704            * @param threadFlagId the primary key for the new message boards thread flag
705            * @return the new message boards thread flag
706            */
707            public MBThreadFlag create(long threadFlagId);
708    
709            /**
710            * Removes the message boards thread flag with the primary key from the database. Also notifies the appropriate model listeners.
711            *
712            * @param threadFlagId the primary key of the message boards thread flag
713            * @return the message boards thread flag that was removed
714            * @throws NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
715            */
716            public MBThreadFlag remove(long threadFlagId)
717                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
718    
719            public MBThreadFlag updateImpl(MBThreadFlag mbThreadFlag);
720    
721            /**
722            * Returns the message boards thread flag with the primary key or throws a {@link NoSuchThreadFlagException} if it could not be found.
723            *
724            * @param threadFlagId the primary key of the message boards thread flag
725            * @return the message boards thread flag
726            * @throws NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
727            */
728            public MBThreadFlag findByPrimaryKey(long threadFlagId)
729                    throws com.liferay.portlet.messageboards.exception.NoSuchThreadFlagException;
730    
731            /**
732            * Returns the message boards thread flag with the primary key or returns <code>null</code> if it could not be found.
733            *
734            * @param threadFlagId the primary key of the message boards thread flag
735            * @return the message boards thread flag, or <code>null</code> if a message boards thread flag with the primary key could not be found
736            */
737            public MBThreadFlag fetchByPrimaryKey(long threadFlagId);
738    
739            @Override
740            public java.util.Map<java.io.Serializable, MBThreadFlag> fetchByPrimaryKeys(
741                    java.util.Set<java.io.Serializable> primaryKeys);
742    
743            /**
744            * Returns all the message boards thread flags.
745            *
746            * @return the message boards thread flags
747            */
748            public java.util.List<MBThreadFlag> findAll();
749    
750            /**
751            * Returns a range of all the message boards thread flags.
752            *
753            * <p>
754            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
755            * </p>
756            *
757            * @param start the lower bound of the range of message boards thread flags
758            * @param end the upper bound of the range of message boards thread flags (not inclusive)
759            * @return the range of message boards thread flags
760            */
761            public java.util.List<MBThreadFlag> findAll(int start, int end);
762    
763            /**
764            * Returns an ordered range of all the message boards thread flags.
765            *
766            * <p>
767            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
768            * </p>
769            *
770            * @param start the lower bound of the range of message boards thread flags
771            * @param end the upper bound of the range of message boards thread flags (not inclusive)
772            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
773            * @return the ordered range of message boards thread flags
774            */
775            public java.util.List<MBThreadFlag> findAll(int start, int end,
776                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator);
777    
778            /**
779            * Returns an ordered range of all the message boards thread flags.
780            *
781            * <p>
782            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
783            * </p>
784            *
785            * @param start the lower bound of the range of message boards thread flags
786            * @param end the upper bound of the range of message boards thread flags (not inclusive)
787            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
788            * @param retrieveFromCache whether to retrieve from the finder cache
789            * @return the ordered range of message boards thread flags
790            */
791            public java.util.List<MBThreadFlag> findAll(int start, int end,
792                    com.liferay.portal.kernel.util.OrderByComparator<MBThreadFlag> orderByComparator,
793                    boolean retrieveFromCache);
794    
795            /**
796            * Removes all the message boards thread flags from the database.
797            */
798            public void removeAll();
799    
800            /**
801            * Returns the number of message boards thread flags.
802            *
803            * @return the number of message boards thread flags
804            */
805            public int countAll();
806    
807            @Override
808            public java.util.Set<java.lang.String> getBadColumnNames();
809    }