001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.social.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for SocialActivity. This utility wraps
024     * {@link com.liferay.portlet.social.service.impl.SocialActivityServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see SocialActivityService
032     * @see com.liferay.portlet.social.service.base.SocialActivityServiceBaseImpl
033     * @see com.liferay.portlet.social.service.impl.SocialActivityServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class SocialActivityServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialActivityServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Returns the Spring bean ID for this bean.
046            *
047            * @return the Spring bean ID for this bean
048            */
049            public static java.lang.String getBeanIdentifier() {
050                    return getService().getBeanIdentifier();
051            }
052    
053            /**
054            * Sets the Spring bean ID for this bean.
055            *
056            * @param beanIdentifier the Spring bean ID for this bean
057            */
058            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
059                    getService().setBeanIdentifier(beanIdentifier);
060            }
061    
062            /**
063            * Returns a range of all the activities done on assets identified by the
064            * class name ID.
065            *
066            * <p>
067            * Useful when paginating results. Returns a maximum of <code>end -
068            * start</code> instances. <code>start</code> and <code>end</code> are not
069            * primary keys, they are indexes in the result set. Thus, <code>0</code>
070            * refers to the first result in the set. Setting both <code>start</code>
071            * and <code>end</code> to {@link
072            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
073            * result set.
074            * </p>
075            *
076            * @param classNameId the target asset's class name ID
077            * @param start the lower bound of the range of results
078            * @param end the upper bound of the range of results (not inclusive)
079            * @return the range of matching activities
080            * @throws PortalException if a permission checker was not initialized
081            * @throws SystemException if a system exception occurred
082            */
083            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
084                    long classNameId, int start, int end)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    return getService().getActivities(classNameId, start, end);
088            }
089    
090            /**
091            * Returns a range of all the activities done on the asset identified by the
092            * class name ID and class primary key that are mirrors of the activity
093            * identified by the mirror activity ID.
094            *
095            * <p>
096            * Useful when paginating results. Returns a maximum of <code>end -
097            * start</code> instances. <code>start</code> and <code>end</code> are not
098            * primary keys, they are indexes in the result set. Thus, <code>0</code>
099            * refers to the first result in the set. Setting both <code>start</code>
100            * and <code>end</code> to {@link
101            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
102            * result set.
103            * </p>
104            *
105            * @param mirrorActivityId the primary key of the mirror activity
106            * @param classNameId the target asset's class name ID
107            * @param classPK the primary key of the target asset
108            * @param start the lower bound of the range of results
109            * @param end the upper bound of the range of results (not inclusive)
110            * @return the range of matching activities
111            * @throws PortalException if a permission checker was not initialized
112            * @throws SystemException if a system exception occurred
113            */
114            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
115                    long mirrorActivityId, long classNameId, long classPK, int start,
116                    int end)
117                    throws com.liferay.portal.kernel.exception.PortalException,
118                            com.liferay.portal.kernel.exception.SystemException {
119                    return getService()
120                                       .getActivities(mirrorActivityId, classNameId, classPK,
121                            start, end);
122            }
123    
124            /**
125            * Returns a range of all the activities done on the asset identified by the
126            * class name and the class primary key that are mirrors of the activity
127            * identified by the mirror activity ID.
128            *
129            * <p>
130            * Useful when paginating results. Returns a maximum of <code>end -
131            * start</code> instances. <code>start</code> and <code>end</code> are not
132            * primary keys, they are indexes in the result set. Thus, <code>0</code>
133            * refers to the first result in the set. Setting both <code>start</code>
134            * and <code>end</code> to {@link
135            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
136            * result set.
137            * </p>
138            *
139            * @param mirrorActivityId the primary key of the mirror activity
140            * @param className the target asset's class name
141            * @param classPK the primary key of the target asset
142            * @param start the lower bound of the range of results
143            * @param end the upper bound of the range of results (not inclusive)
144            * @return the range of matching activities
145            * @throws PortalException if a permission checker was not initialized
146            * @throws SystemException if a system exception occurred
147            */
148            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
149                    long mirrorActivityId, java.lang.String className, long classPK,
150                    int start, int end)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException {
153                    return getService()
154                                       .getActivities(mirrorActivityId, className, classPK, start,
155                            end);
156            }
157    
158            /**
159            * Returns a range of all the activities done on assets identified by the
160            * class name.
161            *
162            * <p>
163            * Useful when paginating results. Returns a maximum of <code>end -
164            * start</code> instances. <code>start</code> and <code>end</code> are not
165            * primary keys, they are indexes in the result set. Thus, <code>0</code>
166            * refers to the first result in the set. Setting both <code>start</code>
167            * and <code>end</code> to {@link
168            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
169            * result set.
170            * </p>
171            *
172            * @param className the target asset's class name
173            * @param start the lower bound of the range of results
174            * @param end the upper bound of the range of results (not inclusive)
175            * @return the range of matching activities
176            * @throws PortalException if a permission checker was not initialized
177            * @throws SystemException if a system exception occurred
178            */
179            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
180                    java.lang.String className, int start, int end)
181                    throws com.liferay.portal.kernel.exception.PortalException,
182                            com.liferay.portal.kernel.exception.SystemException {
183                    return getService().getActivities(className, start, end);
184            }
185    
186            /**
187            * Returns the number of activities done on assets identified by the class
188            * name ID.
189            *
190            * @param classNameId the target asset's class name ID
191            * @return the number of matching activities
192            * @throws SystemException if a system exception occurred
193            */
194            public static int getActivitiesCount(long classNameId)
195                    throws com.liferay.portal.kernel.exception.SystemException {
196                    return getService().getActivitiesCount(classNameId);
197            }
198    
199            /**
200            * Returns the number of activities done on the asset identified by the
201            * class name ID and class primary key that are mirrors of the activity
202            * identified by the mirror activity ID.
203            *
204            * @param mirrorActivityId the primary key of the mirror activity
205            * @param classNameId the target asset's class name ID
206            * @param classPK the primary key of the target asset
207            * @return the number of matching activities
208            * @throws SystemException if a system exception occurred
209            */
210            public static int getActivitiesCount(long mirrorActivityId,
211                    long classNameId, long classPK)
212                    throws com.liferay.portal.kernel.exception.SystemException {
213                    return getService()
214                                       .getActivitiesCount(mirrorActivityId, classNameId, classPK);
215            }
216    
217            /**
218            * Returns the number of activities done on the asset identified by the
219            * class name and class primary key that are mirrors of the activity
220            * identified by the mirror activity ID.
221            *
222            * @param mirrorActivityId the primary key of the mirror activity
223            * @param className the target asset's class name
224            * @param classPK the primary key of the target asset
225            * @return the number of matching activities
226            * @throws SystemException if a system exception occurred
227            */
228            public static int getActivitiesCount(long mirrorActivityId,
229                    java.lang.String className, long classPK)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getService()
232                                       .getActivitiesCount(mirrorActivityId, className, classPK);
233            }
234    
235            /**
236            * Returns the number of activities done on assets identified by class name.
237            *
238            * @param className the target asset's class name
239            * @return the number of matching activities
240            * @throws SystemException if a system exception occurred
241            */
242            public static int getActivitiesCount(java.lang.String className)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getService().getActivitiesCount(className);
245            }
246    
247            /**
248            * Returns the activity identified by its primary key.
249            *
250            * @param activityId the primary key of the activity
251            * @return Returns the activity
252            * @throws PortalException if the activity could not be found
253            * @throws SystemException if a system exception occurred
254            */
255            public static com.liferay.portlet.social.model.SocialActivity getActivity(
256                    long activityId)
257                    throws com.liferay.portal.kernel.exception.PortalException,
258                            com.liferay.portal.kernel.exception.SystemException {
259                    return getService().getActivity(activityId);
260            }
261    
262            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivitySetActivities(
263                    long activitySetId, int start, int end)
264                    throws com.liferay.portal.kernel.exception.PortalException,
265                            com.liferay.portal.kernel.exception.SystemException {
266                    return getService().getActivitySetActivities(activitySetId, start, end);
267            }
268    
269            /**
270            * Returns a range of all the activities done in the group.
271            *
272            * <p>
273            * This method only finds activities without mirrors.
274            * </p>
275            *
276            * <p>
277            * Useful when paginating results. Returns a maximum of <code>end -
278            * start</code> instances. <code>start</code> and <code>end</code> are not
279            * primary keys, they are indexes in the result set. Thus, <code>0</code>
280            * refers to the first result in the set. Setting both <code>start</code>
281            * and <code>end</code> to {@link
282            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
283            * result set.
284            * </p>
285            *
286            * @param groupId the primary key of the group
287            * @param start the lower bound of the range of results
288            * @param end the upper bound of the range of results (not inclusive)
289            * @return the range of matching activities
290            * @throws PortalException if a permission checker was not initialized
291            * @throws SystemException if a system exception occurred
292            */
293            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupActivities(
294                    long groupId, int start, int end)
295                    throws com.liferay.portal.kernel.exception.PortalException,
296                            com.liferay.portal.kernel.exception.SystemException {
297                    return getService().getGroupActivities(groupId, start, end);
298            }
299    
300            /**
301            * Returns the number of activities done in the group.
302            *
303            * <p>
304            * This method only counts activities without mirrors.
305            * </p>
306            *
307            * @param groupId the primary key of the group
308            * @return the number of matching activities
309            * @throws SystemException if a system exception occurred
310            */
311            public static int getGroupActivitiesCount(long groupId)
312                    throws com.liferay.portal.kernel.exception.SystemException {
313                    return getService().getGroupActivitiesCount(groupId);
314            }
315    
316            /**
317            * Returns a range of activities done by users that are members of the
318            * group.
319            *
320            * <p>
321            * This method only finds activities without mirrors.
322            * </p>
323            *
324            * <p>
325            * Useful when paginating results. Returns a maximum of <code>end -
326            * start</code> instances. <code>start</code> and <code>end</code> are not
327            * primary keys, they are indexes in the result set. Thus, <code>0</code>
328            * refers to the first result in the set. Setting both <code>start</code>
329            * and <code>end</code> to {@link
330            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
331            * result set.
332            * </p>
333            *
334            * @param groupId the primary key of the group
335            * @param start the lower bound of the range of results
336            * @param end the upper bound of the range of results (not inclusive)
337            * @return the range of matching activities
338            * @throws PortalException if a permission checker was not initialized
339            * @throws SystemException if a system exception occurred
340            */
341            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupUsersActivities(
342                    long groupId, int start, int end)
343                    throws com.liferay.portal.kernel.exception.PortalException,
344                            com.liferay.portal.kernel.exception.SystemException {
345                    return getService().getGroupUsersActivities(groupId, start, end);
346            }
347    
348            /**
349            * Returns the number of activities done by users that are members of the
350            * group.
351            *
352            * <p>
353            * This method only counts activities without mirrors.
354            * </p>
355            *
356            * @param groupId the primary key of the group
357            * @return the number of matching activities
358            * @throws SystemException if a system exception occurred
359            */
360            public static int getGroupUsersActivitiesCount(long groupId)
361                    throws com.liferay.portal.kernel.exception.SystemException {
362                    return getService().getGroupUsersActivitiesCount(groupId);
363            }
364    
365            /**
366            * Returns the activity that has the mirror activity.
367            *
368            * @param mirrorActivityId the primary key of the mirror activity
369            * @return Returns the mirror activity
370            * @throws PortalException if the mirror activity could not be found
371            * @throws SystemException if a system exception occurred
372            */
373            public static com.liferay.portlet.social.model.SocialActivity getMirrorActivity(
374                    long mirrorActivityId)
375                    throws com.liferay.portal.kernel.exception.PortalException,
376                            com.liferay.portal.kernel.exception.SystemException {
377                    return getService().getMirrorActivity(mirrorActivityId);
378            }
379    
380            /**
381            * Returns a range of all the activities done in the organization. This
382            * method only finds activities without mirrors.
383            *
384            * <p>
385            * Useful when paginating results. Returns a maximum of <code>end -
386            * start</code> instances. <code>start</code> and <code>end</code> are not
387            * primary keys, they are indexes in the result set. Thus, <code>0</code>
388            * refers to the first result in the set. Setting both <code>start</code>
389            * and <code>end</code> to {@link
390            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
391            * result set.
392            * </p>
393            *
394            * @param organizationId the primary key of the organization
395            * @param start the lower bound of the range of results
396            * @param end the upper bound of the range of results (not inclusive)
397            * @return the range of matching activities
398            * @throws PortalException if a permission checker was not initialized
399            * @throws SystemException if a system exception occurred
400            */
401            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities(
402                    long organizationId, int start, int end)
403                    throws com.liferay.portal.kernel.exception.PortalException,
404                            com.liferay.portal.kernel.exception.SystemException {
405                    return getService().getOrganizationActivities(organizationId, start, end);
406            }
407    
408            /**
409            * Returns the number of activities done in the organization. This method
410            * only counts activities without mirrors.
411            *
412            * @param organizationId the primary key of the organization
413            * @return the number of matching activities
414            * @throws SystemException if a system exception occurred
415            */
416            public static int getOrganizationActivitiesCount(long organizationId)
417                    throws com.liferay.portal.kernel.exception.SystemException {
418                    return getService().getOrganizationActivitiesCount(organizationId);
419            }
420    
421            /**
422            * Returns a range of all the activities done by users of the organization.
423            * This method only finds activities without mirrors.
424            *
425            * <p>
426            * Useful when paginating results. Returns a maximum of <code>end -
427            * start</code> instances. <code>start</code> and <code>end</code> are not
428            * primary keys, they are indexes in the result set. Thus, <code>0</code>
429            * refers to the first result in the set. Setting both <code>start</code>
430            * and <code>end</code> to {@link
431            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
432            * result set.
433            * </p>
434            *
435            * @param organizationId the primary key of the organization
436            * @param start the lower bound of the range of results
437            * @param end the upper bound of the range of results (not inclusive)
438            * @return the range of matching activities
439            * @throws PortalException if a permission checker was not initialized
440            * @throws SystemException if a system exception occurred
441            */
442            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities(
443                    long organizationId, int start, int end)
444                    throws com.liferay.portal.kernel.exception.PortalException,
445                            com.liferay.portal.kernel.exception.SystemException {
446                    return getService()
447                                       .getOrganizationUsersActivities(organizationId, start, end);
448            }
449    
450            /**
451            * Returns the number of activities done by users of the organization. This
452            * method only counts activities without mirrors.
453            *
454            * @param organizationId the primary key of the organization
455            * @return the number of matching activities
456            * @throws SystemException if a system exception occurred
457            */
458            public static int getOrganizationUsersActivitiesCount(long organizationId)
459                    throws com.liferay.portal.kernel.exception.SystemException {
460                    return getService().getOrganizationUsersActivitiesCount(organizationId);
461            }
462    
463            /**
464            * Returns a range of all the activities done by users in a relationship
465            * with the user identified by the user ID.
466            *
467            * <p>
468            * Useful when paginating results. Returns a maximum of <code>end -
469            * start</code> instances. <code>start</code> and <code>end</code> are not
470            * primary keys, they are indexes in the result set. Thus, <>0</code> refers
471            * to the first result in the set. Setting both <code>start</code> and
472            * <code>end</code> to {@link
473            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
474            * result set.
475            * </p>
476            *
477            * @param userId the primary key of the user
478            * @param start the lower bound of the range of results
479            * @param end the upper bound of the range of results (not inclusive)
480            * @return the range of matching activities
481            * @throws PortalException if a permission checker was not initialized
482            * @throws SystemException if a system exception occurred
483            */
484            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
485                    long userId, int start, int end)
486                    throws com.liferay.portal.kernel.exception.PortalException,
487                            com.liferay.portal.kernel.exception.SystemException {
488                    return getService().getRelationActivities(userId, start, end);
489            }
490    
491            /**
492            * Returns a range of all the activities done by users in a relationship of
493            * type <code>type</code> with the user identified by <code>userId</code>.
494            * This method only finds activities without mirrors.
495            *
496            * <p>
497            * Useful when paginating results. Returns a maximum of <code>end -
498            * start</code> instances. <code>start</code> and <code>end</code> are not
499            * primary keys, they are indexes in the result set. Thus, <code>0</code>
500            * refers to the first result in the set. Setting both <code>start</code>
501            * and <code>end</code> to {@link
502            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
503            * result set.
504            * </p>
505            *
506            * @param userId the primary key of the user
507            * @param type the relationship type
508            * @param start the lower bound of the range of results
509            * @param end the upper bound of the range of results (not inclusive)
510            * @return the range of matching activities
511            * @throws PortalException if a permission checker was not initialized
512            * @throws SystemException if a system exception occurred
513            */
514            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
515                    long userId, int type, int start, int end)
516                    throws com.liferay.portal.kernel.exception.PortalException,
517                            com.liferay.portal.kernel.exception.SystemException {
518                    return getService().getRelationActivities(userId, type, start, end);
519            }
520    
521            /**
522            * Returns the number of activities done by users in a relationship with the
523            * user identified by userId.
524            *
525            * @param userId the primary key of the user
526            * @return the number of matching activities
527            * @throws SystemException if a system exception occurred
528            */
529            public static int getRelationActivitiesCount(long userId)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    return getService().getRelationActivitiesCount(userId);
532            }
533    
534            /**
535            * Returns the number of activities done by users in a relationship of type
536            * <code>type</code> with the user identified by <code>userId</code>. This
537            * method only counts activities without mirrors.
538            *
539            * @param userId the primary key of the user
540            * @param type the relationship type
541            * @return the number of matching activities
542            * @throws SystemException if a system exception occurred
543            */
544            public static int getRelationActivitiesCount(long userId, int type)
545                    throws com.liferay.portal.kernel.exception.SystemException {
546                    return getService().getRelationActivitiesCount(userId, type);
547            }
548    
549            /**
550            * Returns a range of all the activities done by the user.
551            *
552            * <p>
553            * Useful when paginating results. Returns a maximum of <code>end -
554            * start</code> instances. <code>start</code> and <code>end</code> are not
555            * primary keys, they are indexes in the result set. Thus, <code>0</code>
556            * refers to the first result in the set. Setting both <code>start</code>
557            * and <code>end</code> to {@link
558            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
559            * result set.
560            * </p>
561            *
562            * @param userId the primary key of the user
563            * @param start the lower bound of the range of results
564            * @param end the upper bound of the range of results (not inclusive)
565            * @return the range of matching activities
566            * @throws PortalException if a permission checker was not initialized
567            * @throws SystemException if a system exception occurred
568            */
569            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities(
570                    long userId, int start, int end)
571                    throws com.liferay.portal.kernel.exception.PortalException,
572                            com.liferay.portal.kernel.exception.SystemException {
573                    return getService().getUserActivities(userId, start, end);
574            }
575    
576            /**
577            * Returns the number of activities done by the user.
578            *
579            * @param userId the primary key of the user
580            * @return the number of matching activities
581            * @throws SystemException if a system exception occurred
582            */
583            public static int getUserActivitiesCount(long userId)
584                    throws com.liferay.portal.kernel.exception.SystemException {
585                    return getService().getUserActivitiesCount(userId);
586            }
587    
588            /**
589            * Returns a range of all the activities done in the user's groups. This
590            * method only finds activities without mirrors.
591            *
592            * <p>
593            * Useful when paginating results. Returns a maximum of <code>end -
594            * start</code> instances. <code>start</code> and <code>end</code> are not
595            * primary keys, they are indexes in the result set. Thus, <code>0</code>
596            * refers to the first result in the set. Setting both <code>start</code>
597            * and <code>end</code> to {@link
598            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
599            * result set.
600            * </p>
601            *
602            * @param userId the primary key of the user
603            * @param start the lower bound of the range of results
604            * @param end the upper bound of the range of results (not inclusive)
605            * @return the range of matching activities
606            * @throws PortalException if a permission checker was not initialized
607            * @throws SystemException if a system exception occurred
608            */
609            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities(
610                    long userId, int start, int end)
611                    throws com.liferay.portal.kernel.exception.PortalException,
612                            com.liferay.portal.kernel.exception.SystemException {
613                    return getService().getUserGroupsActivities(userId, start, end);
614            }
615    
616            /**
617            * Returns the number of activities done in user's groups. This method only
618            * counts activities without mirrors.
619            *
620            * @param userId the primary key of the user
621            * @return the number of matching activities
622            * @throws SystemException if a system exception occurred
623            */
624            public static int getUserGroupsActivitiesCount(long userId)
625                    throws com.liferay.portal.kernel.exception.SystemException {
626                    return getService().getUserGroupsActivitiesCount(userId);
627            }
628    
629            /**
630            * Returns a range of all the activities done in the user's groups and
631            * organizations. This method only finds activities without mirrors.
632            *
633            * <p>
634            * Useful when paginating results. Returns a maximum of <code>end -
635            * start</code> instances. <code>start</code> and <code>end</code> are not
636            * primary keys, they are indexes in the result set. Thus, <code>0</code>
637            * refers to the first result in the set. Setting both <code>start</code>
638            * and <code>end</code> to {@link
639            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
640            * result set.
641            * </p>
642            *
643            * @param userId the primary key of the user
644            * @param start the lower bound of the range of results
645            * @param end the upper bound of the range of results (not inclusive)
646            * @return the range of matching activities
647            * @throws PortalException if a permission checker was not initialized
648            * @throws SystemException if a system exception occurred
649            */
650            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsAndOrganizationsActivities(
651                    long userId, int start, int end)
652                    throws com.liferay.portal.kernel.exception.PortalException,
653                            com.liferay.portal.kernel.exception.SystemException {
654                    return getService()
655                                       .getUserGroupsAndOrganizationsActivities(userId, start, end);
656            }
657    
658            /**
659            * Returns the number of activities done in user's groups and organizations.
660            * This method only counts activities without mirrors.
661            *
662            * @param userId the primary key of the user
663            * @return the number of matching activities
664            * @throws SystemException if a system exception occurred
665            */
666            public static int getUserGroupsAndOrganizationsActivitiesCount(long userId)
667                    throws com.liferay.portal.kernel.exception.SystemException {
668                    return getService().getUserGroupsAndOrganizationsActivitiesCount(userId);
669            }
670    
671            /**
672            * Returns a range of all activities done in the user's organizations. This
673            * method only finds activities without mirrors.
674            *
675            * <p>
676            * Useful when paginating results. Returns a maximum of <code>end -
677            * start</code> instances. <code>start</code> and <code>end</code> are not
678            * primary keys, they are indexes in the result set. Thus, <code>0</code>
679            * refers to the first result in the set. Setting both <code>start</code>
680            * and <code>end</code> to {@link
681            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
682            * result set.
683            * </p>
684            *
685            * @param userId the primary key of the user
686            * @param start the lower bound of the range of results
687            * @param end the upper bound of the range of results (not inclusive)
688            * @return the range of matching activities
689            * @throws PortalException if a permission checker was not initialized
690            * @throws SystemException if a system exception occurred
691            */
692            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserOrganizationsActivities(
693                    long userId, int start, int end)
694                    throws com.liferay.portal.kernel.exception.PortalException,
695                            com.liferay.portal.kernel.exception.SystemException {
696                    return getService().getUserOrganizationsActivities(userId, start, end);
697            }
698    
699            /**
700            * Returns the number of activities done in the user's organizations. This
701            * method only counts activities without mirrors.
702            *
703            * @param userId the primary key of the user
704            * @return the number of matching activities
705            * @throws SystemException if a system exception occurred
706            */
707            public static int getUserOrganizationsActivitiesCount(long userId)
708                    throws com.liferay.portal.kernel.exception.SystemException {
709                    return getService().getUserOrganizationsActivitiesCount(userId);
710            }
711    
712            public static SocialActivityService getService() {
713                    if (_service == null) {
714                            _service = (SocialActivityService)PortalBeanLocatorUtil.locate(SocialActivityService.class.getName());
715    
716                            ReferenceRegistry.registerReference(SocialActivityServiceUtil.class,
717                                    "_service");
718                    }
719    
720                    return _service;
721            }
722    
723            /**
724             * @deprecated As of 6.2.0
725             */
726            public void setService(SocialActivityService service) {
727            }
728    
729            private static SocialActivityService _service;
730    }