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