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