1   /**
2    * Copyright (c) 2000-2008 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 com.liferay.portlet.blogs.model.BlogsStatsUser create(
33          long statsUserId) {
34          return getPersistence().create(statsUserId);
35      }
36  
37      public static com.liferay.portlet.blogs.model.BlogsStatsUser remove(
38          long statsUserId)
39          throws com.liferay.portal.SystemException,
40              com.liferay.portlet.blogs.NoSuchStatsUserException {
41          return getPersistence().remove(statsUserId);
42      }
43  
44      public static com.liferay.portlet.blogs.model.BlogsStatsUser remove(
45          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(blogsStatsUser);
48      }
49  
50      /**
51       * @deprecated Use <code>update(BlogsStatsUser blogsStatsUser, boolean merge)</code>.
52       */
53      public static com.liferay.portlet.blogs.model.BlogsStatsUser update(
54          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(blogsStatsUser);
57      }
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        blogsStatsUser the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when blogsStatsUser is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public static com.liferay.portlet.blogs.model.BlogsStatsUser update(
73          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(blogsStatsUser, merge);
76      }
77  
78      public static com.liferay.portlet.blogs.model.BlogsStatsUser updateImpl(
79          com.liferay.portlet.blogs.model.BlogsStatsUser blogsStatsUser,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(blogsStatsUser, merge);
82      }
83  
84      public static com.liferay.portlet.blogs.model.BlogsStatsUser findByPrimaryKey(
85          long statsUserId)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.blogs.NoSuchStatsUserException {
88          return getPersistence().findByPrimaryKey(statsUserId);
89      }
90  
91      public static com.liferay.portlet.blogs.model.BlogsStatsUser fetchByPrimaryKey(
92          long statsUserId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(statsUserId);
94      }
95  
96      public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByGroupId(
97          long groupId) throws com.liferay.portal.SystemException {
98          return getPersistence().findByGroupId(groupId);
99      }
100 
101     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByGroupId(
102         long groupId, int begin, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByGroupId(groupId, begin, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByGroupId(
108         long groupId, int begin, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByGroupId(groupId, begin, end, obc);
112     }
113 
114     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByGroupId_First(
115         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.SystemException,
117             com.liferay.portlet.blogs.NoSuchStatsUserException {
118         return getPersistence().findByGroupId_First(groupId, obc);
119     }
120 
121     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByGroupId_Last(
122         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.SystemException,
124             com.liferay.portlet.blogs.NoSuchStatsUserException {
125         return getPersistence().findByGroupId_Last(groupId, obc);
126     }
127 
128     public static com.liferay.portlet.blogs.model.BlogsStatsUser[] findByGroupId_PrevAndNext(
129         long statsUserId, long groupId,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.blogs.NoSuchStatsUserException {
133         return getPersistence()
134                    .findByGroupId_PrevAndNext(statsUserId, groupId, obc);
135     }
136 
137     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByUserId(
138         long userId) throws com.liferay.portal.SystemException {
139         return getPersistence().findByUserId(userId);
140     }
141 
142     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByUserId(
143         long userId, int begin, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByUserId(userId, begin, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByUserId(
149         long userId, int begin, int end,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByUserId(userId, begin, end, obc);
153     }
154 
155     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByUserId_First(
156         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.SystemException,
158             com.liferay.portlet.blogs.NoSuchStatsUserException {
159         return getPersistence().findByUserId_First(userId, obc);
160     }
161 
162     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByUserId_Last(
163         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.SystemException,
165             com.liferay.portlet.blogs.NoSuchStatsUserException {
166         return getPersistence().findByUserId_Last(userId, obc);
167     }
168 
169     public static com.liferay.portlet.blogs.model.BlogsStatsUser[] findByUserId_PrevAndNext(
170         long statsUserId, long userId,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.blogs.NoSuchStatsUserException {
174         return getPersistence()
175                    .findByUserId_PrevAndNext(statsUserId, userId, obc);
176     }
177 
178     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByG_U(
179         long groupId, long userId)
180         throws com.liferay.portal.SystemException,
181             com.liferay.portlet.blogs.NoSuchStatsUserException {
182         return getPersistence().findByG_U(groupId, userId);
183     }
184 
185     public static com.liferay.portlet.blogs.model.BlogsStatsUser fetchByG_U(
186         long groupId, long userId) throws com.liferay.portal.SystemException {
187         return getPersistence().fetchByG_U(groupId, userId);
188     }
189 
190     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByG_E(
191         long groupId, int entryCount) throws com.liferay.portal.SystemException {
192         return getPersistence().findByG_E(groupId, entryCount);
193     }
194 
195     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByG_E(
196         long groupId, int entryCount, int begin, int end)
197         throws com.liferay.portal.SystemException {
198         return getPersistence().findByG_E(groupId, entryCount, begin, end);
199     }
200 
201     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByG_E(
202         long groupId, int entryCount, int begin, int end,
203         com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.SystemException {
205         return getPersistence().findByG_E(groupId, entryCount, begin, end, obc);
206     }
207 
208     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByG_E_First(
209         long groupId, int entryCount,
210         com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.SystemException,
212             com.liferay.portlet.blogs.NoSuchStatsUserException {
213         return getPersistence().findByG_E_First(groupId, entryCount, obc);
214     }
215 
216     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByG_E_Last(
217         long groupId, int entryCount,
218         com.liferay.portal.kernel.util.OrderByComparator obc)
219         throws com.liferay.portal.SystemException,
220             com.liferay.portlet.blogs.NoSuchStatsUserException {
221         return getPersistence().findByG_E_Last(groupId, entryCount, obc);
222     }
223 
224     public static com.liferay.portlet.blogs.model.BlogsStatsUser[] findByG_E_PrevAndNext(
225         long statsUserId, long groupId, int entryCount,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.SystemException,
228             com.liferay.portlet.blogs.NoSuchStatsUserException {
229         return getPersistence()
230                    .findByG_E_PrevAndNext(statsUserId, groupId, entryCount, obc);
231     }
232 
233     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByC_E(
234         long companyId, int entryCount)
235         throws com.liferay.portal.SystemException {
236         return getPersistence().findByC_E(companyId, entryCount);
237     }
238 
239     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByC_E(
240         long companyId, int entryCount, int begin, int end)
241         throws com.liferay.portal.SystemException {
242         return getPersistence().findByC_E(companyId, entryCount, begin, end);
243     }
244 
245     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByC_E(
246         long companyId, int entryCount, int begin, int end,
247         com.liferay.portal.kernel.util.OrderByComparator obc)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().findByC_E(companyId, entryCount, begin, end, obc);
250     }
251 
252     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByC_E_First(
253         long companyId, int entryCount,
254         com.liferay.portal.kernel.util.OrderByComparator obc)
255         throws com.liferay.portal.SystemException,
256             com.liferay.portlet.blogs.NoSuchStatsUserException {
257         return getPersistence().findByC_E_First(companyId, entryCount, obc);
258     }
259 
260     public static com.liferay.portlet.blogs.model.BlogsStatsUser findByC_E_Last(
261         long companyId, int entryCount,
262         com.liferay.portal.kernel.util.OrderByComparator obc)
263         throws com.liferay.portal.SystemException,
264             com.liferay.portlet.blogs.NoSuchStatsUserException {
265         return getPersistence().findByC_E_Last(companyId, entryCount, obc);
266     }
267 
268     public static com.liferay.portlet.blogs.model.BlogsStatsUser[] findByC_E_PrevAndNext(
269         long statsUserId, long companyId, int entryCount,
270         com.liferay.portal.kernel.util.OrderByComparator obc)
271         throws com.liferay.portal.SystemException,
272             com.liferay.portlet.blogs.NoSuchStatsUserException {
273         return getPersistence()
274                    .findByC_E_PrevAndNext(statsUserId, companyId, entryCount,
275             obc);
276     }
277 
278     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findWithDynamicQuery(
279         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
280         throws com.liferay.portal.SystemException {
281         return getPersistence().findWithDynamicQuery(queryInitializer);
282     }
283 
284     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findWithDynamicQuery(
285         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
286         int begin, int end) throws com.liferay.portal.SystemException {
287         return getPersistence()
288                    .findWithDynamicQuery(queryInitializer, begin, end);
289     }
290 
291     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll()
292         throws com.liferay.portal.SystemException {
293         return getPersistence().findAll();
294     }
295 
296     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll(
297         int begin, int end) throws com.liferay.portal.SystemException {
298         return getPersistence().findAll(begin, end);
299     }
300 
301     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll(
302         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
303         throws com.liferay.portal.SystemException {
304         return getPersistence().findAll(begin, end, obc);
305     }
306 
307     public static void removeByGroupId(long groupId)
308         throws com.liferay.portal.SystemException {
309         getPersistence().removeByGroupId(groupId);
310     }
311 
312     public static void removeByUserId(long userId)
313         throws com.liferay.portal.SystemException {
314         getPersistence().removeByUserId(userId);
315     }
316 
317     public static void removeByG_U(long groupId, long userId)
318         throws com.liferay.portal.SystemException,
319             com.liferay.portlet.blogs.NoSuchStatsUserException {
320         getPersistence().removeByG_U(groupId, userId);
321     }
322 
323     public static void removeByG_E(long groupId, int entryCount)
324         throws com.liferay.portal.SystemException {
325         getPersistence().removeByG_E(groupId, entryCount);
326     }
327 
328     public static void removeByC_E(long companyId, int entryCount)
329         throws com.liferay.portal.SystemException {
330         getPersistence().removeByC_E(companyId, entryCount);
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 countByG_U(long groupId, long userId)
348         throws com.liferay.portal.SystemException {
349         return getPersistence().countByG_U(groupId, userId);
350     }
351 
352     public static int countByG_E(long groupId, int entryCount)
353         throws com.liferay.portal.SystemException {
354         return getPersistence().countByG_E(groupId, entryCount);
355     }
356 
357     public static int countByC_E(long companyId, int entryCount)
358         throws com.liferay.portal.SystemException {
359         return getPersistence().countByC_E(companyId, entryCount);
360     }
361 
362     public static int countAll() throws com.liferay.portal.SystemException {
363         return getPersistence().countAll();
364     }
365 
366     public static BlogsStatsUserPersistence getPersistence() {
367         return _getUtil()._persistence;
368     }
369 
370     public void setPersistence(BlogsStatsUserPersistence persistence) {
371         _persistence = persistence;
372     }
373 
374     private static BlogsStatsUserUtil _getUtil() {
375         if (_util == null) {
376             _util = (BlogsStatsUserUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
377         }
378 
379         return _util;
380     }
381 
382     private static final String _UTIL = BlogsStatsUserUtil.class.getName();
383     private static BlogsStatsUserUtil _util;
384     private BlogsStatsUserPersistence _persistence;
385 }