1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.messageboards.service.persistence;
24  
25  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  
29  import com.liferay.portlet.messageboards.model.MBStatsUser;
30  
31  import java.util.List;
32  
33  /**
34   * <a href="MBStatsUserUtil.java.html"><b><i>View Source</i></b></a>
35   *
36   * <p>
37   * ServiceBuilder generated this class. Modifications in this class will be
38   * overwritten the next time is generated.
39   * </p>
40   *
41   * @author    Brian Wing Shun Chan
42   * @see       MBStatsUserPersistence
43   * @see       MBStatsUserPersistenceImpl
44   * @generated
45   */
46  public class MBStatsUserUtil {
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
49       */
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
66          int start, int end) throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
72       */
73      public static MBStatsUser remove(MBStatsUser mbStatsUser)
74          throws SystemException {
75          return getPersistence().remove(mbStatsUser);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
80       */
81      public static MBStatsUser update(MBStatsUser mbStatsUser, boolean merge)
82          throws SystemException {
83          return getPersistence().update(mbStatsUser, merge);
84      }
85  
86      public static void cacheResult(
87          com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser) {
88          getPersistence().cacheResult(mbStatsUser);
89      }
90  
91      public static void cacheResult(
92          java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> mbStatsUsers) {
93          getPersistence().cacheResult(mbStatsUsers);
94      }
95  
96      public static com.liferay.portlet.messageboards.model.MBStatsUser create(
97          long statsUserId) {
98          return getPersistence().create(statsUserId);
99      }
100 
101     public static com.liferay.portlet.messageboards.model.MBStatsUser remove(
102         long statsUserId)
103         throws com.liferay.portal.SystemException,
104             com.liferay.portlet.messageboards.NoSuchStatsUserException {
105         return getPersistence().remove(statsUserId);
106     }
107 
108     /**
109      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
110      */
111     public static com.liferay.portlet.messageboards.model.MBStatsUser update(
112         com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser)
113         throws com.liferay.portal.SystemException {
114         return getPersistence().update(mbStatsUser);
115     }
116 
117     public static com.liferay.portlet.messageboards.model.MBStatsUser updateImpl(
118         com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser,
119         boolean merge) throws com.liferay.portal.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.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) throws com.liferay.portal.SystemException {
132         return getPersistence().fetchByPrimaryKey(statsUserId);
133     }
134 
135     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByGroupId(
136         long groupId) throws com.liferay.portal.SystemException {
137         return getPersistence().findByGroupId(groupId);
138     }
139 
140     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByGroupId(
141         long groupId, int start, int end)
142         throws com.liferay.portal.SystemException {
143         return getPersistence().findByGroupId(groupId, start, end);
144     }
145 
146     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByGroupId(
147         long groupId, int start, int end,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException {
150         return getPersistence().findByGroupId(groupId, start, end, obc);
151     }
152 
153     public static com.liferay.portlet.messageboards.model.MBStatsUser findByGroupId_First(
154         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.messageboards.NoSuchStatsUserException {
157         return getPersistence().findByGroupId_First(groupId, obc);
158     }
159 
160     public static com.liferay.portlet.messageboards.model.MBStatsUser findByGroupId_Last(
161         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.SystemException,
163             com.liferay.portlet.messageboards.NoSuchStatsUserException {
164         return getPersistence().findByGroupId_Last(groupId, obc);
165     }
166 
167     public static com.liferay.portlet.messageboards.model.MBStatsUser[] findByGroupId_PrevAndNext(
168         long statsUserId, long groupId,
169         com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException,
171             com.liferay.portlet.messageboards.NoSuchStatsUserException {
172         return getPersistence()
173                    .findByGroupId_PrevAndNext(statsUserId, groupId, obc);
174     }
175 
176     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByUserId(
177         long userId) throws com.liferay.portal.SystemException {
178         return getPersistence().findByUserId(userId);
179     }
180 
181     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByUserId(
182         long userId, int start, int end)
183         throws com.liferay.portal.SystemException {
184         return getPersistence().findByUserId(userId, start, end);
185     }
186 
187     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByUserId(
188         long userId, int start, int end,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException {
191         return getPersistence().findByUserId(userId, start, end, obc);
192     }
193 
194     public static com.liferay.portlet.messageboards.model.MBStatsUser findByUserId_First(
195         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.SystemException,
197             com.liferay.portlet.messageboards.NoSuchStatsUserException {
198         return getPersistence().findByUserId_First(userId, obc);
199     }
200 
201     public static com.liferay.portlet.messageboards.model.MBStatsUser findByUserId_Last(
202         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException,
204             com.liferay.portlet.messageboards.NoSuchStatsUserException {
205         return getPersistence().findByUserId_Last(userId, obc);
206     }
207 
208     public static com.liferay.portlet.messageboards.model.MBStatsUser[] findByUserId_PrevAndNext(
209         long statsUserId, long userId,
210         com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.SystemException,
212             com.liferay.portlet.messageboards.NoSuchStatsUserException {
213         return getPersistence()
214                    .findByUserId_PrevAndNext(statsUserId, userId, obc);
215     }
216 
217     public static com.liferay.portlet.messageboards.model.MBStatsUser findByG_U(
218         long groupId, long userId)
219         throws com.liferay.portal.SystemException,
220             com.liferay.portlet.messageboards.NoSuchStatsUserException {
221         return getPersistence().findByG_U(groupId, userId);
222     }
223 
224     public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByG_U(
225         long groupId, long userId) throws com.liferay.portal.SystemException {
226         return getPersistence().fetchByG_U(groupId, userId);
227     }
228 
229     public static com.liferay.portlet.messageboards.model.MBStatsUser fetchByG_U(
230         long groupId, long userId, boolean retrieveFromCache)
231         throws com.liferay.portal.SystemException {
232         return getPersistence().fetchByG_U(groupId, userId, retrieveFromCache);
233     }
234 
235     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByG_M(
236         long groupId, int messageCount)
237         throws com.liferay.portal.SystemException {
238         return getPersistence().findByG_M(groupId, messageCount);
239     }
240 
241     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByG_M(
242         long groupId, int messageCount, int start, int end)
243         throws com.liferay.portal.SystemException {
244         return getPersistence().findByG_M(groupId, messageCount, start, end);
245     }
246 
247     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findByG_M(
248         long groupId, int messageCount, int start, int end,
249         com.liferay.portal.kernel.util.OrderByComparator obc)
250         throws com.liferay.portal.SystemException {
251         return getPersistence().findByG_M(groupId, messageCount, start, end, obc);
252     }
253 
254     public static com.liferay.portlet.messageboards.model.MBStatsUser findByG_M_First(
255         long groupId, int messageCount,
256         com.liferay.portal.kernel.util.OrderByComparator obc)
257         throws com.liferay.portal.SystemException,
258             com.liferay.portlet.messageboards.NoSuchStatsUserException {
259         return getPersistence().findByG_M_First(groupId, messageCount, obc);
260     }
261 
262     public static com.liferay.portlet.messageboards.model.MBStatsUser findByG_M_Last(
263         long groupId, int messageCount,
264         com.liferay.portal.kernel.util.OrderByComparator obc)
265         throws com.liferay.portal.SystemException,
266             com.liferay.portlet.messageboards.NoSuchStatsUserException {
267         return getPersistence().findByG_M_Last(groupId, messageCount, obc);
268     }
269 
270     public static com.liferay.portlet.messageboards.model.MBStatsUser[] findByG_M_PrevAndNext(
271         long statsUserId, long groupId, int messageCount,
272         com.liferay.portal.kernel.util.OrderByComparator obc)
273         throws com.liferay.portal.SystemException,
274             com.liferay.portlet.messageboards.NoSuchStatsUserException {
275         return getPersistence()
276                    .findByG_M_PrevAndNext(statsUserId, groupId, messageCount,
277             obc);
278     }
279 
280     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findAll()
281         throws com.liferay.portal.SystemException {
282         return getPersistence().findAll();
283     }
284 
285     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findAll(
286         int start, int end) throws com.liferay.portal.SystemException {
287         return getPersistence().findAll(start, end);
288     }
289 
290     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> findAll(
291         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
292         throws com.liferay.portal.SystemException {
293         return getPersistence().findAll(start, end, obc);
294     }
295 
296     public static void removeByGroupId(long groupId)
297         throws com.liferay.portal.SystemException {
298         getPersistence().removeByGroupId(groupId);
299     }
300 
301     public static void removeByUserId(long userId)
302         throws com.liferay.portal.SystemException {
303         getPersistence().removeByUserId(userId);
304     }
305 
306     public static void removeByG_U(long groupId, long userId)
307         throws com.liferay.portal.SystemException,
308             com.liferay.portlet.messageboards.NoSuchStatsUserException {
309         getPersistence().removeByG_U(groupId, userId);
310     }
311 
312     public static void removeByG_M(long groupId, int messageCount)
313         throws com.liferay.portal.SystemException {
314         getPersistence().removeByG_M(groupId, messageCount);
315     }
316 
317     public static void removeAll() throws com.liferay.portal.SystemException {
318         getPersistence().removeAll();
319     }
320 
321     public static int countByGroupId(long groupId)
322         throws com.liferay.portal.SystemException {
323         return getPersistence().countByGroupId(groupId);
324     }
325 
326     public static int countByUserId(long userId)
327         throws com.liferay.portal.SystemException {
328         return getPersistence().countByUserId(userId);
329     }
330 
331     public static int countByG_U(long groupId, long userId)
332         throws com.liferay.portal.SystemException {
333         return getPersistence().countByG_U(groupId, userId);
334     }
335 
336     public static int countByG_M(long groupId, int messageCount)
337         throws com.liferay.portal.SystemException {
338         return getPersistence().countByG_M(groupId, messageCount);
339     }
340 
341     public static int countAll() throws com.liferay.portal.SystemException {
342         return getPersistence().countAll();
343     }
344 
345     public static MBStatsUserPersistence getPersistence() {
346         if (_persistence == null) {
347             _persistence = (MBStatsUserPersistence)PortalBeanLocatorUtil.locate(MBStatsUserPersistence.class.getName());
348         }
349 
350         return _persistence;
351     }
352 
353     public void setPersistence(MBStatsUserPersistence persistence) {
354         _persistence = persistence;
355     }
356 
357     private static MBStatsUserPersistence _persistence;
358 }