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