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