001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.social.service; 016 017 import com.liferay.portal.service.ServiceWrapper; 018 019 /** 020 * <p> 021 * This class is a wrapper for {@link SocialActivityLocalService}. 022 * </p> 023 * 024 * @author Brian Wing Shun Chan 025 * @see SocialActivityLocalService 026 * @generated 027 */ 028 public class SocialActivityLocalServiceWrapper 029 implements SocialActivityLocalService, 030 ServiceWrapper<SocialActivityLocalService> { 031 public SocialActivityLocalServiceWrapper( 032 SocialActivityLocalService socialActivityLocalService) { 033 _socialActivityLocalService = socialActivityLocalService; 034 } 035 036 /** 037 * Adds the social activity to the database. Also notifies the appropriate model listeners. 038 * 039 * @param socialActivity the social activity 040 * @return the social activity that was added 041 * @throws SystemException if a system exception occurred 042 */ 043 public com.liferay.portlet.social.model.SocialActivity addSocialActivity( 044 com.liferay.portlet.social.model.SocialActivity socialActivity) 045 throws com.liferay.portal.kernel.exception.SystemException { 046 return _socialActivityLocalService.addSocialActivity(socialActivity); 047 } 048 049 /** 050 * Creates a new social activity with the primary key. Does not add the social activity to the database. 051 * 052 * @param activityId the primary key for the new social activity 053 * @return the new social activity 054 */ 055 public com.liferay.portlet.social.model.SocialActivity createSocialActivity( 056 long activityId) { 057 return _socialActivityLocalService.createSocialActivity(activityId); 058 } 059 060 /** 061 * Deletes the social activity with the primary key from the database. Also notifies the appropriate model listeners. 062 * 063 * @param activityId the primary key of the social activity 064 * @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.SystemException { 411 _socialActivityLocalService.deleteActivities(className, classPK); 412 } 413 414 /** 415 * Removes the stored activity from the database. 416 * 417 * @param activityId the primary key of the stored activity 418 * @throws PortalException if the activity could not be found 419 * @throws SystemException if a system exception occurred 420 */ 421 public void deleteActivity(long activityId) 422 throws com.liferay.portal.kernel.exception.PortalException, 423 com.liferay.portal.kernel.exception.SystemException { 424 _socialActivityLocalService.deleteActivity(activityId); 425 } 426 427 /** 428 * Removes the stored activity and its mirror activity from the database. 429 * 430 * @param activity the activity to be removed 431 * @throws SystemException if a system exception occurred 432 */ 433 public void deleteActivity( 434 com.liferay.portlet.social.model.SocialActivity activity) 435 throws com.liferay.portal.kernel.exception.SystemException { 436 _socialActivityLocalService.deleteActivity(activity); 437 } 438 439 /** 440 * Removes the user's stored activities from the database. 441 * 442 * <p> 443 * This method removes all activities where the user is either the actor or 444 * the receiver. 445 * </p> 446 * 447 * @param userId the primary key of the user 448 * @throws PortalException if the user's activity counters could not be 449 deleted 450 * @throws SystemException if a system exception occurred 451 */ 452 public void deleteUserActivities(long userId) 453 throws com.liferay.portal.kernel.exception.PortalException, 454 com.liferay.portal.kernel.exception.SystemException { 455 _socialActivityLocalService.deleteUserActivities(userId); 456 } 457 458 public com.liferay.portlet.social.model.SocialActivity fetchFirstActivity( 459 java.lang.String className, long classPK, int type) 460 throws com.liferay.portal.kernel.exception.SystemException { 461 return _socialActivityLocalService.fetchFirstActivity(className, 462 classPK, type); 463 } 464 465 /** 466 * Returns a range of all the activities done on assets identified by the 467 * class name ID. 468 * 469 * <p> 470 * Useful when paginating results. Returns a maximum of <code>end - 471 * start</code> instances. <code>start</code> and <code>end</code> are not 472 * primary keys, they are indexes in the result set. Thus, <code>0</code> 473 * refers to the first result in the set. Setting both <code>start</code> 474 * and <code>end</code> to {@link 475 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 476 * result set. 477 * </p> 478 * 479 * @param classNameId the target asset's class name ID 480 * @param start the lower bound of the range of results 481 * @param end the upper bound of the range of results (not inclusive) 482 * @return the range of matching activities 483 * @throws SystemException if a system exception occurred 484 */ 485 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 486 long classNameId, int start, int end) 487 throws com.liferay.portal.kernel.exception.SystemException { 488 return _socialActivityLocalService.getActivities(classNameId, start, end); 489 } 490 491 /** 492 * Returns a range of all the activities done on the asset identified by the 493 * class name ID and class primary key that are mirrors of the activity 494 * identified by the mirror activity ID. 495 * 496 * <p> 497 * Useful when paginating results. Returns a maximum of <code>end - 498 * start</code> instances. <code>start</code> and <code>end</code> are not 499 * primary keys, they are indexes in the result set. Thus, <code>0</code> 500 * refers to the first result in the set. Setting both <code>start</code> 501 * and <code>end</code> to {@link 502 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 503 * result set. 504 * </p> 505 * 506 * @param mirrorActivityId the primary key of the mirror activity 507 * @param classNameId the target asset's class name ID 508 * @param classPK the primary key of the target asset 509 * @param start the lower bound of the range of results 510 * @param end the upper bound of the range of results (not inclusive) 511 * @return the range of matching activities 512 * @throws SystemException if a system exception occurred 513 */ 514 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 515 long mirrorActivityId, long classNameId, long classPK, int start, 516 int end) throws com.liferay.portal.kernel.exception.SystemException { 517 return _socialActivityLocalService.getActivities(mirrorActivityId, 518 classNameId, classPK, start, end); 519 } 520 521 /** 522 * Returns a range of all the activities done on the asset identified by the 523 * class name and the class primary key that are mirrors of the activity 524 * identified by the mirror activity ID. 525 * 526 * <p> 527 * Useful when paginating results. Returns a maximum of <code>end - 528 * start</code> instances. <code>start</code> and <code>end</code> are not 529 * primary keys, they are indexes in the result set. Thus, <code>0</code> 530 * refers to the first result in the set. Setting both <code>start</code> 531 * and <code>end</code> to {@link 532 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 533 * result set. 534 * </p> 535 * 536 * @param mirrorActivityId the primary key of the mirror activity 537 * @param className the target asset's class name 538 * @param classPK the primary key of the target asset 539 * @param start the lower bound of the range of results 540 * @param end the upper bound of the range of results (not inclusive) 541 * @return the range of matching activities 542 * @throws SystemException if a system exception occurred 543 */ 544 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 545 long mirrorActivityId, java.lang.String className, long classPK, 546 int start, int end) 547 throws com.liferay.portal.kernel.exception.SystemException { 548 return _socialActivityLocalService.getActivities(mirrorActivityId, 549 className, classPK, start, end); 550 } 551 552 /** 553 * Returns a range of all the activities done on assets identified by the 554 * class name. 555 * 556 * <p> 557 * Useful when paginating results. Returns a maximum of <code>end - 558 * start</code> instances. <code>start</code> and <code>end</code> are not 559 * primary keys, they are indexes in the result set. Thus, <code>0</code> 560 * refers to the first result in the set. Setting both <code>start</code> 561 * and <code>end</code> to {@link 562 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 563 * result set. 564 * </p> 565 * 566 * @param className the target asset's class name 567 * @param start the lower bound of the range of results 568 * @param end the upper bound of the range of results (not inclusive) 569 * @return the range of matching activities 570 * @throws SystemException if a system exception occurred 571 */ 572 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 573 java.lang.String className, int start, int end) 574 throws com.liferay.portal.kernel.exception.SystemException { 575 return _socialActivityLocalService.getActivities(className, start, end); 576 } 577 578 /** 579 * Returns the number of activities done on assets identified by the class 580 * name ID. 581 * 582 * @param classNameId the target asset's class name ID 583 * @return the number of matching activities 584 * @throws SystemException if a system exception occurred 585 */ 586 public int getActivitiesCount(long classNameId) 587 throws com.liferay.portal.kernel.exception.SystemException { 588 return _socialActivityLocalService.getActivitiesCount(classNameId); 589 } 590 591 /** 592 * Returns the number of activities done on the asset identified by the 593 * class name ID and class primary key that are mirrors of the activity 594 * identified by the mirror activity ID. 595 * 596 * @param mirrorActivityId the primary key of the mirror activity 597 * @param classNameId the target asset's class name ID 598 * @param classPK the primary key of the target asset 599 * @return the number of matching activities 600 * @throws SystemException if a system exception occurred 601 */ 602 public int getActivitiesCount(long mirrorActivityId, long classNameId, 603 long classPK) 604 throws com.liferay.portal.kernel.exception.SystemException { 605 return _socialActivityLocalService.getActivitiesCount(mirrorActivityId, 606 classNameId, classPK); 607 } 608 609 /** 610 * Returns the number of activities done on the asset identified by the 611 * class name and class primary key that are mirrors of the activity 612 * identified by the mirror activity ID. 613 * 614 * @param mirrorActivityId the primary key of the mirror activity 615 * @param className the target asset's class name 616 * @param classPK the primary key of the target asset 617 * @return the number of matching activities 618 * @throws SystemException if a system exception occurred 619 */ 620 public int getActivitiesCount(long mirrorActivityId, 621 java.lang.String className, long classPK) 622 throws com.liferay.portal.kernel.exception.SystemException { 623 return _socialActivityLocalService.getActivitiesCount(mirrorActivityId, 624 className, classPK); 625 } 626 627 /** 628 * Returns the number of activities done on assets identified by class name. 629 * 630 * @param className the target asset's class name 631 * @return the number of matching activities 632 * @throws SystemException if a system exception occurred 633 */ 634 public int getActivitiesCount(java.lang.String className) 635 throws com.liferay.portal.kernel.exception.SystemException { 636 return _socialActivityLocalService.getActivitiesCount(className); 637 } 638 639 /** 640 * Returns the activity identified by its primary key. 641 * 642 * @param activityId the primary key of the activity 643 * @return Returns the activity 644 * @throws PortalException if the activity could not be found 645 * @throws SystemException if a system exception occurred 646 */ 647 public com.liferay.portlet.social.model.SocialActivity getActivity( 648 long activityId) 649 throws com.liferay.portal.kernel.exception.PortalException, 650 com.liferay.portal.kernel.exception.SystemException { 651 return _socialActivityLocalService.getActivity(activityId); 652 } 653 654 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivitySetActivities( 655 long activitySetId, int start, int end) 656 throws com.liferay.portal.kernel.exception.SystemException { 657 return _socialActivityLocalService.getActivitySetActivities(activitySetId, 658 start, end); 659 } 660 661 /** 662 * Returns a range of all the activities done in the group. 663 * 664 * <p> 665 * This method only finds activities without mirrors. 666 * </p> 667 * 668 * <p> 669 * Useful when paginating results. Returns a maximum of <code>end - 670 * start</code> instances. <code>start</code> and <code>end</code> are not 671 * primary keys, they are indexes in the result set. Thus, <code>0</code> 672 * refers to the first result in the set. Setting both <code>start</code> 673 * and <code>end</code> to {@link 674 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 675 * result set. 676 * </p> 677 * 678 * @param groupId the primary key of the group 679 * @param start the lower bound of the range of results 680 * @param end the upper bound of the range of results (not inclusive) 681 * @return the range of matching activities 682 * @throws SystemException if a system exception occurred 683 */ 684 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupActivities( 685 long groupId, int start, int end) 686 throws com.liferay.portal.kernel.exception.SystemException { 687 return _socialActivityLocalService.getGroupActivities(groupId, start, 688 end); 689 } 690 691 /** 692 * Returns the number of activities done in the group. 693 * 694 * <p> 695 * This method only counts activities without mirrors. 696 * </p> 697 * 698 * @param groupId the primary key of the group 699 * @return the number of matching activities 700 * @throws SystemException if a system exception occurred 701 */ 702 public int getGroupActivitiesCount(long groupId) 703 throws com.liferay.portal.kernel.exception.SystemException { 704 return _socialActivityLocalService.getGroupActivitiesCount(groupId); 705 } 706 707 /** 708 * Returns a range of activities done by users that are members of the 709 * group. 710 * 711 * <p> 712 * This method only finds activities without mirrors. 713 * </p> 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 groupId the primary key of the group 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 * @throws SystemException if a system exception occurred 730 */ 731 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupUsersActivities( 732 long groupId, int start, int end) 733 throws com.liferay.portal.kernel.exception.SystemException { 734 return _socialActivityLocalService.getGroupUsersActivities(groupId, 735 start, end); 736 } 737 738 /** 739 * Returns the number of activities done by users that are members of the 740 * group. 741 * 742 * <p> 743 * This method only counts activities without mirrors. 744 * </p> 745 * 746 * @param groupId the primary key of the group 747 * @return the number of matching activities 748 * @throws SystemException if a system exception occurred 749 */ 750 public int getGroupUsersActivitiesCount(long groupId) 751 throws com.liferay.portal.kernel.exception.SystemException { 752 return _socialActivityLocalService.getGroupUsersActivitiesCount(groupId); 753 } 754 755 /** 756 * Returns the activity that has the mirror activity. 757 * 758 * @param mirrorActivityId the primary key of the mirror activity 759 * @return Returns the mirror activity 760 * @throws PortalException if the mirror activity could not be found 761 * @throws SystemException if a system exception occurred 762 */ 763 public com.liferay.portlet.social.model.SocialActivity getMirrorActivity( 764 long mirrorActivityId) 765 throws com.liferay.portal.kernel.exception.PortalException, 766 com.liferay.portal.kernel.exception.SystemException { 767 return _socialActivityLocalService.getMirrorActivity(mirrorActivityId); 768 } 769 770 /** 771 * Returns a range of all the activities done in the organization. This 772 * method only finds activities without mirrors. 773 * 774 * <p> 775 * Useful when paginating results. Returns a maximum of <code>end - 776 * start</code> instances. <code>start</code> and <code>end</code> are not 777 * primary keys, they are indexes in the result set. Thus, <code>0</code> 778 * refers to the first result in the set. Setting both <code>start</code> 779 * and <code>end</code> to {@link 780 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 781 * result set. 782 * </p> 783 * 784 * @param organizationId the primary key of the organization 785 * @param start the lower bound of the range of results 786 * @param end the upper bound of the range of results (not inclusive) 787 * @return the range of matching activities 788 * @throws SystemException if a system exception occurred 789 */ 790 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities( 791 long organizationId, int start, int end) 792 throws com.liferay.portal.kernel.exception.SystemException { 793 return _socialActivityLocalService.getOrganizationActivities(organizationId, 794 start, end); 795 } 796 797 /** 798 * Returns the number of activities done in the organization. This method 799 * only counts activities without mirrors. 800 * 801 * @param organizationId the primary key of the organization 802 * @return the number of matching activities 803 * @throws SystemException if a system exception occurred 804 */ 805 public int getOrganizationActivitiesCount(long organizationId) 806 throws com.liferay.portal.kernel.exception.SystemException { 807 return _socialActivityLocalService.getOrganizationActivitiesCount(organizationId); 808 } 809 810 /** 811 * Returns a range of all the activities done by users of the organization. 812 * This method only finds activities without mirrors. 813 * 814 * <p> 815 * Useful when paginating results. Returns a maximum of <code>end - 816 * start</code> instances. <code>start</code> and <code>end</code> are not 817 * primary keys, they are indexes in the result set. Thus, <code>0</code> 818 * refers to the first result in the set. Setting both <code>start</code> 819 * and <code>end</code> to {@link 820 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 821 * result set. 822 * </p> 823 * 824 * @param organizationId the primary key of the organization 825 * @param start the lower bound of the range of results 826 * @param end the upper bound of the range of results (not inclusive) 827 * @return the range of matching activities 828 * @throws SystemException if a system exception occurred 829 */ 830 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities( 831 long organizationId, int start, int end) 832 throws com.liferay.portal.kernel.exception.SystemException { 833 return _socialActivityLocalService.getOrganizationUsersActivities(organizationId, 834 start, end); 835 } 836 837 /** 838 * Returns the number of activities done by users of the organization. This 839 * method only counts activities without mirrors. 840 * 841 * @param organizationId the primary key of the organization 842 * @return the number of matching activities 843 * @throws SystemException if a system exception occurred 844 */ 845 public int getOrganizationUsersActivitiesCount(long organizationId) 846 throws com.liferay.portal.kernel.exception.SystemException { 847 return _socialActivityLocalService.getOrganizationUsersActivitiesCount(organizationId); 848 } 849 850 /** 851 * Returns a range of all the activities done by users in a relationship 852 * with the user identified by the user ID. 853 * 854 * <p> 855 * Useful when paginating results. Returns a maximum of <code>end - 856 * start</code> instances. <code>start</code> and <code>end</code> are not 857 * primary keys, they are indexes in the result set. Thus, <>0</code> refers 858 * to the first result in the set. Setting both <code>start</code> and 859 * <code>end</code> to {@link 860 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 861 * result set. 862 * </p> 863 * 864 * @param userId the primary key of the user 865 * @param start the lower bound of the range of results 866 * @param end the upper bound of the range of results (not inclusive) 867 * @return the range of matching activities 868 * @throws SystemException if a system exception occurred 869 */ 870 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities( 871 long userId, int start, int end) 872 throws com.liferay.portal.kernel.exception.SystemException { 873 return _socialActivityLocalService.getRelationActivities(userId, start, 874 end); 875 } 876 877 /** 878 * Returns a range of all the activities done by users in a relationship of 879 * type <code>type</code> with the user identified by <code>userId</code>. 880 * This method only finds activities without mirrors. 881 * 882 * <p> 883 * Useful when paginating results. Returns a maximum of <code>end - 884 * start</code> instances. <code>start</code> and <code>end</code> are not 885 * primary keys, they are indexes in the result set. Thus, <code>0</code> 886 * refers to the first result in the set. Setting both <code>start</code> 887 * and <code>end</code> to {@link 888 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 889 * result set. 890 * </p> 891 * 892 * @param userId the primary key of the user 893 * @param type the relationship type 894 * @param start the lower bound of the range of results 895 * @param end the upper bound of the range of results (not inclusive) 896 * @return the range of matching activities 897 * @throws SystemException if a system exception occurred 898 */ 899 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities( 900 long userId, int type, int start, int end) 901 throws com.liferay.portal.kernel.exception.SystemException { 902 return _socialActivityLocalService.getRelationActivities(userId, type, 903 start, end); 904 } 905 906 /** 907 * Returns the number of activities done by users in a relationship with the 908 * user identified by userId. 909 * 910 * @param userId the primary key of the user 911 * @return the number of matching activities 912 * @throws SystemException if a system exception occurred 913 */ 914 public int getRelationActivitiesCount(long userId) 915 throws com.liferay.portal.kernel.exception.SystemException { 916 return _socialActivityLocalService.getRelationActivitiesCount(userId); 917 } 918 919 /** 920 * Returns the number of activities done by users in a relationship of type 921 * <code>type</code> with the user identified by <code>userId</code>. This 922 * method only counts activities without mirrors. 923 * 924 * @param userId the primary key of the user 925 * @param type the relationship type 926 * @return the number of matching activities 927 * @throws SystemException if a system exception occurred 928 */ 929 public int getRelationActivitiesCount(long userId, int type) 930 throws com.liferay.portal.kernel.exception.SystemException { 931 return _socialActivityLocalService.getRelationActivitiesCount(userId, 932 type); 933 } 934 935 /** 936 * Returns a range of all the activities done by the user. 937 * 938 * <p> 939 * Useful when paginating results. Returns a maximum of <code>end - 940 * start</code> instances. <code>start</code> and <code>end</code> are not 941 * primary keys, they are indexes in the result set. Thus, <code>0</code> 942 * refers to the first result in the set. Setting both <code>start</code> 943 * and <code>end</code> to {@link 944 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 945 * result set. 946 * </p> 947 * 948 * @param userId the primary key of the user 949 * @param start the lower bound of the range of results 950 * @param end the upper bound of the range of results (not inclusive) 951 * @return the range of matching activities 952 * @throws SystemException if a system exception occurred 953 */ 954 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities( 955 long userId, int start, int end) 956 throws com.liferay.portal.kernel.exception.SystemException { 957 return _socialActivityLocalService.getUserActivities(userId, start, end); 958 } 959 960 /** 961 * Returns the number of activities done by the user. 962 * 963 * @param userId the primary key of the user 964 * @return the number of matching activities 965 * @throws SystemException if a system exception occurred 966 */ 967 public int getUserActivitiesCount(long userId) 968 throws com.liferay.portal.kernel.exception.SystemException { 969 return _socialActivityLocalService.getUserActivitiesCount(userId); 970 } 971 972 /** 973 * Returns a range of all the activities done in the user's groups. This 974 * method only finds activities without mirrors. 975 * 976 * <p> 977 * Useful when paginating results. Returns a maximum of <code>end - 978 * start</code> instances. <code>start</code> and <code>end</code> are not 979 * primary keys, they are indexes in the result set. Thus, <code>0</code> 980 * refers to the first result in the set. Setting both <code>start</code> 981 * and <code>end</code> to {@link 982 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 983 * result set. 984 * </p> 985 * 986 * @param userId the primary key of the user 987 * @param start the lower bound of the range of results 988 * @param end the upper bound of the range of results (not inclusive) 989 * @return the range of matching activities 990 * @throws SystemException if a system exception occurred 991 */ 992 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities( 993 long userId, int start, int end) 994 throws com.liferay.portal.kernel.exception.SystemException { 995 return _socialActivityLocalService.getUserGroupsActivities(userId, 996 start, end); 997 } 998 999 /** 1000 * Returns the number of activities done in user's groups. This method only 1001 * counts activities without mirrors. 1002 * 1003 * @param userId the primary key of the user 1004 * @return the number of matching activities 1005 * @throws SystemException if a system exception occurred 1006 */ 1007 public int getUserGroupsActivitiesCount(long userId) 1008 throws com.liferay.portal.kernel.exception.SystemException { 1009 return _socialActivityLocalService.getUserGroupsActivitiesCount(userId); 1010 } 1011 1012 /** 1013 * Returns a range of all the activities done in the user's groups and 1014 * organizations. This method only finds activities without mirrors. 1015 * 1016 * <p> 1017 * Useful when paginating results. Returns a maximum of <code>end - 1018 * start</code> instances. <code>start</code> and <code>end</code> are not 1019 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1020 * refers to the first result in the set. Setting both <code>start</code> 1021 * and <code>end</code> to {@link 1022 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1023 * result set. 1024 * </p> 1025 * 1026 * @param userId the primary key of the user 1027 * @param start the lower bound of the range of results 1028 * @param end the upper bound of the range of results (not inclusive) 1029 * @return the range of matching activities 1030 * @throws SystemException if a system exception occurred 1031 */ 1032 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsAndOrganizationsActivities( 1033 long userId, int start, int end) 1034 throws com.liferay.portal.kernel.exception.SystemException { 1035 return _socialActivityLocalService.getUserGroupsAndOrganizationsActivities(userId, 1036 start, end); 1037 } 1038 1039 /** 1040 * Returns the number of activities done in user's groups and organizations. 1041 * This method only counts activities without mirrors. 1042 * 1043 * @param userId the primary key of the user 1044 * @return the number of matching activities 1045 * @throws SystemException if a system exception occurred 1046 */ 1047 public int getUserGroupsAndOrganizationsActivitiesCount(long userId) 1048 throws com.liferay.portal.kernel.exception.SystemException { 1049 return _socialActivityLocalService.getUserGroupsAndOrganizationsActivitiesCount(userId); 1050 } 1051 1052 /** 1053 * Returns a range of all activities done in the user's organizations. This 1054 * method only finds activities without mirrors. 1055 * 1056 * <p> 1057 * Useful when paginating results. Returns a maximum of <code>end - 1058 * start</code> instances. <code>start</code> and <code>end</code> are not 1059 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1060 * refers to the first result in the set. Setting both <code>start</code> 1061 * and <code>end</code> to {@link 1062 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1063 * result set. 1064 * </p> 1065 * 1066 * @param userId the primary key of the user 1067 * @param start the lower bound of the range of results 1068 * @param end the upper bound of the range of results (not inclusive) 1069 * @return the range of matching activities 1070 * @throws SystemException if a system exception occurred 1071 */ 1072 public java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserOrganizationsActivities( 1073 long userId, int start, int end) 1074 throws com.liferay.portal.kernel.exception.SystemException { 1075 return _socialActivityLocalService.getUserOrganizationsActivities(userId, 1076 start, end); 1077 } 1078 1079 /** 1080 * Returns the number of activities done in the user's organizations. This 1081 * method only counts activities without mirrors. 1082 * 1083 * @param userId the primary key of the user 1084 * @return the number of matching activities 1085 * @throws SystemException if a system exception occurred 1086 */ 1087 public int getUserOrganizationsActivitiesCount(long userId) 1088 throws com.liferay.portal.kernel.exception.SystemException { 1089 return _socialActivityLocalService.getUserOrganizationsActivitiesCount(userId); 1090 } 1091 1092 /** 1093 * @deprecated Renamed to {@link #getWrappedService} 1094 */ 1095 public SocialActivityLocalService getWrappedSocialActivityLocalService() { 1096 return _socialActivityLocalService; 1097 } 1098 1099 /** 1100 * @deprecated Renamed to {@link #setWrappedService} 1101 */ 1102 public void setWrappedSocialActivityLocalService( 1103 SocialActivityLocalService socialActivityLocalService) { 1104 _socialActivityLocalService = socialActivityLocalService; 1105 } 1106 1107 public SocialActivityLocalService getWrappedService() { 1108 return _socialActivityLocalService; 1109 } 1110 1111 public void setWrappedService( 1112 SocialActivityLocalService socialActivityLocalService) { 1113 _socialActivityLocalService = socialActivityLocalService; 1114 } 1115 1116 private SocialActivityLocalService _socialActivityLocalService; 1117 }