1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.messageboards.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  
21  import com.liferay.portlet.messageboards.model.MBBan;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="MBBanUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       MBBanPersistence
35   * @see       MBBanPersistenceImpl
36   * @generated
37   */
38  public class MBBanUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(MBBan)
48       */
49      public static void clearCache(MBBan mbBan) {
50          getPersistence().clearCache(mbBan);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery)
65          throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery,
73          int start, int end) throws SystemException {
74          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
79       */
80      public static MBBan remove(MBBan mbBan) throws SystemException {
81          return getPersistence().remove(mbBan);
82      }
83  
84      /**
85       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
86       */
87      public static MBBan update(MBBan mbBan, boolean merge)
88          throws SystemException {
89          return getPersistence().update(mbBan, merge);
90      }
91  
92      public static void cacheResult(
93          com.liferay.portlet.messageboards.model.MBBan mbBan) {
94          getPersistence().cacheResult(mbBan);
95      }
96  
97      public static void cacheResult(
98          java.util.List<com.liferay.portlet.messageboards.model.MBBan> mbBans) {
99          getPersistence().cacheResult(mbBans);
100     }
101 
102     public static com.liferay.portlet.messageboards.model.MBBan create(
103         long banId) {
104         return getPersistence().create(banId);
105     }
106 
107     public static com.liferay.portlet.messageboards.model.MBBan remove(
108         long banId)
109         throws com.liferay.portal.kernel.exception.SystemException,
110             com.liferay.portlet.messageboards.NoSuchBanException {
111         return getPersistence().remove(banId);
112     }
113 
114     public static com.liferay.portlet.messageboards.model.MBBan updateImpl(
115         com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getPersistence().updateImpl(mbBan, merge);
118     }
119 
120     public static com.liferay.portlet.messageboards.model.MBBan findByPrimaryKey(
121         long banId)
122         throws com.liferay.portal.kernel.exception.SystemException,
123             com.liferay.portlet.messageboards.NoSuchBanException {
124         return getPersistence().findByPrimaryKey(banId);
125     }
126 
127     public static com.liferay.portlet.messageboards.model.MBBan fetchByPrimaryKey(
128         long banId) throws com.liferay.portal.kernel.exception.SystemException {
129         return getPersistence().fetchByPrimaryKey(banId);
130     }
131 
132     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
133         long groupId)
134         throws com.liferay.portal.kernel.exception.SystemException {
135         return getPersistence().findByGroupId(groupId);
136     }
137 
138     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
139         long groupId, int start, int end)
140         throws com.liferay.portal.kernel.exception.SystemException {
141         return getPersistence().findByGroupId(groupId, start, end);
142     }
143 
144     public static 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         return getPersistence()
149                    .findByGroupId(groupId, start, end, orderByComparator);
150     }
151 
152     public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_First(
153         long groupId,
154         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
155         throws com.liferay.portal.kernel.exception.SystemException,
156             com.liferay.portlet.messageboards.NoSuchBanException {
157         return getPersistence().findByGroupId_First(groupId, orderByComparator);
158     }
159 
160     public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last(
161         long groupId,
162         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
163         throws com.liferay.portal.kernel.exception.SystemException,
164             com.liferay.portlet.messageboards.NoSuchBanException {
165         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
166     }
167 
168     public static com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext(
169         long banId, long groupId,
170         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
171         throws com.liferay.portal.kernel.exception.SystemException,
172             com.liferay.portlet.messageboards.NoSuchBanException {
173         return getPersistence()
174                    .findByGroupId_PrevAndNext(banId, groupId, orderByComparator);
175     }
176 
177     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
178         long userId) throws com.liferay.portal.kernel.exception.SystemException {
179         return getPersistence().findByUserId(userId);
180     }
181 
182     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
183         long userId, int start, int end)
184         throws com.liferay.portal.kernel.exception.SystemException {
185         return getPersistence().findByUserId(userId, start, end);
186     }
187 
188     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
189         long userId, int start, int end,
190         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
191         throws com.liferay.portal.kernel.exception.SystemException {
192         return getPersistence()
193                    .findByUserId(userId, start, end, orderByComparator);
194     }
195 
196     public static com.liferay.portlet.messageboards.model.MBBan findByUserId_First(
197         long userId,
198         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
199         throws com.liferay.portal.kernel.exception.SystemException,
200             com.liferay.portlet.messageboards.NoSuchBanException {
201         return getPersistence().findByUserId_First(userId, orderByComparator);
202     }
203 
204     public static com.liferay.portlet.messageboards.model.MBBan findByUserId_Last(
205         long userId,
206         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
207         throws com.liferay.portal.kernel.exception.SystemException,
208             com.liferay.portlet.messageboards.NoSuchBanException {
209         return getPersistence().findByUserId_Last(userId, orderByComparator);
210     }
211 
212     public static com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext(
213         long banId, long userId,
214         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
215         throws com.liferay.portal.kernel.exception.SystemException,
216             com.liferay.portlet.messageboards.NoSuchBanException {
217         return getPersistence()
218                    .findByUserId_PrevAndNext(banId, userId, orderByComparator);
219     }
220 
221     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
222         long banUserId)
223         throws com.liferay.portal.kernel.exception.SystemException {
224         return getPersistence().findByBanUserId(banUserId);
225     }
226 
227     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
228         long banUserId, int start, int end)
229         throws com.liferay.portal.kernel.exception.SystemException {
230         return getPersistence().findByBanUserId(banUserId, start, end);
231     }
232 
233     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
234         long banUserId, int start, int end,
235         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
236         throws com.liferay.portal.kernel.exception.SystemException {
237         return getPersistence()
238                    .findByBanUserId(banUserId, start, end, orderByComparator);
239     }
240 
241     public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First(
242         long banUserId,
243         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244         throws com.liferay.portal.kernel.exception.SystemException,
245             com.liferay.portlet.messageboards.NoSuchBanException {
246         return getPersistence()
247                    .findByBanUserId_First(banUserId, orderByComparator);
248     }
249 
250     public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last(
251         long banUserId,
252         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
253         throws com.liferay.portal.kernel.exception.SystemException,
254             com.liferay.portlet.messageboards.NoSuchBanException {
255         return getPersistence()
256                    .findByBanUserId_Last(banUserId, orderByComparator);
257     }
258 
259     public static com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext(
260         long banId, long banUserId,
261         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
262         throws com.liferay.portal.kernel.exception.SystemException,
263             com.liferay.portlet.messageboards.NoSuchBanException {
264         return getPersistence()
265                    .findByBanUserId_PrevAndNext(banId, banUserId,
266             orderByComparator);
267     }
268 
269     public static com.liferay.portlet.messageboards.model.MBBan findByG_B(
270         long groupId, long banUserId)
271         throws com.liferay.portal.kernel.exception.SystemException,
272             com.liferay.portlet.messageboards.NoSuchBanException {
273         return getPersistence().findByG_B(groupId, banUserId);
274     }
275 
276     public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
277         long groupId, long banUserId)
278         throws com.liferay.portal.kernel.exception.SystemException {
279         return getPersistence().fetchByG_B(groupId, banUserId);
280     }
281 
282     public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
283         long groupId, long banUserId, boolean retrieveFromCache)
284         throws com.liferay.portal.kernel.exception.SystemException {
285         return getPersistence().fetchByG_B(groupId, banUserId, retrieveFromCache);
286     }
287 
288     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll()
289         throws com.liferay.portal.kernel.exception.SystemException {
290         return getPersistence().findAll();
291     }
292 
293     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
294         int start, int end)
295         throws com.liferay.portal.kernel.exception.SystemException {
296         return getPersistence().findAll(start, end);
297     }
298 
299     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
300         int start, int end,
301         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
302         throws com.liferay.portal.kernel.exception.SystemException {
303         return getPersistence().findAll(start, end, orderByComparator);
304     }
305 
306     public static void removeByGroupId(long groupId)
307         throws com.liferay.portal.kernel.exception.SystemException {
308         getPersistence().removeByGroupId(groupId);
309     }
310 
311     public static void removeByUserId(long userId)
312         throws com.liferay.portal.kernel.exception.SystemException {
313         getPersistence().removeByUserId(userId);
314     }
315 
316     public static void removeByBanUserId(long banUserId)
317         throws com.liferay.portal.kernel.exception.SystemException {
318         getPersistence().removeByBanUserId(banUserId);
319     }
320 
321     public static void removeByG_B(long groupId, long banUserId)
322         throws com.liferay.portal.kernel.exception.SystemException,
323             com.liferay.portlet.messageboards.NoSuchBanException {
324         getPersistence().removeByG_B(groupId, banUserId);
325     }
326 
327     public static void removeAll()
328         throws com.liferay.portal.kernel.exception.SystemException {
329         getPersistence().removeAll();
330     }
331 
332     public static int countByGroupId(long groupId)
333         throws com.liferay.portal.kernel.exception.SystemException {
334         return getPersistence().countByGroupId(groupId);
335     }
336 
337     public static int countByUserId(long userId)
338         throws com.liferay.portal.kernel.exception.SystemException {
339         return getPersistence().countByUserId(userId);
340     }
341 
342     public static int countByBanUserId(long banUserId)
343         throws com.liferay.portal.kernel.exception.SystemException {
344         return getPersistence().countByBanUserId(banUserId);
345     }
346 
347     public static int countByG_B(long groupId, long banUserId)
348         throws com.liferay.portal.kernel.exception.SystemException {
349         return getPersistence().countByG_B(groupId, banUserId);
350     }
351 
352     public static int countAll()
353         throws com.liferay.portal.kernel.exception.SystemException {
354         return getPersistence().countAll();
355     }
356 
357     public static MBBanPersistence getPersistence() {
358         if (_persistence == null) {
359             _persistence = (MBBanPersistence)PortalBeanLocatorUtil.locate(MBBanPersistence.class.getName());
360         }
361 
362         return _persistence;
363     }
364 
365     public void setPersistence(MBBanPersistence persistence) {
366         _persistence = persistence;
367     }
368 
369     private static MBBanPersistence _persistence;
370 }