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