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