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