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 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 start, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByGroupId(groupId, start, end);
105     }
106 
107     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByGroupId(
108         long groupId, int start, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByGroupId(groupId, start, 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 start, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByUserId(userId, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByUserId(
149         long userId, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByUserId(userId, start, 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 start, int end)
197         throws com.liferay.portal.SystemException {
198         return getPersistence().findByG_E(groupId, entryCount, start, end);
199     }
200 
201     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByG_E(
202         long groupId, int entryCount, int start, int end,
203         com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.SystemException {
205         return getPersistence().findByG_E(groupId, entryCount, start, 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 start, int end)
241         throws com.liferay.portal.SystemException {
242         return getPersistence().findByC_E(companyId, entryCount, start, end);
243     }
244 
245     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findByC_E(
246         long companyId, int entryCount, int start, int end,
247         com.liferay.portal.kernel.util.OrderByComparator obc)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().findByC_E(companyId, entryCount, start, 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<Object> findWithDynamicQuery(
279         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
280         throws com.liferay.portal.SystemException {
281         return getPersistence().findWithDynamicQuery(dynamicQuery);
282     }
283 
284     public static java.util.List<Object> findWithDynamicQuery(
285         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
286         int end) throws com.liferay.portal.SystemException {
287         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
288     }
289 
290     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll()
291         throws com.liferay.portal.SystemException {
292         return getPersistence().findAll();
293     }
294 
295     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll(
296         int start, int end) throws com.liferay.portal.SystemException {
297         return getPersistence().findAll(start, end);
298     }
299 
300     public static java.util.List<com.liferay.portlet.blogs.model.BlogsStatsUser> findAll(
301         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
302         throws com.liferay.portal.SystemException {
303         return getPersistence().findAll(start, end, obc);
304     }
305 
306     public static void removeByGroupId(long groupId)
307         throws com.liferay.portal.SystemException {
308         getPersistence().removeByGroupId(groupId);
309     }
310 
311     public static void removeByUserId(long userId)
312         throws com.liferay.portal.SystemException {
313         getPersistence().removeByUserId(userId);
314     }
315 
316     public static void removeByG_U(long groupId, long userId)
317         throws com.liferay.portal.SystemException,
318             com.liferay.portlet.blogs.NoSuchStatsUserException {
319         getPersistence().removeByG_U(groupId, userId);
320     }
321 
322     public static void removeByG_E(long groupId, int entryCount)
323         throws com.liferay.portal.SystemException {
324         getPersistence().removeByG_E(groupId, entryCount);
325     }
326 
327     public static void removeByC_E(long companyId, int entryCount)
328         throws com.liferay.portal.SystemException {
329         getPersistence().removeByC_E(companyId, entryCount);
330     }
331 
332     public static void removeAll() throws com.liferay.portal.SystemException {
333         getPersistence().removeAll();
334     }
335 
336     public static int countByGroupId(long groupId)
337         throws com.liferay.portal.SystemException {
338         return getPersistence().countByGroupId(groupId);
339     }
340 
341     public static int countByUserId(long userId)
342         throws com.liferay.portal.SystemException {
343         return getPersistence().countByUserId(userId);
344     }
345 
346     public static int countByG_U(long groupId, long userId)
347         throws com.liferay.portal.SystemException {
348         return getPersistence().countByG_U(groupId, userId);
349     }
350 
351     public static int countByG_E(long groupId, int entryCount)
352         throws com.liferay.portal.SystemException {
353         return getPersistence().countByG_E(groupId, entryCount);
354     }
355 
356     public static int countByC_E(long companyId, int entryCount)
357         throws com.liferay.portal.SystemException {
358         return getPersistence().countByC_E(companyId, entryCount);
359     }
360 
361     public static int countAll() throws com.liferay.portal.SystemException {
362         return getPersistence().countAll();
363     }
364 
365     public static BlogsStatsUserPersistence getPersistence() {
366         return _persistence;
367     }
368 
369     public void setPersistence(BlogsStatsUserPersistence persistence) {
370         _persistence = persistence;
371     }
372 
373     private static BlogsStatsUserPersistence _persistence;
374 }