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.
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.
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.
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            * Updates the social activity in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
239            *
240            * @param socialActivity the social activity
241            * @param merge whether to merge the social activity with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
242            * @return the social activity that was updated
243            * @throws SystemException if a system exception occurred
244            */
245            public static com.liferay.portlet.social.model.SocialActivity updateSocialActivity(
246                    com.liferay.portlet.social.model.SocialActivity socialActivity,
247                    boolean merge)
248                    throws com.liferay.portal.kernel.exception.SystemException {
249                    return getService().updateSocialActivity(socialActivity, merge);
250            }
251    
252            /**
253            * Returns the Spring bean ID for this bean.
254            *
255            * @return the Spring bean ID for this bean
256            */
257            public static java.lang.String getBeanIdentifier() {
258                    return getService().getBeanIdentifier();
259            }
260    
261            /**
262            * Sets the Spring bean ID for this bean.
263            *
264            * @param beanIdentifier the Spring bean ID for this bean
265            */
266            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
267                    getService().setBeanIdentifier(beanIdentifier);
268            }
269    
270            /**
271            * Records an activity with the given time in the database.
272            *
273            * <p>
274            * This method records a social activity done on an asset, identified by its
275            * class name and class primary key, in the database. Additional information
276            * (such as the original message ID for a reply to a forum post) is passed
277            * in via the <code>extraData</code> in JSON format. For activities
278            * affecting another user, a mirror activity is generated that describes the
279            * action from the user's point of view. The target user's ID is passed in
280            * via the <code>receiverUserId</code>.
281            * </p>
282            *
283            * <p>
284            * Example for a mirrored activity:<br> When a user replies to a message
285            * boards post, the reply action is stored in the database with the
286            * <code>receiverUserId</code> being the ID of the author of the original
287            * message. The <code>extraData</code> contains the ID of the original
288            * message in JSON format. A mirror activity is generated with the values of
289            * the <code>userId</code> and the <code>receiverUserId</code> swapped. This
290            * mirror activity basically describes a "replied to" event.
291            * </p>
292            *
293            * <p>
294            * Mirror activities are most often used in relation to friend requests and
295            * activities.
296            * </p>
297            *
298            * @param userId the primary key of the acting user
299            * @param groupId the primary key of the group
300            * @param createDate the activity's date
301            * @param className the target asset's class name
302            * @param classPK the primary key of the target asset
303            * @param type the activity's type
304            * @param extraData any extra data regarding the activity
305            * @param receiverUserId the primary key of the receiving user
306            * @throws PortalException if the user or group could not be found
307            * @throws SystemException if a system exception occurred
308            */
309            public static void addActivity(long userId, long groupId,
310                    java.util.Date createDate, java.lang.String className, long classPK,
311                    int type, java.lang.String extraData, long receiverUserId)
312                    throws com.liferay.portal.kernel.exception.PortalException,
313                            com.liferay.portal.kernel.exception.SystemException {
314                    getService()
315                            .addActivity(userId, groupId, createDate, className, classPK, type,
316                            extraData, receiverUserId);
317            }
318    
319            /**
320            * Records an activity in the database, using a time based on the current
321            * time in an attempt to make the activity's time unique.
322            *
323            * @param userId the primary key of the acting user
324            * @param groupId the primary key of the group
325            * @param className the target asset's class name
326            * @param classPK the primary key of the target asset
327            * @param type the activity's type
328            * @param extraData any extra data regarding the activity
329            * @param receiverUserId the primary key of the receiving user
330            * @throws PortalException if the user or group could not be found
331            * @throws SystemException if a system exception occurred
332            */
333            public static void addActivity(long userId, long groupId,
334                    java.lang.String className, long classPK, int type,
335                    java.lang.String extraData, long receiverUserId)
336                    throws com.liferay.portal.kernel.exception.PortalException,
337                            com.liferay.portal.kernel.exception.SystemException {
338                    getService()
339                            .addActivity(userId, groupId, className, classPK, type, extraData,
340                            receiverUserId);
341            }
342    
343            public static void addActivity(
344                    com.liferay.portlet.social.model.SocialActivity activity,
345                    com.liferay.portlet.social.model.SocialActivity mirrorActivity)
346                    throws com.liferay.portal.kernel.exception.PortalException,
347                            com.liferay.portal.kernel.exception.SystemException {
348                    getService().addActivity(activity, mirrorActivity);
349            }
350    
351            /**
352            * Records an activity in the database, but only if there isn't already an
353            * activity with the same parameters.
354            *
355            * <p>
356            * For the main functionality see {@link #addActivity(long, long, Date,
357            * String, long, int, String, long)}
358            * </p>
359            *
360            * @param userId the primary key of the acting user
361            * @param groupId the primary key of the group
362            * @param createDate the activity's date
363            * @param className the target asset's class name
364            * @param classPK the primary key of the target asset
365            * @param type the activity's type
366            * @param extraData any extra data regarding the activity
367            * @param receiverUserId the primary key of the receiving user
368            * @throws PortalException if the user or group could not be found
369            * @throws SystemException if a system exception occurred
370            */
371            public static void addUniqueActivity(long userId, long groupId,
372                    java.util.Date createDate, java.lang.String className, long classPK,
373                    int type, java.lang.String extraData, long receiverUserId)
374                    throws com.liferay.portal.kernel.exception.PortalException,
375                            com.liferay.portal.kernel.exception.SystemException {
376                    getService()
377                            .addUniqueActivity(userId, groupId, createDate, className, classPK,
378                            type, extraData, receiverUserId);
379            }
380    
381            /**
382            * Records an activity with the current time in the database, but only if
383            * there isn't one with the same parameters.
384            *
385            * <p>
386            * For the main functionality see {@link #addActivity(long, long, Date,
387            * String, long, int, String, long)}
388            * </p>
389            *
390            * @param userId the primary key of the acting user
391            * @param groupId the primary key of the group
392            * @param className the target asset's class name
393            * @param classPK the primary key of the target asset
394            * @param type the activity's type
395            * @param extraData any extra data regarding the activity
396            * @param receiverUserId the primary key of the receiving user
397            * @throws PortalException if the user or group could not be found
398            * @throws SystemException if a system exception occurred
399            */
400            public static void addUniqueActivity(long userId, long groupId,
401                    java.lang.String className, long classPK, int type,
402                    java.lang.String extraData, long receiverUserId)
403                    throws com.liferay.portal.kernel.exception.PortalException,
404                            com.liferay.portal.kernel.exception.SystemException {
405                    getService()
406                            .addUniqueActivity(userId, groupId, className, classPK, type,
407                            extraData, receiverUserId);
408            }
409    
410            /**
411            * Removes stored activities for the asset identified by the class name ID
412            * and class primary key.
413            *
414            * @param assetEntry the asset from which to remove stored activities
415            * @throws PortalException if a portal exception occurred
416            * @throws SystemException if a system exception occurred
417            */
418            public static void deleteActivities(
419                    com.liferay.portlet.asset.model.AssetEntry assetEntry)
420                    throws com.liferay.portal.kernel.exception.PortalException,
421                            com.liferay.portal.kernel.exception.SystemException {
422                    getService().deleteActivities(assetEntry);
423            }
424    
425            /**
426            * Removes stored activities for the asset identified by the class name and
427            * class primary key.
428            *
429            * @param className the target asset's class name
430            * @param classPK the primary key of the target asset
431            * @throws SystemException if a system exception occurred
432            */
433            public static void deleteActivities(java.lang.String className, long classPK)
434                    throws com.liferay.portal.kernel.exception.SystemException {
435                    getService().deleteActivities(className, classPK);
436            }
437    
438            /**
439            * Removes the stored activity from the database.
440            *
441            * @param activityId the primary key of the stored activity
442            * @throws PortalException if the activity could not be found
443            * @throws SystemException if a system exception occurred
444            */
445            public static void deleteActivity(long activityId)
446                    throws com.liferay.portal.kernel.exception.PortalException,
447                            com.liferay.portal.kernel.exception.SystemException {
448                    getService().deleteActivity(activityId);
449            }
450    
451            /**
452            * Removes the stored activity and its mirror activity from the database.
453            *
454            * @param activity the activity to be removed
455            * @throws SystemException if a system exception occurred
456            */
457            public static void deleteActivity(
458                    com.liferay.portlet.social.model.SocialActivity activity)
459                    throws com.liferay.portal.kernel.exception.SystemException {
460                    getService().deleteActivity(activity);
461            }
462    
463            /**
464            * Removes the user's stored activities from the database.
465            *
466            * <p>
467            * This method removes all activities where the user is either the actor or
468            * the receiver.
469            * </p>
470            *
471            * @param userId the primary key of the user
472            * @throws SystemException if a system exception occurred
473            */
474            public static void deleteUserActivities(long userId)
475                    throws com.liferay.portal.kernel.exception.SystemException {
476                    getService().deleteUserActivities(userId);
477            }
478    
479            /**
480            * Returns a range of all the activities done on assets identified by the
481            * class name ID.
482            *
483            * <p>
484            * Useful when paginating results. Returns a maximum of <code>end -
485            * start</code> instances. <code>start</code> and <code>end</code> are not
486            * primary keys, they are indexes in the result set. Thus, <code>0</code>
487            * refers to the first result in the set. Setting both <code>start</code>
488            * and <code>end</code> to {@link
489            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
490            * result set.
491            * </p>
492            *
493            * @param classNameId the target asset's class name ID
494            * @param start the lower bound of the range of results
495            * @param end the upper bound of the range of results (not inclusive)
496            * @return the range of matching activities
497            * @throws SystemException if a system exception occurred
498            */
499            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
500                    long classNameId, int start, int end)
501                    throws com.liferay.portal.kernel.exception.SystemException {
502                    return getService().getActivities(classNameId, start, end);
503            }
504    
505            /**
506            * Returns a range of all the activities done on the asset identified by the
507            * class name ID and class primary key that are mirrors of the activity
508            * identified by the mirror activity ID.
509            *
510            * <p>
511            * Useful when paginating results. Returns a maximum of <code>end -
512            * start</code> instances. <code>start</code> and <code>end</code> are not
513            * primary keys, they are indexes in the result set. Thus, <code>0</code>
514            * refers to the first result in the set. Setting both <code>start</code>
515            * and <code>end</code> to {@link
516            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
517            * result set.
518            * </p>
519            *
520            * @param mirrorActivityId the primary key of the mirror activity
521            * @param classNameId the target asset's class name ID
522            * @param classPK the primary key of the target asset
523            * @param start the lower bound of the range of results
524            * @param end the upper bound of the range of results (not inclusive)
525            * @return the range of matching activities
526            * @throws SystemException if a system exception occurred
527            */
528            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
529                    long mirrorActivityId, long classNameId, long classPK, int start,
530                    int end) throws com.liferay.portal.kernel.exception.SystemException {
531                    return getService()
532                                       .getActivities(mirrorActivityId, classNameId, classPK,
533                            start, end);
534            }
535    
536            /**
537            * Returns a range of all the activities done on the asset identified by the
538            * class name and the class primary key that are mirrors of the activity
539            * identified by the mirror activity ID.
540            *
541            * <p>
542            * Useful when paginating results. Returns a maximum of <code>end -
543            * start</code> instances. <code>start</code> and <code>end</code> are not
544            * primary keys, they are indexes in the result set. Thus, <code>0</code>
545            * refers to the first result in the set. Setting both <code>start</code>
546            * and <code>end</code> to {@link
547            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
548            * result set.
549            * </p>
550            *
551            * @param mirrorActivityId the primary key of the mirror activity
552            * @param className the target asset's class name
553            * @param classPK the primary key of the target asset
554            * @param start the lower bound of the range of results
555            * @param end the upper bound of the range of results (not inclusive)
556            * @return the range of matching activities
557            * @throws SystemException if a system exception occurred
558            */
559            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
560                    long mirrorActivityId, java.lang.String className, long classPK,
561                    int start, int end)
562                    throws com.liferay.portal.kernel.exception.SystemException {
563                    return getService()
564                                       .getActivities(mirrorActivityId, className, classPK, start,
565                            end);
566            }
567    
568            /**
569            * Returns a range of all the activities done on assets identified by the
570            * class name.
571            *
572            * <p>
573            * Useful when paginating results. Returns a maximum of <code>end -
574            * start</code> instances. <code>start</code> and <code>end</code> are not
575            * primary keys, they are indexes in the result set. Thus, <code>0</code>
576            * refers to the first result in the set. Setting both <code>start</code>
577            * and <code>end</code> to {@link
578            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
579            * result set.
580            * </p>
581            *
582            * @param className the target asset's class name
583            * @param start the lower bound of the range of results
584            * @param end the upper bound of the range of results (not inclusive)
585            * @return the range of matching activities
586            * @throws SystemException if a system exception occurred
587            */
588            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
589                    java.lang.String className, int start, int end)
590                    throws com.liferay.portal.kernel.exception.SystemException {
591                    return getService().getActivities(className, start, end);
592            }
593    
594            /**
595            * Returns the number of activities done on assets identified by the class
596            * name ID.
597            *
598            * @param classNameId the target asset's class name ID
599            * @return the number of matching activities
600            * @throws SystemException if a system exception occurred
601            */
602            public static int getActivitiesCount(long classNameId)
603                    throws com.liferay.portal.kernel.exception.SystemException {
604                    return getService().getActivitiesCount(classNameId);
605            }
606    
607            /**
608            * Returns the number of activities done on the asset identified by the
609            * class name ID and class primary key that are mirrors of the activity
610            * identified by the mirror activity ID.
611            *
612            * @param mirrorActivityId the primary key of the mirror activity
613            * @param classNameId the target asset's class name ID
614            * @param classPK the primary key of the target asset
615            * @return the number of matching activities
616            * @throws SystemException if a system exception occurred
617            */
618            public static int getActivitiesCount(long mirrorActivityId,
619                    long classNameId, long classPK)
620                    throws com.liferay.portal.kernel.exception.SystemException {
621                    return getService()
622                                       .getActivitiesCount(mirrorActivityId, classNameId, classPK);
623            }
624    
625            /**
626            * Returns the number of activities done on the asset identified by the
627            * class name and class primary key that are mirrors of the activity
628            * identified by the mirror activity ID.
629            *
630            * @param mirrorActivityId the primary key of the mirror activity
631            * @param className the target asset's class name
632            * @param classPK the primary key of the target asset
633            * @return the number of matching activities
634            * @throws SystemException if a system exception occurred
635            */
636            public static int getActivitiesCount(long mirrorActivityId,
637                    java.lang.String className, long classPK)
638                    throws com.liferay.portal.kernel.exception.SystemException {
639                    return getService()
640                                       .getActivitiesCount(mirrorActivityId, className, classPK);
641            }
642    
643            /**
644            * Returns the number of activities done on assets identified by class name.
645            *
646            * @param className the target asset's class name
647            * @return the number of matching activities
648            * @throws SystemException if a system exception occurred
649            */
650            public static int getActivitiesCount(java.lang.String className)
651                    throws com.liferay.portal.kernel.exception.SystemException {
652                    return getService().getActivitiesCount(className);
653            }
654    
655            /**
656            * Returns the activity identified by its primary key.
657            *
658            * @param activityId the primary key of the activity
659            * @return Returns the activity
660            * @throws PortalException if the activity could not be found
661            * @throws SystemException if a system exception occurred
662            */
663            public static com.liferay.portlet.social.model.SocialActivity getActivity(
664                    long activityId)
665                    throws com.liferay.portal.kernel.exception.PortalException,
666                            com.liferay.portal.kernel.exception.SystemException {
667                    return getService().getActivity(activityId);
668            }
669    
670            /**
671            * Returns a range of all the activities done in the group.
672            *
673            * <p>
674            * This method only finds activities without mirrors.
675            * </p>
676            *
677            * <p>
678            * Useful when paginating results. Returns a maximum of <code>end -
679            * start</code> instances. <code>start</code> and <code>end</code> are not
680            * primary keys, they are indexes in the result set. Thus, <code>0</code>
681            * refers to the first result in the set. Setting both <code>start</code>
682            * and <code>end</code> to {@link
683            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
684            * result set.
685            * </p>
686            *
687            * @param groupId the primary key of the group
688            * @param start the lower bound of the range of results
689            * @param end the upper bound of the range of results (not inclusive)
690            * @return the range of matching activities
691            * @throws SystemException if a system exception occurred
692            */
693            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupActivities(
694                    long groupId, int start, int end)
695                    throws com.liferay.portal.kernel.exception.SystemException {
696                    return getService().getGroupActivities(groupId, start, end);
697            }
698    
699            /**
700            * Returns the number of activities done in the group.
701            *
702            * <p>
703            * This method only counts activities without mirrors.
704            * </p>
705            *
706            * @param groupId the primary key of the group
707            * @return the number of matching activities
708            * @throws SystemException if a system exception occurred
709            */
710            public static int getGroupActivitiesCount(long groupId)
711                    throws com.liferay.portal.kernel.exception.SystemException {
712                    return getService().getGroupActivitiesCount(groupId);
713            }
714    
715            /**
716            * Returns a range of activities done by users that are members of the
717            * group.
718            *
719            * <p>
720            * This method only finds activities without mirrors.
721            * </p>
722            *
723            * <p>
724            * Useful when paginating results. Returns a maximum of <code>end -
725            * start</code> instances. <code>start</code> and <code>end</code> are not
726            * primary keys, they are indexes in the result set. Thus, <code>0</code>
727            * refers to the first result in the set. Setting both <code>start</code>
728            * and <code>end</code> to {@link
729            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
730            * result set.
731            * </p>
732            *
733            * @param groupId the primary key of the group
734            * @param start the lower bound of the range of results
735            * @param end the upper bound of the range of results (not inclusive)
736            * @return the range of matching activities
737            * @throws SystemException if a system exception occurred
738            */
739            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupUsersActivities(
740                    long groupId, int start, int end)
741                    throws com.liferay.portal.kernel.exception.SystemException {
742                    return getService().getGroupUsersActivities(groupId, start, end);
743            }
744    
745            /**
746            * Returns the number of activities done by users that are members of the
747            * group.
748            *
749            * <p>
750            * This method only counts activities without mirrors.
751            * </p>
752            *
753            * @param groupId the primary key of the group
754            * @return the number of matching activities
755            * @throws SystemException if a system exception occurred
756            */
757            public static int getGroupUsersActivitiesCount(long groupId)
758                    throws com.liferay.portal.kernel.exception.SystemException {
759                    return getService().getGroupUsersActivitiesCount(groupId);
760            }
761    
762            /**
763            * Returns the activity that has the mirror activity.
764            *
765            * @param mirrorActivityId the primary key of the mirror activity
766            * @return Returns the mirror activity
767            * @throws PortalException if the mirror activity could not be found
768            * @throws SystemException if a system exception occurred
769            */
770            public static com.liferay.portlet.social.model.SocialActivity getMirrorActivity(
771                    long mirrorActivityId)
772                    throws com.liferay.portal.kernel.exception.PortalException,
773                            com.liferay.portal.kernel.exception.SystemException {
774                    return getService().getMirrorActivity(mirrorActivityId);
775            }
776    
777            /**
778            * Returns a range of all the activities done in the organization. This
779            * method only finds activities without mirrors.
780            *
781            * <p>
782            * Useful when paginating results. Returns a maximum of <code>end -
783            * start</code> instances. <code>start</code> and <code>end</code> are not
784            * primary keys, they are indexes in the result set. Thus, <code>0</code>
785            * refers to the first result in the set. Setting both <code>start</code>
786            * and <code>end</code> to {@link
787            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
788            * result set.
789            * </p>
790            *
791            * @param organizationId the primary key of the organization
792            * @param start the lower bound of the range of results
793            * @param end the upper bound of the range of results (not inclusive)
794            * @return the range of matching activities
795            * @throws SystemException if a system exception occurred
796            */
797            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities(
798                    long organizationId, int start, int end)
799                    throws com.liferay.portal.kernel.exception.SystemException {
800                    return getService().getOrganizationActivities(organizationId, start, end);
801            }
802    
803            /**
804            * Returns the number of activities done in the organization. This method
805            * only counts activities without mirrors.
806            *
807            * @param organizationId the primary key of the organization
808            * @return the number of matching activities
809            * @throws SystemException if a system exception occurred
810            */
811            public static int getOrganizationActivitiesCount(long organizationId)
812                    throws com.liferay.portal.kernel.exception.SystemException {
813                    return getService().getOrganizationActivitiesCount(organizationId);
814            }
815    
816            /**
817            * Returns a range of all the activities done by users of the organization.
818            * This method only finds activities without mirrors.
819            *
820            * <p>
821            * Useful when paginating results. Returns a maximum of <code>end -
822            * start</code> instances. <code>start</code> and <code>end</code> are not
823            * primary keys, they are indexes in the result set. Thus, <code>0</code>
824            * refers to the first result in the set. Setting both <code>start</code>
825            * and <code>end</code> to {@link
826            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
827            * result set.
828            * </p>
829            *
830            * @param organizationId the primary key of the organization
831            * @param start the lower bound of the range of results
832            * @param end the upper bound of the range of results (not inclusive)
833            * @return the range of matching activities
834            * @throws SystemException if a system exception occurred
835            */
836            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities(
837                    long organizationId, int start, int end)
838                    throws com.liferay.portal.kernel.exception.SystemException {
839                    return getService()
840                                       .getOrganizationUsersActivities(organizationId, start, end);
841            }
842    
843            /**
844            * Returns the number of activities done by users of the organization. This
845            * method only counts activities without mirrors.
846            *
847            * @param organizationId the primary key of the organization
848            * @return the number of matching activities
849            * @throws SystemException if a system exception occurred
850            */
851            public static int getOrganizationUsersActivitiesCount(long organizationId)
852                    throws com.liferay.portal.kernel.exception.SystemException {
853                    return getService().getOrganizationUsersActivitiesCount(organizationId);
854            }
855    
856            /**
857            * Returns a range of all the activities done by users in a relationship
858            * with the user identified by the user ID.
859            *
860            * <p>
861            * Useful when paginating results. Returns a maximum of <code>end -
862            * start</code> instances. <code>start</code> and <code>end</code> are not
863            * primary keys, they are indexes in the result set. Thus, <>0</code> refers
864            * to the first result in the set. Setting both <code>start</code> and
865            * <code>end</code> to {@link
866            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
867            * result set.
868            * </p>
869            *
870            * @param userId the primary key of the user
871            * @param start the lower bound of the range of results
872            * @param end the upper bound of the range of results (not inclusive)
873            * @return the range of matching activities
874            * @throws SystemException if a system exception occurred
875            */
876            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
877                    long userId, int start, int end)
878                    throws com.liferay.portal.kernel.exception.SystemException {
879                    return getService().getRelationActivities(userId, start, end);
880            }
881    
882            /**
883            * Returns a range of all the activities done by users in a relationship of
884            * type <code>type</code> with the user identified by <code>userId</code>.
885            * This method only finds activities without mirrors.
886            *
887            * <p>
888            * Useful when paginating results. Returns a maximum of <code>end -
889            * start</code> instances. <code>start</code> and <code>end</code> are not
890            * primary keys, they are indexes in the result set. Thus, <code>0</code>
891            * refers to the first result in the set. Setting both <code>start</code>
892            * and <code>end</code> to {@link
893            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
894            * result set.
895            * </p>
896            *
897            * @param userId the primary key of the user
898            * @param type the relationship type
899            * @param start the lower bound of the range of results
900            * @param end the upper bound of the range of results (not inclusive)
901            * @return the range of matching activities
902            * @throws SystemException if a system exception occurred
903            */
904            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
905                    long userId, int type, int start, int end)
906                    throws com.liferay.portal.kernel.exception.SystemException {
907                    return getService().getRelationActivities(userId, type, start, end);
908            }
909    
910            /**
911            * Returns the number of activities done by users in a relationship with the
912            * user identified by userId.
913            *
914            * @param userId the primary key of the user
915            * @return the number of matching activities
916            * @throws SystemException if a system exception occurred
917            */
918            public static int getRelationActivitiesCount(long userId)
919                    throws com.liferay.portal.kernel.exception.SystemException {
920                    return getService().getRelationActivitiesCount(userId);
921            }
922    
923            /**
924            * Returns the number of activities done by users in a relationship of type
925            * <code>type</code> with the user identified by <code>userId</code>. This
926            * method only counts activities without mirrors.
927            *
928            * @param userId the primary key of the user
929            * @param type the relationship type
930            * @return the number of matching activities
931            * @throws SystemException if a system exception occurred
932            */
933            public static int getRelationActivitiesCount(long userId, int type)
934                    throws com.liferay.portal.kernel.exception.SystemException {
935                    return getService().getRelationActivitiesCount(userId, type);
936            }
937    
938            /**
939            * Returns a range of all the activities done by the user.
940            *
941            * <p>
942            * Useful when paginating results. Returns a maximum of <code>end -
943            * start</code> instances. <code>start</code> and <code>end</code> are not
944            * primary keys, they are indexes in the result set. Thus, <code>0</code>
945            * refers to the first result in the set. Setting both <code>start</code>
946            * and <code>end</code> to {@link
947            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
948            * result set.
949            * </p>
950            *
951            * @param userId the primary key of the user
952            * @param start the lower bound of the range of results
953            * @param end the upper bound of the range of results (not inclusive)
954            * @return the range of matching activities
955            * @throws SystemException if a system exception occurred
956            */
957            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities(
958                    long userId, int start, int end)
959                    throws com.liferay.portal.kernel.exception.SystemException {
960                    return getService().getUserActivities(userId, start, end);
961            }
962    
963            /**
964            * Returns the number of activities done by the user.
965            *
966            * @param userId the primary key of the user
967            * @return the number of matching activities
968            * @throws SystemException if a system exception occurred
969            */
970            public static int getUserActivitiesCount(long userId)
971                    throws com.liferay.portal.kernel.exception.SystemException {
972                    return getService().getUserActivitiesCount(userId);
973            }
974    
975            /**
976            * Returns a range of all the activities done in the user's groups. This
977            * method only finds activities without mirrors.
978            *
979            * <p>
980            * Useful when paginating results. Returns a maximum of <code>end -
981            * start</code> instances. <code>start</code> and <code>end</code> are not
982            * primary keys, they are indexes in the result set. Thus, <code>0</code>
983            * refers to the first result in the set. Setting both <code>start</code>
984            * and <code>end</code> to {@link
985            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
986            * result set.
987            * </p>
988            *
989            * @param userId the primary key of the user
990            * @param start the lower bound of the range of results
991            * @param end the upper bound of the range of results (not inclusive)
992            * @return the range of matching activities
993            * @throws SystemException if a system exception occurred
994            */
995            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities(
996                    long userId, int start, int end)
997                    throws com.liferay.portal.kernel.exception.SystemException {
998                    return getService().getUserGroupsActivities(userId, start, end);
999            }
1000    
1001            /**
1002            * Returns the number of activities done in user's groups. This method only
1003            * counts activities without mirrors.
1004            *
1005            * @param userId the primary key of the user
1006            * @return the number of matching activities
1007            * @throws SystemException if a system exception occurred
1008            */
1009            public static int getUserGroupsActivitiesCount(long userId)
1010                    throws com.liferay.portal.kernel.exception.SystemException {
1011                    return getService().getUserGroupsActivitiesCount(userId);
1012            }
1013    
1014            /**
1015            * Returns a range of all the activities done in the user's groups and
1016            * organizations. This method only finds activities without mirrors.
1017            *
1018            * <p>
1019            * Useful when paginating results. Returns a maximum of <code>end -
1020            * start</code> instances. <code>start</code> and <code>end</code> are not
1021            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1022            * refers to the first result in the set. Setting both <code>start</code>
1023            * and <code>end</code> to {@link
1024            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1025            * result set.
1026            * </p>
1027            *
1028            * @param userId the primary key of the user
1029            * @param start the lower bound of the range of results
1030            * @param end the upper bound of the range of results (not inclusive)
1031            * @return the range of matching activities
1032            * @throws SystemException if a system exception occurred
1033            */
1034            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsAndOrganizationsActivities(
1035                    long userId, int start, int end)
1036                    throws com.liferay.portal.kernel.exception.SystemException {
1037                    return getService()
1038                                       .getUserGroupsAndOrganizationsActivities(userId, start, end);
1039            }
1040    
1041            /**
1042            * Returns the number of activities done in user's groups and organizations.
1043            * This method only counts activities without mirrors.
1044            *
1045            * @param userId the primary key of the user
1046            * @return the number of matching activities
1047            * @throws SystemException if a system exception occurred
1048            */
1049            public static int getUserGroupsAndOrganizationsActivitiesCount(long userId)
1050                    throws com.liferay.portal.kernel.exception.SystemException {
1051                    return getService().getUserGroupsAndOrganizationsActivitiesCount(userId);
1052            }
1053    
1054            /**
1055            * Returns a range of all activities done in the user's organizations. This
1056            * method only finds activities without mirrors.
1057            *
1058            * <p>
1059            * Useful when paginating results. Returns a maximum of <code>end -
1060            * start</code> instances. <code>start</code> and <code>end</code> are not
1061            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1062            * refers to the first result in the set. Setting both <code>start</code>
1063            * and <code>end</code> to {@link
1064            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1065            * result set.
1066            * </p>
1067            *
1068            * @param userId the primary key of the user
1069            * @param start the lower bound of the range of results
1070            * @param end the upper bound of the range of results (not inclusive)
1071            * @return the range of matching activities
1072            * @throws SystemException if a system exception occurred
1073            */
1074            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserOrganizationsActivities(
1075                    long userId, int start, int end)
1076                    throws com.liferay.portal.kernel.exception.SystemException {
1077                    return getService().getUserOrganizationsActivities(userId, start, end);
1078            }
1079    
1080            /**
1081            * Returns the number of activities done in the user's organizations. This
1082            * method only counts activities without mirrors.
1083            *
1084            * @param userId the primary key of the user
1085            * @return the number of matching activities
1086            * @throws SystemException if a system exception occurred
1087            */
1088            public static int getUserOrganizationsActivitiesCount(long userId)
1089                    throws com.liferay.portal.kernel.exception.SystemException {
1090                    return getService().getUserOrganizationsActivitiesCount(userId);
1091            }
1092    
1093            public static SocialActivityLocalService getService() {
1094                    if (_service == null) {
1095                            _service = (SocialActivityLocalService)PortalBeanLocatorUtil.locate(SocialActivityLocalService.class.getName());
1096    
1097                            ReferenceRegistry.registerReference(SocialActivityLocalServiceUtil.class,
1098                                    "_service");
1099                    }
1100    
1101                    return _service;
1102            }
1103    
1104            /**
1105             * @deprecated
1106             */
1107            public void setService(SocialActivityLocalService service) {
1108            }
1109    
1110            private static SocialActivityLocalService _service;
1111    }