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.service.persistence.BasePersistence;
018    
019    import com.liferay.portlet.messageboards.model.MBThreadFlag;
020    
021    /**
022     * The persistence interface for the message boards thread flag service.
023     *
024     * <p>
025     * Caching information and settings can be found in <code>portal.properties</code>
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see MBThreadFlagPersistenceImpl
030     * @see MBThreadFlagUtil
031     * @generated
032     */
033    public interface MBThreadFlagPersistence extends BasePersistence<MBThreadFlag> {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * 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.
038             */
039    
040            /**
041            * Caches the message boards thread flag in the entity cache if it is enabled.
042            *
043            * @param mbThreadFlag the message boards thread flag
044            */
045            public void cacheResult(
046                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag);
047    
048            /**
049            * Caches the message boards thread flags in the entity cache if it is enabled.
050            *
051            * @param mbThreadFlags the message boards thread flags
052            */
053            public void cacheResult(
054                    java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> mbThreadFlags);
055    
056            /**
057            * Creates a new message boards thread flag with the primary key. Does not add the message boards thread flag to the database.
058            *
059            * @param threadFlagId the primary key for the new message boards thread flag
060            * @return the new message boards thread flag
061            */
062            public com.liferay.portlet.messageboards.model.MBThreadFlag create(
063                    long threadFlagId);
064    
065            /**
066            * Removes the message boards thread flag with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param threadFlagId the primary key of the message boards thread flag
069            * @return the message boards thread flag that was removed
070            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
071            * @throws SystemException if a system exception occurred
072            */
073            public com.liferay.portlet.messageboards.model.MBThreadFlag remove(
074                    long threadFlagId)
075                    throws com.liferay.portal.kernel.exception.SystemException,
076                            com.liferay.portlet.messageboards.NoSuchThreadFlagException;
077    
078            public com.liferay.portlet.messageboards.model.MBThreadFlag updateImpl(
079                    com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag,
080                    boolean merge)
081                    throws com.liferay.portal.kernel.exception.SystemException;
082    
083            /**
084            * 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.
085            *
086            * @param threadFlagId the primary key of the message boards thread flag
087            * @return the message boards thread flag
088            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
089            * @throws SystemException if a system exception occurred
090            */
091            public com.liferay.portlet.messageboards.model.MBThreadFlag findByPrimaryKey(
092                    long threadFlagId)
093                    throws com.liferay.portal.kernel.exception.SystemException,
094                            com.liferay.portlet.messageboards.NoSuchThreadFlagException;
095    
096            /**
097            * Returns the message boards thread flag with the primary key or returns <code>null</code> if it could not be found.
098            *
099            * @param threadFlagId the primary key of the message boards thread flag
100            * @return the message boards thread flag, or <code>null</code> if a message boards thread flag with the primary key could not be found
101            * @throws SystemException if a system exception occurred
102            */
103            public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByPrimaryKey(
104                    long threadFlagId)
105                    throws com.liferay.portal.kernel.exception.SystemException;
106    
107            /**
108            * Returns all the message boards thread flags where userId = &#63;.
109            *
110            * @param userId the user ID
111            * @return the matching message boards thread flags
112            * @throws SystemException if a system exception occurred
113            */
114            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId(
115                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
116    
117            /**
118            * Returns a range of all the message boards thread flags where userId = &#63;.
119            *
120            * <p>
121            * 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.
122            * </p>
123            *
124            * @param userId the user ID
125            * @param start the lower bound of the range of message boards thread flags
126            * @param end the upper bound of the range of message boards thread flags (not inclusive)
127            * @return the range of matching message boards thread flags
128            * @throws SystemException if a system exception occurred
129            */
130            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId(
131                    long userId, int start, int end)
132                    throws com.liferay.portal.kernel.exception.SystemException;
133    
134            /**
135            * Returns an ordered range of all the message boards thread flags where userId = &#63;.
136            *
137            * <p>
138            * 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.
139            * </p>
140            *
141            * @param userId the user ID
142            * @param start the lower bound of the range of message boards thread flags
143            * @param end the upper bound of the range of message boards thread flags (not inclusive)
144            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
145            * @return the ordered range of matching message boards thread flags
146            * @throws SystemException if a system exception occurred
147            */
148            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId(
149                    long userId, int start, int end,
150                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            /**
154            * Returns the first message boards thread flag in the ordered set where userId = &#63;.
155            *
156            * @param userId the user ID
157            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
158            * @return the first matching message boards thread flag
159            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
160            * @throws SystemException if a system exception occurred
161            */
162            public com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_First(
163                    long userId,
164                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165                    throws com.liferay.portal.kernel.exception.SystemException,
166                            com.liferay.portlet.messageboards.NoSuchThreadFlagException;
167    
168            /**
169            * Returns the first message boards thread flag in the ordered set where userId = &#63;.
170            *
171            * @param userId the user ID
172            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
173            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
174            * @throws SystemException if a system exception occurred
175            */
176            public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUserId_First(
177                    long userId,
178                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
179                    throws com.liferay.portal.kernel.exception.SystemException;
180    
181            /**
182            * Returns the last message boards thread flag in the ordered set where userId = &#63;.
183            *
184            * @param userId the user ID
185            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
186            * @return the last matching message boards thread flag
187            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
188            * @throws SystemException if a system exception occurred
189            */
190            public com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_Last(
191                    long userId,
192                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
193                    throws com.liferay.portal.kernel.exception.SystemException,
194                            com.liferay.portlet.messageboards.NoSuchThreadFlagException;
195    
196            /**
197            * Returns the last message boards thread flag in the ordered set where userId = &#63;.
198            *
199            * @param userId the user ID
200            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
201            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
202            * @throws SystemException if a system exception occurred
203            */
204            public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUserId_Last(
205                    long userId,
206                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207                    throws com.liferay.portal.kernel.exception.SystemException;
208    
209            /**
210            * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where userId = &#63;.
211            *
212            * @param threadFlagId the primary key of the current message boards thread flag
213            * @param userId the user ID
214            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
215            * @return the previous, current, and next message boards thread flag
216            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
217            * @throws SystemException if a system exception occurred
218            */
219            public com.liferay.portlet.messageboards.model.MBThreadFlag[] findByUserId_PrevAndNext(
220                    long threadFlagId, long userId,
221                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222                    throws com.liferay.portal.kernel.exception.SystemException,
223                            com.liferay.portlet.messageboards.NoSuchThreadFlagException;
224    
225            /**
226            * Returns all the message boards thread flags where threadId = &#63;.
227            *
228            * @param threadId the thread ID
229            * @return the matching message boards thread flags
230            * @throws SystemException if a system exception occurred
231            */
232            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId(
233                    long threadId)
234                    throws com.liferay.portal.kernel.exception.SystemException;
235    
236            /**
237            * Returns a range of all the message boards thread flags where threadId = &#63;.
238            *
239            * <p>
240            * 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.
241            * </p>
242            *
243            * @param threadId the thread 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            * @throws SystemException if a system exception occurred
248            */
249            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId(
250                    long threadId, int start, int end)
251                    throws com.liferay.portal.kernel.exception.SystemException;
252    
253            /**
254            * Returns an ordered range of all the message boards thread flags where threadId = &#63;.
255            *
256            * <p>
257            * 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.
258            * </p>
259            *
260            * @param threadId the thread ID
261            * @param start the lower bound of the range of message boards thread flags
262            * @param end the upper bound of the range of message boards thread flags (not inclusive)
263            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
264            * @return the ordered range of matching message boards thread flags
265            * @throws SystemException if a system exception occurred
266            */
267            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId(
268                    long threadId, int start, int end,
269                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
270                    throws com.liferay.portal.kernel.exception.SystemException;
271    
272            /**
273            * Returns the first message boards thread flag in the ordered set where threadId = &#63;.
274            *
275            * @param threadId the thread ID
276            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
277            * @return the first 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 com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_First(
282                    long threadId,
283                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
284                    throws com.liferay.portal.kernel.exception.SystemException,
285                            com.liferay.portlet.messageboards.NoSuchThreadFlagException;
286    
287            /**
288            * Returns the first message boards thread flag in the ordered set where threadId = &#63;.
289            *
290            * @param threadId the thread ID
291            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
292            * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
293            * @throws SystemException if a system exception occurred
294            */
295            public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByThreadId_First(
296                    long threadId,
297                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
298                    throws com.liferay.portal.kernel.exception.SystemException;
299    
300            /**
301            * Returns the last message boards thread flag in the ordered set where threadId = &#63;.
302            *
303            * @param threadId the thread ID
304            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
305            * @return the last matching message boards thread flag
306            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
307            * @throws SystemException if a system exception occurred
308            */
309            public com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_Last(
310                    long threadId,
311                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
312                    throws com.liferay.portal.kernel.exception.SystemException,
313                            com.liferay.portlet.messageboards.NoSuchThreadFlagException;
314    
315            /**
316            * Returns the last message boards thread flag in the ordered set where threadId = &#63;.
317            *
318            * @param threadId the thread ID
319            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
320            * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
321            * @throws SystemException if a system exception occurred
322            */
323            public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByThreadId_Last(
324                    long threadId,
325                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
326                    throws com.liferay.portal.kernel.exception.SystemException;
327    
328            /**
329            * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where threadId = &#63;.
330            *
331            * @param threadFlagId the primary key of the current message boards thread flag
332            * @param threadId the thread ID
333            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
334            * @return the previous, current, and next message boards thread flag
335            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found
336            * @throws SystemException if a system exception occurred
337            */
338            public com.liferay.portlet.messageboards.model.MBThreadFlag[] findByThreadId_PrevAndNext(
339                    long threadFlagId, long threadId,
340                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
341                    throws com.liferay.portal.kernel.exception.SystemException,
342                            com.liferay.portlet.messageboards.NoSuchThreadFlagException;
343    
344            /**
345            * 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.
346            *
347            * @param userId the user ID
348            * @param threadId the thread ID
349            * @return the matching message boards thread flag
350            * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found
351            * @throws SystemException if a system exception occurred
352            */
353            public com.liferay.portlet.messageboards.model.MBThreadFlag findByU_T(
354                    long userId, long threadId)
355                    throws com.liferay.portal.kernel.exception.SystemException,
356                            com.liferay.portlet.messageboards.NoSuchThreadFlagException;
357    
358            /**
359            * 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.
360            *
361            * @param userId the user ID
362            * @param threadId the thread ID
363            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
364            * @throws SystemException if a system exception occurred
365            */
366            public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T(
367                    long userId, long threadId)
368                    throws com.liferay.portal.kernel.exception.SystemException;
369    
370            /**
371            * 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.
372            *
373            * @param userId the user ID
374            * @param threadId the thread ID
375            * @param retrieveFromCache whether to use the finder cache
376            * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
377            * @throws SystemException if a system exception occurred
378            */
379            public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T(
380                    long userId, long threadId, boolean retrieveFromCache)
381                    throws com.liferay.portal.kernel.exception.SystemException;
382    
383            /**
384            * Returns all the message boards thread flags.
385            *
386            * @return the message boards thread flags
387            * @throws SystemException if a system exception occurred
388            */
389            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll()
390                    throws com.liferay.portal.kernel.exception.SystemException;
391    
392            /**
393            * Returns a range of all the message boards thread flags.
394            *
395            * <p>
396            * 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.
397            * </p>
398            *
399            * @param start the lower bound of the range of message boards thread flags
400            * @param end the upper bound of the range of message boards thread flags (not inclusive)
401            * @return the range of message boards thread flags
402            * @throws SystemException if a system exception occurred
403            */
404            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll(
405                    int start, int end)
406                    throws com.liferay.portal.kernel.exception.SystemException;
407    
408            /**
409            * Returns an ordered range of all the message boards thread flags.
410            *
411            * <p>
412            * 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.
413            * </p>
414            *
415            * @param start the lower bound of the range of message boards thread flags
416            * @param end the upper bound of the range of message boards thread flags (not inclusive)
417            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
418            * @return the ordered range of message boards thread flags
419            * @throws SystemException if a system exception occurred
420            */
421            public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll(
422                    int start, int end,
423                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
424                    throws com.liferay.portal.kernel.exception.SystemException;
425    
426            /**
427            * Removes all the message boards thread flags where userId = &#63; from the database.
428            *
429            * @param userId the user ID
430            * @throws SystemException if a system exception occurred
431            */
432            public void removeByUserId(long userId)
433                    throws com.liferay.portal.kernel.exception.SystemException;
434    
435            /**
436            * Removes all the message boards thread flags where threadId = &#63; from the database.
437            *
438            * @param threadId the thread ID
439            * @throws SystemException if a system exception occurred
440            */
441            public void removeByThreadId(long threadId)
442                    throws com.liferay.portal.kernel.exception.SystemException;
443    
444            /**
445            * Removes the message boards thread flag where userId = &#63; and threadId = &#63; from the database.
446            *
447            * @param userId the user ID
448            * @param threadId the thread ID
449            * @return the message boards thread flag that was removed
450            * @throws SystemException if a system exception occurred
451            */
452            public com.liferay.portlet.messageboards.model.MBThreadFlag removeByU_T(
453                    long userId, long threadId)
454                    throws com.liferay.portal.kernel.exception.SystemException,
455                            com.liferay.portlet.messageboards.NoSuchThreadFlagException;
456    
457            /**
458            * Removes all the message boards thread flags from the database.
459            *
460            * @throws SystemException if a system exception occurred
461            */
462            public void removeAll()
463                    throws com.liferay.portal.kernel.exception.SystemException;
464    
465            /**
466            * Returns the number of message boards thread flags where userId = &#63;.
467            *
468            * @param userId the user ID
469            * @return the number of matching message boards thread flags
470            * @throws SystemException if a system exception occurred
471            */
472            public int countByUserId(long userId)
473                    throws com.liferay.portal.kernel.exception.SystemException;
474    
475            /**
476            * Returns the number of message boards thread flags where threadId = &#63;.
477            *
478            * @param threadId the thread ID
479            * @return the number of matching message boards thread flags
480            * @throws SystemException if a system exception occurred
481            */
482            public int countByThreadId(long threadId)
483                    throws com.liferay.portal.kernel.exception.SystemException;
484    
485            /**
486            * Returns the number of message boards thread flags where userId = &#63; and threadId = &#63;.
487            *
488            * @param userId the user ID
489            * @param threadId the thread ID
490            * @return the number of matching message boards thread flags
491            * @throws SystemException if a system exception occurred
492            */
493            public int countByU_T(long userId, long threadId)
494                    throws com.liferay.portal.kernel.exception.SystemException;
495    
496            /**
497            * Returns the number of message boards thread flags.
498            *
499            * @return the number of message boards thread flags
500            * @throws SystemException if a system exception occurred
501            */
502            public int countAll()
503                    throws com.liferay.portal.kernel.exception.SystemException;
504    }