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