001 /** 002 * Copyright (c) 2000-2011 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 /** 018 * <p> 019 * This class is a wrapper for {@link SocialEquityLogLocalService}. 020 * </p> 021 * 022 * @author Brian Wing Shun Chan 023 * @see SocialEquityLogLocalService 024 * @generated 025 */ 026 public class SocialEquityLogLocalServiceWrapper 027 implements SocialEquityLogLocalService { 028 public SocialEquityLogLocalServiceWrapper( 029 SocialEquityLogLocalService socialEquityLogLocalService) { 030 _socialEquityLogLocalService = socialEquityLogLocalService; 031 } 032 033 /** 034 * Adds the social equity log to the database. Also notifies the appropriate model listeners. 035 * 036 * @param socialEquityLog the social equity log 037 * @return the social equity log that was added 038 * @throws SystemException if a system exception occurred 039 */ 040 public com.liferay.portlet.social.model.SocialEquityLog addSocialEquityLog( 041 com.liferay.portlet.social.model.SocialEquityLog socialEquityLog) 042 throws com.liferay.portal.kernel.exception.SystemException { 043 return _socialEquityLogLocalService.addSocialEquityLog(socialEquityLog); 044 } 045 046 /** 047 * Creates a new social equity log with the primary key. Does not add the social equity log to the database. 048 * 049 * @param equityLogId the primary key for the new social equity log 050 * @return the new social equity log 051 */ 052 public com.liferay.portlet.social.model.SocialEquityLog createSocialEquityLog( 053 long equityLogId) { 054 return _socialEquityLogLocalService.createSocialEquityLog(equityLogId); 055 } 056 057 /** 058 * Deletes the social equity log with the primary key from the database. Also notifies the appropriate model listeners. 059 * 060 * @param equityLogId the primary key of the social equity log 061 * @throws PortalException if a social equity log with the primary key could not be found 062 * @throws SystemException if a system exception occurred 063 */ 064 public void deleteSocialEquityLog(long equityLogId) 065 throws com.liferay.portal.kernel.exception.PortalException, 066 com.liferay.portal.kernel.exception.SystemException { 067 _socialEquityLogLocalService.deleteSocialEquityLog(equityLogId); 068 } 069 070 /** 071 * Deletes the social equity log from the database. Also notifies the appropriate model listeners. 072 * 073 * @param socialEquityLog the social equity log 074 * @throws SystemException if a system exception occurred 075 */ 076 public void deleteSocialEquityLog( 077 com.liferay.portlet.social.model.SocialEquityLog socialEquityLog) 078 throws com.liferay.portal.kernel.exception.SystemException { 079 _socialEquityLogLocalService.deleteSocialEquityLog(socialEquityLog); 080 } 081 082 /** 083 * Performs a dynamic query on the database and returns the matching rows. 084 * 085 * @param dynamicQuery the dynamic query 086 * @return the matching rows 087 * @throws SystemException if a system exception occurred 088 */ 089 @SuppressWarnings("rawtypes") 090 public java.util.List dynamicQuery( 091 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 092 throws com.liferay.portal.kernel.exception.SystemException { 093 return _socialEquityLogLocalService.dynamicQuery(dynamicQuery); 094 } 095 096 /** 097 * Performs a dynamic query on the database and returns a range of the matching rows. 098 * 099 * <p> 100 * 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. 101 * </p> 102 * 103 * @param dynamicQuery the dynamic query 104 * @param start the lower bound of the range of model instances 105 * @param end the upper bound of the range of model instances (not inclusive) 106 * @return the range of matching rows 107 * @throws SystemException if a system exception occurred 108 */ 109 @SuppressWarnings("rawtypes") 110 public java.util.List dynamicQuery( 111 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 112 int end) throws com.liferay.portal.kernel.exception.SystemException { 113 return _socialEquityLogLocalService.dynamicQuery(dynamicQuery, start, 114 end); 115 } 116 117 /** 118 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 119 * 120 * <p> 121 * 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. 122 * </p> 123 * 124 * @param dynamicQuery the dynamic query 125 * @param start the lower bound of the range of model instances 126 * @param end the upper bound of the range of model instances (not inclusive) 127 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 128 * @return the ordered range of matching rows 129 * @throws SystemException if a system exception occurred 130 */ 131 @SuppressWarnings("rawtypes") 132 public java.util.List dynamicQuery( 133 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 134 int end, 135 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 136 throws com.liferay.portal.kernel.exception.SystemException { 137 return _socialEquityLogLocalService.dynamicQuery(dynamicQuery, start, 138 end, orderByComparator); 139 } 140 141 /** 142 * Returns the number of rows that match the dynamic query. 143 * 144 * @param dynamicQuery the dynamic query 145 * @return the number of rows that match the dynamic query 146 * @throws SystemException if a system exception occurred 147 */ 148 public long dynamicQueryCount( 149 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 150 throws com.liferay.portal.kernel.exception.SystemException { 151 return _socialEquityLogLocalService.dynamicQueryCount(dynamicQuery); 152 } 153 154 /** 155 * Returns the social equity log with the primary key. 156 * 157 * @param equityLogId the primary key of the social equity log 158 * @return the social equity log 159 * @throws PortalException if a social equity log with the primary key could not be found 160 * @throws SystemException if a system exception occurred 161 */ 162 public com.liferay.portlet.social.model.SocialEquityLog getSocialEquityLog( 163 long equityLogId) 164 throws com.liferay.portal.kernel.exception.PortalException, 165 com.liferay.portal.kernel.exception.SystemException { 166 return _socialEquityLogLocalService.getSocialEquityLog(equityLogId); 167 } 168 169 public com.liferay.portal.model.PersistedModel getPersistedModel( 170 java.io.Serializable primaryKeyObj) 171 throws com.liferay.portal.kernel.exception.PortalException, 172 com.liferay.portal.kernel.exception.SystemException { 173 return _socialEquityLogLocalService.getPersistedModel(primaryKeyObj); 174 } 175 176 /** 177 * Returns a range of all the social equity logs. 178 * 179 * <p> 180 * 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. 181 * </p> 182 * 183 * @param start the lower bound of the range of social equity logs 184 * @param end the upper bound of the range of social equity logs (not inclusive) 185 * @return the range of social equity logs 186 * @throws SystemException if a system exception occurred 187 */ 188 public java.util.List<com.liferay.portlet.social.model.SocialEquityLog> getSocialEquityLogs( 189 int start, int end) 190 throws com.liferay.portal.kernel.exception.SystemException { 191 return _socialEquityLogLocalService.getSocialEquityLogs(start, end); 192 } 193 194 /** 195 * Returns the number of social equity logs. 196 * 197 * @return the number of social equity logs 198 * @throws SystemException if a system exception occurred 199 */ 200 public int getSocialEquityLogsCount() 201 throws com.liferay.portal.kernel.exception.SystemException { 202 return _socialEquityLogLocalService.getSocialEquityLogsCount(); 203 } 204 205 /** 206 * Updates the social equity log in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 207 * 208 * @param socialEquityLog the social equity log 209 * @return the social equity log that was updated 210 * @throws SystemException if a system exception occurred 211 */ 212 public com.liferay.portlet.social.model.SocialEquityLog updateSocialEquityLog( 213 com.liferay.portlet.social.model.SocialEquityLog socialEquityLog) 214 throws com.liferay.portal.kernel.exception.SystemException { 215 return _socialEquityLogLocalService.updateSocialEquityLog(socialEquityLog); 216 } 217 218 /** 219 * Updates the social equity log in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 220 * 221 * @param socialEquityLog the social equity log 222 * @param merge whether to merge the social equity log with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation. 223 * @return the social equity log that was updated 224 * @throws SystemException if a system exception occurred 225 */ 226 public com.liferay.portlet.social.model.SocialEquityLog updateSocialEquityLog( 227 com.liferay.portlet.social.model.SocialEquityLog socialEquityLog, 228 boolean merge) 229 throws com.liferay.portal.kernel.exception.SystemException { 230 return _socialEquityLogLocalService.updateSocialEquityLog(socialEquityLog, 231 merge); 232 } 233 234 /** 235 * Returns the Spring bean ID for this bean. 236 * 237 * @return the Spring bean ID for this bean 238 */ 239 public java.lang.String getBeanIdentifier() { 240 return _socialEquityLogLocalService.getBeanIdentifier(); 241 } 242 243 /** 244 * Sets the Spring bean ID for this bean. 245 * 246 * @param beanIdentifier the Spring bean ID for this bean 247 */ 248 public void setBeanIdentifier(java.lang.String beanIdentifier) { 249 _socialEquityLogLocalService.setBeanIdentifier(beanIdentifier); 250 } 251 252 /** 253 * Records the social equity action and adjusts social equity scores. 254 * 255 * @param userId the primary key of the acting user 256 * @param assetEntryId the primary key of the target asset entry 257 * @param actionId the ID of the action 258 * @throws PortalException if the asset entry could not be found 259 * @throws SystemException if a system exception occurred 260 * @deprecated Replaced by {@link #addEquityLogs(long, long, String, 261 String)} to support the <code>extraData</code> parameter 262 */ 263 public void addEquityLogs(long userId, long assetEntryId, 264 java.lang.String actionId) 265 throws com.liferay.portal.kernel.exception.PortalException, 266 com.liferay.portal.kernel.exception.SystemException { 267 _socialEquityLogLocalService.addEquityLogs(userId, assetEntryId, 268 actionId); 269 } 270 271 /** 272 * Records the social equity action and adjusts social equity scores based 273 * on the user's action done on the target asset entry. 274 * 275 * <p> 276 * The <code>extraData</code> parameter can contain further information 277 * about the action such as the file name for a download action. It is used 278 * to distinguish between otherwise equal actions, such as multiple 279 * downloads of message boards attachments. 280 * </p> 281 * 282 * @param userId the primary key of the acting user 283 * @param assetEntryId the primary key of the target asset entry 284 * @param actionId the ID of the action 285 * @param extraData the extra data associated with the action 286 * @throws PortalException if the asset entry could not be found 287 * @throws SystemException if a system exception occurred 288 */ 289 public void addEquityLogs(long userId, long assetEntryId, 290 java.lang.String actionId, java.lang.String extraData) 291 throws com.liferay.portal.kernel.exception.PortalException, 292 com.liferay.portal.kernel.exception.SystemException { 293 _socialEquityLogLocalService.addEquityLogs(userId, assetEntryId, 294 actionId, extraData); 295 } 296 297 /** 298 * Records the social equity action and adjusts social equity scores based 299 * on the user's action done on the target asset entry identified by the 300 * className/classPK pair. 301 * 302 * <p> 303 * The <code>extraData</code> parameter can contain further information 304 * about the action such as the file name for a download action. It is used 305 * to distinguish between otherwise equal actions, such as multiple 306 * downloads of message boards attachments. 307 * </p> 308 * 309 * @param userId the primary key of the acting user 310 * @param className the class name of the target asset 311 * @param classPK the primary key of the target asset (not the asset entry 312 referring to it) 313 * @param actionId the ID of the action 314 * @param extraData the extra data associated with the action 315 * @throws PortalException if the asset entry could not be found 316 * @throws SystemException if a system exception occurred 317 */ 318 public void addEquityLogs(long userId, java.lang.String className, 319 long classPK, java.lang.String actionId, java.lang.String extraData) 320 throws com.liferay.portal.kernel.exception.PortalException, 321 com.liferay.portal.kernel.exception.SystemException { 322 _socialEquityLogLocalService.addEquityLogs(userId, className, classPK, 323 actionId, extraData); 324 } 325 326 /** 327 * Inserts a new row for the asset entry into the 328 * <code>SocialEquityAssetEntry</code> table. 329 * 330 * <p> 331 * This method should not be used directly by portlets. It is made public 332 * so that it can be in its own transaction to safeguard against 333 * concurrency issues. 334 * </p> 335 * 336 * @param assetEntry the asset entry 337 * @throws SystemException if a system exception occurred 338 */ 339 public void addSocialEquityAssetEntry( 340 com.liferay.portlet.asset.model.AssetEntry assetEntry) 341 throws com.liferay.portal.kernel.exception.SystemException { 342 _socialEquityLogLocalService.addSocialEquityAssetEntry(assetEntry); 343 } 344 345 /** 346 * Inserts a new row for the user into the <code>SocialEquityUser</code> 347 * table. 348 * 349 * <p> 350 * This method should not be used directly by portlets. It is made public 351 * so that it can be in its own transaction to safeguard against 352 * concurrency issues. 353 * </p> 354 * 355 * @param groupId the primary key of the group the user is currently 356 acting in 357 * @param user the acting user 358 * @throws SystemException if a system exception occurred 359 */ 360 public void addSocialEquityUser(long groupId, 361 com.liferay.portal.model.User user) 362 throws com.liferay.portal.kernel.exception.SystemException { 363 _socialEquityLogLocalService.addSocialEquityUser(groupId, user); 364 } 365 366 /** 367 * This is a cleanup method to remove expired actions and any data 368 * associated with them. 369 * 370 * <p> 371 * <i>This method should normally only be called by the portal.</i> 372 * </p> 373 * 374 * <p> 375 * By default it is run by the scheduler once a day, but the frequency can 376 * be modified by overriding the 377 * <code>social.equity.equity.log.check.interval</code> property found in 378 * <code>portal.properties</code>. 379 * </p> 380 * 381 * @throws SystemException if a system exception occurred 382 */ 383 public void checkEquityLogs() 384 throws com.liferay.portal.kernel.exception.SystemException { 385 _socialEquityLogLocalService.checkEquityLogs(); 386 } 387 388 /** 389 * Removes all actions associated with the asset and adjusts equity scores 390 * accordingly. 391 * 392 * <p> 393 * This method is called by the <code>AssetEntry</code> service 394 * automatically when an asset entry is deleted. 395 * </p> 396 * 397 * @param assetEntryId the primary key of the asset entry 398 * @throws SystemException if a system exception occurred 399 */ 400 public void deactivateEquityLogs(long assetEntryId) 401 throws com.liferay.portal.kernel.exception.SystemException { 402 _socialEquityLogLocalService.deactivateEquityLogs(assetEntryId); 403 } 404 405 /** 406 * Removes actions identified by the acting user, the action ID and the 407 * target asset's primary key. 408 * 409 * @param userId the primary key of the acting user 410 * @param assetEntryId the primary key of the target asset entry 411 * @param actionId the ID of the action 412 * @throws PortalException if the asset entry could not be found 413 * @throws SystemException if a system exception occurred 414 * @deprecated Replaced by {@link #deactivateEquityLogs(long, String, long, 415 String, String)} to support the <code>extraData</code> 416 parameter 417 */ 418 public void deactivateEquityLogs(long userId, long assetEntryId, 419 java.lang.String actionId) 420 throws com.liferay.portal.kernel.exception.PortalException, 421 com.liferay.portal.kernel.exception.SystemException { 422 _socialEquityLogLocalService.deactivateEquityLogs(userId, assetEntryId, 423 actionId); 424 } 425 426 /** 427 * Removes actions identified by the acting user, the action ID and the 428 * target asset's className/classPK pair. 429 * 430 * @param userId the primary key of the acting user 431 * @param className the class name of the target asset 432 * @param classPK the primary key of the target asset (not the asset 433 entry referring to it) 434 * @param actionId the ID of the action 435 * @throws PortalException if the asset entry cannot be retrieved 436 * @throws SystemException if a system exception occurred 437 * @deprecated Replaced by {@link #deactivateEquityLogs(long, String, long, 438 String, String)} to support the <code>extraData</code> 439 parameter 440 */ 441 public void deactivateEquityLogs(long userId, java.lang.String className, 442 long classPK, java.lang.String actionId) 443 throws com.liferay.portal.kernel.exception.PortalException, 444 com.liferay.portal.kernel.exception.SystemException { 445 _socialEquityLogLocalService.deactivateEquityLogs(userId, className, 446 classPK, actionId); 447 } 448 449 /** 450 * Removes actions identified by the acting user, the action ID and the 451 * target asset's className/classPK pair. 452 * 453 * <p> 454 * The <code>extraData</code> parameter can be used to further identify the 455 * action. 456 * </p> 457 * 458 * @param userId the primary key of the acting user 459 * @param className the class name of the target asset 460 * @param classPK the primary key of the target asset (not the asset entry 461 referring to it) 462 * @param actionId the ID of the action 463 * @param extraData the extra data associated with the action 464 * @throws PortalException if the asset entry cannot be retrieved 465 * @throws SystemException if a system exception occurred 466 */ 467 public void deactivateEquityLogs(long userId, java.lang.String className, 468 long classPK, java.lang.String actionId, java.lang.String extraData) 469 throws com.liferay.portal.kernel.exception.PortalException, 470 com.liferay.portal.kernel.exception.SystemException { 471 _socialEquityLogLocalService.deactivateEquityLogs(userId, className, 472 classPK, actionId, extraData); 473 } 474 475 /** 476 * Removes actions identified by action ID done on an asset by any user. 477 * 478 * @param className the class name of the target asset 479 * @param classPK the primary key of the target asset (not the asset entry 480 referring to it) 481 * @param actionId the ID of the action 482 * @param extraData the extra data associated with the action 483 * @throws PortalException if the asset entry cannot be retrieved 484 * @throws SystemException if a system exception occurred 485 */ 486 public void deactivateEquityLogs(java.lang.String className, long classPK, 487 java.lang.String actionId, java.lang.String extraData) 488 throws com.liferay.portal.kernel.exception.PortalException, 489 com.liferay.portal.kernel.exception.SystemException { 490 _socialEquityLogLocalService.deactivateEquityLogs(className, classPK, 491 actionId, extraData); 492 } 493 494 /** 495 * Removes all actions done by the user. 496 * 497 * <p> 498 * This method is called by the portal when a user is deleted. 499 * </p> 500 * 501 * @param userId the primary key of the user 502 * @throws SystemException if a system exception occurred 503 */ 504 public void deactivateUserEquityLogs(long userId) 505 throws com.liferay.portal.kernel.exception.SystemException { 506 _socialEquityLogLocalService.deactivateUserEquityLogs(userId); 507 } 508 509 /** 510 * Increments the information equity value of the asset by the number set 511 * in the equity payload. 512 * 513 * <p> 514 * This method is annotated with the <code>BufferedIncrement</code> 515 * annotation, which means that in case of heavy load, invocations of this 516 * method can be aggregated into one method call containing the sum of the 517 * individual increments. 518 * </p> 519 * 520 * <p> 521 * <i>This method should not be called directly by portlets. It is made 522 * public only to accommodate the <code>BufferedIncrement</code> 523 * annotation.</i> 524 * </p> 525 * 526 * @param assetEntryId the primary key of the target asset entry 527 * @param equityPayload the equity payload containing the increments 528 * @throws SystemException if a system exception occurred 529 */ 530 public void incrementSocialEquityAssetEntry_IQ(long assetEntryId, 531 com.liferay.portlet.social.model.SocialEquityIncrementPayload equityPayload) 532 throws com.liferay.portal.kernel.exception.SystemException { 533 _socialEquityLogLocalService.incrementSocialEquityAssetEntry_IQ(assetEntryId, 534 equityPayload); 535 } 536 537 /** 538 * Increments the contribution equity value of the user by the number set 539 * in the equity payload. 540 * 541 * <p> 542 * This method is annotated with the <code>BufferedIncrement</code> 543 * annotation, which means that in case of heavy load, invocations of this 544 * method can be aggregated into one method call containing the sum of the 545 * individual increments. 546 * </p> 547 * 548 * <P> 549 * <i>This method should not be called directly by portlets. It is made 550 * public only to accommodate the <code>BufferedIncrement</code> 551 * annotation.</i> 552 * </p> 553 * 554 * @param groupId the primary key of the group in which the user is acting 555 * @param userId the primary key of the acting user 556 * @param equityPayload the equity payload containing the increments 557 * @throws SystemException if a system exception occurred 558 */ 559 public void incrementSocialEquityUser_CQ(long groupId, long userId, 560 com.liferay.portlet.social.model.SocialEquityIncrementPayload equityPayload) 561 throws com.liferay.portal.kernel.exception.SystemException { 562 _socialEquityLogLocalService.incrementSocialEquityUser_CQ(groupId, 563 userId, equityPayload); 564 } 565 566 /** 567 * Increments the participation equity value of the user by the number set 568 * in the equity payload. 569 * 570 * <p> 571 * This method is annotated with the <code>BufferedIncrement</code> 572 * annotation, which means that in case of heavy load, invocations of this 573 * method can be aggregated into one method call containing the sum of the 574 * individual increments. 575 * </p> 576 * 577 * <p> 578 * <i>This method should not be called directly by portlets. It is made 579 * public only to accommodate the <code>BufferedIncrement</code> 580 * annotation. </i> 581 * </p> 582 * 583 * @param groupId the primary key of the group in which the user is acting 584 * @param userId the primary key of the acting user 585 * @param equityPayload the equity payload containing the increments 586 * @throws SystemException if a system exception occurred 587 */ 588 public void incrementSocialEquityUser_PQ(long groupId, long userId, 589 com.liferay.portlet.social.model.SocialEquityIncrementPayload equityPayload) 590 throws com.liferay.portal.kernel.exception.SystemException { 591 _socialEquityLogLocalService.incrementSocialEquityUser_PQ(groupId, 592 userId, equityPayload); 593 } 594 595 /** 596 * Updates user ranking for all groups. 597 */ 598 public void updateRanks() { 599 _socialEquityLogLocalService.updateRanks(); 600 } 601 602 /** 603 * Updates user ranking for a group. 604 * 605 * @param groupId the primary key of the group 606 */ 607 public void updateRanks(long groupId) { 608 _socialEquityLogLocalService.updateRanks(groupId); 609 } 610 611 public SocialEquityLogLocalService getWrappedSocialEquityLogLocalService() { 612 return _socialEquityLogLocalService; 613 } 614 615 public void setWrappedSocialEquityLogLocalService( 616 SocialEquityLogLocalService socialEquityLogLocalService) { 617 _socialEquityLogLocalService = socialEquityLogLocalService; 618 } 619 620 private SocialEquityLogLocalService _socialEquityLogLocalService; 621 }