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.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 its 244 * class name and class primary key, in the database. Additional information 245 * (such as the original message ID for a reply to a forum post) is passed 246 * in via the <code>extraData</code> in JSON format. For activities 247 * affecting another user, a mirror activity is generated that describes the 248 * action from the user's point of view. The target user's ID is passed in 249 * 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 of 258 * the <code>userId</code> and the <code>receiverUserId</code> swapped. This 259 * 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 full 429 * 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 the 445 * 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 full 455 * 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 the 473 * class name and the class primary key that are mirrors of the activity 474 * 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 full 483 * 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 full 511 * 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 name. 571 * 572 * @param className the target asset's class name 573 * @return the number of matching activities 574 * @throws SystemException if a system exception occurred 575 */ 576 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 577 public int getActivitiesCount(java.lang.String className) 578 throws com.liferay.portal.kernel.exception.SystemException; 579 580 /** 581 * Returns the activity identified by its primary key. 582 * 583 * @param activityId the primary key of the activity 584 * @return Returns the activity 585 * @throws PortalException if the activity could not be found 586 * @throws SystemException if a system exception occurred 587 */ 588 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 589 public com.liferay.portlet.social.model.SocialActivity getActivity( 590 long activityId) 591 throws com.liferay.portal.kernel.exception.PortalException, 592 com.liferay.portal.kernel.exception.SystemException; 593 594 /** 595 * Returns a range of all the activities done in the group. 596 * 597 * <p> 598 * This method only finds activities without mirrors. 599 * </p> 600 * 601 * <p> 602 * Useful when paginating results. Returns a maximum of <code>end - 603 * start</code> instances. <code>start</code> and <code>end</code> are not 604 * primary keys, they are indexes in the result set. Thus, <code>0</code> 605 * refers to the first result in the set. Setting both <code>start</code> 606 * and <code>end</code> to {@link 607 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 608 * result set. 609 * </p> 610 * 611 * @param groupId the primary key of the group 612 * @param start the lower bound of the range of results 613 * @param end the upper bound of the range of results (not inclusive) 614 * @return the range of matching activities 615 * @throws SystemException if a system exception occurred 616 */ 617 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 618 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupActivities( 619 long groupId, int start, int end) 620 throws com.liferay.portal.kernel.exception.SystemException; 621 622 /** 623 * Returns the number of activities done in the group. 624 * 625 * <p> 626 * This method only counts activities without mirrors. 627 * </p> 628 * 629 * @param groupId the primary key of the group 630 * @return the number of matching activities 631 * @throws SystemException if a system exception occurred 632 */ 633 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 634 public int getGroupActivitiesCount(long groupId) 635 throws com.liferay.portal.kernel.exception.SystemException; 636 637 /** 638 * Returns a range of activities done by users that are members of the 639 * group. 640 * 641 * <p> 642 * This method only finds activities without mirrors. 643 * </p> 644 * 645 * <p> 646 * Useful when paginating results. Returns a maximum of <code>end - 647 * start</code> instances. <code>start</code> and <code>end</code> are not 648 * primary keys, they are indexes in the result set. Thus, <code>0</code> 649 * refers to the first result in the set. Setting both <code>start</code> 650 * and <code>end</code> to {@link 651 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 652 * result set. 653 * </p> 654 * 655 * @param groupId the primary key of the group 656 * @param start the lower bound of the range of results 657 * @param end the upper bound of the range of results (not inclusive) 658 * @return the range of matching activities 659 * @throws SystemException if a system exception occurred 660 */ 661 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 662 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupUsersActivities( 663 long groupId, int start, int end) 664 throws com.liferay.portal.kernel.exception.SystemException; 665 666 /** 667 * Returns the number of activities done by users that are members of the 668 * group. 669 * 670 * <p> 671 * This method only counts activities without mirrors. 672 * </p> 673 * 674 * @param groupId the primary key of the group 675 * @return the number of matching activities 676 * @throws SystemException if a system exception occurred 677 */ 678 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 679 public int getGroupUsersActivitiesCount(long groupId) 680 throws com.liferay.portal.kernel.exception.SystemException; 681 682 /** 683 * Returns the activity that has the mirror activity. 684 * 685 * @param mirrorActivityId the primary key of the mirror activity 686 * @return Returns the mirror activity 687 * @throws PortalException if the mirror activity could not be found 688 * @throws SystemException if a system exception occurred 689 */ 690 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 691 public com.liferay.portlet.social.model.SocialActivity getMirrorActivity( 692 long mirrorActivityId) 693 throws com.liferay.portal.kernel.exception.PortalException, 694 com.liferay.portal.kernel.exception.SystemException; 695 696 /** 697 * Returns a range of all the activities done in the organization. This 698 * method only finds activities without mirrors. 699 * 700 * <p> 701 * Useful when paginating results. Returns a maximum of <code>end - 702 * start</code> instances. <code>start</code> and <code>end</code> are not 703 * primary keys, they are indexes in the result set. Thus, <code>0</code> 704 * refers to the first result in the set. Setting both <code>start</code> 705 * and <code>end</code> to {@link 706 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 707 * result set. 708 * </p> 709 * 710 * @param organizationId the primary key of the organization 711 * @param start the lower bound of the range of results 712 * @param end the upper bound of the range of results (not inclusive) 713 * @return the range of matching activities 714 * @throws SystemException if a system exception occurred 715 */ 716 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 717 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities( 718 long organizationId, int start, int end) 719 throws com.liferay.portal.kernel.exception.SystemException; 720 721 /** 722 * Returns the number of activities done in the organization. This method 723 * only counts activities without mirrors. 724 * 725 * @param organizationId the primary key of the organization 726 * @return the number of matching activities 727 * @throws SystemException if a system exception occurred 728 */ 729 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 730 public int getOrganizationActivitiesCount(long organizationId) 731 throws com.liferay.portal.kernel.exception.SystemException; 732 733 /** 734 * Returns a range of all the activities done by users of the organization. 735 * This method only finds activities without mirrors. 736 * 737 * <p> 738 * Useful when paginating results. Returns a maximum of <code>end - 739 * start</code> instances. <code>start</code> and <code>end</code> are not 740 * primary keys, they are indexes in the result set. Thus, <code>0</code> 741 * refers to the first result in the set. Setting both <code>start</code> 742 * and <code>end</code> to {@link 743 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 744 * result set. 745 * </p> 746 * 747 * @param organizationId the primary key of the organization 748 * @param start the lower bound of the range of results 749 * @param end the upper bound of the range of results (not inclusive) 750 * @return the range of matching activities 751 * @throws SystemException if a system exception occurred 752 */ 753 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 754 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities( 755 long organizationId, int start, int end) 756 throws com.liferay.portal.kernel.exception.SystemException; 757 758 /** 759 * Returns the number of activities done by users of the organization. This 760 * method only counts activities without mirrors. 761 * 762 * @param organizationId the primary key of the organization 763 * @return the number of matching activities 764 * @throws SystemException if a system exception occurred 765 */ 766 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 767 public int getOrganizationUsersActivitiesCount(long organizationId) 768 throws com.liferay.portal.kernel.exception.SystemException; 769 770 /** 771 * Returns a range of all the activities done by users in a relationship 772 * with the user identified by the user ID. 773 * 774 * <p> 775 * Useful when paginating results. Returns a maximum of <code>end - 776 * start</code> instances. <code>start</code> and <code>end</code> are not 777 * primary keys, they are indexes in the result set. Thus, <>0</code> refers 778 * to the first result in the set. Setting both <code>start</code> and 779 * <code>end</code> to {@link 780 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 781 * result set. 782 * </p> 783 * 784 * @param userId the primary key of the user 785 * @param start the lower bound of the range of results 786 * @param end the upper bound of the range of results (not inclusive) 787 * @return the range of matching activities 788 * @throws SystemException if a system exception occurred 789 */ 790 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 791 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities( 792 long userId, int start, int end) 793 throws com.liferay.portal.kernel.exception.SystemException; 794 795 /** 796 * Returns a range of all the activities done by users in a relationship of 797 * type <code>type</code> with the user identified by <code>userId</code>. 798 * This method only finds activities without mirrors. 799 * 800 * <p> 801 * Useful when paginating results. Returns a maximum of <code>end - 802 * start</code> instances. <code>start</code> and <code>end</code> are not 803 * primary keys, they are indexes in the result set. Thus, <code>0</code> 804 * refers to the first result in the set. Setting both <code>start</code> 805 * and <code>end</code> to {@link 806 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 807 * result set. 808 * </p> 809 * 810 * @param userId the primary key of the user 811 * @param type the relationship type 812 * @param start the lower bound of the range of results 813 * @param end the upper bound of the range of results (not inclusive) 814 * @return the range of matching activities 815 * @throws SystemException if a system exception occurred 816 */ 817 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 818 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities( 819 long userId, int type, int start, int end) 820 throws com.liferay.portal.kernel.exception.SystemException; 821 822 /** 823 * Returns the number of activities done by users in a relationship with the 824 * user identified by userId. 825 * 826 * @param userId the primary key of the user 827 * @return the number of matching activities 828 * @throws SystemException if a system exception occurred 829 */ 830 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 831 public int getRelationActivitiesCount(long userId) 832 throws com.liferay.portal.kernel.exception.SystemException; 833 834 /** 835 * Returns the number of activities done by users in a relationship of type 836 * <code>type</code> with the user identified by <code>userId</code>. This 837 * method only counts activities without mirrors. 838 * 839 * @param userId the primary key of the user 840 * @param type the relationship type 841 * @return the number of matching activities 842 * @throws SystemException if a system exception occurred 843 */ 844 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 845 public int getRelationActivitiesCount(long userId, int type) 846 throws com.liferay.portal.kernel.exception.SystemException; 847 848 /** 849 * Returns a range of all the activities done by the user. 850 * 851 * <p> 852 * Useful when paginating results. Returns a maximum of <code>end - 853 * start</code> instances. <code>start</code> and <code>end</code> are not 854 * primary keys, they are indexes in the result set. Thus, <code>0</code> 855 * refers to the first result in the set. Setting both <code>start</code> 856 * and <code>end</code> to {@link 857 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 858 * result set. 859 * </p> 860 * 861 * @param userId the primary key of the user 862 * @param start the lower bound of the range of results 863 * @param end the upper bound of the range of results (not inclusive) 864 * @return the range of matching activities 865 * @throws SystemException if a system exception occurred 866 */ 867 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 868 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities( 869 long userId, int start, int end) 870 throws com.liferay.portal.kernel.exception.SystemException; 871 872 /** 873 * Returns the number of activities done by the user. 874 * 875 * @param userId the primary key of the user 876 * @return the number of matching activities 877 * @throws SystemException if a system exception occurred 878 */ 879 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 880 public int getUserActivitiesCount(long userId) 881 throws com.liferay.portal.kernel.exception.SystemException; 882 883 /** 884 * Returns a range of all the activities done in the user's groups. This 885 * method only finds activities without mirrors. 886 * 887 * <p> 888 * Useful when paginating results. Returns a maximum of <code>end - 889 * start</code> instances. <code>start</code> and <code>end</code> are not 890 * primary keys, they are indexes in the result set. Thus, <code>0</code> 891 * refers to the first result in the set. Setting both <code>start</code> 892 * and <code>end</code> to {@link 893 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 894 * result set. 895 * </p> 896 * 897 * @param userId the primary key of the user 898 * @param start the lower bound of the range of results 899 * @param end the upper bound of the range of results (not inclusive) 900 * @return the range of matching activities 901 * @throws SystemException if a system exception occurred 902 */ 903 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 904 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities( 905 long userId, int start, int end) 906 throws com.liferay.portal.kernel.exception.SystemException; 907 908 /** 909 * Returns the number of activities done in user's groups. This method only 910 * counts activities without mirrors. 911 * 912 * @param userId the primary key of the user 913 * @return the number of matching activities 914 * @throws SystemException if a system exception occurred 915 */ 916 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 917 public int getUserGroupsActivitiesCount(long userId) 918 throws com.liferay.portal.kernel.exception.SystemException; 919 920 /** 921 * Returns a range of all the activities done in the user's groups and 922 * organizations. This method only finds activities without mirrors. 923 * 924 * <p> 925 * Useful when paginating results. Returns a maximum of <code>end - 926 * start</code> instances. <code>start</code> and <code>end</code> are not 927 * primary keys, they are indexes in the result set. Thus, <code>0</code> 928 * refers to the first result in the set. Setting both <code>start</code> 929 * and <code>end</code> to {@link 930 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 931 * result set. 932 * </p> 933 * 934 * @param userId the primary key of the user 935 * @param start the lower bound of the range of results 936 * @param end the upper bound of the range of results (not inclusive) 937 * @return the range of matching activities 938 * @throws SystemException if a system exception occurred 939 */ 940 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 941 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsAndOrganizationsActivities( 942 long userId, int start, int end) 943 throws com.liferay.portal.kernel.exception.SystemException; 944 945 /** 946 * Returns the number of activities done in user's groups and organizations. 947 * This method only counts activities without mirrors. 948 * 949 * @param userId the primary key of the user 950 * @return the number of matching activities 951 * @throws SystemException if a system exception occurred 952 */ 953 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 954 public int getUserGroupsAndOrganizationsActivitiesCount(long userId) 955 throws com.liferay.portal.kernel.exception.SystemException; 956 957 /** 958 * Returns a range of all activities done in the user's organizations. This 959 * method only finds activities without mirrors. 960 * 961 * <p> 962 * Useful when paginating results. Returns a maximum of <code>end - 963 * start</code> instances. <code>start</code> and <code>end</code> are not 964 * primary keys, they are indexes in the result set. Thus, <code>0</code> 965 * refers to the first result in the set. Setting both <code>start</code> 966 * and <code>end</code> to {@link 967 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 968 * result set. 969 * </p> 970 * 971 * @param userId the primary key of the user 972 * @param start the lower bound of the range of results 973 * @param end the upper bound of the range of results (not inclusive) 974 * @return the range of matching activities 975 * @throws SystemException if a system exception occurred 976 */ 977 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 978 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserOrganizationsActivities( 979 long userId, int start, int end) 980 throws com.liferay.portal.kernel.exception.SystemException; 981 982 /** 983 * Returns the number of activities done in the user's organizations. This 984 * method only counts activities without mirrors. 985 * 986 * @param userId the primary key of the user 987 * @return the number of matching activities 988 * @throws SystemException if a system exception occurred 989 */ 990 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 991 public int getUserOrganizationsActivitiesCount(long userId) 992 throws com.liferay.portal.kernel.exception.SystemException; 993 }