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