1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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.blogs.service.persistence;
24  
25  /**
26   * <a href="BlogsStatsUserUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class BlogsStatsUserUtil {
32      public static void cacheResult(
33          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser) {
34          getPersistence().cacheResult(blogsStatsUser);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> blogsStatsUsers) {
39          getPersistence().cacheResult(blogsStatsUsers);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portlet.blogs.model.BlogsStatsUser create(
47          long statsUserId) {
48          return getPersistence().create(statsUserId);
49      }
50  
51      public static com.liferay.portlet.blogs.model.BlogsStatsUser remove(
52          long statsUserId)
53          throws com.liferay.portal.SystemException,
54              com.liferay.portlet.blogs.NoSuchStatsUserException {
55          return getPersistence().remove(statsUserId);
56      }
57  
58      public static com.liferay.portlet.blogs.model.BlogsStatsUser remove(
59          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser)
60          throws com.liferay.portal.SystemException {
61          return getPersistence().remove(blogsStatsUser);
62      }
63  
64      /**
65       * @deprecated Use <code>update(BlogsStatsUser blogsStatsUser, boolean merge)</code>.
66       */
67      public static com.liferay.portlet.blogs.model.BlogsStatsUser update(
68          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(blogsStatsUser);
71      }
72  
73      /**
74       * Add, update, or merge, the entity. This method also calls the model
75       * listeners to trigger the proper events associated with adding, deleting,
76       * or updating an entity.
77       *
78       * @param        blogsStatsUser the entity to add, update, or merge
79       * @param        merge boolean value for whether to merge the entity. The
80       *                default value is false. Setting merge to true is more
81       *                expensive and should only be true when blogsStatsUser is
82       *                transient. See LEP-5473 for a detailed discussion of this
83       *                method.
84       * @return        true if the portlet can be displayed via Ajax
85       */
86      public static com.liferay.portlet.blogs.model.BlogsStatsUser update(
87          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser,
88          boolean merge) throws com.liferay.portal.SystemException {
89          return getPersistence().update(blogsStatsUser, merge);
90      }
91  
92      public static com.liferay.portlet.blogs.model.BlogsStatsUser updateImpl(
93          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser,
94          boolean merge) throws com.liferay.portal.SystemException {
95          return getPersistence().updateImpl(blogsStatsUser, merge);
96      }
97  
98      public static com.liferay.portlet.blogs.model.BlogsStatsUser findByPrimaryKey(
99          long statsUserId)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.blogs.NoSuchStatsUserException {
102         return getPersistence().findByPrimaryKey(statsUserId);
103     }
104 
105     public static com.liferay.portlet.blogs.model.BlogsStatsUser fetchByPrimaryKey(
106         long statsUserId) throws com.liferay.portal.SystemException {
107         return getPersistence().fetchByPrimaryKey(statsUserId);
108     }
109 
110     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByGroupId(
111         long groupId) throws com.liferay.portal.SystemException {
112         return getPersistence().findByGroupId(groupId);
113     }
114 
115     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByGroupId(
116         long groupId, int start, int end)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().findByGroupId(groupId, start, end);
119     }
120 
121     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByGroupId(
122         long groupId, int start, int end,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByGroupId(groupId, start, end, obc);
126     }
127 
128     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByGroupId_First(
129         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException,
131             com.liferay.portlet.blogs.NoSuchStatsUserException {
132         return getPersistence().findByGroupId_First(groupId, obc);
133     }
134 
135     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByGroupId_Last(
136         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException,
138             com.liferay.portlet.blogs.NoSuchStatsUserException {
139         return getPersistence().findByGroupId_Last(groupId, obc);
140     }
141 
142     public static com.liferay.portlet.blogs.model.BlogsStatsUser[] findByGroupId_PrevAndNext(
143         long statsUserId, long groupId,
144         com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException,
146             com.liferay.portlet.blogs.NoSuchStatsUserException {
147         return getPersistence()
148                    .findByGroupId_PrevAndNext(statsUserId, groupId, obc);
149     }
150 
151     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByUserId(
152         long userId) throws com.liferay.portal.SystemException {
153         return getPersistence().findByUserId(userId);
154     }
155 
156     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByUserId(
157         long userId, int start, int end)
158         throws com.liferay.portal.SystemException {
159         return getPersistence().findByUserId(userId, start, end);
160     }
161 
162     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByUserId(
163         long userId, int start, int end,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException {
166         return getPersistence().findByUserId(userId, start, end, obc);
167     }
168 
169     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByUserId_First(
170         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException,
172             com.liferay.portlet.blogs.NoSuchStatsUserException {
173         return getPersistence().findByUserId_First(userId, obc);
174     }
175 
176     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByUserId_Last(
177         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException,
179             com.liferay.portlet.blogs.NoSuchStatsUserException {
180         return getPersistence().findByUserId_Last(userId, obc);
181     }
182 
183     public static com.liferay.portlet.blogs.model.BlogsStatsUser[] findByUserId_PrevAndNext(
184         long statsUserId, long userId,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.blogs.NoSuchStatsUserException {
188         return getPersistence()
189                    .findByUserId_PrevAndNext(statsUserId, userId, obc);
190     }
191 
192     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByG_U(
193         long groupId, long userId)
194         throws com.liferay.portal.SystemException,
195             com.liferay.portlet.blogs.NoSuchStatsUserException {
196         return getPersistence().findByG_U(groupId, userId);
197     }
198 
199     public static com.liferay.portlet.blogs.model.BlogsStatsUser fetchByG_U(
200         long groupId, long userId) throws com.liferay.portal.SystemException {
201         return getPersistence().fetchByG_U(groupId, userId);
202     }
203 
204     public static com.liferay.portlet.blogs.model.BlogsStatsUser fetchByG_U(
205         long groupId, long userId, boolean retrieveFromCache)
206         throws com.liferay.portal.SystemException {
207         return getPersistence().fetchByG_U(groupId, userId, retrieveFromCache);
208     }
209 
210     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByG_E(
211         long groupId, int entryCount) throws com.liferay.portal.SystemException {
212         return getPersistence().findByG_E(groupId, entryCount);
213     }
214 
215     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByG_E(
216         long groupId, int entryCount, int start, int end)
217         throws com.liferay.portal.SystemException {
218         return getPersistence().findByG_E(groupId, entryCount, start, end);
219     }
220 
221     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByG_E(
222         long groupId, int entryCount, int start, int end,
223         com.liferay.portal.kernel.util.OrderByComparator obc)
224         throws com.liferay.portal.SystemException {
225         return getPersistence().findByG_E(groupId, entryCount, start, end, obc);
226     }
227 
228     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByG_E_First(
229         long groupId, int entryCount,
230         com.liferay.portal.kernel.util.OrderByComparator obc)
231         throws com.liferay.portal.SystemException,
232             com.liferay.portlet.blogs.NoSuchStatsUserException {
233         return getPersistence().findByG_E_First(groupId, entryCount, obc);
234     }
235 
236     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByG_E_Last(
237         long groupId, int entryCount,
238         com.liferay.portal.kernel.util.OrderByComparator obc)
239         throws com.liferay.portal.SystemException,
240             com.liferay.portlet.blogs.NoSuchStatsUserException {
241         return getPersistence().findByG_E_Last(groupId, entryCount, obc);
242     }
243 
244     public static com.liferay.portlet.blogs.model.BlogsStatsUser[] findByG_E_PrevAndNext(
245         long statsUserId, long groupId, int entryCount,
246         com.liferay.portal.kernel.util.OrderByComparator obc)
247         throws com.liferay.portal.SystemException,
248             com.liferay.portlet.blogs.NoSuchStatsUserException {
249         return getPersistence()
250                    .findByG_E_PrevAndNext(statsUserId, groupId, entryCount, obc);
251     }
252 
253     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByC_E(
254         long companyId, int entryCount)
255         throws com.liferay.portal.SystemException {
256         return getPersistence().findByC_E(companyId, entryCount);
257     }
258 
259     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByC_E(
260         long companyId, int entryCount, int start, int end)
261         throws com.liferay.portal.SystemException {
262         return getPersistence().findByC_E(companyId, entryCount, start, end);
263     }
264 
265     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByC_E(
266         long companyId, int entryCount, int start, int end,
267         com.liferay.portal.kernel.util.OrderByComparator obc)
268         throws com.liferay.portal.SystemException {
269         return getPersistence().findByC_E(companyId, entryCount, start, end, obc);
270     }
271 
272     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByC_E_First(
273         long companyId, int entryCount,
274         com.liferay.portal.kernel.util.OrderByComparator obc)
275         throws com.liferay.portal.SystemException,
276             com.liferay.portlet.blogs.NoSuchStatsUserException {
277         return getPersistence().findByC_E_First(companyId, entryCount, obc);
278     }
279 
280     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByC_E_Last(
281         long companyId, int entryCount,
282         com.liferay.portal.kernel.util.OrderByComparator obc)
283         throws com.liferay.portal.SystemException,
284             com.liferay.portlet.blogs.NoSuchStatsUserException {
285         return getPersistence().findByC_E_Last(companyId, entryCount, obc);
286     }
287 
288     public static com.liferay.portlet.blogs.model.BlogsStatsUser[] findByC_E_PrevAndNext(
289         long statsUserId, long companyId, int entryCount,
290         com.liferay.portal.kernel.util.OrderByComparator obc)
291         throws com.liferay.portal.SystemException,
292             com.liferay.portlet.blogs.NoSuchStatsUserException {
293         return getPersistence()
294                    .findByC_E_PrevAndNext(statsUserId, companyId, entryCount,
295             obc);
296     }
297 
298     public static java.util.List<Object> findWithDynamicQuery(
299         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
300         throws com.liferay.portal.SystemException {
301         return getPersistence().findWithDynamicQuery(dynamicQuery);
302     }
303 
304     public static java.util.List<Object> findWithDynamicQuery(
305         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
306         int end) throws com.liferay.portal.SystemException {
307         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
308     }
309 
310     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll()
311         throws com.liferay.portal.SystemException {
312         return getPersistence().findAll();
313     }
314 
315     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll(
316         int start, int end) throws com.liferay.portal.SystemException {
317         return getPersistence().findAll(start, end);
318     }
319 
320     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll(
321         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
322         throws com.liferay.portal.SystemException {
323         return getPersistence().findAll(start, end, obc);
324     }
325 
326     public static void removeByGroupId(long groupId)
327         throws com.liferay.portal.SystemException {
328         getPersistence().removeByGroupId(groupId);
329     }
330 
331     public static void removeByUserId(long userId)
332         throws com.liferay.portal.SystemException {
333         getPersistence().removeByUserId(userId);
334     }
335 
336     public static void removeByG_U(long groupId, long userId)
337         throws com.liferay.portal.SystemException,
338             com.liferay.portlet.blogs.NoSuchStatsUserException {
339         getPersistence().removeByG_U(groupId, userId);
340     }
341 
342     public static void removeByG_E(long groupId, int entryCount)
343         throws com.liferay.portal.SystemException {
344         getPersistence().removeByG_E(groupId, entryCount);
345     }
346 
347     public static void removeByC_E(long companyId, int entryCount)
348         throws com.liferay.portal.SystemException {
349         getPersistence().removeByC_E(companyId, entryCount);
350     }
351 
352     public static void removeAll() throws com.liferay.portal.SystemException {
353         getPersistence().removeAll();
354     }
355 
356     public static int countByGroupId(long groupId)
357         throws com.liferay.portal.SystemException {
358         return getPersistence().countByGroupId(groupId);
359     }
360 
361     public static int countByUserId(long userId)
362         throws com.liferay.portal.SystemException {
363         return getPersistence().countByUserId(userId);
364     }
365 
366     public static int countByG_U(long groupId, long userId)
367         throws com.liferay.portal.SystemException {
368         return getPersistence().countByG_U(groupId, userId);
369     }
370 
371     public static int countByG_E(long groupId, int entryCount)
372         throws com.liferay.portal.SystemException {
373         return getPersistence().countByG_E(groupId, entryCount);
374     }
375 
376     public static int countByC_E(long companyId, int entryCount)
377         throws com.liferay.portal.SystemException {
378         return getPersistence().countByC_E(companyId, entryCount);
379     }
380 
381     public static int countAll() throws com.liferay.portal.SystemException {
382         return getPersistence().countAll();
383     }
384 
385     public static BlogsStatsUserPersistence getPersistence() {
386         return _persistence;
387     }
388 
389     public void setPersistence(BlogsStatsUserPersistence persistence) {
390         _persistence = persistence;
391     }
392 
393     private static BlogsStatsUserPersistence _persistence;
394 }