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
402            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
403            * result set.
404            * </p>
405            *
406            * @param className the target asset's class name
407            * @param start the lower bound of the range of results
408            * @param end the upper bound of the range of results (not inclusive)
409            * @return the range of matching activities
410            */
411            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
412                    java.lang.String className, int start, int end) {
413                    return getService().getActivities(className, start, end);
414            }
415    
416            /**
417            * Returns a range of all the activities done on assets identified by the
418            * class name ID.
419            *
420            * <p>
421            * Useful when paginating results. Returns a maximum of <code>end -
422            * start</code> instances. <code>start</code> and <code>end</code> are not
423            * primary keys, they are indexes in the result set. Thus, <code>0</code>
424            * refers to the first result in the set. Setting both <code>start</code>
425            * and <code>end</code> to {@link
426            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
427            * result set.
428            * </p>
429            *
430            * @param classNameId the target asset's class name ID
431            * @param start the lower bound of the range of results
432            * @param end the upper bound of the range of results (not inclusive)
433            * @return the range of matching activities
434            */
435            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
436                    long classNameId, int start, int end) {
437                    return getService().getActivities(classNameId, start, end);
438            }
439    
440            /**
441            * Returns a range of all the activities done on the asset identified by the
442            * class name and the class primary key that are mirrors of the activity
443            * identified by the mirror activity ID.
444            *
445            * <p>
446            * Useful when paginating results. Returns a maximum of <code>end -
447            * start</code> instances. <code>start</code> and <code>end</code> are not
448            * primary keys, they are indexes in the result set. Thus, <code>0</code>
449            * refers to the first result in the set. Setting both <code>start</code>
450            * and <code>end</code> to {@link
451            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
452            * result set.
453            * </p>
454            *
455            * @param mirrorActivityId the primary key of the mirror activity
456            * @param className the target asset's class name
457            * @param classPK the primary key of the target asset
458            * @param start the lower bound of the range of results
459            * @param end the upper bound of the range of results (not inclusive)
460            * @return the range of matching activities
461            */
462            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
463                    long mirrorActivityId, java.lang.String className, long classPK,
464                    int start, int end) {
465                    return getService()
466                                       .getActivities(mirrorActivityId, className, classPK, start,
467                            end);
468            }
469    
470            /**
471            * Returns a range of all the activities done on the asset identified by the
472            * class name ID and class primary key that are mirrors of the activity
473            * identified by the mirror activity ID.
474            *
475            * <p>
476            * Useful when paginating results. Returns a maximum of <code>end -
477            * start</code> instances. <code>start</code> and <code>end</code> are not
478            * primary keys, they are indexes in the result set. Thus, <code>0</code>
479            * refers to the first result in the set. Setting both <code>start</code>
480            * and <code>end</code> to {@link
481            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
482            * result set.
483            * </p>
484            *
485            * @param mirrorActivityId the primary key of the mirror activity
486            * @param classNameId the target asset's class name ID
487            * @param classPK the primary key of the target asset
488            * @param start the lower bound of the range of results
489            * @param end the upper bound of the range of results (not inclusive)
490            * @return the range of matching activities
491            */
492            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
493                    long mirrorActivityId, long classNameId, long classPK, int start,
494                    int end) {
495                    return getService()
496                                       .getActivities(mirrorActivityId, classNameId, classPK,
497                            start, end);
498            }
499    
500            /**
501            * Returns the number of activities done on assets identified by class name.
502            *
503            * @param className the target asset's class name
504            * @return the number of matching activities
505            */
506            public static int getActivitiesCount(java.lang.String className) {
507                    return getService().getActivitiesCount(className);
508            }
509    
510            /**
511            * Returns the number of activities done on assets identified by the class
512            * name ID.
513            *
514            * @param classNameId the target asset's class name ID
515            * @return the number of matching activities
516            */
517            public static int getActivitiesCount(long classNameId) {
518                    return getService().getActivitiesCount(classNameId);
519            }
520    
521            /**
522            * Returns the number of activities done on the asset identified by the
523            * class name 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 className the target asset's class name
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                    java.lang.String className, long classPK) {
533                    return getService()
534                                       .getActivitiesCount(mirrorActivityId, className, classPK);
535            }
536    
537            /**
538            * Returns the number of activities done on the asset identified by the
539            * class name ID and class primary key that are mirrors of the activity
540            * identified by the mirror activity ID.
541            *
542            * @param mirrorActivityId the primary key of the mirror activity
543            * @param classNameId the target asset's class name ID
544            * @param classPK the primary key of the target asset
545            * @return the number of matching activities
546            */
547            public static int getActivitiesCount(long mirrorActivityId,
548                    long classNameId, long classPK) {
549                    return getService()
550                                       .getActivitiesCount(mirrorActivityId, classNameId, classPK);
551            }
552    
553            /**
554            * Returns the activity identified by its primary key.
555            *
556            * @param activityId the primary key of the activity
557            * @return Returns the activity
558            * @throws PortalException if the activity could not be found
559            */
560            public static com.liferay.portlet.social.model.SocialActivity getActivity(
561                    long activityId)
562                    throws com.liferay.portal.kernel.exception.PortalException {
563                    return getService().getActivity(activityId);
564            }
565    
566            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivitySetActivities(
567                    long activitySetId, int start, int end) {
568                    return getService().getActivitySetActivities(activitySetId, start, end);
569            }
570    
571            /**
572            * Returns the Spring bean ID for this bean.
573            *
574            * @return the Spring bean ID for this bean
575            */
576            public static java.lang.String getBeanIdentifier() {
577                    return getService().getBeanIdentifier();
578            }
579    
580            /**
581            * Returns a range of all the activities done in the group.
582            *
583            * <p>
584            * This method only finds activities without mirrors.
585            * </p>
586            *
587            * <p>
588            * Useful when paginating results. Returns a maximum of <code>end -
589            * start</code> instances. <code>start</code> and <code>end</code> are not
590            * primary keys, they are indexes in the result set. Thus, <code>0</code>
591            * refers to the first result in the set. Setting both <code>start</code>
592            * and <code>end</code> to {@link
593            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
594            * result set.
595            * </p>
596            *
597            * @param groupId the primary key of the group
598            * @param start the lower bound of the range of results
599            * @param end the upper bound of the range of results (not inclusive)
600            * @return the range of matching activities
601            */
602            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupActivities(
603                    long groupId, int start, int end) {
604                    return getService().getGroupActivities(groupId, start, end);
605            }
606    
607            /**
608            * Returns the number of activities done in the group.
609            *
610            * <p>
611            * This method only counts activities without mirrors.
612            * </p>
613            *
614            * @param groupId the primary key of the group
615            * @return the number of matching activities
616            */
617            public static int getGroupActivitiesCount(long groupId) {
618                    return getService().getGroupActivitiesCount(groupId);
619            }
620    
621            /**
622            * Returns a range of activities done by users that are members of the
623            * group.
624            *
625            * <p>
626            * This method only finds activities without mirrors.
627            * </p>
628            *
629            * <p>
630            * Useful when paginating results. Returns a maximum of <code>end -
631            * start</code> instances. <code>start</code> and <code>end</code> are not
632            * primary keys, they are indexes in the result set. Thus, <code>0</code>
633            * refers to the first result in the set. Setting both <code>start</code>
634            * and <code>end</code> to {@link
635            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
636            * result set.
637            * </p>
638            *
639            * @param groupId the primary key of the group
640            * @param start the lower bound of the range of results
641            * @param end the upper bound of the range of results (not inclusive)
642            * @return the range of matching activities
643            */
644            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupUsersActivities(
645                    long groupId, int start, int end) {
646                    return getService().getGroupUsersActivities(groupId, start, end);
647            }
648    
649            /**
650            * Returns the number of activities done by users that are members of the
651            * group.
652            *
653            * <p>
654            * This method only counts activities without mirrors.
655            * </p>
656            *
657            * @param groupId the primary key of the group
658            * @return the number of matching activities
659            */
660            public static int getGroupUsersActivitiesCount(long groupId) {
661                    return getService().getGroupUsersActivitiesCount(groupId);
662            }
663    
664            /**
665            * Returns the activity that has the mirror activity.
666            *
667            * @param mirrorActivityId the primary key of the mirror activity
668            * @return Returns the mirror activity
669            * @throws PortalException if the mirror activity could not be found
670            */
671            public static com.liferay.portlet.social.model.SocialActivity getMirrorActivity(
672                    long mirrorActivityId)
673                    throws com.liferay.portal.kernel.exception.PortalException {
674                    return getService().getMirrorActivity(mirrorActivityId);
675            }
676    
677            /**
678            * Returns a range of all the activities done in the organization. This
679            * method only finds activities without mirrors.
680            *
681            * <p>
682            * Useful when paginating results. Returns a maximum of <code>end -
683            * start</code> instances. <code>start</code> and <code>end</code> are not
684            * primary keys, they are indexes in the result set. Thus, <code>0</code>
685            * refers to the first result in the set. Setting both <code>start</code>
686            * and <code>end</code> to {@link
687            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
688            * result set.
689            * </p>
690            *
691            * @param organizationId the primary key of the organization
692            * @param start the lower bound of the range of results
693            * @param end the upper bound of the range of results (not inclusive)
694            * @return the range of matching activities
695            */
696            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities(
697                    long organizationId, int start, int end) {
698                    return getService().getOrganizationActivities(organizationId, start, end);
699            }
700    
701            /**
702            * Returns the number of activities done in the organization. This method
703            * only counts activities without mirrors.
704            *
705            * @param organizationId the primary key of the organization
706            * @return the number of matching activities
707            */
708            public static int getOrganizationActivitiesCount(long organizationId) {
709                    return getService().getOrganizationActivitiesCount(organizationId);
710            }
711    
712            /**
713            * Returns a range of all the activities done by users of the organization.
714            * This method only finds activities without mirrors.
715            *
716            * <p>
717            * Useful when paginating results. Returns a maximum of <code>end -
718            * start</code> instances. <code>start</code> and <code>end</code> are not
719            * primary keys, they are indexes in the result set. Thus, <code>0</code>
720            * refers to the first result in the set. Setting both <code>start</code>
721            * and <code>end</code> to {@link
722            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
723            * result set.
724            * </p>
725            *
726            * @param organizationId the primary key of the organization
727            * @param start the lower bound of the range of results
728            * @param end the upper bound of the range of results (not inclusive)
729            * @return the range of matching activities
730            */
731            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities(
732                    long organizationId, int start, int end) {
733                    return getService()
734                                       .getOrganizationUsersActivities(organizationId, start, end);
735            }
736    
737            /**
738            * Returns the number of activities done by users of the organization. This
739            * method only counts activities without mirrors.
740            *
741            * @param organizationId the primary key of the organization
742            * @return the number of matching activities
743            */
744            public static int getOrganizationUsersActivitiesCount(long organizationId) {
745                    return getService().getOrganizationUsersActivitiesCount(organizationId);
746            }
747    
748            public static com.liferay.portal.model.PersistedModel getPersistedModel(
749                    java.io.Serializable primaryKeyObj)
750                    throws com.liferay.portal.kernel.exception.PortalException {
751                    return getService().getPersistedModel(primaryKeyObj);
752            }
753    
754            /**
755            * Returns a range of all the activities done by users in a relationship
756            * with the user identified by the user ID.
757            *
758            * <p>
759            * Useful when paginating results. Returns a maximum of <code>end -
760            * start</code> instances. <code>start</code> and <code>end</code> are not
761            * primary keys, they are indexes in the result set. Thus, <>0</code> refers
762            * to the first result in the set. Setting both <code>start</code> and
763            * <code>end</code> to {@link
764            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
765            * result set.
766            * </p>
767            *
768            * @param userId the primary key of the user
769            * @param start the lower bound of the range of results
770            * @param end the upper bound of the range of results (not inclusive)
771            * @return the range of matching activities
772            */
773            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
774                    long userId, int start, int end) {
775                    return getService().getRelationActivities(userId, start, end);
776            }
777    
778            /**
779            * Returns a range of all the activities done by users in a relationship of
780            * type <code>type</code> with the user identified by <code>userId</code>.
781            * This method only finds activities without mirrors.
782            *
783            * <p>
784            * Useful when paginating results. Returns a maximum of <code>end -
785            * start</code> instances. <code>start</code> and <code>end</code> are not
786            * primary keys, they are indexes in the result set. Thus, <code>0</code>
787            * refers to the first result in the set. Setting both <code>start</code>
788            * and <code>end</code> to {@link
789            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
790            * result set.
791            * </p>
792            *
793            * @param userId the primary key of the user
794            * @param type the relationship type
795            * @param start the lower bound of the range of results
796            * @param end the upper bound of the range of results (not inclusive)
797            * @return the range of matching activities
798            */
799            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
800                    long userId, int type, int start, int end) {
801                    return getService().getRelationActivities(userId, type, start, end);
802            }
803    
804            /**
805            * Returns the number of activities done by users in a relationship with the
806            * user identified by userId.
807            *
808            * @param userId the primary key of the user
809            * @return the number of matching activities
810            */
811            public static int getRelationActivitiesCount(long userId) {
812                    return getService().getRelationActivitiesCount(userId);
813            }
814    
815            /**
816            * Returns the number of activities done by users in a relationship of type
817            * <code>type</code> with the user identified by <code>userId</code>. This
818            * method only counts activities without mirrors.
819            *
820            * @param userId the primary key of the user
821            * @param type the relationship type
822            * @return the number of matching activities
823            */
824            public static int getRelationActivitiesCount(long userId, int type) {
825                    return getService().getRelationActivitiesCount(userId, type);
826            }
827    
828            /**
829            * Returns a range of all the social activities.
830            *
831            * <p>
832            * 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.
833            * </p>
834            *
835            * @param start the lower bound of the range of social activities
836            * @param end the upper bound of the range of social activities (not inclusive)
837            * @return the range of social activities
838            */
839            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getSocialActivities(
840                    int start, int end) {
841                    return getService().getSocialActivities(start, end);
842            }
843    
844            /**
845            * Returns the number of social activities.
846            *
847            * @return the number of social activities
848            */
849            public static int getSocialActivitiesCount() {
850                    return getService().getSocialActivitiesCount();
851            }
852    
853            /**
854            * Returns the social activity with the primary key.
855            *
856            * @param activityId the primary key of the social activity
857            * @return the social activity
858            * @throws PortalException if a social activity with the primary key could not be found
859            */
860            public static com.liferay.portlet.social.model.SocialActivity getSocialActivity(
861                    long activityId)
862                    throws com.liferay.portal.kernel.exception.PortalException {
863                    return getService().getSocialActivity(activityId);
864            }
865    
866            /**
867            * Returns a range of all the activities done by the user.
868            *
869            * <p>
870            * Useful when paginating results. Returns a maximum of <code>end -
871            * start</code> instances. <code>start</code> and <code>end</code> are not
872            * primary keys, they are indexes in the result set. Thus, <code>0</code>
873            * refers to the first result in the set. Setting both <code>start</code>
874            * and <code>end</code> to {@link
875            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
876            * result set.
877            * </p>
878            *
879            * @param userId the primary key of the user
880            * @param start the lower bound of the range of results
881            * @param end the upper bound of the range of results (not inclusive)
882            * @return the range of matching activities
883            */
884            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities(
885                    long userId, int start, int end) {
886                    return getService().getUserActivities(userId, start, end);
887            }
888    
889            /**
890            * Returns the number of activities done by the user.
891            *
892            * @param userId the primary key of the user
893            * @return the number of matching activities
894            */
895            public static int getUserActivitiesCount(long userId) {
896                    return getService().getUserActivitiesCount(userId);
897            }
898    
899            /**
900            * Returns a range of all the activities done in the user's groups. This
901            * method only finds activities without mirrors.
902            *
903            * <p>
904            * Useful when paginating results. Returns a maximum of <code>end -
905            * start</code> instances. <code>start</code> and <code>end</code> are not
906            * primary keys, they are indexes in the result set. Thus, <code>0</code>
907            * refers to the first result in the set. Setting both <code>start</code>
908            * and <code>end</code> to {@link
909            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
910            * result set.
911            * </p>
912            *
913            * @param userId the primary key of the user
914            * @param start the lower bound of the range of results
915            * @param end the upper bound of the range of results (not inclusive)
916            * @return the range of matching activities
917            */
918            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities(
919                    long userId, int start, int end) {
920                    return getService().getUserGroupsActivities(userId, start, end);
921            }
922    
923            /**
924            * Returns the number of activities done in user's groups. This method only
925            * counts activities without mirrors.
926            *
927            * @param userId the primary key of the user
928            * @return the number of matching activities
929            */
930            public static int getUserGroupsActivitiesCount(long userId) {
931                    return getService().getUserGroupsActivitiesCount(userId);
932            }
933    
934            /**
935            * Returns a range of all the activities done in the user's groups and
936            * organizations. This method only finds activities without mirrors.
937            *
938            * <p>
939            * Useful when paginating results. Returns a maximum of <code>end -
940            * start</code> instances. <code>start</code> and <code>end</code> are not
941            * primary keys, they are indexes in the result set. Thus, <code>0</code>
942            * refers to the first result in the set. Setting both <code>start</code>
943            * and <code>end</code> to {@link
944            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
945            * result set.
946            * </p>
947            *
948            * @param userId the primary key of the user
949            * @param start the lower bound of the range of results
950            * @param end the upper bound of the range of results (not inclusive)
951            * @return the range of matching activities
952            */
953            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsAndOrganizationsActivities(
954                    long userId, int start, int end) {
955                    return getService()
956                                       .getUserGroupsAndOrganizationsActivities(userId, start, end);
957            }
958    
959            /**
960            * Returns the number of activities done in user's groups and organizations.
961            * This method only counts activities without mirrors.
962            *
963            * @param userId the primary key of the user
964            * @return the number of matching activities
965            */
966            public static int getUserGroupsAndOrganizationsActivitiesCount(long userId) {
967                    return getService().getUserGroupsAndOrganizationsActivitiesCount(userId);
968            }
969    
970            /**
971            * Returns a range of all activities done in the user's organizations. This
972            * method only finds activities without mirrors.
973            *
974            * <p>
975            * Useful when paginating results. Returns a maximum of <code>end -
976            * start</code> instances. <code>start</code> and <code>end</code> are not
977            * primary keys, they are indexes in the result set. Thus, <code>0</code>
978            * refers to the first result in the set. Setting both <code>start</code>
979            * and <code>end</code> to {@link
980            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
981            * result set.
982            * </p>
983            *
984            * @param userId the primary key of the user
985            * @param start the lower bound of the range of results
986            * @param end the upper bound of the range of results (not inclusive)
987            * @return the range of matching activities
988            */
989            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserOrganizationsActivities(
990                    long userId, int start, int end) {
991                    return getService().getUserOrganizationsActivities(userId, start, end);
992            }
993    
994            /**
995            * Returns the number of activities done in the user's organizations. This
996            * method only counts activities without mirrors.
997            *
998            * @param userId the primary key of the user
999            * @return the number of matching activities
1000            */
1001            public static int getUserOrganizationsActivitiesCount(long userId) {
1002                    return getService().getUserOrganizationsActivitiesCount(userId);
1003            }
1004    
1005            /**
1006            * Sets the Spring bean ID for this bean.
1007            *
1008            * @param beanIdentifier the Spring bean ID for this bean
1009            */
1010            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
1011                    getService().setBeanIdentifier(beanIdentifier);
1012            }
1013    
1014            /**
1015            * Updates the social activity in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
1016            *
1017            * @param socialActivity the social activity
1018            * @return the social activity that was updated
1019            */
1020            public static com.liferay.portlet.social.model.SocialActivity updateSocialActivity(
1021                    com.liferay.portlet.social.model.SocialActivity socialActivity) {
1022                    return getService().updateSocialActivity(socialActivity);
1023            }
1024    
1025            public static SocialActivityLocalService getService() {
1026                    if (_service == null) {
1027                            _service = (SocialActivityLocalService)PortalBeanLocatorUtil.locate(SocialActivityLocalService.class.getName());
1028    
1029                            ReferenceRegistry.registerReference(SocialActivityLocalServiceUtil.class,
1030                                    "_service");
1031                    }
1032    
1033                    return _service;
1034            }
1035    
1036            /**
1037             * @deprecated As of 6.2.0
1038             */
1039            @Deprecated
1040            public void setService(SocialActivityLocalService service) {
1041            }
1042    
1043            private static SocialActivityLocalService _service;
1044    }