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