1   /**
2    * Copyright (c) 2000-2007 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;
24  
25  /**
26   * <a href="BlogsStatsUserLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.blogs.service.BlogsStatsUserLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.blogs.service.BlogsStatsUserLocalServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.blogs.service.BlogsStatsUserLocalService
48   * @see com.liferay.portlet.blogs.service.BlogsStatsUserLocalServiceFactory
49   *
50   */
51  public class BlogsStatsUserLocalServiceUtil {
52      public static com.liferay.portlet.blogs.model.BlogsStatsUser addBlogsStatsUser(
53          com.liferay.portlet.blogs.model.BlogsStatsUser model)
54          throws com.liferay.portal.SystemException {
55          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
56  
57          return blogsStatsUserLocalService.addBlogsStatsUser(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
64  
65          return blogsStatsUserLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
72  
73          return blogsStatsUserLocalService.dynamicQuery(queryInitializer, begin,
74              end);
75      }
76  
77      public static com.liferay.portlet.blogs.model.BlogsStatsUser updateBlogsStatsUser(
78          com.liferay.portlet.blogs.model.BlogsStatsUser model)
79          throws com.liferay.portal.SystemException {
80          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
81  
82          return blogsStatsUserLocalService.updateBlogsStatsUser(model);
83      }
84  
85      public static void deleteStatsUserByGroupId(long groupId)
86          throws com.liferay.portal.SystemException {
87          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
88          blogsStatsUserLocalService.deleteStatsUserByGroupId(groupId);
89      }
90  
91      public static void deleteStatsUserByUserId(long userId)
92          throws com.liferay.portal.SystemException {
93          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
94          blogsStatsUserLocalService.deleteStatsUserByUserId(userId);
95      }
96  
97      public static java.util.List getCompanyStatsUsers(long companyId,
98          int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException {
100         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
101 
102         return blogsStatsUserLocalService.getCompanyStatsUsers(companyId,
103             begin, end, obc);
104     }
105 
106     public static int getCompanyStatsUsersCount(long companyId)
107         throws com.liferay.portal.SystemException {
108         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
109 
110         return blogsStatsUserLocalService.getCompanyStatsUsersCount(companyId);
111     }
112 
113     public static java.util.List getGroupStatsUsers(long groupId, int begin,
114         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException {
116         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
117 
118         return blogsStatsUserLocalService.getGroupStatsUsers(groupId, begin,
119             end, obc);
120     }
121 
122     public static int getGroupStatsUsersCount(long groupId)
123         throws com.liferay.portal.SystemException {
124         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
125 
126         return blogsStatsUserLocalService.getGroupStatsUsersCount(groupId);
127     }
128 
129     public static java.util.List getOrganizationStatsUsers(
130         long organizationId, int begin, int end,
131         com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.SystemException {
133         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
134 
135         return blogsStatsUserLocalService.getOrganizationStatsUsers(organizationId,
136             begin, end, obc);
137     }
138 
139     public static int getOrganizationStatsUsersCount(long organizationId)
140         throws com.liferay.portal.SystemException {
141         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
142 
143         return blogsStatsUserLocalService.getOrganizationStatsUsersCount(organizationId);
144     }
145 
146     public static com.liferay.portlet.blogs.model.BlogsStatsUser getStatsUser(
147         long groupId, long userId)
148         throws com.liferay.portal.PortalException, 
149             com.liferay.portal.SystemException {
150         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
151 
152         return blogsStatsUserLocalService.getStatsUser(groupId, userId);
153     }
154 
155     public static void updateStatsUser(long groupId, long userId,
156         java.util.Date lastPostDate)
157         throws com.liferay.portal.PortalException, 
158             com.liferay.portal.SystemException {
159         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
160         blogsStatsUserLocalService.updateStatsUser(groupId, userId, lastPostDate);
161     }
162 }