1   /**
2    * Copyright (c) 2000-2010 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   *
12   *
13   */
14  
15  package com.liferay.portlet.messageboards.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="MBStatsUserLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link MBStatsUserLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       MBStatsUserLocalService
39   * @generated
40   */
41  public class MBStatsUserLocalServiceUtil {
42      public static com.liferay.portlet.messageboards.model.MBStatsUser addMBStatsUser(
43          com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser)
44          throws com.liferay.portal.SystemException {
45          return getService().addMBStatsUser(mbStatsUser);
46      }
47  
48      public static com.liferay.portlet.messageboards.model.MBStatsUser createMBStatsUser(
49          long statsUserId) {
50          return getService().createMBStatsUser(statsUserId);
51      }
52  
53      public static void deleteMBStatsUser(long statsUserId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteMBStatsUser(statsUserId);
57      }
58  
59      public static void deleteMBStatsUser(
60          com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser)
61          throws com.liferay.portal.SystemException {
62          getService().deleteMBStatsUser(mbStatsUser);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portlet.messageboards.model.MBStatsUser getMBStatsUser(
96          long statsUserId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getMBStatsUser(statsUserId);
100     }
101 
102     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> getMBStatsUsers(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getMBStatsUsers(start, end);
105     }
106 
107     public static int getMBStatsUsersCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getMBStatsUsersCount();
110     }
111 
112     public static com.liferay.portlet.messageboards.model.MBStatsUser updateMBStatsUser(
113         com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser)
114         throws com.liferay.portal.SystemException {
115         return getService().updateMBStatsUser(mbStatsUser);
116     }
117 
118     public static com.liferay.portlet.messageboards.model.MBStatsUser updateMBStatsUser(
119         com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser,
120         boolean merge) throws com.liferay.portal.SystemException {
121         return getService().updateMBStatsUser(mbStatsUser, merge);
122     }
123 
124     public static com.liferay.portlet.messageboards.model.MBStatsUser addStatsUser(
125         long groupId, long userId) throws com.liferay.portal.SystemException {
126         return getService().addStatsUser(groupId, userId);
127     }
128 
129     /**
130     * @deprecated
131     */
132     public static void deleteStatsUserByGroupId(long groupId)
133         throws com.liferay.portal.SystemException {
134         getService().deleteStatsUserByGroupId(groupId);
135     }
136 
137     /**
138     * @deprecated
139     */
140     public static void deleteStatsUserByUserId(long userId)
141         throws com.liferay.portal.SystemException {
142         getService().deleteStatsUserByUserId(userId);
143     }
144 
145     public static void deleteStatsUsersByGroupId(long groupId)
146         throws com.liferay.portal.SystemException {
147         getService().deleteStatsUsersByGroupId(groupId);
148     }
149 
150     public static void deleteStatsUsersByUserId(long userId)
151         throws com.liferay.portal.SystemException {
152         getService().deleteStatsUsersByUserId(userId);
153     }
154 
155     public static int getMessageCountByUserId(long userId)
156         throws com.liferay.portal.SystemException {
157         return getService().getMessageCountByUserId(userId);
158     }
159 
160     public static com.liferay.portlet.messageboards.model.MBStatsUser getStatsUser(
161         long groupId, long userId) throws com.liferay.portal.SystemException {
162         return getService().getStatsUser(groupId, userId);
163     }
164 
165     /**
166     * @deprecated
167     */
168     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> getStatsUsers(
169         long groupId, int start, int end)
170         throws com.liferay.portal.SystemException {
171         return getService().getStatsUsers(groupId, start, end);
172     }
173 
174     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> getStatsUsersByGroupId(
175         long groupId, int start, int end)
176         throws com.liferay.portal.SystemException {
177         return getService().getStatsUsersByGroupId(groupId, start, end);
178     }
179 
180     public static int getStatsUsersByGroupIdCount(long groupId)
181         throws com.liferay.portal.SystemException {
182         return getService().getStatsUsersByGroupIdCount(groupId);
183     }
184 
185     public static java.util.List<com.liferay.portlet.messageboards.model.MBStatsUser> getStatsUsersByUserId(
186         long userId) throws com.liferay.portal.SystemException {
187         return getService().getStatsUsersByUserId(userId);
188     }
189 
190     /**
191     * @deprecated
192     */
193     public static int getStatsUsersCount(long groupId)
194         throws com.liferay.portal.SystemException {
195         return getService().getStatsUsersCount(groupId);
196     }
197 
198     public static com.liferay.portlet.messageboards.model.MBStatsUser updateStatsUser(
199         long groupId, long userId) throws com.liferay.portal.SystemException {
200         return getService().updateStatsUser(groupId, userId);
201     }
202 
203     public static com.liferay.portlet.messageboards.model.MBStatsUser updateStatsUser(
204         long groupId, long userId, java.util.Date lastPostDate)
205         throws com.liferay.portal.SystemException {
206         return getService().updateStatsUser(groupId, userId, lastPostDate);
207     }
208 
209     public static MBStatsUserLocalService getService() {
210         if (_service == null) {
211             _service = (MBStatsUserLocalService)PortalBeanLocatorUtil.locate(MBStatsUserLocalService.class.getName());
212 
213             ReferenceRegistry.registerReference(MBStatsUserLocalServiceUtil.class,
214                 "_service");
215             MethodCache.remove(MBStatsUserLocalService.class);
216         }
217 
218         return _service;
219     }
220 
221     public void setService(MBStatsUserLocalService service) {
222         MethodCache.remove(MBStatsUserLocalService.class);
223 
224         _service = service;
225 
226         ReferenceRegistry.registerReference(MBStatsUserLocalServiceUtil.class,
227             "_service");
228         MethodCache.remove(MBStatsUserLocalService.class);
229     }
230 
231     private static MBStatsUserLocalService _service;
232 }