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