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