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.social.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="SocialActivityLocalServiceUtil.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 SocialActivityLocalService} 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       SocialActivityLocalService
39   * @generated
40   */
41  public class SocialActivityLocalServiceUtil {
42      public static com.liferay.portlet.social.model.SocialActivity addSocialActivity(
43          com.liferay.portlet.social.model.SocialActivity socialActivity)
44          throws com.liferay.portal.SystemException {
45          return getService().addSocialActivity(socialActivity);
46      }
47  
48      public static com.liferay.portlet.social.model.SocialActivity createSocialActivity(
49          long activityId) {
50          return getService().createSocialActivity(activityId);
51      }
52  
53      public static void deleteSocialActivity(long activityId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteSocialActivity(activityId);
57      }
58  
59      public static void deleteSocialActivity(
60          com.liferay.portlet.social.model.SocialActivity socialActivity)
61          throws com.liferay.portal.SystemException {
62          getService().deleteSocialActivity(socialActivity);
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.social.model.SocialActivity getSocialActivity(
96          long activityId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getSocialActivity(activityId);
100     }
101 
102     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getSocialActivities(
103         int start, int end) throws com.liferay.portal.SystemException {
104         return getService().getSocialActivities(start, end);
105     }
106 
107     public static int getSocialActivitiesCount()
108         throws com.liferay.portal.SystemException {
109         return getService().getSocialActivitiesCount();
110     }
111 
112     public static com.liferay.portlet.social.model.SocialActivity updateSocialActivity(
113         com.liferay.portlet.social.model.SocialActivity socialActivity)
114         throws com.liferay.portal.SystemException {
115         return getService().updateSocialActivity(socialActivity);
116     }
117 
118     public static com.liferay.portlet.social.model.SocialActivity updateSocialActivity(
119         com.liferay.portlet.social.model.SocialActivity socialActivity,
120         boolean merge) throws com.liferay.portal.SystemException {
121         return getService().updateSocialActivity(socialActivity, merge);
122     }
123 
124     public static com.liferay.portlet.social.model.SocialActivity addActivity(
125         long userId, long groupId, java.util.Date createDate,
126         java.lang.String className, long classPK, int type,
127         java.lang.String extraData, long receiverUserId)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException {
130         return getService()
131                    .addActivity(userId, groupId, createDate, className,
132             classPK, type, extraData, receiverUserId);
133     }
134 
135     public static com.liferay.portlet.social.model.SocialActivity addActivity(
136         long userId, long groupId, java.lang.String className, long classPK,
137         int type, java.lang.String extraData, long receiverUserId)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException {
140         return getService()
141                    .addActivity(userId, groupId, className, classPK, type,
142             extraData, receiverUserId);
143     }
144 
145     public static com.liferay.portlet.social.model.SocialActivity addUniqueActivity(
146         long userId, long groupId, java.util.Date createDate,
147         java.lang.String className, long classPK, int type,
148         java.lang.String extraData, long receiverUserId)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException {
151         return getService()
152                    .addUniqueActivity(userId, groupId, createDate, className,
153             classPK, type, extraData, receiverUserId);
154     }
155 
156     public static com.liferay.portlet.social.model.SocialActivity addUniqueActivity(
157         long userId, long groupId, java.lang.String className, long classPK,
158         int type, java.lang.String extraData, long receiverUserId)
159         throws com.liferay.portal.PortalException,
160             com.liferay.portal.SystemException {
161         return getService()
162                    .addUniqueActivity(userId, groupId, className, classPK,
163             type, extraData, receiverUserId);
164     }
165 
166     public static void deleteActivities(long classNameId, long classPK)
167         throws com.liferay.portal.SystemException {
168         getService().deleteActivities(classNameId, classPK);
169     }
170 
171     public static void deleteActivities(java.lang.String className, long classPK)
172         throws com.liferay.portal.SystemException {
173         getService().deleteActivities(className, classPK);
174     }
175 
176     public static void deleteActivity(long activityId)
177         throws com.liferay.portal.PortalException,
178             com.liferay.portal.SystemException {
179         getService().deleteActivity(activityId);
180     }
181 
182     public static void deleteActivity(
183         com.liferay.portlet.social.model.SocialActivity activity)
184         throws com.liferay.portal.SystemException {
185         getService().deleteActivity(activity);
186     }
187 
188     public static void deleteUserActivities(long userId)
189         throws com.liferay.portal.SystemException {
190         getService().deleteUserActivities(userId);
191     }
192 
193     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
194         long classNameId, int start, int end)
195         throws com.liferay.portal.SystemException {
196         return getService().getActivities(classNameId, start, end);
197     }
198 
199     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
200         long mirrorActivityId, long classNameId, long classPK, int start,
201         int end) throws com.liferay.portal.SystemException {
202         return getService()
203                    .getActivities(mirrorActivityId, classNameId, classPK,
204             start, end);
205     }
206 
207     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
208         long mirrorActivityId, java.lang.String className, long classPK,
209         int start, int end) throws com.liferay.portal.SystemException {
210         return getService()
211                    .getActivities(mirrorActivityId, className, classPK, start,
212             end);
213     }
214 
215     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
216         java.lang.String className, int start, int end)
217         throws com.liferay.portal.SystemException {
218         return getService().getActivities(className, start, end);
219     }
220 
221     public static int getActivitiesCount(long classNameId)
222         throws com.liferay.portal.SystemException {
223         return getService().getActivitiesCount(classNameId);
224     }
225 
226     public static int getActivitiesCount(long mirrorActivityId,
227         long classNameId, long classPK)
228         throws com.liferay.portal.SystemException {
229         return getService()
230                    .getActivitiesCount(mirrorActivityId, classNameId, classPK);
231     }
232 
233     public static int getActivitiesCount(long mirrorActivityId,
234         java.lang.String className, long classPK)
235         throws com.liferay.portal.SystemException {
236         return getService()
237                    .getActivitiesCount(mirrorActivityId, className, classPK);
238     }
239 
240     public static int getActivitiesCount(java.lang.String className)
241         throws com.liferay.portal.SystemException {
242         return getService().getActivitiesCount(className);
243     }
244 
245     public static com.liferay.portlet.social.model.SocialActivity getActivity(
246         long activityId)
247         throws com.liferay.portal.PortalException,
248             com.liferay.portal.SystemException {
249         return getService().getActivity(activityId);
250     }
251 
252     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupActivities(
253         long groupId, int start, int end)
254         throws com.liferay.portal.SystemException {
255         return getService().getGroupActivities(groupId, start, end);
256     }
257 
258     public static int getGroupActivitiesCount(long groupId)
259         throws com.liferay.portal.SystemException {
260         return getService().getGroupActivitiesCount(groupId);
261     }
262 
263     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupUsersActivities(
264         long groupId, int start, int end)
265         throws com.liferay.portal.SystemException {
266         return getService().getGroupUsersActivities(groupId, start, end);
267     }
268 
269     public static int getGroupUsersActivitiesCount(long groupId)
270         throws com.liferay.portal.SystemException {
271         return getService().getGroupUsersActivitiesCount(groupId);
272     }
273 
274     public static com.liferay.portlet.social.model.SocialActivity getMirrorActivity(
275         long mirrorActivityId)
276         throws com.liferay.portal.PortalException,
277             com.liferay.portal.SystemException {
278         return getService().getMirrorActivity(mirrorActivityId);
279     }
280 
281     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities(
282         long organizationId, int start, int end)
283         throws com.liferay.portal.SystemException {
284         return getService().getOrganizationActivities(organizationId, start, end);
285     }
286 
287     public static int getOrganizationActivitiesCount(long organizationId)
288         throws com.liferay.portal.SystemException {
289         return getService().getOrganizationActivitiesCount(organizationId);
290     }
291 
292     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities(
293         long organizationId, int start, int end)
294         throws com.liferay.portal.SystemException {
295         return getService()
296                    .getOrganizationUsersActivities(organizationId, start, end);
297     }
298 
299     public static int getOrganizationUsersActivitiesCount(long organizationId)
300         throws com.liferay.portal.SystemException {
301         return getService().getOrganizationUsersActivitiesCount(organizationId);
302     }
303 
304     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
305         long userId, int start, int end)
306         throws com.liferay.portal.SystemException {
307         return getService().getRelationActivities(userId, start, end);
308     }
309 
310     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
311         long userId, int type, int start, int end)
312         throws com.liferay.portal.SystemException {
313         return getService().getRelationActivities(userId, type, start, end);
314     }
315 
316     public static int getRelationActivitiesCount(long userId)
317         throws com.liferay.portal.SystemException {
318         return getService().getRelationActivitiesCount(userId);
319     }
320 
321     public static int getRelationActivitiesCount(long userId, int type)
322         throws com.liferay.portal.SystemException {
323         return getService().getRelationActivitiesCount(userId, type);
324     }
325 
326     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities(
327         long userId, int start, int end)
328         throws com.liferay.portal.SystemException {
329         return getService().getUserActivities(userId, start, end);
330     }
331 
332     public static int getUserActivitiesCount(long userId)
333         throws com.liferay.portal.SystemException {
334         return getService().getUserActivitiesCount(userId);
335     }
336 
337     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities(
338         long userId, int start, int end)
339         throws com.liferay.portal.SystemException {
340         return getService().getUserGroupsActivities(userId, start, end);
341     }
342 
343     public static int getUserGroupsActivitiesCount(long userId)
344         throws com.liferay.portal.SystemException {
345         return getService().getUserGroupsActivitiesCount(userId);
346     }
347 
348     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsAndOrganizationsActivities(
349         long userId, int start, int end)
350         throws com.liferay.portal.SystemException {
351         return getService()
352                    .getUserGroupsAndOrganizationsActivities(userId, start, end);
353     }
354 
355     public static int getUserGroupsAndOrganizationsActivitiesCount(long userId)
356         throws com.liferay.portal.SystemException {
357         return getService().getUserGroupsAndOrganizationsActivitiesCount(userId);
358     }
359 
360     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserOrganizationsActivities(
361         long userId, int start, int end)
362         throws com.liferay.portal.SystemException {
363         return getService().getUserOrganizationsActivities(userId, start, end);
364     }
365 
366     public static int getUserOrganizationsActivitiesCount(long userId)
367         throws com.liferay.portal.SystemException {
368         return getService().getUserOrganizationsActivitiesCount(userId);
369     }
370 
371     public static SocialActivityLocalService getService() {
372         if (_service == null) {
373             _service = (SocialActivityLocalService)PortalBeanLocatorUtil.locate(SocialActivityLocalService.class.getName());
374 
375             ReferenceRegistry.registerReference(SocialActivityLocalServiceUtil.class,
376                 "_service");
377             MethodCache.remove(SocialActivityLocalService.class);
378         }
379 
380         return _service;
381     }
382 
383     public void setService(SocialActivityLocalService service) {
384         MethodCache.remove(SocialActivityLocalService.class);
385 
386         _service = service;
387 
388         ReferenceRegistry.registerReference(SocialActivityLocalServiceUtil.class,
389             "_service");
390         MethodCache.remove(SocialActivityLocalService.class);
391     }
392 
393     private static SocialActivityLocalService _service;
394 }