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