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