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