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