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