001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 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 * Updates the social activity in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 239 * 240 * @param socialActivity the social activity 241 * @param merge whether to merge the social activity with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation. 242 * @return the social activity that was updated 243 * @throws SystemException if a system exception occurred 244 */ 245 public static com.liferay.portlet.social.model.SocialActivity updateSocialActivity( 246 com.liferay.portlet.social.model.SocialActivity socialActivity, 247 boolean merge) 248 throws com.liferay.portal.kernel.exception.SystemException { 249 return getService().updateSocialActivity(socialActivity, merge); 250 } 251 252 /** 253 * Returns the Spring bean ID for this bean. 254 * 255 * @return the Spring bean ID for this bean 256 */ 257 public static java.lang.String getBeanIdentifier() { 258 return getService().getBeanIdentifier(); 259 } 260 261 /** 262 * Sets the Spring bean ID for this bean. 263 * 264 * @param beanIdentifier the Spring bean ID for this bean 265 */ 266 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 267 getService().setBeanIdentifier(beanIdentifier); 268 } 269 270 /** 271 * Records an activity with the given time in the database. 272 * 273 * <p> 274 * This method records a social activity done on an asset, identified by its 275 * class name and class primary key, in the database. Additional information 276 * (such as the original message ID for a reply to a forum post) is passed 277 * in via the <code>extraData</code> in JSON format. For activities 278 * affecting another user, a mirror activity is generated that describes the 279 * action from the user's point of view. The target user's ID is passed in 280 * via the <code>receiverUserId</code>. 281 * </p> 282 * 283 * <p> 284 * Example for a mirrored activity:<br> When a user replies to a message 285 * boards post, the reply action is stored in the database with the 286 * <code>receiverUserId</code> being the ID of the author of the original 287 * message. The <code>extraData</code> contains the ID of the original 288 * message in JSON format. A mirror activity is generated with the values of 289 * the <code>userId</code> and the <code>receiverUserId</code> swapped. This 290 * mirror activity basically describes a "replied to" event. 291 * </p> 292 * 293 * <p> 294 * Mirror activities are most often used in relation to friend requests and 295 * activities. 296 * </p> 297 * 298 * @param userId the primary key of the acting user 299 * @param groupId the primary key of the group 300 * @param createDate the activity's date 301 * @param className the target asset's class name 302 * @param classPK the primary key of the target asset 303 * @param type the activity's type 304 * @param extraData any extra data regarding the activity 305 * @param receiverUserId the primary key of the receiving user 306 * @throws PortalException if the user or group could not be found 307 * @throws SystemException if a system exception occurred 308 */ 309 public static void addActivity(long userId, long groupId, 310 java.util.Date createDate, java.lang.String className, long classPK, 311 int type, java.lang.String extraData, long receiverUserId) 312 throws com.liferay.portal.kernel.exception.PortalException, 313 com.liferay.portal.kernel.exception.SystemException { 314 getService() 315 .addActivity(userId, groupId, createDate, className, classPK, type, 316 extraData, receiverUserId); 317 } 318 319 /** 320 * Records an activity in the database, using a time based on the current 321 * time in an attempt to make the activity's time unique. 322 * 323 * @param userId the primary key of the acting user 324 * @param groupId the primary key of the group 325 * @param className the target asset's class name 326 * @param classPK the primary key of the target asset 327 * @param type the activity's type 328 * @param extraData any extra data regarding the activity 329 * @param receiverUserId the primary key of the receiving user 330 * @throws PortalException if the user or group could not be found 331 * @throws SystemException if a system exception occurred 332 */ 333 public static void addActivity(long userId, long groupId, 334 java.lang.String className, long classPK, int type, 335 java.lang.String extraData, long receiverUserId) 336 throws com.liferay.portal.kernel.exception.PortalException, 337 com.liferay.portal.kernel.exception.SystemException { 338 getService() 339 .addActivity(userId, groupId, className, classPK, type, extraData, 340 receiverUserId); 341 } 342 343 public static void addActivity( 344 com.liferay.portlet.social.model.SocialActivity activity, 345 com.liferay.portlet.social.model.SocialActivity mirrorActivity) 346 throws com.liferay.portal.kernel.exception.PortalException, 347 com.liferay.portal.kernel.exception.SystemException { 348 getService().addActivity(activity, mirrorActivity); 349 } 350 351 /** 352 * Records an activity in the database, but only if there isn't already an 353 * activity with the same parameters. 354 * 355 * <p> 356 * For the main functionality see {@link #addActivity(long, long, Date, 357 * String, long, int, String, long)} 358 * </p> 359 * 360 * @param userId the primary key of the acting user 361 * @param groupId the primary key of the group 362 * @param createDate the activity's date 363 * @param className the target asset's class name 364 * @param classPK the primary key of the target asset 365 * @param type the activity's type 366 * @param extraData any extra data regarding the activity 367 * @param receiverUserId the primary key of the receiving user 368 * @throws PortalException if the user or group could not be found 369 * @throws SystemException if a system exception occurred 370 */ 371 public static void addUniqueActivity(long userId, long groupId, 372 java.util.Date createDate, java.lang.String className, long classPK, 373 int type, java.lang.String extraData, long receiverUserId) 374 throws com.liferay.portal.kernel.exception.PortalException, 375 com.liferay.portal.kernel.exception.SystemException { 376 getService() 377 .addUniqueActivity(userId, groupId, createDate, className, classPK, 378 type, extraData, receiverUserId); 379 } 380 381 /** 382 * Records an activity with the current time in the database, but only if 383 * there isn't one with the same parameters. 384 * 385 * <p> 386 * For the main functionality see {@link #addActivity(long, long, Date, 387 * String, long, int, String, long)} 388 * </p> 389 * 390 * @param userId the primary key of the acting user 391 * @param groupId the primary key of the group 392 * @param className the target asset's class name 393 * @param classPK the primary key of the target asset 394 * @param type the activity's type 395 * @param extraData any extra data regarding the activity 396 * @param receiverUserId the primary key of the receiving user 397 * @throws PortalException if the user or group could not be found 398 * @throws SystemException if a system exception occurred 399 */ 400 public static void addUniqueActivity(long userId, long groupId, 401 java.lang.String className, long classPK, int type, 402 java.lang.String extraData, long receiverUserId) 403 throws com.liferay.portal.kernel.exception.PortalException, 404 com.liferay.portal.kernel.exception.SystemException { 405 getService() 406 .addUniqueActivity(userId, groupId, className, classPK, type, 407 extraData, receiverUserId); 408 } 409 410 /** 411 * Removes stored activities for the asset identified by the class name ID 412 * and class primary key. 413 * 414 * @throws SystemException if a system exception occurred 415 */ 416 public static void deleteActivities( 417 com.liferay.portlet.asset.model.AssetEntry assetEntry) 418 throws com.liferay.portal.kernel.exception.PortalException, 419 com.liferay.portal.kernel.exception.SystemException { 420 getService().deleteActivities(assetEntry); 421 } 422 423 /** 424 * Removes stored activities for the asset identified by the class name and 425 * class primary key. 426 * 427 * @param className the target asset's class name 428 * @param classPK the primary key of the target asset 429 * @throws SystemException if a system exception occurred 430 */ 431 public static void deleteActivities(java.lang.String className, long classPK) 432 throws com.liferay.portal.kernel.exception.SystemException { 433 getService().deleteActivities(className, classPK); 434 } 435 436 /** 437 * Removes the stored activity from the database. 438 * 439 * @param activityId the primary key of the stored activity 440 * @throws PortalException if the activity could not be found 441 * @throws SystemException if a system exception occurred 442 */ 443 public static void deleteActivity(long activityId) 444 throws com.liferay.portal.kernel.exception.PortalException, 445 com.liferay.portal.kernel.exception.SystemException { 446 getService().deleteActivity(activityId); 447 } 448 449 /** 450 * Removes the stored activity and its mirror activity from the database. 451 * 452 * @param activity the activity to be removed 453 * @throws SystemException if a system exception occurred 454 */ 455 public static void deleteActivity( 456 com.liferay.portlet.social.model.SocialActivity activity) 457 throws com.liferay.portal.kernel.exception.SystemException { 458 getService().deleteActivity(activity); 459 } 460 461 /** 462 * Removes the user's stored activities from the database. 463 * 464 * <p> 465 * This method removes all activities where the user is either the actor or 466 * the receiver. 467 * </p> 468 * 469 * @param userId the primary key of the user 470 * @throws SystemException if a system exception occurred 471 */ 472 public static void deleteUserActivities(long userId) 473 throws com.liferay.portal.kernel.exception.SystemException { 474 getService().deleteUserActivities(userId); 475 } 476 477 /** 478 * Returns a range of all the activities done on assets identified by the 479 * class name ID. 480 * 481 * <p> 482 * Useful when paginating results. Returns a maximum of <code>end - 483 * start</code> instances. <code>start</code> and <code>end</code> are not 484 * primary keys, they are indexes in the result set. Thus, <code>0</code> 485 * refers to the first result in the set. Setting both <code>start</code> 486 * and <code>end</code> to {@link 487 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 488 * result set. 489 * </p> 490 * 491 * @param classNameId the target asset's class name ID 492 * @param start the lower bound of the range of results 493 * @param end the upper bound of the range of results (not inclusive) 494 * @return the range of matching activities 495 * @throws SystemException if a system exception occurred 496 */ 497 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 498 long classNameId, int start, int end) 499 throws com.liferay.portal.kernel.exception.SystemException { 500 return getService().getActivities(classNameId, start, end); 501 } 502 503 /** 504 * Returns a range of all the activities done on the asset identified by the 505 * class name ID and class primary key that are mirrors of the activity 506 * identified by the mirror activity ID. 507 * 508 * <p> 509 * Useful when paginating results. Returns a maximum of <code>end - 510 * start</code> instances. <code>start</code> and <code>end</code> are not 511 * primary keys, they are indexes in the result set. Thus, <code>0</code> 512 * refers to the first result in the set. Setting both <code>start</code> 513 * and <code>end</code> to {@link 514 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 515 * result set. 516 * </p> 517 * 518 * @param mirrorActivityId the primary key of the mirror activity 519 * @param classNameId the target asset's class name ID 520 * @param classPK the primary key of the target asset 521 * @param start the lower bound of the range of results 522 * @param end the upper bound of the range of results (not inclusive) 523 * @return the range of matching activities 524 * @throws SystemException if a system exception occurred 525 */ 526 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 527 long mirrorActivityId, long classNameId, long classPK, int start, 528 int end) throws com.liferay.portal.kernel.exception.SystemException { 529 return getService() 530 .getActivities(mirrorActivityId, classNameId, classPK, 531 start, end); 532 } 533 534 /** 535 * Returns a range of all the activities done on the asset identified by the 536 * class name and the class primary key that are mirrors of the activity 537 * identified by the mirror activity ID. 538 * 539 * <p> 540 * Useful when paginating results. Returns a maximum of <code>end - 541 * start</code> instances. <code>start</code> and <code>end</code> are not 542 * primary keys, they are indexes in the result set. Thus, <code>0</code> 543 * refers to the first result in the set. Setting both <code>start</code> 544 * and <code>end</code> to {@link 545 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 546 * result set. 547 * </p> 548 * 549 * @param mirrorActivityId the primary key of the mirror activity 550 * @param className the target asset's class name 551 * @param classPK the primary key of the target asset 552 * @param start the lower bound of the range of results 553 * @param end the upper bound of the range of results (not inclusive) 554 * @return the range of matching activities 555 * @throws SystemException if a system exception occurred 556 */ 557 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 558 long mirrorActivityId, java.lang.String className, long classPK, 559 int start, int end) 560 throws com.liferay.portal.kernel.exception.SystemException { 561 return getService() 562 .getActivities(mirrorActivityId, className, classPK, start, 563 end); 564 } 565 566 /** 567 * Returns a range of all the activities done on assets identified by the 568 * class name. 569 * 570 * <p> 571 * Useful when paginating results. Returns a maximum of <code>end - 572 * start</code> instances. <code>start</code> and <code>end</code> are not 573 * primary keys, they are indexes in the result set. Thus, <code>0</code> 574 * refers to the first result in the set. Setting both <code>start</code> 575 * and <code>end</code> to {@link 576 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 577 * result set. 578 * </p> 579 * 580 * @param className the target asset's class name 581 * @param start the lower bound of the range of results 582 * @param end the upper bound of the range of results (not inclusive) 583 * @return the range of matching activities 584 * @throws SystemException if a system exception occurred 585 */ 586 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getActivities( 587 java.lang.String className, int start, int end) 588 throws com.liferay.portal.kernel.exception.SystemException { 589 return getService().getActivities(className, start, end); 590 } 591 592 /** 593 * Returns the number of activities done on assets identified by the class 594 * name ID. 595 * 596 * @param classNameId the target asset's class name ID 597 * @return the number of matching activities 598 * @throws SystemException if a system exception occurred 599 */ 600 public static int getActivitiesCount(long classNameId) 601 throws com.liferay.portal.kernel.exception.SystemException { 602 return getService().getActivitiesCount(classNameId); 603 } 604 605 /** 606 * Returns the number of activities done on the asset identified by the 607 * class name ID and class primary key that are mirrors of the activity 608 * identified by the mirror activity ID. 609 * 610 * @param mirrorActivityId the primary key of the mirror activity 611 * @param classNameId the target asset's class name ID 612 * @param classPK the primary key of the target asset 613 * @return the number of matching activities 614 * @throws SystemException if a system exception occurred 615 */ 616 public static int getActivitiesCount(long mirrorActivityId, 617 long classNameId, long classPK) 618 throws com.liferay.portal.kernel.exception.SystemException { 619 return getService() 620 .getActivitiesCount(mirrorActivityId, classNameId, classPK); 621 } 622 623 /** 624 * Returns the number of activities done on the asset identified by the 625 * class name and class primary key that are mirrors of the activity 626 * identified by the mirror activity ID. 627 * 628 * @param mirrorActivityId the primary key of the mirror activity 629 * @param className the target asset's class name 630 * @param classPK the primary key of the target asset 631 * @return the number of matching activities 632 * @throws SystemException if a system exception occurred 633 */ 634 public static int getActivitiesCount(long mirrorActivityId, 635 java.lang.String className, long classPK) 636 throws com.liferay.portal.kernel.exception.SystemException { 637 return getService() 638 .getActivitiesCount(mirrorActivityId, className, classPK); 639 } 640 641 /** 642 * Returns the number of activities done on assets identified by class name. 643 * 644 * @param className the target asset's class name 645 * @return the number of matching activities 646 * @throws SystemException if a system exception occurred 647 */ 648 public static int getActivitiesCount(java.lang.String className) 649 throws com.liferay.portal.kernel.exception.SystemException { 650 return getService().getActivitiesCount(className); 651 } 652 653 /** 654 * Returns the activity identified by its primary key. 655 * 656 * @param activityId the primary key of the activity 657 * @return Returns the activity 658 * @throws PortalException if the activity could not be found 659 * @throws SystemException if a system exception occurred 660 */ 661 public static com.liferay.portlet.social.model.SocialActivity getActivity( 662 long activityId) 663 throws com.liferay.portal.kernel.exception.PortalException, 664 com.liferay.portal.kernel.exception.SystemException { 665 return getService().getActivity(activityId); 666 } 667 668 /** 669 * Returns a range of all the activities done in the group. 670 * 671 * <p> 672 * This method only finds activities without mirrors. 673 * </p> 674 * 675 * <p> 676 * Useful when paginating results. Returns a maximum of <code>end - 677 * start</code> instances. <code>start</code> and <code>end</code> are not 678 * primary keys, they are indexes in the result set. Thus, <code>0</code> 679 * refers to the first result in the set. Setting both <code>start</code> 680 * and <code>end</code> to {@link 681 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 682 * result set. 683 * </p> 684 * 685 * @param groupId the primary key of the group 686 * @param start the lower bound of the range of results 687 * @param end the upper bound of the range of results (not inclusive) 688 * @return the range of matching activities 689 * @throws SystemException if a system exception occurred 690 */ 691 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupActivities( 692 long groupId, int start, int end) 693 throws com.liferay.portal.kernel.exception.SystemException { 694 return getService().getGroupActivities(groupId, start, end); 695 } 696 697 /** 698 * Returns the number of activities done in the group. 699 * 700 * <p> 701 * This method only counts activities without mirrors. 702 * </p> 703 * 704 * @param groupId the primary key of the group 705 * @return the number of matching activities 706 * @throws SystemException if a system exception occurred 707 */ 708 public static int getGroupActivitiesCount(long groupId) 709 throws com.liferay.portal.kernel.exception.SystemException { 710 return getService().getGroupActivitiesCount(groupId); 711 } 712 713 /** 714 * Returns a range of activities done by users that are members of the 715 * group. 716 * 717 * <p> 718 * This method only finds activities without mirrors. 719 * </p> 720 * 721 * <p> 722 * Useful when paginating results. Returns a maximum of <code>end - 723 * start</code> instances. <code>start</code> and <code>end</code> are not 724 * primary keys, they are indexes in the result set. Thus, <code>0</code> 725 * refers to the first result in the set. Setting both <code>start</code> 726 * and <code>end</code> to {@link 727 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 728 * result set. 729 * </p> 730 * 731 * @param groupId the primary key of the group 732 * @param start the lower bound of the range of results 733 * @param end the upper bound of the range of results (not inclusive) 734 * @return the range of matching activities 735 * @throws SystemException if a system exception occurred 736 */ 737 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getGroupUsersActivities( 738 long groupId, int start, int end) 739 throws com.liferay.portal.kernel.exception.SystemException { 740 return getService().getGroupUsersActivities(groupId, start, end); 741 } 742 743 /** 744 * Returns the number of activities done by users that are members of the 745 * group. 746 * 747 * <p> 748 * This method only counts activities without mirrors. 749 * </p> 750 * 751 * @param groupId the primary key of the group 752 * @return the number of matching activities 753 * @throws SystemException if a system exception occurred 754 */ 755 public static int getGroupUsersActivitiesCount(long groupId) 756 throws com.liferay.portal.kernel.exception.SystemException { 757 return getService().getGroupUsersActivitiesCount(groupId); 758 } 759 760 /** 761 * Returns the activity that has the mirror activity. 762 * 763 * @param mirrorActivityId the primary key of the mirror activity 764 * @return Returns the mirror activity 765 * @throws PortalException if the mirror activity could not be found 766 * @throws SystemException if a system exception occurred 767 */ 768 public static com.liferay.portlet.social.model.SocialActivity getMirrorActivity( 769 long mirrorActivityId) 770 throws com.liferay.portal.kernel.exception.PortalException, 771 com.liferay.portal.kernel.exception.SystemException { 772 return getService().getMirrorActivity(mirrorActivityId); 773 } 774 775 /** 776 * Returns a range of all the activities done in the organization. This 777 * method only finds activities without mirrors. 778 * 779 * <p> 780 * Useful when paginating results. Returns a maximum of <code>end - 781 * start</code> instances. <code>start</code> and <code>end</code> are not 782 * primary keys, they are indexes in the result set. Thus, <code>0</code> 783 * refers to the first result in the set. Setting both <code>start</code> 784 * and <code>end</code> to {@link 785 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 786 * result set. 787 * </p> 788 * 789 * @param organizationId the primary key of the organization 790 * @param start the lower bound of the range of results 791 * @param end the upper bound of the range of results (not inclusive) 792 * @return the range of matching activities 793 * @throws SystemException if a system exception occurred 794 */ 795 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationActivities( 796 long organizationId, int start, int end) 797 throws com.liferay.portal.kernel.exception.SystemException { 798 return getService().getOrganizationActivities(organizationId, start, end); 799 } 800 801 /** 802 * Returns the number of activities done in the organization. This method 803 * only counts activities without mirrors. 804 * 805 * @param organizationId the primary key of the organization 806 * @return the number of matching activities 807 * @throws SystemException if a system exception occurred 808 */ 809 public static int getOrganizationActivitiesCount(long organizationId) 810 throws com.liferay.portal.kernel.exception.SystemException { 811 return getService().getOrganizationActivitiesCount(organizationId); 812 } 813 814 /** 815 * Returns a range of all the activities done by users of the organization. 816 * This method only finds activities without mirrors. 817 * 818 * <p> 819 * Useful when paginating results. Returns a maximum of <code>end - 820 * start</code> instances. <code>start</code> and <code>end</code> are not 821 * primary keys, they are indexes in the result set. Thus, <code>0</code> 822 * refers to the first result in the set. Setting both <code>start</code> 823 * and <code>end</code> to {@link 824 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 825 * result set. 826 * </p> 827 * 828 * @param organizationId the primary key of the organization 829 * @param start the lower bound of the range of results 830 * @param end the upper bound of the range of results (not inclusive) 831 * @return the range of matching activities 832 * @throws SystemException if a system exception occurred 833 */ 834 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getOrganizationUsersActivities( 835 long organizationId, int start, int end) 836 throws com.liferay.portal.kernel.exception.SystemException { 837 return getService() 838 .getOrganizationUsersActivities(organizationId, start, end); 839 } 840 841 /** 842 * Returns the number of activities done by users of the organization. This 843 * method only counts activities without mirrors. 844 * 845 * @param organizationId the primary key of the organization 846 * @return the number of matching activities 847 * @throws SystemException if a system exception occurred 848 */ 849 public static int getOrganizationUsersActivitiesCount(long organizationId) 850 throws com.liferay.portal.kernel.exception.SystemException { 851 return getService().getOrganizationUsersActivitiesCount(organizationId); 852 } 853 854 /** 855 * Returns a range of all the activities done by users in a relationship 856 * with the user identified by the user ID. 857 * 858 * <p> 859 * Useful when paginating results. Returns a maximum of <code>end - 860 * start</code> instances. <code>start</code> and <code>end</code> are not 861 * primary keys, they are indexes in the result set. Thus, <>0</code> refers 862 * to the first result in the set. Setting both <code>start</code> and 863 * <code>end</code> to {@link 864 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 865 * result set. 866 * </p> 867 * 868 * @param userId the primary key of the user 869 * @param start the lower bound of the range of results 870 * @param end the upper bound of the range of results (not inclusive) 871 * @return the range of matching activities 872 * @throws SystemException if a system exception occurred 873 */ 874 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities( 875 long userId, int start, int end) 876 throws com.liferay.portal.kernel.exception.SystemException { 877 return getService().getRelationActivities(userId, start, end); 878 } 879 880 /** 881 * Returns a range of all the activities done by users in a relationship of 882 * type <code>type</code> with the user identified by <code>userId</code>. 883 * This method only finds activities without mirrors. 884 * 885 * <p> 886 * Useful when paginating results. Returns a maximum of <code>end - 887 * start</code> instances. <code>start</code> and <code>end</code> are not 888 * primary keys, they are indexes in the result set. Thus, <code>0</code> 889 * refers to the first result in the set. Setting both <code>start</code> 890 * and <code>end</code> to {@link 891 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 892 * result set. 893 * </p> 894 * 895 * @param userId the primary key of the user 896 * @param type the relationship type 897 * @param start the lower bound of the range of results 898 * @param end the upper bound of the range of results (not inclusive) 899 * @return the range of matching activities 900 * @throws SystemException if a system exception occurred 901 */ 902 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getRelationActivities( 903 long userId, int type, int start, int end) 904 throws com.liferay.portal.kernel.exception.SystemException { 905 return getService().getRelationActivities(userId, type, start, end); 906 } 907 908 /** 909 * Returns the number of activities done by users in a relationship with the 910 * user identified by userId. 911 * 912 * @param userId the primary key of the user 913 * @return the number of matching activities 914 * @throws SystemException if a system exception occurred 915 */ 916 public static int getRelationActivitiesCount(long userId) 917 throws com.liferay.portal.kernel.exception.SystemException { 918 return getService().getRelationActivitiesCount(userId); 919 } 920 921 /** 922 * Returns the number of activities done by users in a relationship of type 923 * <code>type</code> with the user identified by <code>userId</code>. This 924 * method only counts activities without mirrors. 925 * 926 * @param userId the primary key of the user 927 * @param type the relationship type 928 * @return the number of matching activities 929 * @throws SystemException if a system exception occurred 930 */ 931 public static int getRelationActivitiesCount(long userId, int type) 932 throws com.liferay.portal.kernel.exception.SystemException { 933 return getService().getRelationActivitiesCount(userId, type); 934 } 935 936 /** 937 * Returns a range of all the activities done by the user. 938 * 939 * <p> 940 * Useful when paginating results. Returns a maximum of <code>end - 941 * start</code> instances. <code>start</code> and <code>end</code> are not 942 * primary keys, they are indexes in the result set. Thus, <code>0</code> 943 * refers to the first result in the set. Setting both <code>start</code> 944 * and <code>end</code> to {@link 945 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 946 * result set. 947 * </p> 948 * 949 * @param userId the primary key of the user 950 * @param start the lower bound of the range of results 951 * @param end the upper bound of the range of results (not inclusive) 952 * @return the range of matching activities 953 * @throws SystemException if a system exception occurred 954 */ 955 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserActivities( 956 long userId, int start, int end) 957 throws com.liferay.portal.kernel.exception.SystemException { 958 return getService().getUserActivities(userId, start, end); 959 } 960 961 /** 962 * Returns the number of activities done by the user. 963 * 964 * @param userId the primary key of the user 965 * @return the number of matching activities 966 * @throws SystemException if a system exception occurred 967 */ 968 public static int getUserActivitiesCount(long userId) 969 throws com.liferay.portal.kernel.exception.SystemException { 970 return getService().getUserActivitiesCount(userId); 971 } 972 973 /** 974 * Returns a range of all the activities done in the user's groups. This 975 * method only finds activities without mirrors. 976 * 977 * <p> 978 * Useful when paginating results. Returns a maximum of <code>end - 979 * start</code> instances. <code>start</code> and <code>end</code> are not 980 * primary keys, they are indexes in the result set. Thus, <code>0</code> 981 * refers to the first result in the set. Setting both <code>start</code> 982 * and <code>end</code> to {@link 983 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 984 * result set. 985 * </p> 986 * 987 * @param userId the primary key of the user 988 * @param start the lower bound of the range of results 989 * @param end the upper bound of the range of results (not inclusive) 990 * @return the range of matching activities 991 * @throws SystemException if a system exception occurred 992 */ 993 public static java.util.List<com.liferay.portlet.social.model.SocialActivity> getUserGroupsActivities( 994 long userId, int start, int end) 995 throws com.liferay.portal.kernel.exception.SystemException { 996 return getService().getUserGroupsActivities(userId, 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 static int getUserGroupsActivitiesCount(long userId) 1008 throws com.liferay.portal.kernel.exception.SystemException { 1009 return getService().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 static 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 getService() 1036 .getUserGroupsAndOrganizationsActivities(userId, 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 static int getUserGroupsAndOrganizationsActivitiesCount(long userId) 1048 throws com.liferay.portal.kernel.exception.SystemException { 1049 return getService().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 static 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 getService().getUserOrganizationsActivities(userId, start, end); 1076 } 1077 1078 /** 1079 * Returns the number of activities done in the user's organizations. This 1080 * method only counts activities without mirrors. 1081 * 1082 * @param userId the primary key of the user 1083 * @return the number of matching activities 1084 * @throws SystemException if a system exception occurred 1085 */ 1086 public static int getUserOrganizationsActivitiesCount(long userId) 1087 throws com.liferay.portal.kernel.exception.SystemException { 1088 return getService().getUserOrganizationsActivitiesCount(userId); 1089 } 1090 1091 public static SocialActivityLocalService getService() { 1092 if (_service == null) { 1093 _service = (SocialActivityLocalService)PortalBeanLocatorUtil.locate(SocialActivityLocalService.class.getName()); 1094 1095 ReferenceRegistry.registerReference(SocialActivityLocalServiceUtil.class, 1096 "_service"); 1097 } 1098 1099 return _service; 1100 } 1101 1102 /** 1103 * @deprecated 1104 */ 1105 public void setService(SocialActivityLocalService service) { 1106 } 1107 1108 private static SocialActivityLocalService _service; 1109 }