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.MBBan;
020    
021    /**
022     * The persistence interface for the message boards ban 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 MBBanPersistenceImpl
030     * @see MBBanUtil
031     * @generated
032     */
033    public interface MBBanPersistence extends BasePersistence<MBBan> {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify or reference this interface directly. Always use {@link MBBanUtil} to access the message boards ban persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
038             */
039    
040            /**
041            * Caches the message boards ban in the entity cache if it is enabled.
042            *
043            * @param mbBan the message boards ban
044            */
045            public void cacheResult(com.liferay.portlet.messageboards.model.MBBan mbBan);
046    
047            /**
048            * Caches the message boards bans in the entity cache if it is enabled.
049            *
050            * @param mbBans the message boards bans
051            */
052            public void cacheResult(
053                    java.util.List<com.liferay.portlet.messageboards.model.MBBan> mbBans);
054    
055            /**
056            * Creates a new message boards ban with the primary key. Does not add the message boards ban to the database.
057            *
058            * @param banId the primary key for the new message boards ban
059            * @return the new message boards ban
060            */
061            public com.liferay.portlet.messageboards.model.MBBan create(long banId);
062    
063            /**
064            * Removes the message boards ban with the primary key from the database. Also notifies the appropriate model listeners.
065            *
066            * @param banId the primary key of the message boards ban
067            * @return the message boards ban that was removed
068            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public com.liferay.portlet.messageboards.model.MBBan remove(long banId)
072                    throws com.liferay.portal.kernel.exception.SystemException,
073                            com.liferay.portlet.messageboards.NoSuchBanException;
074    
075            public com.liferay.portlet.messageboards.model.MBBan updateImpl(
076                    com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
077                    throws com.liferay.portal.kernel.exception.SystemException;
078    
079            /**
080            * Returns the message boards ban with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchBanException} if it could not be found.
081            *
082            * @param banId the primary key of the message boards ban
083            * @return the message boards ban
084            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found
085            * @throws SystemException if a system exception occurred
086            */
087            public com.liferay.portlet.messageboards.model.MBBan findByPrimaryKey(
088                    long banId)
089                    throws com.liferay.portal.kernel.exception.SystemException,
090                            com.liferay.portlet.messageboards.NoSuchBanException;
091    
092            /**
093            * Returns the message boards ban with the primary key or returns <code>null</code> if it could not be found.
094            *
095            * @param banId the primary key of the message boards ban
096            * @return the message boards ban, or <code>null</code> if a message boards ban with the primary key could not be found
097            * @throws SystemException if a system exception occurred
098            */
099            public com.liferay.portlet.messageboards.model.MBBan fetchByPrimaryKey(
100                    long banId) throws com.liferay.portal.kernel.exception.SystemException;
101    
102            /**
103            * Returns all the message boards bans where groupId = &#63;.
104            *
105            * @param groupId the group ID
106            * @return the matching message boards bans
107            * @throws SystemException if a system exception occurred
108            */
109            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
110                    long groupId)
111                    throws com.liferay.portal.kernel.exception.SystemException;
112    
113            /**
114            * Returns a range of all the message boards bans where groupId = &#63;.
115            *
116            * <p>
117            * 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.
118            * </p>
119            *
120            * @param groupId the group ID
121            * @param start the lower bound of the range of message boards bans
122            * @param end the upper bound of the range of message boards bans (not inclusive)
123            * @return the range of matching message boards bans
124            * @throws SystemException if a system exception occurred
125            */
126            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
127                    long groupId, int start, int end)
128                    throws com.liferay.portal.kernel.exception.SystemException;
129    
130            /**
131            * Returns an ordered range of all the message boards bans where groupId = &#63;.
132            *
133            * <p>
134            * 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.
135            * </p>
136            *
137            * @param groupId the group ID
138            * @param start the lower bound of the range of message boards bans
139            * @param end the upper bound of the range of message boards bans (not inclusive)
140            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
141            * @return the ordered range of matching message boards bans
142            * @throws SystemException if a system exception occurred
143            */
144            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
145                    long groupId, int start, int end,
146                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
147                    throws com.liferay.portal.kernel.exception.SystemException;
148    
149            /**
150            * Returns the first message boards ban in the ordered set where groupId = &#63;.
151            *
152            * @param groupId the group ID
153            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
154            * @return the first matching message boards ban
155            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
156            * @throws SystemException if a system exception occurred
157            */
158            public com.liferay.portlet.messageboards.model.MBBan findByGroupId_First(
159                    long groupId,
160                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161                    throws com.liferay.portal.kernel.exception.SystemException,
162                            com.liferay.portlet.messageboards.NoSuchBanException;
163    
164            /**
165            * Returns the first message boards ban in the ordered set where groupId = &#63;.
166            *
167            * @param groupId the group ID
168            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
169            * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
170            * @throws SystemException if a system exception occurred
171            */
172            public com.liferay.portlet.messageboards.model.MBBan fetchByGroupId_First(
173                    long groupId,
174                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175                    throws com.liferay.portal.kernel.exception.SystemException;
176    
177            /**
178            * Returns the last message boards ban in the ordered set where groupId = &#63;.
179            *
180            * @param groupId the group ID
181            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
182            * @return the last matching message boards ban
183            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
184            * @throws SystemException if a system exception occurred
185            */
186            public com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last(
187                    long groupId,
188                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
189                    throws com.liferay.portal.kernel.exception.SystemException,
190                            com.liferay.portlet.messageboards.NoSuchBanException;
191    
192            /**
193            * Returns the last message boards ban in the ordered set where groupId = &#63;.
194            *
195            * @param groupId the group ID
196            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
197            * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
198            * @throws SystemException if a system exception occurred
199            */
200            public com.liferay.portlet.messageboards.model.MBBan fetchByGroupId_Last(
201                    long groupId,
202                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203                    throws com.liferay.portal.kernel.exception.SystemException;
204    
205            /**
206            * Returns the message boards bans before and after the current message boards ban in the ordered set where groupId = &#63;.
207            *
208            * @param banId the primary key of the current message boards ban
209            * @param groupId the group ID
210            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
211            * @return the previous, current, and next message boards ban
212            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found
213            * @throws SystemException if a system exception occurred
214            */
215            public com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext(
216                    long banId, long groupId,
217                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
218                    throws com.liferay.portal.kernel.exception.SystemException,
219                            com.liferay.portlet.messageboards.NoSuchBanException;
220    
221            /**
222            * Returns all the message boards bans where userId = &#63;.
223            *
224            * @param userId the user ID
225            * @return the matching message boards bans
226            * @throws SystemException if a system exception occurred
227            */
228            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
229                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
230    
231            /**
232            * Returns a range of all the message boards bans where userId = &#63;.
233            *
234            * <p>
235            * 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.
236            * </p>
237            *
238            * @param userId the user ID
239            * @param start the lower bound of the range of message boards bans
240            * @param end the upper bound of the range of message boards bans (not inclusive)
241            * @return the range of matching message boards bans
242            * @throws SystemException if a system exception occurred
243            */
244            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
245                    long userId, int start, int end)
246                    throws com.liferay.portal.kernel.exception.SystemException;
247    
248            /**
249            * Returns an ordered range of all the message boards bans where userId = &#63;.
250            *
251            * <p>
252            * 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.
253            * </p>
254            *
255            * @param userId the user ID
256            * @param start the lower bound of the range of message boards bans
257            * @param end the upper bound of the range of message boards bans (not inclusive)
258            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
259            * @return the ordered range of matching message boards bans
260            * @throws SystemException if a system exception occurred
261            */
262            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
263                    long userId, int start, int end,
264                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
265                    throws com.liferay.portal.kernel.exception.SystemException;
266    
267            /**
268            * Returns the first message boards ban in the ordered set where userId = &#63;.
269            *
270            * @param userId the user ID
271            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
272            * @return the first matching message boards ban
273            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
274            * @throws SystemException if a system exception occurred
275            */
276            public com.liferay.portlet.messageboards.model.MBBan findByUserId_First(
277                    long userId,
278                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
279                    throws com.liferay.portal.kernel.exception.SystemException,
280                            com.liferay.portlet.messageboards.NoSuchBanException;
281    
282            /**
283            * Returns the first message boards ban in the ordered set where userId = &#63;.
284            *
285            * @param userId the user ID
286            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
287            * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
288            * @throws SystemException if a system exception occurred
289            */
290            public com.liferay.portlet.messageboards.model.MBBan fetchByUserId_First(
291                    long userId,
292                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
293                    throws com.liferay.portal.kernel.exception.SystemException;
294    
295            /**
296            * Returns the last message boards ban in the ordered set where userId = &#63;.
297            *
298            * @param userId the user ID
299            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
300            * @return the last matching message boards ban
301            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public com.liferay.portlet.messageboards.model.MBBan findByUserId_Last(
305                    long userId,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.kernel.exception.SystemException,
308                            com.liferay.portlet.messageboards.NoSuchBanException;
309    
310            /**
311            * Returns the last message boards ban in the ordered set where userId = &#63;.
312            *
313            * @param userId the user ID
314            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
315            * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
316            * @throws SystemException if a system exception occurred
317            */
318            public com.liferay.portlet.messageboards.model.MBBan fetchByUserId_Last(
319                    long userId,
320                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
321                    throws com.liferay.portal.kernel.exception.SystemException;
322    
323            /**
324            * Returns the message boards bans before and after the current message boards ban in the ordered set where userId = &#63;.
325            *
326            * @param banId the primary key of the current message boards ban
327            * @param userId the user ID
328            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
329            * @return the previous, current, and next message boards ban
330            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found
331            * @throws SystemException if a system exception occurred
332            */
333            public com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext(
334                    long banId, long userId,
335                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
336                    throws com.liferay.portal.kernel.exception.SystemException,
337                            com.liferay.portlet.messageboards.NoSuchBanException;
338    
339            /**
340            * Returns all the message boards bans where banUserId = &#63;.
341            *
342            * @param banUserId the ban user ID
343            * @return the matching message boards bans
344            * @throws SystemException if a system exception occurred
345            */
346            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
347                    long banUserId)
348                    throws com.liferay.portal.kernel.exception.SystemException;
349    
350            /**
351            * Returns a range of all the message boards bans where banUserId = &#63;.
352            *
353            * <p>
354            * 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.
355            * </p>
356            *
357            * @param banUserId the ban user ID
358            * @param start the lower bound of the range of message boards bans
359            * @param end the upper bound of the range of message boards bans (not inclusive)
360            * @return the range of matching message boards bans
361            * @throws SystemException if a system exception occurred
362            */
363            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
364                    long banUserId, int start, int end)
365                    throws com.liferay.portal.kernel.exception.SystemException;
366    
367            /**
368            * Returns an ordered range of all the message boards bans where banUserId = &#63;.
369            *
370            * <p>
371            * 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.
372            * </p>
373            *
374            * @param banUserId the ban user ID
375            * @param start the lower bound of the range of message boards bans
376            * @param end the upper bound of the range of message boards bans (not inclusive)
377            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
378            * @return the ordered range of matching message boards bans
379            * @throws SystemException if a system exception occurred
380            */
381            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
382                    long banUserId, int start, int end,
383                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
384                    throws com.liferay.portal.kernel.exception.SystemException;
385    
386            /**
387            * Returns the first message boards ban in the ordered set where banUserId = &#63;.
388            *
389            * @param banUserId the ban user ID
390            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
391            * @return the first matching message boards ban
392            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
393            * @throws SystemException if a system exception occurred
394            */
395            public com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First(
396                    long banUserId,
397                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
398                    throws com.liferay.portal.kernel.exception.SystemException,
399                            com.liferay.portlet.messageboards.NoSuchBanException;
400    
401            /**
402            * Returns the first message boards ban in the ordered set where banUserId = &#63;.
403            *
404            * @param banUserId the ban user ID
405            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
406            * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
407            * @throws SystemException if a system exception occurred
408            */
409            public com.liferay.portlet.messageboards.model.MBBan fetchByBanUserId_First(
410                    long banUserId,
411                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
412                    throws com.liferay.portal.kernel.exception.SystemException;
413    
414            /**
415            * Returns the last message boards ban in the ordered set where banUserId = &#63;.
416            *
417            * @param banUserId the ban user ID
418            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
419            * @return the last matching message boards ban
420            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
421            * @throws SystemException if a system exception occurred
422            */
423            public com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last(
424                    long banUserId,
425                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
426                    throws com.liferay.portal.kernel.exception.SystemException,
427                            com.liferay.portlet.messageboards.NoSuchBanException;
428    
429            /**
430            * Returns the last message boards ban in the ordered set where banUserId = &#63;.
431            *
432            * @param banUserId the ban user ID
433            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
434            * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
435            * @throws SystemException if a system exception occurred
436            */
437            public com.liferay.portlet.messageboards.model.MBBan fetchByBanUserId_Last(
438                    long banUserId,
439                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
440                    throws com.liferay.portal.kernel.exception.SystemException;
441    
442            /**
443            * Returns the message boards bans before and after the current message boards ban in the ordered set where banUserId = &#63;.
444            *
445            * @param banId the primary key of the current message boards ban
446            * @param banUserId the ban user ID
447            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
448            * @return the previous, current, and next message boards ban
449            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found
450            * @throws SystemException if a system exception occurred
451            */
452            public com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext(
453                    long banId, long banUserId,
454                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
455                    throws com.liferay.portal.kernel.exception.SystemException,
456                            com.liferay.portlet.messageboards.NoSuchBanException;
457    
458            /**
459            * Returns the message boards ban where groupId = &#63; and banUserId = &#63; or throws a {@link com.liferay.portlet.messageboards.NoSuchBanException} if it could not be found.
460            *
461            * @param groupId the group ID
462            * @param banUserId the ban user ID
463            * @return the matching message boards ban
464            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
465            * @throws SystemException if a system exception occurred
466            */
467            public com.liferay.portlet.messageboards.model.MBBan findByG_B(
468                    long groupId, long banUserId)
469                    throws com.liferay.portal.kernel.exception.SystemException,
470                            com.liferay.portlet.messageboards.NoSuchBanException;
471    
472            /**
473            * Returns the message boards ban where groupId = &#63; and banUserId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
474            *
475            * @param groupId the group ID
476            * @param banUserId the ban user ID
477            * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
478            * @throws SystemException if a system exception occurred
479            */
480            public com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
481                    long groupId, long banUserId)
482                    throws com.liferay.portal.kernel.exception.SystemException;
483    
484            /**
485            * Returns the message boards ban where groupId = &#63; and banUserId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
486            *
487            * @param groupId the group ID
488            * @param banUserId the ban user ID
489            * @param retrieveFromCache whether to use the finder cache
490            * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
491            * @throws SystemException if a system exception occurred
492            */
493            public com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
494                    long groupId, long banUserId, boolean retrieveFromCache)
495                    throws com.liferay.portal.kernel.exception.SystemException;
496    
497            /**
498            * Returns all the message boards bans.
499            *
500            * @return the message boards bans
501            * @throws SystemException if a system exception occurred
502            */
503            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll()
504                    throws com.liferay.portal.kernel.exception.SystemException;
505    
506            /**
507            * Returns a range of all the message boards bans.
508            *
509            * <p>
510            * 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.
511            * </p>
512            *
513            * @param start the lower bound of the range of message boards bans
514            * @param end the upper bound of the range of message boards bans (not inclusive)
515            * @return the range of message boards bans
516            * @throws SystemException if a system exception occurred
517            */
518            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
519                    int start, int end)
520                    throws com.liferay.portal.kernel.exception.SystemException;
521    
522            /**
523            * Returns an ordered range of all the message boards bans.
524            *
525            * <p>
526            * 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.
527            * </p>
528            *
529            * @param start the lower bound of the range of message boards bans
530            * @param end the upper bound of the range of message boards bans (not inclusive)
531            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
532            * @return the ordered range of message boards bans
533            * @throws SystemException if a system exception occurred
534            */
535            public java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
536                    int start, int end,
537                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
538                    throws com.liferay.portal.kernel.exception.SystemException;
539    
540            /**
541            * Removes all the message boards bans where groupId = &#63; from the database.
542            *
543            * @param groupId the group ID
544            * @throws SystemException if a system exception occurred
545            */
546            public void removeByGroupId(long groupId)
547                    throws com.liferay.portal.kernel.exception.SystemException;
548    
549            /**
550            * Removes all the message boards bans where userId = &#63; from the database.
551            *
552            * @param userId the user ID
553            * @throws SystemException if a system exception occurred
554            */
555            public void removeByUserId(long userId)
556                    throws com.liferay.portal.kernel.exception.SystemException;
557    
558            /**
559            * Removes all the message boards bans where banUserId = &#63; from the database.
560            *
561            * @param banUserId the ban user ID
562            * @throws SystemException if a system exception occurred
563            */
564            public void removeByBanUserId(long banUserId)
565                    throws com.liferay.portal.kernel.exception.SystemException;
566    
567            /**
568            * Removes the message boards ban where groupId = &#63; and banUserId = &#63; from the database.
569            *
570            * @param groupId the group ID
571            * @param banUserId the ban user ID
572            * @return the message boards ban that was removed
573            * @throws SystemException if a system exception occurred
574            */
575            public com.liferay.portlet.messageboards.model.MBBan removeByG_B(
576                    long groupId, long banUserId)
577                    throws com.liferay.portal.kernel.exception.SystemException,
578                            com.liferay.portlet.messageboards.NoSuchBanException;
579    
580            /**
581            * Removes all the message boards bans from the database.
582            *
583            * @throws SystemException if a system exception occurred
584            */
585            public void removeAll()
586                    throws com.liferay.portal.kernel.exception.SystemException;
587    
588            /**
589            * Returns the number of message boards bans where groupId = &#63;.
590            *
591            * @param groupId the group ID
592            * @return the number of matching message boards bans
593            * @throws SystemException if a system exception occurred
594            */
595            public int countByGroupId(long groupId)
596                    throws com.liferay.portal.kernel.exception.SystemException;
597    
598            /**
599            * Returns the number of message boards bans where userId = &#63;.
600            *
601            * @param userId the user ID
602            * @return the number of matching message boards bans
603            * @throws SystemException if a system exception occurred
604            */
605            public int countByUserId(long userId)
606                    throws com.liferay.portal.kernel.exception.SystemException;
607    
608            /**
609            * Returns the number of message boards bans where banUserId = &#63;.
610            *
611            * @param banUserId the ban user ID
612            * @return the number of matching message boards bans
613            * @throws SystemException if a system exception occurred
614            */
615            public int countByBanUserId(long banUserId)
616                    throws com.liferay.portal.kernel.exception.SystemException;
617    
618            /**
619            * Returns the number of message boards bans where groupId = &#63; and banUserId = &#63;.
620            *
621            * @param groupId the group ID
622            * @param banUserId the ban user ID
623            * @return the number of matching message boards bans
624            * @throws SystemException if a system exception occurred
625            */
626            public int countByG_B(long groupId, long banUserId)
627                    throws com.liferay.portal.kernel.exception.SystemException;
628    
629            /**
630            * Returns the number of message boards bans.
631            *
632            * @return the number of message boards bans
633            * @throws SystemException if a system exception occurred
634            */
635            public int countAll()
636                    throws com.liferay.portal.kernel.exception.SystemException;
637    }