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