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            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
637                    return getService().getIndexableActionableDynamicQuery();
638            }
639    
640            /**
641            * Returns the activity that has the mirror activity.
642            *
643            * @param mirrorActivityId the primary key of the mirror activity
644            * @return Returns the mirror activity
645            */
646            public static com.liferay.portlet.social.model.SocialActivity getMirrorActivity(
647                    long mirrorActivityId)
648                    throws com.liferay.portal.kernel.exception.PortalException {
649                    return getService().getMirrorActivity(mirrorActivityId);
650            }
651    
652            /**
653            * Returns the OSGi service identifier.
654            *
655            * @return the OSGi service identifier
656            */
657            public static java.lang.String getOSGiServiceIdentifier() {
658                    return getService().getOSGiServiceIdentifier();
659            }
660    
661            /**
662            * Returns a range of all the activities done in the organization. This
663            * method only finds activities without mirrors.
664            *
665            * <p>
666            * Useful when paginating results. Returns a maximum of <code>end -
667            * start</code> instances. <code>start</code> and <code>end</code> are not
668            * primary keys, they are indexes in the result set. Thus, <code>0</code>
669            * refers to the first result in the set. Setting both <code>start</code>
670            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
671            * result set.
672            * </p>
673            *
674            * @param organizationId the primary key of the organization
675            * @param start the lower bound of the range of results
676            * @param end the upper bound of the range of results (not inclusive)
677            * @return the range of matching activities
678            */
679            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities(
680                    long organizationId, int start, int end) {
681                    return getService().getOrganizationActivities(organizationId, start, end);
682            }
683    
684            /**
685            * Returns the number of activities done in the organization. This method
686            * only counts activities without mirrors.
687            *
688            * @param organizationId the primary key of the organization
689            * @return the number of matching activities
690            */
691            public static int getOrganizationActivitiesCount(long organizationId) {
692                    return getService().getOrganizationActivitiesCount(organizationId);
693            }
694    
695            /**
696            * Returns a range of all the activities done by users of the organization.
697            * This method only finds activities without mirrors.
698            *
699            * <p>
700            * Useful when paginating results. Returns a maximum of <code>end -
701            * start</code> instances. <code>start</code> and <code>end</code> are not
702            * primary keys, they are indexes in the result set. Thus, <code>0</code>
703            * refers to the first result in the set. Setting both <code>start</code>
704            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
705            * result set.
706            * </p>
707            *
708            * @param organizationId the primary key of the organization
709            * @param start the lower bound of the range of results
710            * @param end the upper bound of the range of results (not inclusive)
711            * @return the range of matching activities
712            */
713            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities(
714                    long organizationId, int start, int end) {
715                    return getService()
716                                       .getOrganizationUsersActivities(organizationId, start, end);
717            }
718    
719            /**
720            * Returns the number of activities done by users of the organization. This
721            * method only counts activities without mirrors.
722            *
723            * @param organizationId the primary key of the organization
724            * @return the number of matching activities
725            */
726            public static int getOrganizationUsersActivitiesCount(long organizationId) {
727                    return getService().getOrganizationUsersActivitiesCount(organizationId);
728            }
729    
730            public static com.liferay.portal.model.PersistedModel getPersistedModel(
731                    java.io.Serializable primaryKeyObj)
732                    throws com.liferay.portal.kernel.exception.PortalException {
733                    return getService().getPersistedModel(primaryKeyObj);
734            }
735    
736            /**
737            * Returns a range of all the activities done by users in a relationship
738            * with the user identified by the user ID.
739            *
740            * <p>
741            * Useful when paginating results. Returns a maximum of <code>end -
742            * start</code> instances. <code>start</code> and <code>end</code> are not
743            * primary keys, they are indexes in the result set. Thus, <>0</code> refers
744            * to the first result in the set. Setting both <code>start</code> and
745            * <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result
746            * set.
747            * </p>
748            *
749            * @param userId the primary key of the user
750            * @param start the lower bound of the range of results
751            * @param end the upper bound of the range of results (not inclusive)
752            * @return the range of matching activities
753            */
754            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
755                    long userId, int start, int end) {
756                    return getService().getRelationActivities(userId, start, end);
757            }
758    
759            /**
760            * Returns a range of all the activities done by users in a relationship of
761            * type <code>type</code> with the user identified by <code>userId</code>.
762            * This method only finds activities without mirrors.
763            *
764            * <p>
765            * Useful when paginating results. Returns a maximum of <code>end -
766            * start</code> instances. <code>start</code> and <code>end</code> are not
767            * primary keys, they are indexes in the result set. Thus, <code>0</code>
768            * refers to the first result in the set. Setting both <code>start</code>
769            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
770            * result set.
771            * </p>
772            *
773            * @param userId the primary key of the user
774            * @param type the relationship type
775            * @param start the lower bound of the range of results
776            * @param end the upper bound of the range of results (not inclusive)
777            * @return the range of matching activities
778            */
779            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
780                    long userId, int type, int start, int end) {
781                    return getService().getRelationActivities(userId, type, start, end);
782            }
783    
784            /**
785            * Returns the number of activities done by users in a relationship with the
786            * user identified by userId.
787            *
788            * @param userId the primary key of the user
789            * @return the number of matching activities
790            */
791            public static int getRelationActivitiesCount(long userId) {
792                    return getService().getRelationActivitiesCount(userId);
793            }
794    
795            /**
796            * Returns the number of activities done by users in a relationship of type
797            * <code>type</code> with the user identified by <code>userId</code>. This
798            * method only counts activities without mirrors.
799            *
800            * @param userId the primary key of the user
801            * @param type the relationship type
802            * @return the number of matching activities
803            */
804            public static int getRelationActivitiesCount(long userId, int type) {
805                    return getService().getRelationActivitiesCount(userId, type);
806            }
807    
808            /**
809            * Returns a range of all the social activities.
810            *
811            * <p>
812            * 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.
813            * </p>
814            *
815            * @param start the lower bound of the range of social activities
816            * @param end the upper bound of the range of social activities (not inclusive)
817            * @return the range of social activities
818            */
819            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getSocialActivities(
820                    int start, int end) {
821                    return getService().getSocialActivities(start, end);
822            }
823    
824            /**
825            * Returns the number of social activities.
826            *
827            * @return the number of social activities
828            */
829            public static int getSocialActivitiesCount() {
830                    return getService().getSocialActivitiesCount();
831            }
832    
833            /**
834            * Returns the social activity with the primary key.
835            *
836            * @param activityId the primary key of the social activity
837            * @return the social activity
838            * @throws PortalException if a social activity with the primary key could not be found
839            */
840            public static com.liferay.portlet.social.model.SocialActivity getSocialActivity(
841                    long activityId)
842                    throws com.liferay.portal.kernel.exception.PortalException {
843                    return getService().getSocialActivity(activityId);
844            }
845    
846            /**
847            * Returns a range of all the activities done by the user.
848            *
849            * <p>
850            * Useful when paginating results. Returns a maximum of <code>end -
851            * start</code> instances. <code>start</code> and <code>end</code> are not
852            * primary keys, they are indexes in the result set. Thus, <code>0</code>
853            * refers to the first result in the set. Setting both <code>start</code>
854            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
855            * result set.
856            * </p>
857            *
858            * @param userId the primary key of the user
859            * @param start the lower bound of the range of results
860            * @param end the upper bound of the range of results (not inclusive)
861            * @return the range of matching activities
862            */
863            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities(
864                    long userId, int start, int end) {
865                    return getService().getUserActivities(userId, start, end);
866            }
867    
868            /**
869            * Returns the number of activities done by the user.
870            *
871            * @param userId the primary key of the user
872            * @return the number of matching activities
873            */
874            public static int getUserActivitiesCount(long userId) {
875                    return getService().getUserActivitiesCount(userId);
876            }
877    
878            /**
879            * Returns a range of all the activities done in the user's groups. This
880            * method only finds activities without mirrors.
881            *
882            * <p>
883            * Useful when paginating results. Returns a maximum of <code>end -
884            * start</code> instances. <code>start</code> and <code>end</code> are not
885            * primary keys, they are indexes in the result set. Thus, <code>0</code>
886            * refers to the first result in the set. Setting both <code>start</code>
887            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
888            * result set.
889            * </p>
890            *
891            * @param userId the primary key of the user
892            * @param start the lower bound of the range of results
893            * @param end the upper bound of the range of results (not inclusive)
894            * @return the range of matching activities
895            */
896            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities(
897                    long userId, int start, int end) {
898                    return getService().getUserGroupsActivities(userId, start, end);
899            }
900    
901            /**
902            * Returns the number of activities done in user's groups. This method only
903            * counts activities without mirrors.
904            *
905            * @param userId the primary key of the user
906            * @return the number of matching activities
907            */
908            public static int getUserGroupsActivitiesCount(long userId) {
909                    return getService().getUserGroupsActivitiesCount(userId);
910            }
911    
912            /**
913            * Returns a range of all the activities done in the user's groups and
914            * organizations. This method only finds activities without mirrors.
915            *
916            * <p>
917            * Useful when paginating results. Returns a maximum of <code>end -
918            * start</code> instances. <code>start</code> and <code>end</code> are not
919            * primary keys, they are indexes in the result set. Thus, <code>0</code>
920            * refers to the first result in the set. Setting both <code>start</code>
921            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
922            * result set.
923            * </p>
924            *
925            * @param userId the primary key of the user
926            * @param start the lower bound of the range of results
927            * @param end the upper bound of the range of results (not inclusive)
928            * @return the range of matching activities
929            */
930            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsAndOrganizationsActivities(
931                    long userId, int start, int end) {
932                    return getService()
933                                       .getUserGroupsAndOrganizationsActivities(userId, start, end);
934            }
935    
936            /**
937            * Returns the number of activities done in user's groups and organizations.
938            * This method only counts activities without mirrors.
939            *
940            * @param userId the primary key of the user
941            * @return the number of matching activities
942            */
943            public static int getUserGroupsAndOrganizationsActivitiesCount(long userId) {
944                    return getService().getUserGroupsAndOrganizationsActivitiesCount(userId);
945            }
946    
947            /**
948            * Returns a range of all activities done in the user's organizations. This
949            * method only finds activities without mirrors.
950            *
951            * <p>
952            * Useful when paginating results. Returns a maximum of <code>end -
953            * start</code> instances. <code>start</code> and <code>end</code> are not
954            * primary keys, they are indexes in the result set. Thus, <code>0</code>
955            * refers to the first result in the set. Setting both <code>start</code>
956            * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full
957            * result set.
958            * </p>
959            *
960            * @param userId the primary key of the user
961            * @param start the lower bound of the range of results
962            * @param end the upper bound of the range of results (not inclusive)
963            * @return the range of matching activities
964            */
965            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserOrganizationsActivities(
966                    long userId, int start, int end) {
967                    return getService().getUserOrganizationsActivities(userId, start, end);
968            }
969    
970            /**
971            * Returns the number of activities done in the user's organizations. This
972            * method only counts activities without mirrors.
973            *
974            * @param userId the primary key of the user
975            * @return the number of matching activities
976            */
977            public static int getUserOrganizationsActivitiesCount(long userId) {
978                    return getService().getUserOrganizationsActivitiesCount(userId);
979            }
980    
981            /**
982            * Updates the social activity in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
983            *
984            * @param socialActivity the social activity
985            * @return the social activity that was updated
986            */
987            public static com.liferay.portlet.social.model.SocialActivity updateSocialActivity(
988                    com.liferay.portlet.social.model.SocialActivity socialActivity) {
989                    return getService().updateSocialActivity(socialActivity);
990            }
991    
992            public static SocialActivityLocalService getService() {
993                    if (_service == null) {
994                            _service = (SocialActivityLocalService)PortalBeanLocatorUtil.locate(SocialActivityLocalService.class.getName());
995    
996                            ReferenceRegistry.registerReference(SocialActivityLocalServiceUtil.class,
997                                    "_service");
998                    }
999    
1000                    return _service;
1001            }
1002    
1003            private static SocialActivityLocalService _service;
1004    }