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 419 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 420 * result set. 421 * </p> 422 * 423 * @param className the target asset's class name 424 * @param start the lower bound of the range of results 425 * @param end the upper bound of the range of results (not inclusive) 426 * @return the range of matching activities 427 */ 428 @Override 429 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 430 java.lang.String className, int start, int end) { 431 return _socialActivityLocalService.getActivities(className, start, end); 432 } 433 434 /** 435 * Returns a range of all the activities done on assets identified by the 436 * class name ID. 437 * 438 * <p> 439 * Useful when paginating results. Returns a maximum of <code>end - 440 * start</code> instances. <code>start</code> and <code>end</code> are not 441 * primary keys, they are indexes in the result set. Thus, <code>0</code> 442 * refers to the first result in the set. Setting both <code>start</code> 443 * and <code>end</code> to {@link 444 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 445 * result set. 446 * </p> 447 * 448 * @param classNameId the target asset's class name ID 449 * @param start the lower bound of the range of results 450 * @param end the upper bound of the range of results (not inclusive) 451 * @return the range of matching activities 452 */ 453 @Override 454 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 455 long classNameId, int start, int end) { 456 return _socialActivityLocalService.getActivities(classNameId, start, end); 457 } 458 459 /** 460 * Returns a range of all the activities done on the asset identified by the 461 * class name and the class primary key that are mirrors of the activity 462 * identified by the mirror activity ID. 463 * 464 * <p> 465 * Useful when paginating results. Returns a maximum of <code>end - 466 * start</code> instances. <code>start</code> and <code>end</code> are not 467 * primary keys, they are indexes in the result set. Thus, <code>0</code> 468 * refers to the first result in the set. Setting both <code>start</code> 469 * and <code>end</code> to {@link 470 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 471 * result set. 472 * </p> 473 * 474 * @param mirrorActivityId the primary key of the mirror activity 475 * @param className the target asset's class name 476 * @param classPK the primary key of the target asset 477 * @param start the lower bound of the range of results 478 * @param end the upper bound of the range of results (not inclusive) 479 * @return the range of matching activities 480 */ 481 @Override 482 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 483 long mirrorActivityId, java.lang.String className, long classPK, 484 int start, int end) { 485 return _socialActivityLocalService.getActivities(mirrorActivityId, 486 className, classPK, 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 */ 511 @Override 512 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 513 long mirrorActivityId, long classNameId, long classPK, int start, 514 int end) { 515 return _socialActivityLocalService.getActivities(mirrorActivityId, 516 classNameId, classPK, start, end); 517 } 518 519 /** 520 * Returns the number of activities done on assets identified by class name. 521 * 522 * @param className the target asset's class name 523 * @return the number of matching activities 524 */ 525 @Override 526 public int getActivitiesCount(java.lang.String className) { 527 return _socialActivityLocalService.getActivitiesCount(className); 528 } 529 530 /** 531 * Returns the number of activities done on assets identified by the class 532 * name ID. 533 * 534 * @param classNameId the target asset's class name ID 535 * @return the number of matching activities 536 */ 537 @Override 538 public int getActivitiesCount(long classNameId) { 539 return _socialActivityLocalService.getActivitiesCount(classNameId); 540 } 541 542 /** 543 * Returns the number of activities done on the asset identified by the 544 * class name and class primary key that are mirrors of the activity 545 * identified by the mirror activity ID. 546 * 547 * @param mirrorActivityId the primary key of the mirror activity 548 * @param className the target asset's class name 549 * @param classPK the primary key of the target asset 550 * @return the number of matching activities 551 */ 552 @Override 553 public int getActivitiesCount(long mirrorActivityId, 554 java.lang.String className, long classPK) { 555 return _socialActivityLocalService.getActivitiesCount(mirrorActivityId, 556 className, classPK); 557 } 558 559 /** 560 * Returns the number of activities done on the asset identified by the 561 * class name ID and class primary key that are mirrors of the activity 562 * identified by the mirror activity ID. 563 * 564 * @param mirrorActivityId the primary key of the mirror activity 565 * @param classNameId the target asset's class name ID 566 * @param classPK the primary key of the target asset 567 * @return the number of matching activities 568 */ 569 @Override 570 public int getActivitiesCount(long mirrorActivityId, long classNameId, 571 long classPK) { 572 return _socialActivityLocalService.getActivitiesCount(mirrorActivityId, 573 classNameId, classPK); 574 } 575 576 /** 577 * Returns the activity identified by its primary key. 578 * 579 * @param activityId the primary key of the activity 580 * @return Returns the activity 581 * @throws PortalException if the activity could not be found 582 */ 583 @Override 584 public com.liferay.portlet.social.model.SocialActivity getActivity( 585 long activityId) 586 throws com.liferay.portal.kernel.exception.PortalException { 587 return _socialActivityLocalService.getActivity(activityId); 588 } 589 590 @Override 591 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivitySetActivities( 592 long activitySetId, int start, int end) { 593 return _socialActivityLocalService.getActivitySetActivities(activitySetId, 594 start, end); 595 } 596 597 /** 598 * Returns the Spring bean ID for this bean. 599 * 600 * @return the Spring bean ID for this bean 601 */ 602 @Override 603 public java.lang.String getBeanIdentifier() { 604 return _socialActivityLocalService.getBeanIdentifier(); 605 } 606 607 /** 608 * Returns a range of all the activities done in the group. 609 * 610 * <p> 611 * This method only finds activities without mirrors. 612 * </p> 613 * 614 * <p> 615 * Useful when paginating results. Returns a maximum of <code>end - 616 * start</code> instances. <code>start</code> and <code>end</code> are not 617 * primary keys, they are indexes in the result set. Thus, <code>0</code> 618 * refers to the first result in the set. Setting both <code>start</code> 619 * and <code>end</code> to {@link 620 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 621 * result set. 622 * </p> 623 * 624 * @param groupId the primary key of the group 625 * @param start the lower bound of the range of results 626 * @param end the upper bound of the range of results (not inclusive) 627 * @return the range of matching activities 628 */ 629 @Override 630 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupActivities( 631 long groupId, int start, int end) { 632 return _socialActivityLocalService.getGroupActivities(groupId, start, 633 end); 634 } 635 636 /** 637 * Returns the number of activities done in the group. 638 * 639 * <p> 640 * This method only counts activities without mirrors. 641 * </p> 642 * 643 * @param groupId the primary key of the group 644 * @return the number of matching activities 645 */ 646 @Override 647 public int getGroupActivitiesCount(long groupId) { 648 return _socialActivityLocalService.getGroupActivitiesCount(groupId); 649 } 650 651 /** 652 * Returns a range of activities done by users that are members of the 653 * 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 */ 674 @Override 675 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupUsersActivities( 676 long groupId, int start, int end) { 677 return _socialActivityLocalService.getGroupUsersActivities(groupId, 678 start, end); 679 } 680 681 /** 682 * Returns the number of activities done by users that are members of the 683 * 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 */ 692 @Override 693 public int getGroupUsersActivitiesCount(long groupId) { 694 return _socialActivityLocalService.getGroupUsersActivitiesCount(groupId); 695 } 696 697 /** 698 * Returns the activity that has the mirror activity. 699 * 700 * @param mirrorActivityId the primary key of the mirror activity 701 * @return Returns the mirror activity 702 * @throws PortalException if the mirror activity could not be found 703 */ 704 @Override 705 public com.liferay.portlet.social.model.SocialActivity getMirrorActivity( 706 long mirrorActivityId) 707 throws com.liferay.portal.kernel.exception.PortalException { 708 return _socialActivityLocalService.getMirrorActivity(mirrorActivityId); 709 } 710 711 /** 712 * Returns a range of all the activities done in the organization. This 713 * method only finds activities without mirrors. 714 * 715 * <p> 716 * Useful when paginating results. Returns a maximum of <code>end - 717 * start</code> instances. <code>start</code> and <code>end</code> are not 718 * primary keys, they are indexes in the result set. Thus, <code>0</code> 719 * refers to the first result in the set. Setting both <code>start</code> 720 * and <code>end</code> to {@link 721 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 722 * result set. 723 * </p> 724 * 725 * @param organizationId the primary key of the organization 726 * @param start the lower bound of the range of results 727 * @param end the upper bound of the range of results (not inclusive) 728 * @return the range of matching activities 729 */ 730 @Override 731 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities( 732 long organizationId, int start, int end) { 733 return _socialActivityLocalService.getOrganizationActivities(organizationId, 734 start, end); 735 } 736 737 /** 738 * Returns the number of activities done in the organization. This method 739 * only counts activities without mirrors. 740 * 741 * @param organizationId the primary key of the organization 742 * @return the number of matching activities 743 */ 744 @Override 745 public int getOrganizationActivitiesCount(long organizationId) { 746 return _socialActivityLocalService.getOrganizationActivitiesCount(organizationId); 747 } 748 749 /** 750 * Returns a range of all the activities done by users of the organization. 751 * This method only finds activities without mirrors. 752 * 753 * <p> 754 * Useful when paginating results. Returns a maximum of <code>end - 755 * start</code> instances. <code>start</code> and <code>end</code> are not 756 * primary keys, they are indexes in the result set. Thus, <code>0</code> 757 * refers to the first result in the set. Setting both <code>start</code> 758 * and <code>end</code> to {@link 759 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 760 * result set. 761 * </p> 762 * 763 * @param organizationId the primary key of the organization 764 * @param start the lower bound of the range of results 765 * @param end the upper bound of the range of results (not inclusive) 766 * @return the range of matching activities 767 */ 768 @Override 769 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities( 770 long organizationId, int start, int end) { 771 return _socialActivityLocalService.getOrganizationUsersActivities(organizationId, 772 start, end); 773 } 774 775 /** 776 * Returns the number of activities done by users of the organization. This 777 * method only counts activities without mirrors. 778 * 779 * @param organizationId the primary key of the organization 780 * @return the number of matching activities 781 */ 782 @Override 783 public int getOrganizationUsersActivitiesCount(long organizationId) { 784 return _socialActivityLocalService.getOrganizationUsersActivitiesCount(organizationId); 785 } 786 787 @Override 788 public com.liferay.portal.model.PersistedModel getPersistedModel( 789 java.io.Serializable primaryKeyObj) 790 throws com.liferay.portal.kernel.exception.PortalException { 791 return _socialActivityLocalService.getPersistedModel(primaryKeyObj); 792 } 793 794 /** 795 * Returns a range of all the activities done by users in a relationship 796 * with the user identified by the user ID. 797 * 798 * <p> 799 * Useful when paginating results. Returns a maximum of <code>end - 800 * start</code> instances. <code>start</code> and <code>end</code> are not 801 * primary keys, they are indexes in the result set. Thus, <>0</code> refers 802 * to the first result in the set. Setting both <code>start</code> and 803 * <code>end</code> to {@link 804 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 805 * result set. 806 * </p> 807 * 808 * @param userId the primary key of the user 809 * @param start the lower bound of the range of results 810 * @param end the upper bound of the range of results (not inclusive) 811 * @return the range of matching activities 812 */ 813 @Override 814 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities( 815 long userId, int start, int end) { 816 return _socialActivityLocalService.getRelationActivities(userId, start, 817 end); 818 } 819 820 /** 821 * Returns a range of all the activities done by users in a relationship of 822 * type <code>type</code> with the user identified by <code>userId</code>. 823 * This method only finds activities without mirrors. 824 * 825 * <p> 826 * Useful when paginating results. Returns a maximum of <code>end - 827 * start</code> instances. <code>start</code> and <code>end</code> are not 828 * primary keys, they are indexes in the result set. Thus, <code>0</code> 829 * refers to the first result in the set. Setting both <code>start</code> 830 * and <code>end</code> to {@link 831 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 832 * result set. 833 * </p> 834 * 835 * @param userId the primary key of the user 836 * @param type the relationship type 837 * @param start the lower bound of the range of results 838 * @param end the upper bound of the range of results (not inclusive) 839 * @return the range of matching activities 840 */ 841 @Override 842 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities( 843 long userId, int type, int start, int end) { 844 return _socialActivityLocalService.getRelationActivities(userId, type, 845 start, end); 846 } 847 848 /** 849 * Returns the number of activities done by users in a relationship with the 850 * user identified by userId. 851 * 852 * @param userId the primary key of the user 853 * @return the number of matching activities 854 */ 855 @Override 856 public int getRelationActivitiesCount(long userId) { 857 return _socialActivityLocalService.getRelationActivitiesCount(userId); 858 } 859 860 /** 861 * Returns the number of activities done by users in a relationship of type 862 * <code>type</code> with the user identified by <code>userId</code>. This 863 * method only counts activities without mirrors. 864 * 865 * @param userId the primary key of the user 866 * @param type the relationship type 867 * @return the number of matching activities 868 */ 869 @Override 870 public int getRelationActivitiesCount(long userId, int type) { 871 return _socialActivityLocalService.getRelationActivitiesCount(userId, 872 type); 873 } 874 875 /** 876 * Returns a range of all the social activities. 877 * 878 * <p> 879 * 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. 880 * </p> 881 * 882 * @param start the lower bound of the range of social activities 883 * @param end the upper bound of the range of social activities (not inclusive) 884 * @return the range of social activities 885 */ 886 @Override 887 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getSocialActivities( 888 int start, int end) { 889 return _socialActivityLocalService.getSocialActivities(start, end); 890 } 891 892 /** 893 * Returns the number of social activities. 894 * 895 * @return the number of social activities 896 */ 897 @Override 898 public int getSocialActivitiesCount() { 899 return _socialActivityLocalService.getSocialActivitiesCount(); 900 } 901 902 /** 903 * Returns the social activity with the primary key. 904 * 905 * @param activityId the primary key of the social activity 906 * @return the social activity 907 * @throws PortalException if a social activity with the primary key could not be found 908 */ 909 @Override 910 public com.liferay.portlet.social.model.SocialActivity getSocialActivity( 911 long activityId) 912 throws com.liferay.portal.kernel.exception.PortalException { 913 return _socialActivityLocalService.getSocialActivity(activityId); 914 } 915 916 /** 917 * Returns a range of all the activities done by the user. 918 * 919 * <p> 920 * Useful when paginating results. Returns a maximum of <code>end - 921 * start</code> instances. <code>start</code> and <code>end</code> are not 922 * primary keys, they are indexes in the result set. Thus, <code>0</code> 923 * refers to the first result in the set. Setting both <code>start</code> 924 * and <code>end</code> to {@link 925 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 926 * result set. 927 * </p> 928 * 929 * @param userId the primary key of the user 930 * @param start the lower bound of the range of results 931 * @param end the upper bound of the range of results (not inclusive) 932 * @return the range of matching activities 933 */ 934 @Override 935 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities( 936 long userId, int start, int end) { 937 return _socialActivityLocalService.getUserActivities(userId, start, end); 938 } 939 940 /** 941 * Returns the number of activities done by the user. 942 * 943 * @param userId the primary key of the user 944 * @return the number of matching activities 945 */ 946 @Override 947 public int getUserActivitiesCount(long userId) { 948 return _socialActivityLocalService.getUserActivitiesCount(userId); 949 } 950 951 /** 952 * Returns a range of all the activities done in the user's groups. This 953 * method only finds activities without mirrors. 954 * 955 * <p> 956 * Useful when paginating results. Returns a maximum of <code>end - 957 * start</code> instances. <code>start</code> and <code>end</code> are not 958 * primary keys, they are indexes in the result set. Thus, <code>0</code> 959 * refers to the first result in the set. Setting both <code>start</code> 960 * and <code>end</code> to {@link 961 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 962 * result set. 963 * </p> 964 * 965 * @param userId the primary key of the user 966 * @param start the lower bound of the range of results 967 * @param end the upper bound of the range of results (not inclusive) 968 * @return the range of matching activities 969 */ 970 @Override 971 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities( 972 long userId, int start, int end) { 973 return _socialActivityLocalService.getUserGroupsActivities(userId, 974 start, end); 975 } 976 977 /** 978 * Returns the number of activities done in user's groups. This method only 979 * counts activities without mirrors. 980 * 981 * @param userId the primary key of the user 982 * @return the number of matching activities 983 */ 984 @Override 985 public int getUserGroupsActivitiesCount(long userId) { 986 return _socialActivityLocalService.getUserGroupsActivitiesCount(userId); 987 } 988 989 /** 990 * Returns a range of all the activities done in the user's groups and 991 * organizations. This method only finds activities without mirrors. 992 * 993 * <p> 994 * Useful when paginating results. Returns a maximum of <code>end - 995 * start</code> instances. <code>start</code> and <code>end</code> are not 996 * primary keys, they are indexes in the result set. Thus, <code>0</code> 997 * refers to the first result in the set. Setting both <code>start</code> 998 * and <code>end</code> to {@link 999 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1000 * result set. 1001 * </p> 1002 * 1003 * @param userId the primary key of the user 1004 * @param start the lower bound of the range of results 1005 * @param end the upper bound of the range of results (not inclusive) 1006 * @return the range of matching activities 1007 */ 1008 @Override 1009 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsAndOrganizationsActivities( 1010 long userId, int start, int end) { 1011 return _socialActivityLocalService.getUserGroupsAndOrganizationsActivities(userId, 1012 start, end); 1013 } 1014 1015 /** 1016 * Returns the number of activities done in user's groups and organizations. 1017 * This method only counts activities without mirrors. 1018 * 1019 * @param userId the primary key of the user 1020 * @return the number of matching activities 1021 */ 1022 @Override 1023 public int getUserGroupsAndOrganizationsActivitiesCount(long userId) { 1024 return _socialActivityLocalService.getUserGroupsAndOrganizationsActivitiesCount(userId); 1025 } 1026 1027 /** 1028 * Returns a range of all activities done in the user's organizations. This 1029 * method only finds activities without mirrors. 1030 * 1031 * <p> 1032 * Useful when paginating results. Returns a maximum of <code>end - 1033 * start</code> instances. <code>start</code> and <code>end</code> are not 1034 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1035 * refers to the first result in the set. Setting both <code>start</code> 1036 * and <code>end</code> to {@link 1037 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1038 * result set. 1039 * </p> 1040 * 1041 * @param userId the primary key of the user 1042 * @param start the lower bound of the range of results 1043 * @param end the upper bound of the range of results (not inclusive) 1044 * @return the range of matching activities 1045 */ 1046 @Override 1047 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserOrganizationsActivities( 1048 long userId, int start, int end) { 1049 return _socialActivityLocalService.getUserOrganizationsActivities(userId, 1050 start, end); 1051 } 1052 1053 /** 1054 * Returns the number of activities done in the user's organizations. This 1055 * method only counts activities without mirrors. 1056 * 1057 * @param userId the primary key of the user 1058 * @return the number of matching activities 1059 */ 1060 @Override 1061 public int getUserOrganizationsActivitiesCount(long userId) { 1062 return _socialActivityLocalService.getUserOrganizationsActivitiesCount(userId); 1063 } 1064 1065 /** 1066 * Sets the Spring bean ID for this bean. 1067 * 1068 * @param beanIdentifier the Spring bean ID for this bean 1069 */ 1070 @Override 1071 public void setBeanIdentifier(java.lang.String beanIdentifier) { 1072 _socialActivityLocalService.setBeanIdentifier(beanIdentifier); 1073 } 1074 1075 /** 1076 * Updates the social activity in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 1077 * 1078 * @param socialActivity the social activity 1079 * @return the social activity that was updated 1080 */ 1081 @Override 1082 public com.liferay.portlet.social.model.SocialActivity updateSocialActivity( 1083 com.liferay.portlet.social.model.SocialActivity socialActivity) { 1084 return _socialActivityLocalService.updateSocialActivity(socialActivity); 1085 } 1086 1087 /** 1088 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 1089 */ 1090 @Deprecated 1091 public SocialActivityLocalService getWrappedSocialActivityLocalService() { 1092 return _socialActivityLocalService; 1093 } 1094 1095 /** 1096 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 1097 */ 1098 @Deprecated 1099 public void setWrappedSocialActivityLocalService( 1100 SocialActivityLocalService socialActivityLocalService) { 1101 _socialActivityLocalService = socialActivityLocalService; 1102 } 1103 1104 @Override 1105 public SocialActivityLocalService getWrappedService() { 1106 return _socialActivityLocalService; 1107 } 1108 1109 @Override 1110 public void setWrappedService( 1111 SocialActivityLocalService socialActivityLocalService) { 1112 _socialActivityLocalService = socialActivityLocalService; 1113 } 1114 1115 private SocialActivityLocalService _socialActivityLocalService; 1116 }