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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
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            * Returns the Spring bean ID for this bean.
221            *
222            * @return the Spring bean ID for this bean
223            */
224            public java.lang.String getBeanIdentifier();
225    
226            /**
227            * Sets the Spring bean ID for this bean.
228            *
229            * @param beanIdentifier the Spring bean ID for this bean
230            */
231            public void setBeanIdentifier(java.lang.String beanIdentifier);
232    
233            /**
234            * Records an activity with the given time in the database.
235            *
236            * <p>
237            * This method records a social activity done on an asset, identified by its
238            * class name and class primary key, in the database. Additional information
239            * (such as the original message ID for a reply to a forum post) is passed
240            * in via the <code>extraData</code> in JSON format. For activities
241            * affecting another user, a mirror activity is generated that describes the
242            * action from the user's point of view. The target user's ID is passed in
243            * via the <code>receiverUserId</code>.
244            * </p>
245            *
246            * <p>
247            * Example for a mirrored activity:<br> When a user replies to a message
248            * boards post, the reply action is stored in the database with the
249            * <code>receiverUserId</code> being the ID of the author of the original
250            * message. The <code>extraData</code> contains the ID of the original
251            * message in JSON format. A mirror activity is generated with the values of
252            * the <code>userId</code> and the <code>receiverUserId</code> swapped. This
253            * mirror activity basically describes a "replied to" event.
254            * </p>
255            *
256            * <p>
257            * Mirror activities are most often used in relation to friend requests and
258            * activities.
259            * </p>
260            *
261            * @param userId the primary key of the acting user
262            * @param groupId the primary key of the group
263            * @param createDate the activity's date
264            * @param className the target asset's class name
265            * @param classPK the primary key of the target asset
266            * @param type the activity's type
267            * @param extraData any extra data regarding the activity
268            * @param receiverUserId the primary key of the receiving user
269            * @throws PortalException if the user or group could not be found
270            * @throws SystemException if a system exception occurred
271            */
272            public void addActivity(long userId, long groupId,
273                    java.util.Date createDate, java.lang.String className, long classPK,
274                    int type, java.lang.String extraData, long receiverUserId)
275                    throws com.liferay.portal.kernel.exception.PortalException,
276                            com.liferay.portal.kernel.exception.SystemException;
277    
278            /**
279            * Records an activity in the database, using a time based on the current
280            * time in an attempt to make the activity's time unique.
281            *
282            * @param userId the primary key of the acting user
283            * @param groupId the primary key of the group
284            * @param className the target asset's class name
285            * @param classPK the primary key of the target asset
286            * @param type the activity's type
287            * @param extraData any extra data regarding the activity
288            * @param receiverUserId the primary key of the receiving user
289            * @throws PortalException if the user or group could not be found
290            * @throws SystemException if a system exception occurred
291            */
292            public void addActivity(long userId, long groupId,
293                    java.lang.String className, long classPK, int type,
294                    java.lang.String extraData, long receiverUserId)
295                    throws com.liferay.portal.kernel.exception.PortalException,
296                            com.liferay.portal.kernel.exception.SystemException;
297    
298            public void addActivity(
299                    com.liferay.portlet.social.model.SocialActivity activity,
300                    com.liferay.portlet.social.model.SocialActivity mirrorActivity)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException;
303    
304            /**
305            * Records an activity in the database, but only if there isn't already an
306            * activity with the same parameters.
307            *
308            * <p>
309            * For the main functionality see {@link #addActivity(long, long, Date,
310            * String, long, int, String, long)}
311            * </p>
312            *
313            * @param userId the primary key of the acting user
314            * @param groupId the primary key of the group
315            * @param createDate the activity's date
316            * @param className the target asset's class name
317            * @param classPK the primary key of the target asset
318            * @param type the activity's type
319            * @param extraData any extra data regarding the activity
320            * @param receiverUserId the primary key of the receiving user
321            * @throws PortalException if the user or group could not be found
322            * @throws SystemException if a system exception occurred
323            */
324            public void addUniqueActivity(long userId, long groupId,
325                    java.util.Date createDate, java.lang.String className, long classPK,
326                    int type, java.lang.String extraData, long receiverUserId)
327                    throws com.liferay.portal.kernel.exception.PortalException,
328                            com.liferay.portal.kernel.exception.SystemException;
329    
330            /**
331            * Records an activity with the current time in the database, but only if
332            * there isn't one with the same parameters.
333            *
334            * <p>
335            * For the main functionality see {@link #addActivity(long, long, Date,
336            * String, long, int, String, long)}
337            * </p>
338            *
339            * @param userId the primary key of the acting user
340            * @param groupId the primary key of the group
341            * @param className the target asset's class name
342            * @param classPK the primary key of the target asset
343            * @param type the activity's type
344            * @param extraData any extra data regarding the activity
345            * @param receiverUserId the primary key of the receiving user
346            * @throws PortalException if the user or group could not be found
347            * @throws SystemException if a system exception occurred
348            */
349            public void addUniqueActivity(long userId, long groupId,
350                    java.lang.String className, long classPK, int type,
351                    java.lang.String extraData, long receiverUserId)
352                    throws com.liferay.portal.kernel.exception.PortalException,
353                            com.liferay.portal.kernel.exception.SystemException;
354    
355            /**
356            * Removes stored activities for the asset.
357            *
358            * @param assetEntry the asset from which to remove stored activities
359            * @throws PortalException if a portal exception occurred
360            * @throws SystemException if a system exception occurred
361            */
362            public void deleteActivities(
363                    com.liferay.portlet.asset.model.AssetEntry assetEntry)
364                    throws com.liferay.portal.kernel.exception.PortalException,
365                            com.liferay.portal.kernel.exception.SystemException;
366    
367            /**
368            * Removes stored activities for the asset identified by the class name and
369            * class primary key.
370            *
371            * @param className the target asset's class name
372            * @param classPK the primary key of the target asset
373            * @throws SystemException if a system exception occurred
374            */
375            public void deleteActivities(java.lang.String className, long classPK)
376                    throws com.liferay.portal.kernel.exception.PortalException,
377                            com.liferay.portal.kernel.exception.SystemException;
378    
379            /**
380            * Removes the stored activity from the database.
381            *
382            * @param activityId the primary key of the stored activity
383            * @throws PortalException if the activity could not be found
384            * @throws SystemException if a system exception occurred
385            */
386            public void deleteActivity(long activityId)
387                    throws com.liferay.portal.kernel.exception.PortalException,
388                            com.liferay.portal.kernel.exception.SystemException;
389    
390            /**
391            * Removes the stored activity and its mirror activity from the database.
392            *
393            * @param activity the activity to be removed
394            * @throws SystemException if a system exception occurred
395            */
396            public void deleteActivity(
397                    com.liferay.portlet.social.model.SocialActivity activity)
398                    throws com.liferay.portal.kernel.exception.PortalException,
399                            com.liferay.portal.kernel.exception.SystemException;
400    
401            /**
402            * Removes the user's stored activities from the database.
403            *
404            * <p>
405            * This method removes all activities where the user is either the actor or
406            * the receiver.
407            * </p>
408            *
409            * @param userId the primary key of the user
410            * @throws PortalException if the user's activity counters could not be
411            deleted
412            * @throws SystemException if a system exception occurred
413            */
414            public void deleteUserActivities(long userId)
415                    throws com.liferay.portal.kernel.exception.PortalException,
416                            com.liferay.portal.kernel.exception.SystemException;
417    
418            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
419            public com.liferay.portlet.social.model.SocialActivity fetchFirstActivity(
420                    java.lang.String className, long classPK, int type)
421                    throws com.liferay.portal.kernel.exception.SystemException;
422    
423            /**
424            * Returns a range of all the activities done on assets identified by the
425            * class name ID.
426            *
427            * <p>
428            * Useful when paginating results. Returns a maximum of <code>end -
429            * start</code> instances. <code>start</code> and <code>end</code> are not
430            * primary keys, they are indexes in the result set. Thus, <code>0</code>
431            * refers to the first result in the set. Setting both <code>start</code>
432            * and <code>end</code> to {@link
433            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
434            * result set.
435            * </p>
436            *
437            * @param classNameId the target asset's class name ID
438            * @param start the lower bound of the range of results
439            * @param end the upper bound of the range of results (not inclusive)
440            * @return the range of matching activities
441            * @throws SystemException if a system exception occurred
442            */
443            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
444            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
445                    long classNameId, int start, int end)
446                    throws com.liferay.portal.kernel.exception.SystemException;
447    
448            /**
449            * Returns a range of all the activities done on the asset identified by the
450            * class name ID and class primary key that are mirrors of the activity
451            * identified by the mirror activity ID.
452            *
453            * <p>
454            * Useful when paginating results. Returns a maximum of <code>end -
455            * start</code> instances. <code>start</code> and <code>end</code> are not
456            * primary keys, they are indexes in the result set. Thus, <code>0</code>
457            * refers to the first result in the set. Setting both <code>start</code>
458            * and <code>end</code> to {@link
459            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
460            * result set.
461            * </p>
462            *
463            * @param mirrorActivityId the primary key of the mirror activity
464            * @param classNameId the target asset's class name ID
465            * @param classPK the primary key of the target asset
466            * @param start the lower bound of the range of results
467            * @param end the upper bound of the range of results (not inclusive)
468            * @return the range of matching activities
469            * @throws SystemException if a system exception occurred
470            */
471            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
472            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
473                    long mirrorActivityId, long classNameId, long classPK, int start,
474                    int end) throws com.liferay.portal.kernel.exception.SystemException;
475    
476            /**
477            * Returns a range of all the activities done on the asset identified by the
478            * class name and the class primary key that are mirrors of the activity
479            * identified by the mirror activity ID.
480            *
481            * <p>
482            * Useful when paginating results. Returns a maximum of <code>end -
483            * start</code> instances. <code>start</code> and <code>end</code> are not
484            * primary keys, they are indexes in the result set. Thus, <code>0</code>
485            * refers to the first result in the set. Setting both <code>start</code>
486            * and <code>end</code> to {@link
487            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
488            * result set.
489            * </p>
490            *
491            * @param mirrorActivityId the primary key of the mirror activity
492            * @param className the target asset's class name
493            * @param classPK the primary key of the target asset
494            * @param start the lower bound of the range of results
495            * @param end the upper bound of the range of results (not inclusive)
496            * @return the range of matching activities
497            * @throws SystemException if a system exception occurred
498            */
499            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
500            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
501                    long mirrorActivityId, java.lang.String className, long classPK,
502                    int start, int end)
503                    throws com.liferay.portal.kernel.exception.SystemException;
504    
505            /**
506            * Returns a range of all the activities done on assets identified by the
507            * class name.
508            *
509            * <p>
510            * Useful when paginating results. Returns a maximum of <code>end -
511            * start</code> instances. <code>start</code> and <code>end</code> are not
512            * primary keys, they are indexes in the result set. Thus, <code>0</code>
513            * refers to the first result in the set. Setting both <code>start</code>
514            * and <code>end</code> to {@link
515            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
516            * result set.
517            * </p>
518            *
519            * @param className the target asset's class name
520            * @param start the lower bound of the range of results
521            * @param end the upper bound of the range of results (not inclusive)
522            * @return the range of matching activities
523            * @throws SystemException if a system exception occurred
524            */
525            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
526            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities(
527                    java.lang.String className, int start, int end)
528                    throws com.liferay.portal.kernel.exception.SystemException;
529    
530            /**
531            * Returns the number of activities done on assets identified by the class
532            * name ID.
533            *
534            * @param classNameId the target asset's class name ID
535            * @return the number of matching activities
536            * @throws SystemException if a system exception occurred
537            */
538            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
539            public int getActivitiesCount(long classNameId)
540                    throws com.liferay.portal.kernel.exception.SystemException;
541    
542            /**
543            * Returns the number of activities done on the asset identified by the
544            * class name ID and class primary key that are mirrors of the activity
545            * identified by the mirror activity ID.
546            *
547            * @param mirrorActivityId the primary key of the mirror activity
548            * @param classNameId the target asset's class name ID
549            * @param classPK the primary key of the target asset
550            * @return the number of matching activities
551            * @throws SystemException if a system exception occurred
552            */
553            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
554            public int getActivitiesCount(long mirrorActivityId, long classNameId,
555                    long classPK)
556                    throws com.liferay.portal.kernel.exception.SystemException;
557    
558            /**
559            * Returns the number of activities done on the asset identified by the
560            * class name and class primary key that are mirrors of the activity
561            * identified by the mirror activity ID.
562            *
563            * @param mirrorActivityId the primary key of the mirror activity
564            * @param className the target asset's class name
565            * @param classPK the primary key of the target asset
566            * @return the number of matching activities
567            * @throws SystemException if a system exception occurred
568            */
569            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
570            public int getActivitiesCount(long mirrorActivityId,
571                    java.lang.String className, long classPK)
572                    throws com.liferay.portal.kernel.exception.SystemException;
573    
574            /**
575            * Returns the number of activities done on assets identified by class name.
576            *
577            * @param className the target asset's class name
578            * @return the number of matching activities
579            * @throws SystemException if a system exception occurred
580            */
581            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
582            public int getActivitiesCount(java.lang.String className)
583                    throws com.liferay.portal.kernel.exception.SystemException;
584    
585            /**
586            * Returns the activity identified by its primary key.
587            *
588            * @param activityId the primary key of the activity
589            * @return Returns the activity
590            * @throws PortalException if the activity could not be found
591            * @throws SystemException if a system exception occurred
592            */
593            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
594            public com.liferay.portlet.social.model.SocialActivity getActivity(
595                    long activityId)
596                    throws com.liferay.portal.kernel.exception.PortalException,
597                            com.liferay.portal.kernel.exception.SystemException;
598    
599            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
600            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivitySetActivities(
601                    long activitySetId, int start, int end)
602                    throws com.liferay.portal.kernel.exception.SystemException;
603    
604            /**
605            * Returns a range of all the activities done in the group.
606            *
607            * <p>
608            * This method only finds activities without mirrors.
609            * </p>
610            *
611            * <p>
612            * Useful when paginating results. Returns a maximum of <code>end -
613            * start</code> instances. <code>start</code> and <code>end</code> are not
614            * primary keys, they are indexes in the result set. Thus, <code>0</code>
615            * refers to the first result in the set. Setting both <code>start</code>
616            * and <code>end</code> to {@link
617            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
618            * result set.
619            * </p>
620            *
621            * @param groupId the primary key of the group
622            * @param start the lower bound of the range of results
623            * @param end the upper bound of the range of results (not inclusive)
624            * @return the range of matching activities
625            * @throws SystemException if a system exception occurred
626            */
627            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
628            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupActivities(
629                    long groupId, int start, int end)
630                    throws com.liferay.portal.kernel.exception.SystemException;
631    
632            /**
633            * Returns the number of activities done in the group.
634            *
635            * <p>
636            * This method only counts activities without mirrors.
637            * </p>
638            *
639            * @param groupId the primary key of the group
640            * @return the number of matching activities
641            * @throws SystemException if a system exception occurred
642            */
643            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
644            public int getGroupActivitiesCount(long groupId)
645                    throws com.liferay.portal.kernel.exception.SystemException;
646    
647            /**
648            * Returns a range of activities done by users that are members of the
649            * group.
650            *
651            * <p>
652            * This method only finds activities without mirrors.
653            * </p>
654            *
655            * <p>
656            * Useful when paginating results. Returns a maximum of <code>end -
657            * start</code> instances. <code>start</code> and <code>end</code> are not
658            * primary keys, they are indexes in the result set. Thus, <code>0</code>
659            * refers to the first result in the set. Setting both <code>start</code>
660            * and <code>end</code> to {@link
661            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
662            * result set.
663            * </p>
664            *
665            * @param groupId the primary key of the group
666            * @param start the lower bound of the range of results
667            * @param end the upper bound of the range of results (not inclusive)
668            * @return the range of matching activities
669            * @throws SystemException if a system exception occurred
670            */
671            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
672            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupUsersActivities(
673                    long groupId, int start, int end)
674                    throws com.liferay.portal.kernel.exception.SystemException;
675    
676            /**
677            * Returns the number of activities done by users that are members of the
678            * group.
679            *
680            * <p>
681            * This method only counts activities without mirrors.
682            * </p>
683            *
684            * @param groupId the primary key of the group
685            * @return the number of matching activities
686            * @throws SystemException if a system exception occurred
687            */
688            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
689            public int getGroupUsersActivitiesCount(long groupId)
690                    throws com.liferay.portal.kernel.exception.SystemException;
691    
692            /**
693            * Returns the activity that has the mirror activity.
694            *
695            * @param mirrorActivityId the primary key of the mirror activity
696            * @return Returns the mirror activity
697            * @throws PortalException if the mirror activity could not be found
698            * @throws SystemException if a system exception occurred
699            */
700            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
701            public com.liferay.portlet.social.model.SocialActivity getMirrorActivity(
702                    long mirrorActivityId)
703                    throws com.liferay.portal.kernel.exception.PortalException,
704                            com.liferay.portal.kernel.exception.SystemException;
705    
706            /**
707            * Returns a range of all the activities done in the organization. This
708            * method only finds activities without mirrors.
709            *
710            * <p>
711            * Useful when paginating results. Returns a maximum of <code>end -
712            * start</code> instances. <code>start</code> and <code>end</code> are not
713            * primary keys, they are indexes in the result set. Thus, <code>0</code>
714            * refers to the first result in the set. Setting both <code>start</code>
715            * and <code>end</code> to {@link
716            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
717            * result set.
718            * </p>
719            *
720            * @param organizationId the primary key of the organization
721            * @param start the lower bound of the range of results
722            * @param end the upper bound of the range of results (not inclusive)
723            * @return the range of matching activities
724            * @throws SystemException if a system exception occurred
725            */
726            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
727            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities(
728                    long organizationId, int start, int end)
729                    throws com.liferay.portal.kernel.exception.SystemException;
730    
731            /**
732            * Returns the number of activities done in the organization. This method
733            * only counts activities without mirrors.
734            *
735            * @param organizationId the primary key of the organization
736            * @return the number of matching activities
737            * @throws SystemException if a system exception occurred
738            */
739            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
740            public int getOrganizationActivitiesCount(long organizationId)
741                    throws com.liferay.portal.kernel.exception.SystemException;
742    
743            /**
744            * Returns a range of all the activities done by users of the organization.
745            * This method only finds activities without mirrors.
746            *
747            * <p>
748            * Useful when paginating results. Returns a maximum of <code>end -
749            * start</code> instances. <code>start</code> and <code>end</code> are not
750            * primary keys, they are indexes in the result set. Thus, <code>0</code>
751            * refers to the first result in the set. Setting both <code>start</code>
752            * and <code>end</code> to {@link
753            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
754            * result set.
755            * </p>
756            *
757            * @param organizationId the primary key of the organization
758            * @param start the lower bound of the range of results
759            * @param end the upper bound of the range of results (not inclusive)
760            * @return the range of matching activities
761            * @throws SystemException if a system exception occurred
762            */
763            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
764            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities(
765                    long organizationId, int start, int end)
766                    throws com.liferay.portal.kernel.exception.SystemException;
767    
768            /**
769            * Returns the number of activities done by users of the organization. This
770            * method only counts activities without mirrors.
771            *
772            * @param organizationId the primary key of the organization
773            * @return the number of matching activities
774            * @throws SystemException if a system exception occurred
775            */
776            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
777            public int getOrganizationUsersActivitiesCount(long organizationId)
778                    throws com.liferay.portal.kernel.exception.SystemException;
779    
780            /**
781            * Returns a range of all the activities done by users in a relationship
782            * with the user identified by the user ID.
783            *
784            * <p>
785            * Useful when paginating results. Returns a maximum of <code>end -
786            * start</code> instances. <code>start</code> and <code>end</code> are not
787            * primary keys, they are indexes in the result set. Thus, <>0</code> refers
788            * to the first result in the set. Setting both <code>start</code> and
789            * <code>end</code> to {@link
790            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
791            * result set.
792            * </p>
793            *
794            * @param userId the primary key of the user
795            * @param start the lower bound of the range of results
796            * @param end the upper bound of the range of results (not inclusive)
797            * @return the range of matching activities
798            * @throws SystemException if a system exception occurred
799            */
800            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
801            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
802                    long userId, int start, int end)
803                    throws com.liferay.portal.kernel.exception.SystemException;
804    
805            /**
806            * Returns a range of all the activities done by users in a relationship of
807            * type <code>type</code> with the user identified by <code>userId</code>.
808            * This method only finds activities without mirrors.
809            *
810            * <p>
811            * Useful when paginating results. Returns a maximum of <code>end -
812            * start</code> instances. <code>start</code> and <code>end</code> are not
813            * primary keys, they are indexes in the result set. Thus, <code>0</code>
814            * refers to the first result in the set. Setting both <code>start</code>
815            * and <code>end</code> to {@link
816            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
817            * result set.
818            * </p>
819            *
820            * @param userId the primary key of the user
821            * @param type the relationship type
822            * @param start the lower bound of the range of results
823            * @param end the upper bound of the range of results (not inclusive)
824            * @return the range of matching activities
825            * @throws SystemException if a system exception occurred
826            */
827            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
828            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities(
829                    long userId, int type, int start, int end)
830                    throws com.liferay.portal.kernel.exception.SystemException;
831    
832            /**
833            * Returns the number of activities done by users in a relationship with the
834            * user identified by userId.
835            *
836            * @param userId the primary key of the user
837            * @return the number of matching activities
838            * @throws SystemException if a system exception occurred
839            */
840            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
841            public int getRelationActivitiesCount(long userId)
842                    throws com.liferay.portal.kernel.exception.SystemException;
843    
844            /**
845            * Returns the number of activities done by users in a relationship of type
846            * <code>type</code> with the user identified by <code>userId</code>. This
847            * method only counts activities without mirrors.
848            *
849            * @param userId the primary key of the user
850            * @param type the relationship type
851            * @return the number of matching activities
852            * @throws SystemException if a system exception occurred
853            */
854            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
855            public int getRelationActivitiesCount(long userId, int type)
856                    throws com.liferay.portal.kernel.exception.SystemException;
857    
858            /**
859            * Returns a range of all the activities done by the user.
860            *
861            * <p>
862            * Useful when paginating results. Returns a maximum of <code>end -
863            * start</code> instances. <code>start</code> and <code>end</code> are not
864            * primary keys, they are indexes in the result set. Thus, <code>0</code>
865            * refers to the first result in the set. Setting both <code>start</code>
866            * and <code>end</code> to {@link
867            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
868            * result set.
869            * </p>
870            *
871            * @param userId the primary key of the user
872            * @param start the lower bound of the range of results
873            * @param end the upper bound of the range of results (not inclusive)
874            * @return the range of matching activities
875            * @throws SystemException if a system exception occurred
876            */
877            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
878            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities(
879                    long userId, int start, int end)
880                    throws com.liferay.portal.kernel.exception.SystemException;
881    
882            /**
883            * Returns the number of activities done by the user.
884            *
885            * @param userId the primary key of the user
886            * @return the number of matching activities
887            * @throws SystemException if a system exception occurred
888            */
889            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
890            public int getUserActivitiesCount(long userId)
891                    throws com.liferay.portal.kernel.exception.SystemException;
892    
893            /**
894            * Returns a range of all the activities done in the user's groups. This
895            * method only finds activities without mirrors.
896            *
897            * <p>
898            * Useful when paginating results. Returns a maximum of <code>end -
899            * start</code> instances. <code>start</code> and <code>end</code> are not
900            * primary keys, they are indexes in the result set. Thus, <code>0</code>
901            * refers to the first result in the set. Setting both <code>start</code>
902            * and <code>end</code> to {@link
903            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
904            * result set.
905            * </p>
906            *
907            * @param userId the primary key of the user
908            * @param start the lower bound of the range of results
909            * @param end the upper bound of the range of results (not inclusive)
910            * @return the range of matching activities
911            * @throws SystemException if a system exception occurred
912            */
913            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
914            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities(
915                    long userId, int start, int end)
916                    throws com.liferay.portal.kernel.exception.SystemException;
917    
918            /**
919            * Returns the number of activities done in user's groups. This method only
920            * counts activities without mirrors.
921            *
922            * @param userId the primary key of the user
923            * @return the number of matching activities
924            * @throws SystemException if a system exception occurred
925            */
926            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
927            public int getUserGroupsActivitiesCount(long userId)
928                    throws com.liferay.portal.kernel.exception.SystemException;
929    
930            /**
931            * Returns a range of all the activities done in the user's groups and
932            * organizations. This method only finds activities without mirrors.
933            *
934            * <p>
935            * Useful when paginating results. Returns a maximum of <code>end -
936            * start</code> instances. <code>start</code> and <code>end</code> are not
937            * primary keys, they are indexes in the result set. Thus, <code>0</code>
938            * refers to the first result in the set. Setting both <code>start</code>
939            * and <code>end</code> to {@link
940            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
941            * result set.
942            * </p>
943            *
944            * @param userId the primary key of the user
945            * @param start the lower bound of the range of results
946            * @param end the upper bound of the range of results (not inclusive)
947            * @return the range of matching activities
948            * @throws SystemException if a system exception occurred
949            */
950            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
951            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsAndOrganizationsActivities(
952                    long userId, int start, int end)
953                    throws com.liferay.portal.kernel.exception.SystemException;
954    
955            /**
956            * Returns the number of activities done in user's groups and organizations.
957            * This method only counts activities without mirrors.
958            *
959            * @param userId the primary key of the user
960            * @return the number of matching activities
961            * @throws SystemException if a system exception occurred
962            */
963            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
964            public int getUserGroupsAndOrganizationsActivitiesCount(long userId)
965                    throws com.liferay.portal.kernel.exception.SystemException;
966    
967            /**
968            * Returns a range of all activities done in the user's organizations. This
969            * method only finds activities without mirrors.
970            *
971            * <p>
972            * Useful when paginating results. Returns a maximum of <code>end -
973            * start</code> instances. <code>start</code> and <code>end</code> are not
974            * primary keys, they are indexes in the result set. Thus, <code>0</code>
975            * refers to the first result in the set. Setting both <code>start</code>
976            * and <code>end</code> to {@link
977            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
978            * result set.
979            * </p>
980            *
981            * @param userId the primary key of the user
982            * @param start the lower bound of the range of results
983            * @param end the upper bound of the range of results (not inclusive)
984            * @return the range of matching activities
985            * @throws SystemException if a system exception occurred
986            */
987            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
988            public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserOrganizationsActivities(
989                    long userId, int start, int end)
990                    throws com.liferay.portal.kernel.exception.SystemException;
991    
992            /**
993            * Returns the number of activities done in the user's organizations. This
994            * method only counts activities without mirrors.
995            *
996            * @param userId the primary key of the user
997            * @return the number of matching activities
998            * @throws SystemException if a system exception occurred
999            */
1000            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1001            public int getUserOrganizationsActivitiesCount(long userId)
1002                    throws com.liferay.portal.kernel.exception.SystemException;
1003    }