001 /** 002 * Copyright (c) 2000-present 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.service.ServiceWrapper; 020 021 /** 022 * Provides a wrapper for {@link SocialActivityCounterLocalService}. 023 * 024 * @author Brian Wing Shun Chan 025 * @see SocialActivityCounterLocalService 026 * @generated 027 */ 028 @ProviderType 029 public class SocialActivityCounterLocalServiceWrapper 030 implements SocialActivityCounterLocalService, 031 ServiceWrapper<SocialActivityCounterLocalService> { 032 public SocialActivityCounterLocalServiceWrapper( 033 SocialActivityCounterLocalService socialActivityCounterLocalService) { 034 _socialActivityCounterLocalService = socialActivityCounterLocalService; 035 } 036 037 /** 038 * Adds an activity counter specifying a previous activity and period 039 * length. 040 * 041 * <p> 042 * This method uses the lock service to guard against multiple threads 043 * trying to insert the same counter because this service is called 044 * asynchronously from the social activity service. 045 * </p> 046 * 047 * @param groupId the primary key of the group 048 * @param classNameId the primary key of the entity's class this counter 049 belongs to 050 * @param classPK the primary key of the entity this counter belongs to 051 * @param name the counter name 052 * @param ownerType the counter's owner type. Acceptable values are 053 <code>TYPE_ACTOR</code>, <code>TYPE_ASSET</code> and 054 <code>TYPE_CREATOR</code> defined in {@link 055 SocialActivityCounterConstants}. 056 * @param totalValue the counter's total value (optionally <code>0</code>) 057 * @param previousActivityCounterId the primary key of the activity counter 058 for the previous time period (optionally <code>0</code>, if this 059 is the first) 060 * @param periodLength the period length in days, 061 <code>PERIOD_LENGTH_INFINITE</code> for never ending counters or 062 <code>PERIOD_LENGTH_SYSTEM</code> for the period length defined 063 in <code>portal-ext.properties</code>. For more information see 064 {@link SocialActivityCounterConstants}. 065 * @return the added activity counter 066 */ 067 @Override 068 public com.liferay.portlet.social.model.SocialActivityCounter addActivityCounter( 069 long groupId, long classNameId, long classPK, java.lang.String name, 070 int ownerType, int totalValue, long previousActivityCounterId, 071 int periodLength) 072 throws com.liferay.portal.kernel.exception.PortalException { 073 return _socialActivityCounterLocalService.addActivityCounter(groupId, 074 classNameId, classPK, name, ownerType, totalValue, 075 previousActivityCounterId, periodLength); 076 } 077 078 /** 079 * Adds or increments activity counters related to an activity. 080 * 081 * </p> 082 * This method is called asynchronously from the social activity service 083 * when the user performs an activity defined in 084 * </code>liferay-social.xml</code>. 085 * </p> 086 * 087 * <p> 088 * This method first calls the activity processor class, if there is one 089 * defined for the activity, checks for limits and increments all the 090 * counters that belong to the activity. Afterwards, it processes the 091 * activity with respect to achievement classes, if any. Lastly it 092 * increments the built-in <code>user.activities</code> and 093 * <code>asset.activities</code> counters. 094 * </p> 095 * 096 * @param activity the social activity 097 */ 098 @Override 099 public void addActivityCounters( 100 com.liferay.portlet.social.model.SocialActivity activity) 101 throws com.liferay.portal.kernel.exception.PortalException { 102 _socialActivityCounterLocalService.addActivityCounters(activity); 103 } 104 105 /** 106 * Adds the social activity counter to the database. Also notifies the appropriate model listeners. 107 * 108 * @param socialActivityCounter the social activity counter 109 * @return the social activity counter that was added 110 */ 111 @Override 112 public com.liferay.portlet.social.model.SocialActivityCounter addSocialActivityCounter( 113 com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter) { 114 return _socialActivityCounterLocalService.addSocialActivityCounter(socialActivityCounter); 115 } 116 117 /** 118 * Creates a new social activity counter with the primary key. Does not add the social activity counter to the database. 119 * 120 * @param activityCounterId the primary key for the new social activity counter 121 * @return the new social activity counter 122 */ 123 @Override 124 public com.liferay.portlet.social.model.SocialActivityCounter createSocialActivityCounter( 125 long activityCounterId) { 126 return _socialActivityCounterLocalService.createSocialActivityCounter(activityCounterId); 127 } 128 129 /** 130 * Deletes all activity counters, limits, and settings related to the asset. 131 * 132 * <p> 133 * This method subtracts the asset's popularity from the owner's 134 * contribution points. It also creates a new contribution period if the 135 * latest one does not belong to the current period. 136 * </p> 137 * 138 * @param assetEntry the asset entry 139 */ 140 @Override 141 public void deleteActivityCounters( 142 com.liferay.portlet.asset.model.AssetEntry assetEntry) 143 throws com.liferay.portal.kernel.exception.PortalException { 144 _socialActivityCounterLocalService.deleteActivityCounters(assetEntry); 145 } 146 147 /** 148 * Deletes all activity counters for the entity identified by the class name 149 * and class primary key. 150 * 151 * @param className the entity's class name 152 * @param classPK the primary key of the entity 153 */ 154 @Override 155 public void deleteActivityCounters(java.lang.String className, long classPK) 156 throws com.liferay.portal.kernel.exception.PortalException { 157 _socialActivityCounterLocalService.deleteActivityCounters(className, 158 classPK); 159 } 160 161 /** 162 * Deletes all activity counters, limits, and settings related to the entity 163 * identified by the class name ID and class primary key. 164 * 165 * @param classNameId the primary key of the entity's class 166 * @param classPK the primary key of the entity 167 */ 168 @Override 169 public void deleteActivityCounters(long classNameId, long classPK) 170 throws com.liferay.portal.kernel.exception.PortalException { 171 _socialActivityCounterLocalService.deleteActivityCounters(classNameId, 172 classPK); 173 } 174 175 /** 176 * @throws PortalException 177 */ 178 @Override 179 public com.liferay.portal.model.PersistedModel deletePersistedModel( 180 com.liferay.portal.model.PersistedModel persistedModel) 181 throws com.liferay.portal.kernel.exception.PortalException { 182 return _socialActivityCounterLocalService.deletePersistedModel(persistedModel); 183 } 184 185 /** 186 * Deletes the social activity counter with the primary key from the database. Also notifies the appropriate model listeners. 187 * 188 * @param activityCounterId the primary key of the social activity counter 189 * @return the social activity counter that was removed 190 * @throws PortalException if a social activity counter with the primary key could not be found 191 */ 192 @Override 193 public com.liferay.portlet.social.model.SocialActivityCounter deleteSocialActivityCounter( 194 long activityCounterId) 195 throws com.liferay.portal.kernel.exception.PortalException { 196 return _socialActivityCounterLocalService.deleteSocialActivityCounter(activityCounterId); 197 } 198 199 /** 200 * Deletes the social activity counter from the database. Also notifies the appropriate model listeners. 201 * 202 * @param socialActivityCounter the social activity counter 203 * @return the social activity counter that was removed 204 */ 205 @Override 206 public com.liferay.portlet.social.model.SocialActivityCounter deleteSocialActivityCounter( 207 com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter) { 208 return _socialActivityCounterLocalService.deleteSocialActivityCounter(socialActivityCounter); 209 } 210 211 /** 212 * Disables all the counters of an asset identified by the class name and 213 * class primary key. 214 * 215 * <p> 216 * This method is used by the recycle bin to disable all counters of assets 217 * put into the recycle bin. It adjusts the owner's contribution score. 218 * </p> 219 * 220 * @param className the asset's class name 221 * @param classPK the primary key of the asset 222 */ 223 @Override 224 public void disableActivityCounters(java.lang.String className, long classPK) 225 throws com.liferay.portal.kernel.exception.PortalException { 226 _socialActivityCounterLocalService.disableActivityCounters(className, 227 classPK); 228 } 229 230 /** 231 * Disables all the counters of an asset identified by the class name ID and 232 * class primary key. 233 * 234 * <p> 235 * This method is used by the recycle bin to disable all counters of assets 236 * put into the recycle bin. It adjusts the owner's contribution score. 237 * </p> 238 * 239 * @param classNameId the primary key of the asset's class 240 * @param classPK the primary key of the asset 241 */ 242 @Override 243 public void disableActivityCounters(long classNameId, long classPK) 244 throws com.liferay.portal.kernel.exception.PortalException { 245 _socialActivityCounterLocalService.disableActivityCounters(classNameId, 246 classPK); 247 } 248 249 @Override 250 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 251 return _socialActivityCounterLocalService.dynamicQuery(); 252 } 253 254 /** 255 * Performs a dynamic query on the database and returns the matching rows. 256 * 257 * @param dynamicQuery the dynamic query 258 * @return the matching rows 259 */ 260 @Override 261 public <T> java.util.List<T> dynamicQuery( 262 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 263 return _socialActivityCounterLocalService.dynamicQuery(dynamicQuery); 264 } 265 266 /** 267 * Performs a dynamic query on the database and returns a range of the matching rows. 268 * 269 * <p> 270 * 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.SocialActivityCounterModelImpl}. 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. 271 * </p> 272 * 273 * @param dynamicQuery the dynamic query 274 * @param start the lower bound of the range of model instances 275 * @param end the upper bound of the range of model instances (not inclusive) 276 * @return the range of matching rows 277 */ 278 @Override 279 public <T> java.util.List<T> dynamicQuery( 280 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 281 int end) { 282 return _socialActivityCounterLocalService.dynamicQuery(dynamicQuery, 283 start, end); 284 } 285 286 /** 287 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 288 * 289 * <p> 290 * 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.SocialActivityCounterModelImpl}. 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. 291 * </p> 292 * 293 * @param dynamicQuery the dynamic query 294 * @param start the lower bound of the range of model instances 295 * @param end the upper bound of the range of model instances (not inclusive) 296 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 297 * @return the ordered range of matching rows 298 */ 299 @Override 300 public <T> java.util.List<T> dynamicQuery( 301 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 302 int end, 303 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 304 return _socialActivityCounterLocalService.dynamicQuery(dynamicQuery, 305 start, end, orderByComparator); 306 } 307 308 /** 309 * Returns the number of rows matching the dynamic query. 310 * 311 * @param dynamicQuery the dynamic query 312 * @return the number of rows matching the dynamic query 313 */ 314 @Override 315 public long dynamicQueryCount( 316 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 317 return _socialActivityCounterLocalService.dynamicQueryCount(dynamicQuery); 318 } 319 320 /** 321 * Returns the number of rows matching the dynamic query. 322 * 323 * @param dynamicQuery the dynamic query 324 * @param projection the projection to apply to the query 325 * @return the number of rows matching the dynamic query 326 */ 327 @Override 328 public long dynamicQueryCount( 329 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 330 com.liferay.portal.kernel.dao.orm.Projection projection) { 331 return _socialActivityCounterLocalService.dynamicQueryCount(dynamicQuery, 332 projection); 333 } 334 335 /** 336 * Enables all the counters of an asset identified by the class name and 337 * class primary key. 338 * 339 * <p> 340 * This method is used by the recycle bin to enable all counters of assets 341 * restored from the recycle bin. It adjusts the owner's contribution score. 342 * </p> 343 * 344 * @param className the asset's class name 345 * @param classPK the primary key of the asset 346 */ 347 @Override 348 public void enableActivityCounters(java.lang.String className, long classPK) 349 throws com.liferay.portal.kernel.exception.PortalException { 350 _socialActivityCounterLocalService.enableActivityCounters(className, 351 classPK); 352 } 353 354 /** 355 * Enables all activity counters of an asset identified by the class name ID 356 * and class primary key. 357 * 358 * <p> 359 * This method is used by the recycle bin to enable all counters of assets 360 * restored from the recycle bin. It adjusts the owner's contribution score. 361 * </p> 362 * 363 * @param classNameId the primary key of the asset's class 364 * @param classPK the primary key of the asset 365 */ 366 @Override 367 public void enableActivityCounters(long classNameId, long classPK) 368 throws com.liferay.portal.kernel.exception.PortalException { 369 _socialActivityCounterLocalService.enableActivityCounters(classNameId, 370 classPK); 371 } 372 373 /** 374 * Returns the activity counter with the given name, owner, and end period 375 * that belong to the given entity. 376 * 377 * @param groupId the primary key of the group 378 * @param classNameId the primary key of the entity's class 379 * @param classPK the primary key of the entity 380 * @param name the counter name 381 * @param ownerType the owner type 382 * @param endPeriod the end period, <code>-1</code> for the latest one 383 * @return the matching activity counter 384 */ 385 @Override 386 public com.liferay.portlet.social.model.SocialActivityCounter fetchActivityCounterByEndPeriod( 387 long groupId, long classNameId, long classPK, java.lang.String name, 388 int ownerType, int endPeriod) { 389 return _socialActivityCounterLocalService.fetchActivityCounterByEndPeriod(groupId, 390 classNameId, classPK, name, ownerType, endPeriod); 391 } 392 393 /** 394 * Returns the activity counter with the given name, owner, and start period 395 * that belong to the given entity. 396 * 397 * @param groupId the primary key of the group 398 * @param classNameId the primary key of the entity's class 399 * @param classPK the primary key of the entity 400 * @param name the counter name 401 * @param ownerType the owner type 402 * @param startPeriod the start period 403 * @return the matching activity counter 404 */ 405 @Override 406 public com.liferay.portlet.social.model.SocialActivityCounter fetchActivityCounterByStartPeriod( 407 long groupId, long classNameId, long classPK, java.lang.String name, 408 int ownerType, int startPeriod) { 409 return _socialActivityCounterLocalService.fetchActivityCounterByStartPeriod(groupId, 410 classNameId, classPK, name, ownerType, startPeriod); 411 } 412 413 /** 414 * Returns the latest activity counter with the given name and owner that 415 * belong to the given entity. 416 * 417 * @param groupId the primary key of the group 418 * @param classNameId the primary key of the entity's class 419 * @param classPK the primary key of the entity 420 * @param name the counter name 421 * @param ownerType the owner type 422 * @return the matching activity counter 423 */ 424 @Override 425 public com.liferay.portlet.social.model.SocialActivityCounter fetchLatestActivityCounter( 426 long groupId, long classNameId, long classPK, java.lang.String name, 427 int ownerType) { 428 return _socialActivityCounterLocalService.fetchLatestActivityCounter(groupId, 429 classNameId, classPK, name, ownerType); 430 } 431 432 @Override 433 public com.liferay.portlet.social.model.SocialActivityCounter fetchSocialActivityCounter( 434 long activityCounterId) { 435 return _socialActivityCounterLocalService.fetchSocialActivityCounter(activityCounterId); 436 } 437 438 @Override 439 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 440 return _socialActivityCounterLocalService.getActionableDynamicQuery(); 441 } 442 443 @Override 444 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 445 return _socialActivityCounterLocalService.getIndexableActionableDynamicQuery(); 446 } 447 448 /** 449 * Returns the OSGi service identifier. 450 * 451 * @return the OSGi service identifier 452 */ 453 @Override 454 public java.lang.String getOSGiServiceIdentifier() { 455 return _socialActivityCounterLocalService.getOSGiServiceIdentifier(); 456 } 457 458 /** 459 * Returns all the activity counters with the given name and period offsets. 460 * 461 * <p> 462 * The start and end offsets can belong to different periods. This method 463 * groups the counters by name and returns the sum of their current values. 464 * </p> 465 * 466 * @param groupId the primary key of the group 467 * @param name the counter name 468 * @param startOffset the offset for the start period 469 * @param endOffset the offset for the end period 470 * @return the matching activity counters 471 */ 472 @Override 473 public java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getOffsetActivityCounters( 474 long groupId, java.lang.String name, int startOffset, int endOffset) { 475 return _socialActivityCounterLocalService.getOffsetActivityCounters(groupId, 476 name, startOffset, endOffset); 477 } 478 479 /** 480 * Returns the distribution of the activity counters with the given name and 481 * period offsets. 482 * 483 * <p> 484 * The start and end offsets can belong to different periods. This method 485 * groups the counters by their owner entity (usually some asset) and 486 * returns a counter for each entity class with the sum of the counters' 487 * current values. 488 * </p> 489 * 490 * @param groupId the primary key of the group 491 * @param name the counter name 492 * @param startOffset the offset for the start period 493 * @param endOffset the offset for the end period 494 * @return the distribution of matching activity counters 495 */ 496 @Override 497 public java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getOffsetDistributionActivityCounters( 498 long groupId, java.lang.String name, int startOffset, int endOffset) { 499 return _socialActivityCounterLocalService.getOffsetDistributionActivityCounters(groupId, 500 name, startOffset, endOffset); 501 } 502 503 /** 504 * Returns all the activity counters with the given name and time period. 505 * 506 * <p> 507 * The start and end period values can belong to different periods. This 508 * method groups the counters by name and returns the sum of their current 509 * values. 510 * </p> 511 * 512 * @param groupId the primary key of the group 513 * @param name the counter name 514 * @param startPeriod the start period 515 * @param endPeriod the end period 516 * @return the matching activity counters 517 */ 518 @Override 519 public java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getPeriodActivityCounters( 520 long groupId, java.lang.String name, int startPeriod, int endPeriod) { 521 return _socialActivityCounterLocalService.getPeriodActivityCounters(groupId, 522 name, startPeriod, endPeriod); 523 } 524 525 /** 526 * Returns the distribution of activity counters with the given name and 527 * time period. 528 * 529 * <p> 530 * The start and end period values can belong to different periods. This 531 * method groups the counters by their owner entity (usually some asset) and 532 * returns a counter for each entity class with the sum of the counters' 533 * current values. 534 * </p> 535 * 536 * @param groupId the primary key of the group 537 * @param name the counter name 538 * @param startPeriod the start period 539 * @param endPeriod the end period 540 * @return the distribution of matching activity counters 541 */ 542 @Override 543 public java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getPeriodDistributionActivityCounters( 544 long groupId, java.lang.String name, int startPeriod, int endPeriod) { 545 return _socialActivityCounterLocalService.getPeriodDistributionActivityCounters(groupId, 546 name, startPeriod, endPeriod); 547 } 548 549 @Override 550 public com.liferay.portal.model.PersistedModel getPersistedModel( 551 java.io.Serializable primaryKeyObj) 552 throws com.liferay.portal.kernel.exception.PortalException { 553 return _socialActivityCounterLocalService.getPersistedModel(primaryKeyObj); 554 } 555 556 /** 557 * Returns the social activity counter with the primary key. 558 * 559 * @param activityCounterId the primary key of the social activity counter 560 * @return the social activity counter 561 * @throws PortalException if a social activity counter with the primary key could not be found 562 */ 563 @Override 564 public com.liferay.portlet.social.model.SocialActivityCounter getSocialActivityCounter( 565 long activityCounterId) 566 throws com.liferay.portal.kernel.exception.PortalException { 567 return _socialActivityCounterLocalService.getSocialActivityCounter(activityCounterId); 568 } 569 570 /** 571 * Returns a range of all the social activity counters. 572 * 573 * <p> 574 * 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.SocialActivityCounterModelImpl}. 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. 575 * </p> 576 * 577 * @param start the lower bound of the range of social activity counters 578 * @param end the upper bound of the range of social activity counters (not inclusive) 579 * @return the range of social activity counters 580 */ 581 @Override 582 public java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getSocialActivityCounters( 583 int start, int end) { 584 return _socialActivityCounterLocalService.getSocialActivityCounters(start, 585 end); 586 } 587 588 /** 589 * Returns the number of social activity counters. 590 * 591 * @return the number of social activity counters 592 */ 593 @Override 594 public int getSocialActivityCountersCount() { 595 return _socialActivityCounterLocalService.getSocialActivityCountersCount(); 596 } 597 598 /** 599 * Returns the range of tuples that contain users and a list of activity 600 * counters. 601 * 602 * <p> 603 * The counters returned for each user are passed to this method in the 604 * selectedNames array. The method also accepts an array of counter names 605 * that are used to rank the users. 606 * </p> 607 * 608 * <p> 609 * Useful when paginating results. Returns a maximum of <code>end - 610 * start</code> instances. <code>start</code> and <code>end</code> are not 611 * primary keys, they are indexes in the result set. Thus, <code>0</code> 612 * refers to the first result in the set. Setting both <code>start</code> 613 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 614 * result set. 615 * </p> 616 * 617 * @param groupId the primary key of the group 618 * @param rankingNames the ranking counter names 619 * @param selectedNames the counter names that will be returned with each 620 user 621 * @param start the lower bound of the range of results 622 * @param end the upper bound of the range of results (not inclusive) 623 * @return the range of matching tuples 624 */ 625 @Override 626 public java.util.List<com.liferay.portal.kernel.util.Tuple> getUserActivityCounters( 627 long groupId, java.lang.String[] rankingNames, 628 java.lang.String[] selectedNames, int start, int end) { 629 return _socialActivityCounterLocalService.getUserActivityCounters(groupId, 630 rankingNames, selectedNames, start, end); 631 } 632 633 /** 634 * Returns the number of users having a rank based on the given counters. 635 * 636 * @param groupId the primary key of the group 637 * @param rankingNames the ranking counter names 638 * @return the number of matching users 639 */ 640 @Override 641 public int getUserActivityCountersCount(long groupId, 642 java.lang.String[] rankingNames) { 643 return _socialActivityCounterLocalService.getUserActivityCountersCount(groupId, 644 rankingNames); 645 } 646 647 /** 648 * Increments the <code>user.achievements</code> counter for a user. 649 * 650 * <p> 651 * This method should be used by an external achievement class when the 652 * users unlocks an achievement. 653 * </p> 654 * 655 * @param userId the primary key of the user 656 * @param groupId the primary key of the group 657 */ 658 @Override 659 public void incrementUserAchievementCounter(long userId, long groupId) 660 throws com.liferay.portal.kernel.exception.PortalException { 661 _socialActivityCounterLocalService.incrementUserAchievementCounter(userId, 662 groupId); 663 } 664 665 /** 666 * Updates the social activity counter in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 667 * 668 * @param socialActivityCounter the social activity counter 669 * @return the social activity counter that was updated 670 */ 671 @Override 672 public com.liferay.portlet.social.model.SocialActivityCounter updateSocialActivityCounter( 673 com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter) { 674 return _socialActivityCounterLocalService.updateSocialActivityCounter(socialActivityCounter); 675 } 676 677 @Override 678 public SocialActivityCounterLocalService getWrappedService() { 679 return _socialActivityCounterLocalService; 680 } 681 682 @Override 683 public void setWrappedService( 684 SocialActivityCounterLocalService socialActivityCounterLocalService) { 685 _socialActivityCounterLocalService = socialActivityCounterLocalService; 686 } 687 688 private SocialActivityCounterLocalService _socialActivityCounterLocalService; 689 }