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