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