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.MBStatsUser;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="MBStatsUserUtil.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       MBStatsUserPersistence
35   * @see       MBStatsUserPersistenceImpl
36   * @generated
37   */
38  public class MBStatsUserUtil {
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(MBStatsUser)
48       */
49      public static void clearCache(MBStatsUser mbStatsUser) {
50          getPersistence().clearCache(mbStatsUser);
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<MBStatsUser> findWithDynamicQuery(
65          DynamicQuery dynamicQuery) 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<MBStatsUser> findWithDynamicQuery(
73          DynamicQuery dynamicQuery, int start, int end)
74          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 MBStatsUser remove(MBStatsUser mbStatsUser)
82          throws SystemException {
83          return getPersistence().remove(mbStatsUser);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static MBStatsUser update(MBStatsUser mbStatsUser, boolean merge)
90          throws SystemException {
91          return getPersistence().update(mbStatsUser, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser) {
96          getPersistence().cacheResult(mbStatsUser);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> mbStatsUsers) {
101         getPersistence().cacheResult(mbStatsUsers);
102     }
103 
104     public static com.liferay.portlet.messageboards.model.MBStatsUser create(
105         long statsUserId) {
106         return getPersistence().create(statsUserId);
107     }
108 
109     public static com.liferay.portlet.messageboards.model.MBStatsUser remove(
110         long statsUserId)
111         throws com.liferay.portal.kernel.exception.SystemException,
112             com.liferay.portlet.messageboards.NoSuchStatsUserException {
113         return getPersistence().remove(statsUserId);
114     }
115 
116     public static com.liferay.portlet.messageboards.model.MBStatsUser updateImpl(
117         com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser,
118         boolean merge)
119         throws com.liferay.portal.kernel.exception.SystemException {
120         return getPersistence().updateImpl(mbStatsUser, merge);
121     }
122 
123     public static com.liferay.portlet.messageboards.model.MBStatsUser findByPrimaryKey(
124         long statsUserId)
125         throws com.liferay.portal.kernel.exception.SystemException,
126             com.liferay.portlet.messageboards.NoSuchStatsUserException {
127         return getPersistence().findByPrimaryKey(statsUserId);
128     }
129 
130     public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByPrimaryKey(
131         long statsUserId)
132         throws com.liferay.portal.kernel.exception.SystemException {
133         return getPersistence().fetchByPrimaryKey(statsUserId);
134     }
135 
136     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByGroupId(
137         long groupId)
138         throws com.liferay.portal.kernel.exception.SystemException {
139         return getPersistence().findByGroupId(groupId);
140     }
141 
142     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByGroupId(
143         long groupId, int start, int end)
144         throws com.liferay.portal.kernel.exception.SystemException {
145         return getPersistence().findByGroupId(groupId, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByGroupId(
149         long groupId, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151         throws com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence()
153                    .findByGroupId(groupId, start, end, orderByComparator);
154     }
155 
156     public static com.liferay.portlet.messageboards.model.MBStatsUser findByGroupId_First(
157         long groupId,
158         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159         throws com.liferay.portal.kernel.exception.SystemException,
160             com.liferay.portlet.messageboards.NoSuchStatsUserException {
161         return getPersistence().findByGroupId_First(groupId, orderByComparator);
162     }
163 
164     public static com.liferay.portlet.messageboards.model.MBStatsUser findByGroupId_Last(
165         long groupId,
166         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167         throws com.liferay.portal.kernel.exception.SystemException,
168             com.liferay.portlet.messageboards.NoSuchStatsUserException {
169         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
170     }
171 
172     public static com.liferay.portlet.messageboards.model.MBStatsUser[] findByGroupId_PrevAndNext(
173         long statsUserId, long groupId,
174         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175         throws com.liferay.portal.kernel.exception.SystemException,
176             com.liferay.portlet.messageboards.NoSuchStatsUserException {
177         return getPersistence()
178                    .findByGroupId_PrevAndNext(statsUserId, groupId,
179             orderByComparator);
180     }
181 
182     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByUserId(
183         long userId) throws com.liferay.portal.kernel.exception.SystemException {
184         return getPersistence().findByUserId(userId);
185     }
186 
187     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByUserId(
188         long userId, int start, int end)
189         throws com.liferay.portal.kernel.exception.SystemException {
190         return getPersistence().findByUserId(userId, start, end);
191     }
192 
193     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByUserId(
194         long userId, int start, int end,
195         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
196         throws com.liferay.portal.kernel.exception.SystemException {
197         return getPersistence()
198                    .findByUserId(userId, start, end, orderByComparator);
199     }
200 
201     public static com.liferay.portlet.messageboards.model.MBStatsUser findByUserId_First(
202         long userId,
203         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
204         throws com.liferay.portal.kernel.exception.SystemException,
205             com.liferay.portlet.messageboards.NoSuchStatsUserException {
206         return getPersistence().findByUserId_First(userId, orderByComparator);
207     }
208 
209     public static com.liferay.portlet.messageboards.model.MBStatsUser findByUserId_Last(
210         long userId,
211         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212         throws com.liferay.portal.kernel.exception.SystemException,
213             com.liferay.portlet.messageboards.NoSuchStatsUserException {
214         return getPersistence().findByUserId_Last(userId, orderByComparator);
215     }
216 
217     public static com.liferay.portlet.messageboards.model.MBStatsUser[] findByUserId_PrevAndNext(
218         long statsUserId, long userId,
219         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
220         throws com.liferay.portal.kernel.exception.SystemException,
221             com.liferay.portlet.messageboards.NoSuchStatsUserException {
222         return getPersistence()
223                    .findByUserId_PrevAndNext(statsUserId, userId,
224             orderByComparator);
225     }
226 
227     public static com.liferay.portlet.messageboards.model.MBStatsUser findByG_U(
228         long groupId, long userId)
229         throws com.liferay.portal.kernel.exception.SystemException,
230             com.liferay.portlet.messageboards.NoSuchStatsUserException {
231         return getPersistence().findByG_U(groupId, userId);
232     }
233 
234     public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByG_U(
235         long groupId, long userId)
236         throws com.liferay.portal.kernel.exception.SystemException {
237         return getPersistence().fetchByG_U(groupId, userId);
238     }
239 
240     public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByG_U(
241         long groupId, long userId, boolean retrieveFromCache)
242         throws com.liferay.portal.kernel.exception.SystemException {
243         return getPersistence().fetchByG_U(groupId, userId, retrieveFromCache);
244     }
245 
246     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByG_M(
247         long groupId, int messageCount)
248         throws com.liferay.portal.kernel.exception.SystemException {
249         return getPersistence().findByG_M(groupId, messageCount);
250     }
251 
252     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByG_M(
253         long groupId, int messageCount, int start, int end)
254         throws com.liferay.portal.kernel.exception.SystemException {
255         return getPersistence().findByG_M(groupId, messageCount, start, end);
256     }
257 
258     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByG_M(
259         long groupId, int messageCount, int start, int end,
260         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261         throws com.liferay.portal.kernel.exception.SystemException {
262         return getPersistence()
263                    .findByG_M(groupId, messageCount, start, end,
264             orderByComparator);
265     }
266 
267     public static com.liferay.portlet.messageboards.model.MBStatsUser findByG_M_First(
268         long groupId, int messageCount,
269         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
270         throws com.liferay.portal.kernel.exception.SystemException,
271             com.liferay.portlet.messageboards.NoSuchStatsUserException {
272         return getPersistence()
273                    .findByG_M_First(groupId, messageCount, orderByComparator);
274     }
275 
276     public static com.liferay.portlet.messageboards.model.MBStatsUser findByG_M_Last(
277         long groupId, int messageCount,
278         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
279         throws com.liferay.portal.kernel.exception.SystemException,
280             com.liferay.portlet.messageboards.NoSuchStatsUserException {
281         return getPersistence()
282                    .findByG_M_Last(groupId, messageCount, orderByComparator);
283     }
284 
285     public static com.liferay.portlet.messageboards.model.MBStatsUser[] findByG_M_PrevAndNext(
286         long statsUserId, long groupId, int messageCount,
287         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
288         throws com.liferay.portal.kernel.exception.SystemException,
289             com.liferay.portlet.messageboards.NoSuchStatsUserException {
290         return getPersistence()
291                    .findByG_M_PrevAndNext(statsUserId, groupId, messageCount,
292             orderByComparator);
293     }
294 
295     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findAll()
296         throws com.liferay.portal.kernel.exception.SystemException {
297         return getPersistence().findAll();
298     }
299 
300     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findAll(
301         int start, int end)
302         throws com.liferay.portal.kernel.exception.SystemException {
303         return getPersistence().findAll(start, end);
304     }
305 
306     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findAll(
307         int start, int end,
308         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
309         throws com.liferay.portal.kernel.exception.SystemException {
310         return getPersistence().findAll(start, end, orderByComparator);
311     }
312 
313     public static void removeByGroupId(long groupId)
314         throws com.liferay.portal.kernel.exception.SystemException {
315         getPersistence().removeByGroupId(groupId);
316     }
317 
318     public static void removeByUserId(long userId)
319         throws com.liferay.portal.kernel.exception.SystemException {
320         getPersistence().removeByUserId(userId);
321     }
322 
323     public static void removeByG_U(long groupId, long userId)
324         throws com.liferay.portal.kernel.exception.SystemException,
325             com.liferay.portlet.messageboards.NoSuchStatsUserException {
326         getPersistence().removeByG_U(groupId, userId);
327     }
328 
329     public static void removeByG_M(long groupId, int messageCount)
330         throws com.liferay.portal.kernel.exception.SystemException {
331         getPersistence().removeByG_M(groupId, messageCount);
332     }
333 
334     public static void removeAll()
335         throws com.liferay.portal.kernel.exception.SystemException {
336         getPersistence().removeAll();
337     }
338 
339     public static int countByGroupId(long groupId)
340         throws com.liferay.portal.kernel.exception.SystemException {
341         return getPersistence().countByGroupId(groupId);
342     }
343 
344     public static int countByUserId(long userId)
345         throws com.liferay.portal.kernel.exception.SystemException {
346         return getPersistence().countByUserId(userId);
347     }
348 
349     public static int countByG_U(long groupId, long userId)
350         throws com.liferay.portal.kernel.exception.SystemException {
351         return getPersistence().countByG_U(groupId, userId);
352     }
353 
354     public static int countByG_M(long groupId, int messageCount)
355         throws com.liferay.portal.kernel.exception.SystemException {
356         return getPersistence().countByG_M(groupId, messageCount);
357     }
358 
359     public static int countAll()
360         throws com.liferay.portal.kernel.exception.SystemException {
361         return getPersistence().countAll();
362     }
363 
364     public static MBStatsUserPersistence getPersistence() {
365         if (_persistence == null) {
366             _persistence = (MBStatsUserPersistence)PortalBeanLocatorUtil.locate(MBStatsUserPersistence.class.getName());
367         }
368 
369         return _persistence;
370     }
371 
372     public void setPersistence(MBStatsUserPersistence persistence) {
373         _persistence = persistence;
374     }
375 
376     private static MBStatsUserPersistence _persistence;
377 }