001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.messageboards.model.MBBan;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the message boards ban service. This utility wraps {@link MBBanPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see MBBanPersistence
037     * @see MBBanPersistenceImpl
038     * @generated
039     */
040    public class MBBanUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(MBBan mbBan) {
058                    getPersistence().clearCache(mbBan);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery)
073                    throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery,
081                    int start, int end) throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery,
089                    int start, int end, OrderByComparator orderByComparator)
090                    throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
098             */
099            public static MBBan update(MBBan mbBan) throws SystemException {
100                    return getPersistence().update(mbBan);
101            }
102    
103            /**
104             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
105             */
106            public static MBBan update(MBBan mbBan, ServiceContext serviceContext)
107                    throws SystemException {
108                    return getPersistence().update(mbBan, serviceContext);
109            }
110    
111            /**
112            * Returns all the message boards bans where groupId = &#63;.
113            *
114            * @param groupId the group ID
115            * @return the matching message boards bans
116            * @throws SystemException if a system exception occurred
117            */
118            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
119                    long groupId)
120                    throws com.liferay.portal.kernel.exception.SystemException {
121                    return getPersistence().findByGroupId(groupId);
122            }
123    
124            /**
125            * Returns a range of all the message boards bans where groupId = &#63;.
126            *
127            * <p>
128            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
129            * </p>
130            *
131            * @param groupId the group ID
132            * @param start the lower bound of the range of message boards bans
133            * @param end the upper bound of the range of message boards bans (not inclusive)
134            * @return the range of matching message boards bans
135            * @throws SystemException if a system exception occurred
136            */
137            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
138                    long groupId, int start, int end)
139                    throws com.liferay.portal.kernel.exception.SystemException {
140                    return getPersistence().findByGroupId(groupId, start, end);
141            }
142    
143            /**
144            * Returns an ordered range of all the message boards bans where groupId = &#63;.
145            *
146            * <p>
147            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
148            * </p>
149            *
150            * @param groupId the group ID
151            * @param start the lower bound of the range of message boards bans
152            * @param end the upper bound of the range of message boards bans (not inclusive)
153            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
154            * @return the ordered range of matching message boards bans
155            * @throws SystemException if a system exception occurred
156            */
157            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
158                    long groupId, int start, int end,
159                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
160                    throws com.liferay.portal.kernel.exception.SystemException {
161                    return getPersistence()
162                                       .findByGroupId(groupId, start, end, orderByComparator);
163            }
164    
165            /**
166            * Returns the first message boards ban in the ordered set where groupId = &#63;.
167            *
168            * @param groupId the group ID
169            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
170            * @return the first matching message boards ban
171            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
172            * @throws SystemException if a system exception occurred
173            */
174            public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_First(
175                    long groupId,
176                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
177                    throws com.liferay.portal.kernel.exception.SystemException,
178                            com.liferay.portlet.messageboards.NoSuchBanException {
179                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
180            }
181    
182            /**
183            * Returns the first message boards ban in the ordered set where groupId = &#63;.
184            *
185            * @param groupId the group ID
186            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
187            * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
188            * @throws SystemException if a system exception occurred
189            */
190            public static com.liferay.portlet.messageboards.model.MBBan fetchByGroupId_First(
191                    long groupId,
192                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
193                    throws com.liferay.portal.kernel.exception.SystemException {
194                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
195            }
196    
197            /**
198            * Returns the last message boards ban in the ordered set where groupId = &#63;.
199            *
200            * @param groupId the group ID
201            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
202            * @return the last matching message boards ban
203            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
204            * @throws SystemException if a system exception occurred
205            */
206            public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last(
207                    long groupId,
208                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
209                    throws com.liferay.portal.kernel.exception.SystemException,
210                            com.liferay.portlet.messageboards.NoSuchBanException {
211                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
212            }
213    
214            /**
215            * Returns the last message boards ban in the ordered set where groupId = &#63;.
216            *
217            * @param groupId the group ID
218            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
219            * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
220            * @throws SystemException if a system exception occurred
221            */
222            public static com.liferay.portlet.messageboards.model.MBBan fetchByGroupId_Last(
223                    long groupId,
224                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
225                    throws com.liferay.portal.kernel.exception.SystemException {
226                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
227            }
228    
229            /**
230            * Returns the message boards bans before and after the current message boards ban in the ordered set where groupId = &#63;.
231            *
232            * @param banId the primary key of the current message boards ban
233            * @param groupId the group ID
234            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
235            * @return the previous, current, and next message boards ban
236            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found
237            * @throws SystemException if a system exception occurred
238            */
239            public static com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext(
240                    long banId, long groupId,
241                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
242                    throws com.liferay.portal.kernel.exception.SystemException,
243                            com.liferay.portlet.messageboards.NoSuchBanException {
244                    return getPersistence()
245                                       .findByGroupId_PrevAndNext(banId, groupId, orderByComparator);
246            }
247    
248            /**
249            * Removes all the message boards bans where groupId = &#63; from the database.
250            *
251            * @param groupId the group ID
252            * @throws SystemException if a system exception occurred
253            */
254            public static void removeByGroupId(long groupId)
255                    throws com.liferay.portal.kernel.exception.SystemException {
256                    getPersistence().removeByGroupId(groupId);
257            }
258    
259            /**
260            * Returns the number of message boards bans where groupId = &#63;.
261            *
262            * @param groupId the group ID
263            * @return the number of matching message boards bans
264            * @throws SystemException if a system exception occurred
265            */
266            public static int countByGroupId(long groupId)
267                    throws com.liferay.portal.kernel.exception.SystemException {
268                    return getPersistence().countByGroupId(groupId);
269            }
270    
271            /**
272            * Returns all the message boards bans where userId = &#63;.
273            *
274            * @param userId the user ID
275            * @return the matching message boards bans
276            * @throws SystemException if a system exception occurred
277            */
278            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
279                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
280                    return getPersistence().findByUserId(userId);
281            }
282    
283            /**
284            * Returns a range of all the message boards bans where userId = &#63;.
285            *
286            * <p>
287            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
288            * </p>
289            *
290            * @param userId the user ID
291            * @param start the lower bound of the range of message boards bans
292            * @param end the upper bound of the range of message boards bans (not inclusive)
293            * @return the range of matching message boards bans
294            * @throws SystemException if a system exception occurred
295            */
296            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
297                    long userId, int start, int end)
298                    throws com.liferay.portal.kernel.exception.SystemException {
299                    return getPersistence().findByUserId(userId, start, end);
300            }
301    
302            /**
303            * Returns an ordered range of all the message boards bans where userId = &#63;.
304            *
305            * <p>
306            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
307            * </p>
308            *
309            * @param userId the user ID
310            * @param start the lower bound of the range of message boards bans
311            * @param end the upper bound of the range of message boards bans (not inclusive)
312            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
313            * @return the ordered range of matching message boards bans
314            * @throws SystemException if a system exception occurred
315            */
316            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
317                    long userId, int start, int end,
318                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
319                    throws com.liferay.portal.kernel.exception.SystemException {
320                    return getPersistence()
321                                       .findByUserId(userId, start, end, orderByComparator);
322            }
323    
324            /**
325            * Returns the first message boards ban in the ordered set where userId = &#63;.
326            *
327            * @param userId the user ID
328            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
329            * @return the first matching message boards ban
330            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
331            * @throws SystemException if a system exception occurred
332            */
333            public static com.liferay.portlet.messageboards.model.MBBan findByUserId_First(
334                    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                    return getPersistence().findByUserId_First(userId, orderByComparator);
339            }
340    
341            /**
342            * Returns the first message boards ban in the ordered set where userId = &#63;.
343            *
344            * @param userId the user ID
345            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
346            * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
347            * @throws SystemException if a system exception occurred
348            */
349            public static com.liferay.portlet.messageboards.model.MBBan fetchByUserId_First(
350                    long userId,
351                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
352                    throws com.liferay.portal.kernel.exception.SystemException {
353                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
354            }
355    
356            /**
357            * Returns the last message boards ban in the ordered set where userId = &#63;.
358            *
359            * @param userId the user ID
360            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
361            * @return the last matching message boards ban
362            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
363            * @throws SystemException if a system exception occurred
364            */
365            public static com.liferay.portlet.messageboards.model.MBBan findByUserId_Last(
366                    long userId,
367                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
368                    throws com.liferay.portal.kernel.exception.SystemException,
369                            com.liferay.portlet.messageboards.NoSuchBanException {
370                    return getPersistence().findByUserId_Last(userId, orderByComparator);
371            }
372    
373            /**
374            * Returns the last message boards ban in the ordered set where userId = &#63;.
375            *
376            * @param userId the user ID
377            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
378            * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
379            * @throws SystemException if a system exception occurred
380            */
381            public static com.liferay.portlet.messageboards.model.MBBan fetchByUserId_Last(
382                    long userId,
383                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
384                    throws com.liferay.portal.kernel.exception.SystemException {
385                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
386            }
387    
388            /**
389            * Returns the message boards bans before and after the current message boards ban in the ordered set where userId = &#63;.
390            *
391            * @param banId the primary key of the current message boards ban
392            * @param userId the user ID
393            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
394            * @return the previous, current, and next message boards ban
395            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found
396            * @throws SystemException if a system exception occurred
397            */
398            public static com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext(
399                    long banId, long userId,
400                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
401                    throws com.liferay.portal.kernel.exception.SystemException,
402                            com.liferay.portlet.messageboards.NoSuchBanException {
403                    return getPersistence()
404                                       .findByUserId_PrevAndNext(banId, userId, orderByComparator);
405            }
406    
407            /**
408            * Removes all the message boards bans where userId = &#63; from the database.
409            *
410            * @param userId the user ID
411            * @throws SystemException if a system exception occurred
412            */
413            public static void removeByUserId(long userId)
414                    throws com.liferay.portal.kernel.exception.SystemException {
415                    getPersistence().removeByUserId(userId);
416            }
417    
418            /**
419            * Returns the number of message boards bans where userId = &#63;.
420            *
421            * @param userId the user ID
422            * @return the number of matching message boards bans
423            * @throws SystemException if a system exception occurred
424            */
425            public static int countByUserId(long userId)
426                    throws com.liferay.portal.kernel.exception.SystemException {
427                    return getPersistence().countByUserId(userId);
428            }
429    
430            /**
431            * Returns all the message boards bans where banUserId = &#63;.
432            *
433            * @param banUserId the ban user ID
434            * @return the matching message boards bans
435            * @throws SystemException if a system exception occurred
436            */
437            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
438                    long banUserId)
439                    throws com.liferay.portal.kernel.exception.SystemException {
440                    return getPersistence().findByBanUserId(banUserId);
441            }
442    
443            /**
444            * Returns a range of all the message boards bans where banUserId = &#63;.
445            *
446            * <p>
447            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
448            * </p>
449            *
450            * @param banUserId the ban user ID
451            * @param start the lower bound of the range of message boards bans
452            * @param end the upper bound of the range of message boards bans (not inclusive)
453            * @return the range of matching message boards bans
454            * @throws SystemException if a system exception occurred
455            */
456            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
457                    long banUserId, int start, int end)
458                    throws com.liferay.portal.kernel.exception.SystemException {
459                    return getPersistence().findByBanUserId(banUserId, start, end);
460            }
461    
462            /**
463            * Returns an ordered range of all the message boards bans where banUserId = &#63;.
464            *
465            * <p>
466            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
467            * </p>
468            *
469            * @param banUserId the ban user ID
470            * @param start the lower bound of the range of message boards bans
471            * @param end the upper bound of the range of message boards bans (not inclusive)
472            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
473            * @return the ordered range of matching message boards bans
474            * @throws SystemException if a system exception occurred
475            */
476            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
477                    long banUserId, int start, int end,
478                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
479                    throws com.liferay.portal.kernel.exception.SystemException {
480                    return getPersistence()
481                                       .findByBanUserId(banUserId, start, end, orderByComparator);
482            }
483    
484            /**
485            * Returns the first message boards ban in the ordered set where banUserId = &#63;.
486            *
487            * @param banUserId the ban user ID
488            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
489            * @return the first matching message boards ban
490            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
491            * @throws SystemException if a system exception occurred
492            */
493            public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First(
494                    long banUserId,
495                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
496                    throws com.liferay.portal.kernel.exception.SystemException,
497                            com.liferay.portlet.messageboards.NoSuchBanException {
498                    return getPersistence()
499                                       .findByBanUserId_First(banUserId, orderByComparator);
500            }
501    
502            /**
503            * Returns the first message boards ban in the ordered set where banUserId = &#63;.
504            *
505            * @param banUserId the ban user ID
506            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
507            * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
508            * @throws SystemException if a system exception occurred
509            */
510            public static com.liferay.portlet.messageboards.model.MBBan fetchByBanUserId_First(
511                    long banUserId,
512                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
513                    throws com.liferay.portal.kernel.exception.SystemException {
514                    return getPersistence()
515                                       .fetchByBanUserId_First(banUserId, orderByComparator);
516            }
517    
518            /**
519            * Returns the last message boards ban in the ordered set where banUserId = &#63;.
520            *
521            * @param banUserId the ban user ID
522            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
523            * @return the last matching message boards ban
524            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
525            * @throws SystemException if a system exception occurred
526            */
527            public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last(
528                    long banUserId,
529                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
530                    throws com.liferay.portal.kernel.exception.SystemException,
531                            com.liferay.portlet.messageboards.NoSuchBanException {
532                    return getPersistence()
533                                       .findByBanUserId_Last(banUserId, orderByComparator);
534            }
535    
536            /**
537            * Returns the last message boards ban in the ordered set where banUserId = &#63;.
538            *
539            * @param banUserId the ban user ID
540            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
541            * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
542            * @throws SystemException if a system exception occurred
543            */
544            public static com.liferay.portlet.messageboards.model.MBBan fetchByBanUserId_Last(
545                    long banUserId,
546                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
547                    throws com.liferay.portal.kernel.exception.SystemException {
548                    return getPersistence()
549                                       .fetchByBanUserId_Last(banUserId, orderByComparator);
550            }
551    
552            /**
553            * Returns the message boards bans before and after the current message boards ban in the ordered set where banUserId = &#63;.
554            *
555            * @param banId the primary key of the current message boards ban
556            * @param banUserId the ban user ID
557            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
558            * @return the previous, current, and next message boards ban
559            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found
560            * @throws SystemException if a system exception occurred
561            */
562            public static com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext(
563                    long banId, long banUserId,
564                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
565                    throws com.liferay.portal.kernel.exception.SystemException,
566                            com.liferay.portlet.messageboards.NoSuchBanException {
567                    return getPersistence()
568                                       .findByBanUserId_PrevAndNext(banId, banUserId,
569                            orderByComparator);
570            }
571    
572            /**
573            * Removes all the message boards bans where banUserId = &#63; from the database.
574            *
575            * @param banUserId the ban user ID
576            * @throws SystemException if a system exception occurred
577            */
578            public static void removeByBanUserId(long banUserId)
579                    throws com.liferay.portal.kernel.exception.SystemException {
580                    getPersistence().removeByBanUserId(banUserId);
581            }
582    
583            /**
584            * Returns the number of message boards bans where banUserId = &#63;.
585            *
586            * @param banUserId the ban user ID
587            * @return the number of matching message boards bans
588            * @throws SystemException if a system exception occurred
589            */
590            public static int countByBanUserId(long banUserId)
591                    throws com.liferay.portal.kernel.exception.SystemException {
592                    return getPersistence().countByBanUserId(banUserId);
593            }
594    
595            /**
596            * 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.
597            *
598            * @param groupId the group ID
599            * @param banUserId the ban user ID
600            * @return the matching message boards ban
601            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found
602            * @throws SystemException if a system exception occurred
603            */
604            public static com.liferay.portlet.messageboards.model.MBBan findByG_B(
605                    long groupId, long banUserId)
606                    throws com.liferay.portal.kernel.exception.SystemException,
607                            com.liferay.portlet.messageboards.NoSuchBanException {
608                    return getPersistence().findByG_B(groupId, banUserId);
609            }
610    
611            /**
612            * 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.
613            *
614            * @param groupId the group ID
615            * @param banUserId the ban user ID
616            * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
617            * @throws SystemException if a system exception occurred
618            */
619            public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
620                    long groupId, long banUserId)
621                    throws com.liferay.portal.kernel.exception.SystemException {
622                    return getPersistence().fetchByG_B(groupId, banUserId);
623            }
624    
625            /**
626            * 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.
627            *
628            * @param groupId the group ID
629            * @param banUserId the ban user ID
630            * @param retrieveFromCache whether to use the finder cache
631            * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found
632            * @throws SystemException if a system exception occurred
633            */
634            public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
635                    long groupId, long banUserId, boolean retrieveFromCache)
636                    throws com.liferay.portal.kernel.exception.SystemException {
637                    return getPersistence().fetchByG_B(groupId, banUserId, retrieveFromCache);
638            }
639    
640            /**
641            * Removes the message boards ban where groupId = &#63; and banUserId = &#63; from the database.
642            *
643            * @param groupId the group ID
644            * @param banUserId the ban user ID
645            * @return the message boards ban that was removed
646            * @throws SystemException if a system exception occurred
647            */
648            public static com.liferay.portlet.messageboards.model.MBBan removeByG_B(
649                    long groupId, long banUserId)
650                    throws com.liferay.portal.kernel.exception.SystemException,
651                            com.liferay.portlet.messageboards.NoSuchBanException {
652                    return getPersistence().removeByG_B(groupId, banUserId);
653            }
654    
655            /**
656            * Returns the number of message boards bans where groupId = &#63; and banUserId = &#63;.
657            *
658            * @param groupId the group ID
659            * @param banUserId the ban user ID
660            * @return the number of matching message boards bans
661            * @throws SystemException if a system exception occurred
662            */
663            public static int countByG_B(long groupId, long banUserId)
664                    throws com.liferay.portal.kernel.exception.SystemException {
665                    return getPersistence().countByG_B(groupId, banUserId);
666            }
667    
668            /**
669            * Caches the message boards ban in the entity cache if it is enabled.
670            *
671            * @param mbBan the message boards ban
672            */
673            public static void cacheResult(
674                    com.liferay.portlet.messageboards.model.MBBan mbBan) {
675                    getPersistence().cacheResult(mbBan);
676            }
677    
678            /**
679            * Caches the message boards bans in the entity cache if it is enabled.
680            *
681            * @param mbBans the message boards bans
682            */
683            public static void cacheResult(
684                    java.util.List<com.liferay.portlet.messageboards.model.MBBan> mbBans) {
685                    getPersistence().cacheResult(mbBans);
686            }
687    
688            /**
689            * Creates a new message boards ban with the primary key. Does not add the message boards ban to the database.
690            *
691            * @param banId the primary key for the new message boards ban
692            * @return the new message boards ban
693            */
694            public static com.liferay.portlet.messageboards.model.MBBan create(
695                    long banId) {
696                    return getPersistence().create(banId);
697            }
698    
699            /**
700            * Removes the message boards ban with the primary key from the database. Also notifies the appropriate model listeners.
701            *
702            * @param banId the primary key of the message boards ban
703            * @return the message boards ban that was removed
704            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found
705            * @throws SystemException if a system exception occurred
706            */
707            public static com.liferay.portlet.messageboards.model.MBBan remove(
708                    long banId)
709                    throws com.liferay.portal.kernel.exception.SystemException,
710                            com.liferay.portlet.messageboards.NoSuchBanException {
711                    return getPersistence().remove(banId);
712            }
713    
714            public static com.liferay.portlet.messageboards.model.MBBan updateImpl(
715                    com.liferay.portlet.messageboards.model.MBBan mbBan)
716                    throws com.liferay.portal.kernel.exception.SystemException {
717                    return getPersistence().updateImpl(mbBan);
718            }
719    
720            /**
721            * Returns the message boards ban with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchBanException} if it could not be found.
722            *
723            * @param banId the primary key of the message boards ban
724            * @return the message boards ban
725            * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found
726            * @throws SystemException if a system exception occurred
727            */
728            public static com.liferay.portlet.messageboards.model.MBBan findByPrimaryKey(
729                    long banId)
730                    throws com.liferay.portal.kernel.exception.SystemException,
731                            com.liferay.portlet.messageboards.NoSuchBanException {
732                    return getPersistence().findByPrimaryKey(banId);
733            }
734    
735            /**
736            * Returns the message boards ban with the primary key or returns <code>null</code> if it could not be found.
737            *
738            * @param banId the primary key of the message boards ban
739            * @return the message boards ban, or <code>null</code> if a message boards ban with the primary key could not be found
740            * @throws SystemException if a system exception occurred
741            */
742            public static com.liferay.portlet.messageboards.model.MBBan fetchByPrimaryKey(
743                    long banId) throws com.liferay.portal.kernel.exception.SystemException {
744                    return getPersistence().fetchByPrimaryKey(banId);
745            }
746    
747            /**
748            * Returns all the message boards bans.
749            *
750            * @return the message boards bans
751            * @throws SystemException if a system exception occurred
752            */
753            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll()
754                    throws com.liferay.portal.kernel.exception.SystemException {
755                    return getPersistence().findAll();
756            }
757    
758            /**
759            * Returns a range of all the message boards bans.
760            *
761            * <p>
762            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
763            * </p>
764            *
765            * @param start the lower bound of the range of message boards bans
766            * @param end the upper bound of the range of message boards bans (not inclusive)
767            * @return the range of message boards bans
768            * @throws SystemException if a system exception occurred
769            */
770            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
771                    int start, int end)
772                    throws com.liferay.portal.kernel.exception.SystemException {
773                    return getPersistence().findAll(start, end);
774            }
775    
776            /**
777            * Returns an ordered range of all the message boards bans.
778            *
779            * <p>
780            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
781            * </p>
782            *
783            * @param start the lower bound of the range of message boards bans
784            * @param end the upper bound of the range of message boards bans (not inclusive)
785            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
786            * @return the ordered range of message boards bans
787            * @throws SystemException if a system exception occurred
788            */
789            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
790                    int start, int end,
791                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
792                    throws com.liferay.portal.kernel.exception.SystemException {
793                    return getPersistence().findAll(start, end, orderByComparator);
794            }
795    
796            /**
797            * Removes all the message boards bans from the database.
798            *
799            * @throws SystemException if a system exception occurred
800            */
801            public static void removeAll()
802                    throws com.liferay.portal.kernel.exception.SystemException {
803                    getPersistence().removeAll();
804            }
805    
806            /**
807            * Returns the number of message boards bans.
808            *
809            * @return the number of message boards bans
810            * @throws SystemException if a system exception occurred
811            */
812            public static int countAll()
813                    throws com.liferay.portal.kernel.exception.SystemException {
814                    return getPersistence().countAll();
815            }
816    
817            public static MBBanPersistence getPersistence() {
818                    if (_persistence == null) {
819                            _persistence = (MBBanPersistence)PortalBeanLocatorUtil.locate(MBBanPersistence.class.getName());
820    
821                            ReferenceRegistry.registerReference(MBBanUtil.class, "_persistence");
822                    }
823    
824                    return _persistence;
825            }
826    
827            /**
828             * @deprecated
829             */
830            public void setPersistence(MBBanPersistence persistence) {
831            }
832    
833            private static MBBanPersistence _persistence;
834    }