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