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