001    /**
002     * Copyright (c) 2000-2010 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.service.ServiceContext;
022    
023    import com.liferay.portlet.messageboards.model.MBBan;
024    
025    import java.util.List;
026    
027    /**
028     * @author    Brian Wing Shun Chan
029     * @see       MBBanPersistence
030     * @see       MBBanPersistenceImpl
031     * @generated
032     */
033    public class MBBanUtil {
034            /**
035             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
036             */
037            public static void clearCache() {
038                    getPersistence().clearCache();
039            }
040    
041            /**
042             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
043             */
044            public static void clearCache(MBBan mbBan) {
045                    getPersistence().clearCache(mbBan);
046            }
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
050             */
051            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
052                    throws SystemException {
053                    return getPersistence().countWithDynamicQuery(dynamicQuery);
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
058             */
059            public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery)
060                    throws SystemException {
061                    return getPersistence().findWithDynamicQuery(dynamicQuery);
062            }
063    
064            /**
065             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
066             */
067            public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery,
068                    int start, int end) throws SystemException {
069                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070            }
071    
072            /**
073             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
074             */
075            public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery,
076                    int start, int end, OrderByComparator orderByComparator)
077                    throws SystemException {
078                    return getPersistence()
079                                       .findWithDynamicQuery(dynamicQuery, start, end,
080                            orderByComparator);
081            }
082    
083            /**
084             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
085             */
086            public static MBBan remove(MBBan mbBan) throws SystemException {
087                    return getPersistence().remove(mbBan);
088            }
089    
090            /**
091             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
092             */
093            public static MBBan update(MBBan mbBan, boolean merge)
094                    throws SystemException {
095                    return getPersistence().update(mbBan, merge);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
100             */
101            public static MBBan update(MBBan mbBan, boolean merge,
102                    ServiceContext serviceContext) throws SystemException {
103                    return getPersistence().update(mbBan, merge, serviceContext);
104            }
105    
106            public static void cacheResult(
107                    com.liferay.portlet.messageboards.model.MBBan mbBan) {
108                    getPersistence().cacheResult(mbBan);
109            }
110    
111            public static void cacheResult(
112                    java.util.List<com.liferay.portlet.messageboards.model.MBBan> mbBans) {
113                    getPersistence().cacheResult(mbBans);
114            }
115    
116            public static com.liferay.portlet.messageboards.model.MBBan create(
117                    long banId) {
118                    return getPersistence().create(banId);
119            }
120    
121            public static com.liferay.portlet.messageboards.model.MBBan remove(
122                    long banId)
123                    throws com.liferay.portal.kernel.exception.SystemException,
124                            com.liferay.portlet.messageboards.NoSuchBanException {
125                    return getPersistence().remove(banId);
126            }
127    
128            public static com.liferay.portlet.messageboards.model.MBBan updateImpl(
129                    com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
130                    throws com.liferay.portal.kernel.exception.SystemException {
131                    return getPersistence().updateImpl(mbBan, merge);
132            }
133    
134            public static com.liferay.portlet.messageboards.model.MBBan findByPrimaryKey(
135                    long banId)
136                    throws com.liferay.portal.kernel.exception.SystemException,
137                            com.liferay.portlet.messageboards.NoSuchBanException {
138                    return getPersistence().findByPrimaryKey(banId);
139            }
140    
141            public static com.liferay.portlet.messageboards.model.MBBan fetchByPrimaryKey(
142                    long banId) throws com.liferay.portal.kernel.exception.SystemException {
143                    return getPersistence().fetchByPrimaryKey(banId);
144            }
145    
146            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
147                    long groupId)
148                    throws com.liferay.portal.kernel.exception.SystemException {
149                    return getPersistence().findByGroupId(groupId);
150            }
151    
152            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
153                    long groupId, int start, int end)
154                    throws com.liferay.portal.kernel.exception.SystemException {
155                    return getPersistence().findByGroupId(groupId, start, end);
156            }
157    
158            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
159                    long groupId, int start, int end,
160                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
161                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence()
163                                       .findByGroupId(groupId, start, end, orderByComparator);
164            }
165    
166            public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_First(
167                    long groupId,
168                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169                    throws com.liferay.portal.kernel.exception.SystemException,
170                            com.liferay.portlet.messageboards.NoSuchBanException {
171                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
172            }
173    
174            public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last(
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_Last(groupId, orderByComparator);
180            }
181    
182            public static com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext(
183                    long banId, long groupId,
184                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
185                    throws com.liferay.portal.kernel.exception.SystemException,
186                            com.liferay.portlet.messageboards.NoSuchBanException {
187                    return getPersistence()
188                                       .findByGroupId_PrevAndNext(banId, groupId, orderByComparator);
189            }
190    
191            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
192                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
193                    return getPersistence().findByUserId(userId);
194            }
195    
196            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
197                    long userId, int start, int end)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getPersistence().findByUserId(userId, start, end);
200            }
201    
202            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
203                    long userId, int start, int end,
204                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
205                    throws com.liferay.portal.kernel.exception.SystemException {
206                    return getPersistence()
207                                       .findByUserId(userId, start, end, orderByComparator);
208            }
209    
210            public static com.liferay.portlet.messageboards.model.MBBan findByUserId_First(
211                    long userId,
212                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
213                    throws com.liferay.portal.kernel.exception.SystemException,
214                            com.liferay.portlet.messageboards.NoSuchBanException {
215                    return getPersistence().findByUserId_First(userId, orderByComparator);
216            }
217    
218            public static com.liferay.portlet.messageboards.model.MBBan findByUserId_Last(
219                    long userId,
220                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
221                    throws com.liferay.portal.kernel.exception.SystemException,
222                            com.liferay.portlet.messageboards.NoSuchBanException {
223                    return getPersistence().findByUserId_Last(userId, orderByComparator);
224            }
225    
226            public static com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext(
227                    long banId, long userId,
228                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
229                    throws com.liferay.portal.kernel.exception.SystemException,
230                            com.liferay.portlet.messageboards.NoSuchBanException {
231                    return getPersistence()
232                                       .findByUserId_PrevAndNext(banId, userId, orderByComparator);
233            }
234    
235            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
236                    long banUserId)
237                    throws com.liferay.portal.kernel.exception.SystemException {
238                    return getPersistence().findByBanUserId(banUserId);
239            }
240    
241            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
242                    long banUserId, int start, int end)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getPersistence().findByBanUserId(banUserId, start, end);
245            }
246    
247            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
248                    long banUserId, int start, int end,
249                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
250                    throws com.liferay.portal.kernel.exception.SystemException {
251                    return getPersistence()
252                                       .findByBanUserId(banUserId, start, end, orderByComparator);
253            }
254    
255            public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First(
256                    long banUserId,
257                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
258                    throws com.liferay.portal.kernel.exception.SystemException,
259                            com.liferay.portlet.messageboards.NoSuchBanException {
260                    return getPersistence()
261                                       .findByBanUserId_First(banUserId, orderByComparator);
262            }
263    
264            public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last(
265                    long banUserId,
266                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267                    throws com.liferay.portal.kernel.exception.SystemException,
268                            com.liferay.portlet.messageboards.NoSuchBanException {
269                    return getPersistence()
270                                       .findByBanUserId_Last(banUserId, orderByComparator);
271            }
272    
273            public static com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext(
274                    long banId, long banUserId,
275                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
276                    throws com.liferay.portal.kernel.exception.SystemException,
277                            com.liferay.portlet.messageboards.NoSuchBanException {
278                    return getPersistence()
279                                       .findByBanUserId_PrevAndNext(banId, banUserId,
280                            orderByComparator);
281            }
282    
283            public static com.liferay.portlet.messageboards.model.MBBan findByG_B(
284                    long groupId, long banUserId)
285                    throws com.liferay.portal.kernel.exception.SystemException,
286                            com.liferay.portlet.messageboards.NoSuchBanException {
287                    return getPersistence().findByG_B(groupId, banUserId);
288            }
289    
290            public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
291                    long groupId, long banUserId)
292                    throws com.liferay.portal.kernel.exception.SystemException {
293                    return getPersistence().fetchByG_B(groupId, banUserId);
294            }
295    
296            public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
297                    long groupId, long banUserId, boolean retrieveFromCache)
298                    throws com.liferay.portal.kernel.exception.SystemException {
299                    return getPersistence().fetchByG_B(groupId, banUserId, retrieveFromCache);
300            }
301    
302            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll()
303                    throws com.liferay.portal.kernel.exception.SystemException {
304                    return getPersistence().findAll();
305            }
306    
307            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
308                    int start, int end)
309                    throws com.liferay.portal.kernel.exception.SystemException {
310                    return getPersistence().findAll(start, end);
311            }
312    
313            public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
314                    int start, int end,
315                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
316                    throws com.liferay.portal.kernel.exception.SystemException {
317                    return getPersistence().findAll(start, end, orderByComparator);
318            }
319    
320            public static void removeByGroupId(long groupId)
321                    throws com.liferay.portal.kernel.exception.SystemException {
322                    getPersistence().removeByGroupId(groupId);
323            }
324    
325            public static void removeByUserId(long userId)
326                    throws com.liferay.portal.kernel.exception.SystemException {
327                    getPersistence().removeByUserId(userId);
328            }
329    
330            public static void removeByBanUserId(long banUserId)
331                    throws com.liferay.portal.kernel.exception.SystemException {
332                    getPersistence().removeByBanUserId(banUserId);
333            }
334    
335            public static void removeByG_B(long groupId, long banUserId)
336                    throws com.liferay.portal.kernel.exception.SystemException,
337                            com.liferay.portlet.messageboards.NoSuchBanException {
338                    getPersistence().removeByG_B(groupId, banUserId);
339            }
340    
341            public static void removeAll()
342                    throws com.liferay.portal.kernel.exception.SystemException {
343                    getPersistence().removeAll();
344            }
345    
346            public static int countByGroupId(long groupId)
347                    throws com.liferay.portal.kernel.exception.SystemException {
348                    return getPersistence().countByGroupId(groupId);
349            }
350    
351            public static int countByUserId(long userId)
352                    throws com.liferay.portal.kernel.exception.SystemException {
353                    return getPersistence().countByUserId(userId);
354            }
355    
356            public static int countByBanUserId(long banUserId)
357                    throws com.liferay.portal.kernel.exception.SystemException {
358                    return getPersistence().countByBanUserId(banUserId);
359            }
360    
361            public static int countByG_B(long groupId, long banUserId)
362                    throws com.liferay.portal.kernel.exception.SystemException {
363                    return getPersistence().countByG_B(groupId, banUserId);
364            }
365    
366            public static int countAll()
367                    throws com.liferay.portal.kernel.exception.SystemException {
368                    return getPersistence().countAll();
369            }
370    
371            public static MBBanPersistence getPersistence() {
372                    if (_persistence == null) {
373                            _persistence = (MBBanPersistence)PortalBeanLocatorUtil.locate(MBBanPersistence.class.getName());
374                    }
375    
376                    return _persistence;
377            }
378    
379            public void setPersistence(MBBanPersistence persistence) {
380                    _persistence = persistence;
381            }
382    
383            private static MBBanPersistence _persistence;
384    }