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