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;
24  
25  
26  /**
27   * <a href="BlogsStatsUserLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.blogs.service.BlogsStatsUserLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.blogs.service.BlogsStatsUserLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.blogs.service.BlogsStatsUserLocalService
50   * @see com.liferay.portlet.blogs.service.BlogsStatsUserLocalServiceFactory
51   *
52   */
53  public class BlogsStatsUserLocalServiceUtil {
54      public static com.liferay.portlet.blogs.model.BlogsStatsUser addBlogsStatsUser(
55          com.liferay.portlet.blogs.model.BlogsStatsUser model)
56          throws com.liferay.portal.SystemException {
57          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
58  
59          return blogsStatsUserLocalService.addBlogsStatsUser(model);
60      }
61  
62      public static java.util.List dynamicQuery(
63          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
64          throws com.liferay.portal.SystemException {
65          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
66  
67          return blogsStatsUserLocalService.dynamicQuery(queryInitializer);
68      }
69  
70      public static java.util.List dynamicQuery(
71          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
72          int begin, int end) throws com.liferay.portal.SystemException {
73          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
74  
75          return blogsStatsUserLocalService.dynamicQuery(queryInitializer, begin,
76              end);
77      }
78  
79      public static com.liferay.portlet.blogs.model.BlogsStatsUser updateBlogsStatsUser(
80          com.liferay.portlet.blogs.model.BlogsStatsUser model)
81          throws com.liferay.portal.SystemException {
82          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
83  
84          return blogsStatsUserLocalService.updateBlogsStatsUser(model);
85      }
86  
87      public static com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence getBlogsEntryPersistence() {
88          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
89  
90          return blogsStatsUserLocalService.getBlogsEntryPersistence();
91      }
92  
93      public static void setBlogsEntryPersistence(
94          com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence blogsEntryPersistence) {
95          BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
96  
97          blogsStatsUserLocalService.setBlogsEntryPersistence(blogsEntryPersistence);
98      }
99  
100     public static com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder getBlogsEntryFinder() {
101         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
102 
103         return blogsStatsUserLocalService.getBlogsEntryFinder();
104     }
105 
106     public static void setBlogsEntryFinder(
107         com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder blogsEntryFinder) {
108         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
109 
110         blogsStatsUserLocalService.setBlogsEntryFinder(blogsEntryFinder);
111     }
112 
113     public static com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
114         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
115 
116         return blogsStatsUserLocalService.getBlogsStatsUserPersistence();
117     }
118 
119     public static void setBlogsStatsUserPersistence(
120         com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence blogsStatsUserPersistence) {
121         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
122 
123         blogsStatsUserLocalService.setBlogsStatsUserPersistence(blogsStatsUserPersistence);
124     }
125 
126     public static com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder getBlogsStatsUserFinder() {
127         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
128 
129         return blogsStatsUserLocalService.getBlogsStatsUserFinder();
130     }
131 
132     public static void setBlogsStatsUserFinder(
133         com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder blogsStatsUserFinder) {
134         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
135 
136         blogsStatsUserLocalService.setBlogsStatsUserFinder(blogsStatsUserFinder);
137     }
138 
139     public static com.liferay.portal.service.persistence.GroupPersistence getGroupPersistence() {
140         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
141 
142         return blogsStatsUserLocalService.getGroupPersistence();
143     }
144 
145     public static void setGroupPersistence(
146         com.liferay.portal.service.persistence.GroupPersistence groupPersistence) {
147         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
148 
149         blogsStatsUserLocalService.setGroupPersistence(groupPersistence);
150     }
151 
152     public static com.liferay.portal.service.persistence.GroupFinder getGroupFinder() {
153         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
154 
155         return blogsStatsUserLocalService.getGroupFinder();
156     }
157 
158     public static void setGroupFinder(
159         com.liferay.portal.service.persistence.GroupFinder groupFinder) {
160         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
161 
162         blogsStatsUserLocalService.setGroupFinder(groupFinder);
163     }
164 
165     public static void afterPropertiesSet() {
166         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
167 
168         blogsStatsUserLocalService.afterPropertiesSet();
169     }
170 
171     public static void deleteStatsUserByGroupId(long groupId)
172         throws com.liferay.portal.SystemException {
173         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
174 
175         blogsStatsUserLocalService.deleteStatsUserByGroupId(groupId);
176     }
177 
178     public static void deleteStatsUserByUserId(long userId)
179         throws com.liferay.portal.SystemException {
180         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
181 
182         blogsStatsUserLocalService.deleteStatsUserByUserId(userId);
183     }
184 
185     public static java.util.List getCompanyStatsUsers(long companyId,
186         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.SystemException {
188         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
189 
190         return blogsStatsUserLocalService.getCompanyStatsUsers(companyId,
191             begin, end, obc);
192     }
193 
194     public static int getCompanyStatsUsersCount(long companyId)
195         throws com.liferay.portal.SystemException {
196         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
197 
198         return blogsStatsUserLocalService.getCompanyStatsUsersCount(companyId);
199     }
200 
201     public static java.util.List getGroupStatsUsers(long groupId, int begin,
202         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException {
204         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
205 
206         return blogsStatsUserLocalService.getGroupStatsUsers(groupId, begin,
207             end, obc);
208     }
209 
210     public static int getGroupStatsUsersCount(long groupId)
211         throws com.liferay.portal.SystemException {
212         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
213 
214         return blogsStatsUserLocalService.getGroupStatsUsersCount(groupId);
215     }
216 
217     public static java.util.List getOrganizationStatsUsers(
218         long organizationId, int begin, int end,
219         com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException {
221         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
222 
223         return blogsStatsUserLocalService.getOrganizationStatsUsers(organizationId,
224             begin, end, obc);
225     }
226 
227     public static int getOrganizationStatsUsersCount(long organizationId)
228         throws com.liferay.portal.SystemException {
229         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
230 
231         return blogsStatsUserLocalService.getOrganizationStatsUsersCount(organizationId);
232     }
233 
234     public static com.liferay.portlet.blogs.model.BlogsStatsUser getStatsUser(
235         long groupId, long userId)
236         throws com.liferay.portal.PortalException, 
237             com.liferay.portal.SystemException {
238         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
239 
240         return blogsStatsUserLocalService.getStatsUser(groupId, userId);
241     }
242 
243     public static void updateStatsUser(long groupId, long userId,
244         java.util.Date lastPostDate)
245         throws com.liferay.portal.PortalException, 
246             com.liferay.portal.SystemException {
247         BlogsStatsUserLocalService blogsStatsUserLocalService = BlogsStatsUserLocalServiceFactory.getService();
248 
249         blogsStatsUserLocalService.updateStatsUser(groupId, userId, lastPostDate);
250     }
251 }