001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the social activity local service. This utility wraps {@link com.liferay.portlet.social.service.impl.SocialActivityLocalServiceImpl} and is the primary access point for service operations in application layer code running on the local server.
023     *
024     * <p>
025     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see SocialActivityLocalService
030     * @see com.liferay.portlet.social.service.base.SocialActivityLocalServiceBaseImpl
031     * @see com.liferay.portlet.social.service.impl.SocialActivityLocalServiceImpl
032     * @generated
033     */
034    public class SocialActivityLocalServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.social.service.impl.SocialActivityLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Adds the social activity to the database. Also notifies the appropriate model listeners.
043            *
044            * @param socialActivity the social activity
045            * @return the social activity that was added
046            * @throws SystemException if a system exception occurred
047            */
048            public static com.liferay.portlet.social.model.SocialActivity addSocialActivity(
049                    com.liferay.portlet.social.model.SocialActivity socialActivity)
050                    throws com.liferay.portal.kernel.exception.SystemException {
051                    return getService().addSocialActivity(socialActivity);
052            }
053    
054            /**
055            * Creates a new social activity with the primary key. Does not add the social activity to the database.
056            *
057            * @param activityId the primary key for the new social activity
058            * @return the new social activity
059            */
060            public static com.liferay.portlet.social.model.SocialActivity createSocialActivity(
061                    long activityId) {
062                    return getService().createSocialActivity(activityId);
063            }
064    
065            /**
066            * Deletes the social activity with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param activityId the primary key of the social activity
069            * @throws PortalException if a social activity with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public static void deleteSocialActivity(long activityId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    getService().deleteSocialActivity(activityId);
076            }
077    
078            /**
079            * Deletes the social activity from the database. Also notifies the appropriate model listeners.
080            *
081            * @param socialActivity the social activity
082            * @throws SystemException if a system exception occurred
083            */
084            public static void deleteSocialActivity(
085                    com.liferay.portlet.social.model.SocialActivity socialActivity)
086                    throws com.liferay.portal.kernel.exception.SystemException {
087                    getService().deleteSocialActivity(socialActivity);
088            }
089    
090            /**
091            * Performs a dynamic query on the database and returns the matching rows.
092            *
093            * @param dynamicQuery the dynamic query
094            * @return the matching rows
095            * @throws SystemException if a system exception occurred
096            */
097            @SuppressWarnings("rawtypes")
098            public static java.util.List dynamicQuery(
099                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getService().dynamicQuery(dynamicQuery);
102            }
103    
104            /**
105            * Performs a dynamic query on the database and returns a range of the matching rows.
106            *
107            * <p>
108            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
109            * </p>
110            *
111            * @param dynamicQuery the dynamic query
112            * @param start the lower bound of the range of model instances
113            * @param end the upper bound of the range of model instances (not inclusive)
114            * @return the range of matching rows
115            * @throws SystemException if a system exception occurred
116            */
117            @SuppressWarnings("rawtypes")
118            public static java.util.List dynamicQuery(
119                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120                    int end) throws com.liferay.portal.kernel.exception.SystemException {
121                    return getService().dynamicQuery(dynamicQuery, start, end);
122            }
123    
124            /**
125            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
126            *
127            * <p>
128            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
129            * </p>
130            *
131            * @param dynamicQuery the dynamic query
132            * @param start the lower bound of the range of model instances
133            * @param end the upper bound of the range of model instances (not inclusive)
134            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
135            * @return the ordered range of matching rows
136            * @throws SystemException if a system exception occurred
137            */
138            @SuppressWarnings("rawtypes")
139            public static java.util.List dynamicQuery(
140                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141                    int end,
142                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    return getService()
145                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146            }
147    
148            /**
149            * Returns the number of rows that match the dynamic query.
150            *
151            * @param dynamicQuery the dynamic query
152            * @return the number of rows that match the dynamic query
153            * @throws SystemException if a system exception occurred
154            */
155            public static long dynamicQueryCount(
156                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157                    throws com.liferay.portal.kernel.exception.SystemException {
158                    return getService().dynamicQueryCount(dynamicQuery);
159            }
160    
161            public static com.liferay.portlet.social.model.SocialActivity fetchSocialActivity(
162                    long activityId)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getService().fetchSocialActivity(activityId);
165            }
166    
167            /**
168            * Returns the social activity with the primary key.
169            *
170            * @param activityId the primary key of the social activity
171            * @return the social activity
172            * @throws PortalException if a social activity with the primary key could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portlet.social.model.SocialActivity getSocialActivity(
176                    long activityId)
177                    throws com.liferay.portal.kernel.exception.PortalException,
178                            com.liferay.portal.kernel.exception.SystemException {
179                    return getService().getSocialActivity(activityId);
180            }
181    
182            public static com.liferay.portal.model.PersistedModel getPersistedModel(
183                    java.io.Serializable primaryKeyObj)
184                    throws com.liferay.portal.kernel.exception.PortalException,
185                            com.liferay.portal.kernel.exception.SystemException {
186                    return getService().getPersistedModel(primaryKeyObj);
187            }
188    
189            /**
190            * Returns a range of all the social activities.
191            *
192            * <p>
193            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
194            * </p>
195            *
196            * @param start the lower bound of the range of social activities
197            * @param end the upper bound of the range of social activities (not inclusive)
198            * @return the range of social activities
199            * @throws SystemException if a system exception occurred
200            */
201            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getSocialActivities(
202                    int start, int end)
203                    throws com.liferay.portal.kernel.exception.SystemException {
204                    return getService().getSocialActivities(start, end);
205            }
206    
207            /**
208            * Returns the number of social activities.
209            *
210            * @return the number of social activities
211            * @throws SystemException if a system exception occurred
212            */
213            public static int getSocialActivitiesCount()
214                    throws com.liferay.portal.kernel.exception.SystemException {
215                    return getService().getSocialActivitiesCount();
216            }
217    
218            /**
219            * Updates the social activity in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
220            *
221            * @param socialActivity the social activity
222            * @return the social activity that was updated
223            * @throws SystemException if a system exception occurred
224            */
225            public static com.liferay.portlet.social.model.SocialActivity updateSocialActivity(
226                    com.liferay.portlet.social.model.SocialActivity socialActivity)
227                    throws com.liferay.portal.kernel.exception.SystemException {
228                    return getService().updateSocialActivity(socialActivity);
229            }
230    
231            /**
232            * Updates the social activity in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
233            *
234            * @param socialActivity the social activity
235            * @param merge whether to merge the social activity with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
236            * @return the social activity that was updated
237            * @throws SystemException if a system exception occurred
238            */
239            public static com.liferay.portlet.social.model.SocialActivity updateSocialActivity(
240                    com.liferay.portlet.social.model.SocialActivity socialActivity,
241                    boolean merge)
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return getService().updateSocialActivity(socialActivity, merge);
244            }
245    
246            /**
247            * Returns the Spring bean ID for this bean.
248            *
249            * @return the Spring bean ID for this bean
250            */
251            public static java.lang.String getBeanIdentifier() {
252                    return getService().getBeanIdentifier();
253            }
254    
255            /**
256            * Sets the Spring bean ID for this bean.
257            *
258            * @param beanIdentifier the Spring bean ID for this bean
259            */
260            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
261                    getService().setBeanIdentifier(beanIdentifier);
262            }
263    
264            /**
265            * Records an activity with the given time in the database.
266            *
267            * <p>
268            * This method records a social activity done on an asset, identified by its
269            * class name and class primary key, in the database. Additional information
270            * (such as the original message ID for a reply to a forum post) is passed
271            * in via the <code>extraData</code> in JSON format. For activities
272            * affecting another user, a mirror activity is generated that describes the
273            * action from the user's point of view. The target user's ID is passed in
274            * via the <code>receiverUserId</code>.
275            * </p>
276            *
277            * <p>
278            * Example for a mirrored activity:<br> When a user replies to a message
279            * boards post, the reply action is stored in the database with the
280            * <code>receiverUserId</code> being the ID of the author of the original
281            * message. The <code>extraData</code> contains the ID of the original
282            * message in JSON format. A mirror activity is generated with the values of
283            * the <code>userId</code> and the <code>receiverUserId</code> swapped. This
284            * mirror activity basically describes a "replied to" event.
285            * </p>
286            *
287            * <p>
288            * Mirror activities are most often used in relation to friend requests and
289            * activities.
290            * </p>
291            *
292            * @param userId the primary key of the acting user
293            * @param groupId the primary key of the group
294            * @param createDate the activity's date
295            * @param className the target asset's class name
296            * @param classPK the primary key of the target asset
297            * @param type the activity's type
298            * @param extraData any extra data regarding the activity
299            * @param receiverUserId the primary key of the receiving user
300            * @throws PortalException if the user or group could not be found
301            * @throws SystemException if a system exception occurred
302            */
303            public static void addActivity(long userId, long groupId,
304                    java.util.Date createDate, java.lang.String className, long classPK,
305                    int type, java.lang.String extraData, long receiverUserId)
306                    throws com.liferay.portal.kernel.exception.PortalException,
307                            com.liferay.portal.kernel.exception.SystemException {
308                    getService()
309                            .addActivity(userId, groupId, createDate, className, classPK, type,
310                            extraData, receiverUserId);
311            }
312    
313            /**
314            * Records an activity in the database, using a time based on the current
315            * time in an attempt to make the activity's time unique.
316            *
317            * @param userId the primary key of the acting user
318            * @param groupId the primary key of the group
319            * @param className the target asset's class name
320            * @param classPK the primary key of the target asset
321            * @param type the activity's type
322            * @param extraData any extra data regarding the activity
323            * @param receiverUserId the primary key of the receiving user
324            * @throws PortalException if the user or group could not be found
325            * @throws SystemException if a system exception occurred
326            */
327            public static void addActivity(long userId, long groupId,
328                    java.lang.String className, long classPK, int type,
329                    java.lang.String extraData, long receiverUserId)
330                    throws com.liferay.portal.kernel.exception.PortalException,
331                            com.liferay.portal.kernel.exception.SystemException {
332                    getService()
333                            .addActivity(userId, groupId, className, classPK, type, extraData,
334                            receiverUserId);
335            }
336    
337            public static void addActivity(
338                    com.liferay.portlet.social.model.SocialActivity activity,
339                    com.liferay.portlet.social.model.SocialActivity mirrorActivity)
340                    throws com.liferay.portal.kernel.exception.PortalException,
341                            com.liferay.portal.kernel.exception.SystemException {
342                    getService().addActivity(activity, mirrorActivity);
343            }
344    
345            /**
346            * Records an activity in the database, but only if there isn't already an
347            * activity with the same parameters.
348            *
349            * <p>
350            * For the main functionality see {@link #addActivity(long, long, Date,
351            * String, long, int, String, long)}
352            * </p>
353            *
354            * @param userId the primary key of the acting user
355            * @param groupId the primary key of the group
356            * @param createDate the activity's date
357            * @param className the target asset's class name
358            * @param classPK the primary key of the target asset
359            * @param type the activity's type
360            * @param extraData any extra data regarding the activity
361            * @param receiverUserId the primary key of the receiving user
362            * @throws PortalException if the user or group could not be found
363            * @throws SystemException if a system exception occurred
364            */
365            public static void addUniqueActivity(long userId, long groupId,
366                    java.util.Date createDate, java.lang.String className, long classPK,
367                    int type, java.lang.String extraData, long receiverUserId)
368                    throws com.liferay.portal.kernel.exception.PortalException,
369                            com.liferay.portal.kernel.exception.SystemException {
370                    getService()
371                            .addUniqueActivity(userId, groupId, createDate, className, classPK,
372                            type, extraData, receiverUserId);
373            }
374    
375            /**
376            * Records an activity with the current time in the database, but only if
377            * there isn't one with the same parameters.
378            *
379            * <p>
380            * For the main functionality see {@link #addActivity(long, long, Date,
381            * String, long, int, String, long)}
382            * </p>
383            *
384            * @param userId the primary key of the acting user
385            * @param groupId the primary key of the group
386            * @param className the target asset's class name
387            * @param classPK the primary key of the target asset
388            * @param type the activity's type
389            * @param extraData any extra data regarding the activity
390            * @param receiverUserId the primary key of the receiving user
391            * @throws PortalException if the user or group could not be found
392            * @throws SystemException if a system exception occurred
393            */
394            public static void addUniqueActivity(long userId, long groupId,
395                    java.lang.String className, long classPK, int type,
396                    java.lang.String extraData, long receiverUserId)
397                    throws com.liferay.portal.kernel.exception.PortalException,
398                            com.liferay.portal.kernel.exception.SystemException {
399                    getService()
400                            .addUniqueActivity(userId, groupId, className, classPK, type,
401                            extraData, receiverUserId);
402            }
403    
404            /**
405            * Removes stored activities for the asset identified by the class name ID
406            * and class primary key.
407            *
408            * @throws SystemException if a system exception occurred
409            */
410            public static void deleteActivities(
411                    com.liferay.portlet.asset.model.AssetEntry assetEntry)
412                    throws com.liferay.portal.kernel.exception.PortalException,
413                            com.liferay.portal.kernel.exception.SystemException {
414                    getService().deleteActivities(assetEntry);
415            }
416    
417            /**
418            * Removes stored activities for the asset identified by the class name and
419            * class primary key.
420            *
421            * @param className the target asset's class name
422            * @param classPK the primary key of the target asset
423            * @throws SystemException if a system exception occurred
424            */
425            public static void deleteActivities(java.lang.String className, long classPK)
426                    throws com.liferay.portal.kernel.exception.SystemException {
427                    getService().deleteActivities(className, classPK);
428            }
429    
430            /**
431            * Removes the stored activity from the database.
432            *
433            * @param activityId the primary key of the stored activity
434            * @throws PortalException if the activity could not be found
435            * @throws SystemException if a system exception occurred
436            */
437            public static void deleteActivity(long activityId)
438                    throws com.liferay.portal.kernel.exception.PortalException,
439                            com.liferay.portal.kernel.exception.SystemException {
440                    getService().deleteActivity(activityId);
441            }
442    
443            /**
444            * Removes the stored activity and its mirror activity from the database.
445            *
446            * @param activity the activity to be removed
447            * @throws SystemException if a system exception occurred
448            */
449            public static void deleteActivity(
450                    com.liferay.portlet.social.model.SocialActivity activity)
451                    throws com.liferay.portal.kernel.exception.SystemException {
452                    getService().deleteActivity(activity);
453            }
454    
455            /**
456            * Removes the user's stored activities from the database.
457            *
458            * <p>
459            * This method removes all activities where the user is either the actor or
460            * the receiver.
461            * </p>
462            *
463            * @param userId the primary key of the user
464            * @throws SystemException if a system exception occurred
465            */
466            public static void deleteUserActivities(long userId)
467                    throws com.liferay.portal.kernel.exception.SystemException {
468                    getService().deleteUserActivities(userId);
469            }
470    
471            /**
472            * Returns a range of all the activities done on assets identified by the
473            * class name ID.
474            *
475            * <p>
476            * Useful when paginating results. Returns a maximum of <code>end -
477            * start</code> instances. <code>start</code> and <code>end</code> are not
478            * primary keys, they are indexes in the result set. Thus, <code>0</code>
479            * refers to the first result in the set. Setting both <code>start</code>
480            * and <code>end</code> to {@link
481            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
482            * result set.
483            * </p>
484            *
485            * @param classNameId the target asset's class name ID
486            * @param start the lower bound of the range of results
487            * @param end the upper bound of the range of results (not inclusive)
488            * @return the range of matching activities
489            * @throws SystemException if a system exception occurred
490            */
491            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
492                    long classNameId, int start, int end)
493                    throws com.liferay.portal.kernel.exception.SystemException {
494                    return getService().getActivities(classNameId, start, end);
495            }
496    
497            /**
498            * Returns a range of all the activities done on the asset identified by the
499            * class name ID and class primary key that are mirrors of the activity
500            * identified by the mirror activity ID.
501            *
502            * <p>
503            * Useful when paginating results. Returns a maximum of <code>end -
504            * start</code> instances. <code>start</code> and <code>end</code> are not
505            * primary keys, they are indexes in the result set. Thus, <code>0</code>
506            * refers to the first result in the set. Setting both <code>start</code>
507            * and <code>end</code> to {@link
508            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
509            * result set.
510            * </p>
511            *
512            * @param mirrorActivityId the primary key of the mirror activity
513            * @param classNameId the target asset's class name ID
514            * @param classPK the primary key of the target asset
515            * @param start the lower bound of the range of results
516            * @param end the upper bound of the range of results (not inclusive)
517            * @return the range of matching activities
518            * @throws SystemException if a system exception occurred
519            */
520            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
521                    long mirrorActivityId, long classNameId, long classPK, int start,
522                    int end) throws com.liferay.portal.kernel.exception.SystemException {
523                    return getService()
524                                       .getActivities(mirrorActivityId, classNameId, classPK,
525                            start, end);
526            }
527    
528            /**
529            * Returns a range of all the activities done on the asset identified by the
530            * class name and the class primary key that are mirrors of the activity
531            * identified by the mirror activity ID.
532            *
533            * <p>
534            * Useful when paginating results. Returns a maximum of <code>end -
535            * start</code> instances. <code>start</code> and <code>end</code> are not
536            * primary keys, they are indexes in the result set. Thus, <code>0</code>
537            * refers to the first result in the set. Setting both <code>start</code>
538            * and <code>end</code> to {@link
539            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
540            * result set.
541            * </p>
542            *
543            * @param mirrorActivityId the primary key of the mirror activity
544            * @param className the target asset's class name
545            * @param classPK the primary key of the target asset
546            * @param start the lower bound of the range of results
547            * @param end the upper bound of the range of results (not inclusive)
548            * @return the range of matching activities
549            * @throws SystemException if a system exception occurred
550            */
551            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
552                    long mirrorActivityId, java.lang.String className, long classPK,
553                    int start, int end)
554                    throws com.liferay.portal.kernel.exception.SystemException {
555                    return getService()
556                                       .getActivities(mirrorActivityId, className, classPK, start,
557                            end);
558            }
559    
560            /**
561            * Returns a range of all the activities done on assets identified by the
562            * class name.
563            *
564            * <p>
565            * Useful when paginating results. Returns a maximum of <code>end -
566            * start</code> instances. <code>start</code> and <code>end</code> are not
567            * primary keys, they are indexes in the result set. Thus, <code>0</code>
568            * refers to the first result in the set. Setting both <code>start</code>
569            * and <code>end</code> to {@link
570            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
571            * result set.
572            * </p>
573            *
574            * @param className the target asset's class name
575            * @param start the lower bound of the range of results
576            * @param end the upper bound of the range of results (not inclusive)
577            * @return the range of matching activities
578            * @throws SystemException if a system exception occurred
579            */
580            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
581                    java.lang.String className, int start, int end)
582                    throws com.liferay.portal.kernel.exception.SystemException {
583                    return getService().getActivities(className, start, end);
584            }
585    
586            /**
587            * Returns the number of activities done on assets identified by the class
588            * name ID.
589            *
590            * @param classNameId the target asset's class name ID
591            * @return the number of matching activities
592            * @throws SystemException if a system exception occurred
593            */
594            public static int getActivitiesCount(long classNameId)
595                    throws com.liferay.portal.kernel.exception.SystemException {
596                    return getService().getActivitiesCount(classNameId);
597            }
598    
599            /**
600            * Returns the number of activities done on the asset identified by the
601            * class name ID and class primary key that are mirrors of the activity
602            * identified by the mirror activity ID.
603            *
604            * @param mirrorActivityId the primary key of the mirror activity
605            * @param classNameId the target asset's class name ID
606            * @param classPK the primary key of the target asset
607            * @return the number of matching activities
608            * @throws SystemException if a system exception occurred
609            */
610            public static int getActivitiesCount(long mirrorActivityId,
611                    long classNameId, long classPK)
612                    throws com.liferay.portal.kernel.exception.SystemException {
613                    return getService()
614                                       .getActivitiesCount(mirrorActivityId, classNameId, classPK);
615            }
616    
617            /**
618            * Returns the number of activities done on the asset identified by the
619            * class name and class primary key that are mirrors of the activity
620            * identified by the mirror activity ID.
621            *
622            * @param mirrorActivityId the primary key of the mirror activity
623            * @param className the target asset's class name
624            * @param classPK the primary key of the target asset
625            * @return the number of matching activities
626            * @throws SystemException if a system exception occurred
627            */
628            public static int getActivitiesCount(long mirrorActivityId,
629                    java.lang.String className, long classPK)
630                    throws com.liferay.portal.kernel.exception.SystemException {
631                    return getService()
632                                       .getActivitiesCount(mirrorActivityId, className, classPK);
633            }
634    
635            /**
636            * Returns the number of activities done on assets identified by class name.
637            *
638            * @param className the target asset's class name
639            * @return the number of matching activities
640            * @throws SystemException if a system exception occurred
641            */
642            public static int getActivitiesCount(java.lang.String className)
643                    throws com.liferay.portal.kernel.exception.SystemException {
644                    return getService().getActivitiesCount(className);
645            }
646    
647            /**
648            * Returns the activity identified by its primary key.
649            *
650            * @param activityId the primary key of the activity
651            * @return Returns the activity
652            * @throws PortalException if the activity could not be found
653            * @throws SystemException if a system exception occurred
654            */
655            public static com.liferay.portlet.social.model.SocialActivity getActivity(
656                    long activityId)
657                    throws com.liferay.portal.kernel.exception.PortalException,
658                            com.liferay.portal.kernel.exception.SystemException {
659                    return getService().getActivity(activityId);
660            }
661    
662            /**
663            * Returns a range of all the activities done in the group.
664            *
665            * <p>
666            * This method only finds activities without mirrors.
667            * </p>
668            *
669            * <p>
670            * Useful when paginating results. Returns a maximum of <code>end -
671            * start</code> instances. <code>start</code> and <code>end</code> are not
672            * primary keys, they are indexes in the result set. Thus, <code>0</code>
673            * refers to the first result in the set. Setting both <code>start</code>
674            * and <code>end</code> to {@link
675            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
676            * result set.
677            * </p>
678            *
679            * @param groupId the primary key of the group
680            * @param start the lower bound of the range of results
681            * @param end the upper bound of the range of results (not inclusive)
682            * @return the range of matching activities
683            * @throws SystemException if a system exception occurred
684            */
685            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupActivities(
686                    long groupId, int start, int end)
687                    throws com.liferay.portal.kernel.exception.SystemException {
688                    return getService().getGroupActivities(groupId, start, end);
689            }
690    
691            /**
692            * Returns the number of activities done in the group.
693            *
694            * <p>
695            * This method only counts activities without mirrors.
696            * </p>
697            *
698            * @param groupId the primary key of the group
699            * @return the number of matching activities
700            * @throws SystemException if a system exception occurred
701            */
702            public static int getGroupActivitiesCount(long groupId)
703                    throws com.liferay.portal.kernel.exception.SystemException {
704                    return getService().getGroupActivitiesCount(groupId);
705            }
706    
707            /**
708            * Returns a range of activities done by users that are members of the
709            * group.
710            *
711            * <p>
712            * This method only finds activities without mirrors.
713            * </p>
714            *
715            * <p>
716            * Useful when paginating results. Returns a maximum of <code>end -
717            * start</code> instances. <code>start</code> and <code>end</code> are not
718            * primary keys, they are indexes in the result set. Thus, <code>0</code>
719            * refers to the first result in the set. Setting both <code>start</code>
720            * and <code>end</code> to {@link
721            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
722            * result set.
723            * </p>
724            *
725            * @param groupId the primary key of the group
726            * @param start the lower bound of the range of results
727            * @param end the upper bound of the range of results (not inclusive)
728            * @return the range of matching activities
729            * @throws SystemException if a system exception occurred
730            */
731            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupUsersActivities(
732                    long groupId, int start, int end)
733                    throws com.liferay.portal.kernel.exception.SystemException {
734                    return getService().getGroupUsersActivities(groupId, start, end);
735            }
736    
737            /**
738            * Returns the number of activities done by users that are members of the
739            * group.
740            *
741            * <p>
742            * This method only counts activities without mirrors.
743            * </p>
744            *
745            * @param groupId the primary key of the group
746            * @return the number of matching activities
747            * @throws SystemException if a system exception occurred
748            */
749            public static int getGroupUsersActivitiesCount(long groupId)
750                    throws com.liferay.portal.kernel.exception.SystemException {
751                    return getService().getGroupUsersActivitiesCount(groupId);
752            }
753    
754            /**
755            * Returns the activity that has the mirror activity.
756            *
757            * @param mirrorActivityId the primary key of the mirror activity
758            * @return Returns the mirror activity
759            * @throws PortalException if the mirror activity could not be found
760            * @throws SystemException if a system exception occurred
761            */
762            public static com.liferay.portlet.social.model.SocialActivity getMirrorActivity(
763                    long mirrorActivityId)
764                    throws com.liferay.portal.kernel.exception.PortalException,
765                            com.liferay.portal.kernel.exception.SystemException {
766                    return getService().getMirrorActivity(mirrorActivityId);
767            }
768    
769            /**
770            * Returns a range of all the activities done in the organization. This
771            * method only finds activities without mirrors.
772            *
773            * <p>
774            * Useful when paginating results. Returns a maximum of <code>end -
775            * start</code> instances. <code>start</code> and <code>end</code> are not
776            * primary keys, they are indexes in the result set. Thus, <code>0</code>
777            * refers to the first result in the set. Setting both <code>start</code>
778            * and <code>end</code> to {@link
779            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
780            * result set.
781            * </p>
782            *
783            * @param organizationId the primary key of the organization
784            * @param start the lower bound of the range of results
785            * @param end the upper bound of the range of results (not inclusive)
786            * @return the range of matching activities
787            * @throws SystemException if a system exception occurred
788            */
789            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities(
790                    long organizationId, int start, int end)
791                    throws com.liferay.portal.kernel.exception.SystemException {
792                    return getService().getOrganizationActivities(organizationId, start, end);
793            }
794    
795            /**
796            * Returns the number of activities done in the organization. This method
797            * only counts activities without mirrors.
798            *
799            * @param organizationId the primary key of the organization
800            * @return the number of matching activities
801            * @throws SystemException if a system exception occurred
802            */
803            public static int getOrganizationActivitiesCount(long organizationId)
804                    throws com.liferay.portal.kernel.exception.SystemException {
805                    return getService().getOrganizationActivitiesCount(organizationId);
806            }
807    
808            /**
809            * Returns a range of all the activities done by users of the organization.
810            * This method only finds activities without mirrors.
811            *
812            * <p>
813            * Useful when paginating results. Returns a maximum of <code>end -
814            * start</code> instances. <code>start</code> and <code>end</code> are not
815            * primary keys, they are indexes in the result set. Thus, <code>0</code>
816            * refers to the first result in the set. Setting both <code>start</code>
817            * and <code>end</code> to {@link
818            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
819            * result set.
820            * </p>
821            *
822            * @param organizationId the primary key of the organization
823            * @param start the lower bound of the range of results
824            * @param end the upper bound of the range of results (not inclusive)
825            * @return the range of matching activities
826            * @throws SystemException if a system exception occurred
827            */
828            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities(
829                    long organizationId, int start, int end)
830                    throws com.liferay.portal.kernel.exception.SystemException {
831                    return getService()
832                                       .getOrganizationUsersActivities(organizationId, start, end);
833            }
834    
835            /**
836            * Returns the number of activities done by users of the organization. This
837            * method only counts activities without mirrors.
838            *
839            * @param organizationId the primary key of the organization
840            * @return the number of matching activities
841            * @throws SystemException if a system exception occurred
842            */
843            public static int getOrganizationUsersActivitiesCount(long organizationId)
844                    throws com.liferay.portal.kernel.exception.SystemException {
845                    return getService().getOrganizationUsersActivitiesCount(organizationId);
846            }
847    
848            /**
849            * Returns a range of all the activities done by users in a relationship
850            * with the user identified by the user ID.
851            *
852            * <p>
853            * Useful when paginating results. Returns a maximum of <code>end -
854            * start</code> instances. <code>start</code> and <code>end</code> are not
855            * primary keys, they are indexes in the result set. Thus, <>0</code> refers
856            * to the first result in the set. Setting both <code>start</code> and
857            * <code>end</code> to {@link
858            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
859            * result set.
860            * </p>
861            *
862            * @param userId the primary key of the user
863            * @param start the lower bound of the range of results
864            * @param end the upper bound of the range of results (not inclusive)
865            * @return the range of matching activities
866            * @throws SystemException if a system exception occurred
867            */
868            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
869                    long userId, int start, int end)
870                    throws com.liferay.portal.kernel.exception.SystemException {
871                    return getService().getRelationActivities(userId, start, end);
872            }
873    
874            /**
875            * Returns a range of all the activities done by users in a relationship of
876            * type <code>type</code> with the user identified by <code>userId</code>.
877            * This method only finds activities without mirrors.
878            *
879            * <p>
880            * Useful when paginating results. Returns a maximum of <code>end -
881            * start</code> instances. <code>start</code> and <code>end</code> are not
882            * primary keys, they are indexes in the result set. Thus, <code>0</code>
883            * refers to the first result in the set. Setting both <code>start</code>
884            * and <code>end</code> to {@link
885            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
886            * result set.
887            * </p>
888            *
889            * @param userId the primary key of the user
890            * @param type the relationship type
891            * @param start the lower bound of the range of results
892            * @param end the upper bound of the range of results (not inclusive)
893            * @return the range of matching activities
894            * @throws SystemException if a system exception occurred
895            */
896            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
897                    long userId, int type, int start, int end)
898                    throws com.liferay.portal.kernel.exception.SystemException {
899                    return getService().getRelationActivities(userId, type, start, end);
900            }
901    
902            /**
903            * Returns the number of activities done by users in a relationship with the
904            * user identified by userId.
905            *
906            * @param userId the primary key of the user
907            * @return the number of matching activities
908            * @throws SystemException if a system exception occurred
909            */
910            public static int getRelationActivitiesCount(long userId)
911                    throws com.liferay.portal.kernel.exception.SystemException {
912                    return getService().getRelationActivitiesCount(userId);
913            }
914    
915            /**
916            * Returns the number of activities done by users in a relationship of type
917            * <code>type</code> with the user identified by <code>userId</code>. This
918            * method only counts activities without mirrors.
919            *
920            * @param userId the primary key of the user
921            * @param type the relationship type
922            * @return the number of matching activities
923            * @throws SystemException if a system exception occurred
924            */
925            public static int getRelationActivitiesCount(long userId, int type)
926                    throws com.liferay.portal.kernel.exception.SystemException {
927                    return getService().getRelationActivitiesCount(userId, type);
928            }
929    
930            /**
931            * Returns a range of all the activities done by the user.
932            *
933            * <p>
934            * Useful when paginating results. Returns a maximum of <code>end -
935            * start</code> instances. <code>start</code> and <code>end</code> are not
936            * primary keys, they are indexes in the result set. Thus, <code>0</code>
937            * refers to the first result in the set. Setting both <code>start</code>
938            * and <code>end</code> to {@link
939            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
940            * result set.
941            * </p>
942            *
943            * @param userId the primary key of the user
944            * @param start the lower bound of the range of results
945            * @param end the upper bound of the range of results (not inclusive)
946            * @return the range of matching activities
947            * @throws SystemException if a system exception occurred
948            */
949            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities(
950                    long userId, int start, int end)
951                    throws com.liferay.portal.kernel.exception.SystemException {
952                    return getService().getUserActivities(userId, start, end);
953            }
954    
955            /**
956            * Returns the number of activities done by the user.
957            *
958            * @param userId the primary key of the user
959            * @return the number of matching activities
960            * @throws SystemException if a system exception occurred
961            */
962            public static int getUserActivitiesCount(long userId)
963                    throws com.liferay.portal.kernel.exception.SystemException {
964                    return getService().getUserActivitiesCount(userId);
965            }
966    
967            /**
968            * Returns a range of all the activities done in the user's groups. This
969            * method only finds activities without mirrors.
970            *
971            * <p>
972            * Useful when paginating results. Returns a maximum of <code>end -
973            * start</code> instances. <code>start</code> and <code>end</code> are not
974            * primary keys, they are indexes in the result set. Thus, <code>0</code>
975            * refers to the first result in the set. Setting both <code>start</code>
976            * and <code>end</code> to {@link
977            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
978            * result set.
979            * </p>
980            *
981            * @param userId the primary key of the user
982            * @param start the lower bound of the range of results
983            * @param end the upper bound of the range of results (not inclusive)
984            * @return the range of matching activities
985            * @throws SystemException if a system exception occurred
986            */
987            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities(
988                    long userId, int start, int end)
989                    throws com.liferay.portal.kernel.exception.SystemException {
990                    return getService().getUserGroupsActivities(userId, start, end);
991            }
992    
993            /**
994            * Returns the number of activities done in user's groups. This method only
995            * counts activities without mirrors.
996            *
997            * @param userId the primary key of the user
998            * @return the number of matching activities
999            * @throws SystemException if a system exception occurred
1000            */
1001            public static int getUserGroupsActivitiesCount(long userId)
1002                    throws com.liferay.portal.kernel.exception.SystemException {
1003                    return getService().getUserGroupsActivitiesCount(userId);
1004            }
1005    
1006            /**
1007            * Returns a range of all the activities done in the user's groups and
1008            * organizations. This method only finds activities without mirrors.
1009            *
1010            * <p>
1011            * Useful when paginating results. Returns a maximum of <code>end -
1012            * start</code> instances. <code>start</code> and <code>end</code> are not
1013            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1014            * refers to the first result in the set. Setting both <code>start</code>
1015            * and <code>end</code> to {@link
1016            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1017            * result set.
1018            * </p>
1019            *
1020            * @param userId the primary key of the user
1021            * @param start the lower bound of the range of results
1022            * @param end the upper bound of the range of results (not inclusive)
1023            * @return the range of matching activities
1024            * @throws SystemException if a system exception occurred
1025            */
1026            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsAndOrganizationsActivities(
1027                    long userId, int start, int end)
1028                    throws com.liferay.portal.kernel.exception.SystemException {
1029                    return getService()
1030                                       .getUserGroupsAndOrganizationsActivities(userId, start, end);
1031            }
1032    
1033            /**
1034            * Returns the number of activities done in user's groups and organizations.
1035            * This method only counts activities without mirrors.
1036            *
1037            * @param userId the primary key of the user
1038            * @return the number of matching activities
1039            * @throws SystemException if a system exception occurred
1040            */
1041            public static int getUserGroupsAndOrganizationsActivitiesCount(long userId)
1042                    throws com.liferay.portal.kernel.exception.SystemException {
1043                    return getService().getUserGroupsAndOrganizationsActivitiesCount(userId);
1044            }
1045    
1046            /**
1047            * Returns a range of all activities done in the user's organizations. This
1048            * method only finds activities without mirrors.
1049            *
1050            * <p>
1051            * Useful when paginating results. Returns a maximum of <code>end -
1052            * start</code> instances. <code>start</code> and <code>end</code> are not
1053            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1054            * refers to the first result in the set. Setting both <code>start</code>
1055            * and <code>end</code> to {@link
1056            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1057            * result set.
1058            * </p>
1059            *
1060            * @param userId the primary key of the user
1061            * @param start the lower bound of the range of results
1062            * @param end the upper bound of the range of results (not inclusive)
1063            * @return the range of matching activities
1064            * @throws SystemException if a system exception occurred
1065            */
1066            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserOrganizationsActivities(
1067                    long userId, int start, int end)
1068                    throws com.liferay.portal.kernel.exception.SystemException {
1069                    return getService().getUserOrganizationsActivities(userId, start, end);
1070            }
1071    
1072            /**
1073            * Returns the number of activities done in the user's organizations. This
1074            * method only counts activities without mirrors.
1075            *
1076            * @param userId the primary key of the user
1077            * @return the number of matching activities
1078            * @throws SystemException if a system exception occurred
1079            */
1080            public static int getUserOrganizationsActivitiesCount(long userId)
1081                    throws com.liferay.portal.kernel.exception.SystemException {
1082                    return getService().getUserOrganizationsActivitiesCount(userId);
1083            }
1084    
1085            public static SocialActivityLocalService getService() {
1086                    if (_service == null) {
1087                            _service = (SocialActivityLocalService)PortalBeanLocatorUtil.locate(SocialActivityLocalService.class.getName());
1088    
1089                            ReferenceRegistry.registerReference(SocialActivityLocalServiceUtil.class,
1090                                    "_service");
1091                            MethodCache.remove(SocialActivityLocalService.class);
1092                    }
1093    
1094                    return _service;
1095            }
1096    
1097            public void setService(SocialActivityLocalService service) {
1098                    MethodCache.remove(SocialActivityLocalService.class);
1099    
1100                    _service = service;
1101    
1102                    ReferenceRegistry.registerReference(SocialActivityLocalServiceUtil.class,
1103                            "_service");
1104                    MethodCache.remove(SocialActivityLocalService.class);
1105            }
1106    
1107            private static SocialActivityLocalService _service;
1108    }