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