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