001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.social.service;
016    
017    import com.liferay.portal.service.ServiceWrapper;
018    
019    /**
020     * <p>
021     * This class is a wrapper for {@link SocialActivityCounterLocalService}.
022     * </p>
023     *
024     * @author    Brian Wing Shun Chan
025     * @see       SocialActivityCounterLocalService
026     * @generated
027     */
028    public class SocialActivityCounterLocalServiceWrapper
029            implements SocialActivityCounterLocalService,
030                    ServiceWrapper<SocialActivityCounterLocalService> {
031            public SocialActivityCounterLocalServiceWrapper(
032                    SocialActivityCounterLocalService socialActivityCounterLocalService) {
033                    _socialActivityCounterLocalService = socialActivityCounterLocalService;
034            }
035    
036            /**
037            * Adds the social activity counter to the database. Also notifies the appropriate model listeners.
038            *
039            * @param socialActivityCounter the social activity counter
040            * @return the social activity counter that was added
041            * @throws SystemException if a system exception occurred
042            */
043            public com.liferay.portlet.social.model.SocialActivityCounter addSocialActivityCounter(
044                    com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter)
045                    throws com.liferay.portal.kernel.exception.SystemException {
046                    return _socialActivityCounterLocalService.addSocialActivityCounter(socialActivityCounter);
047            }
048    
049            /**
050            * Creates a new social activity counter with the primary key. Does not add the social activity counter to the database.
051            *
052            * @param activityCounterId the primary key for the new social activity counter
053            * @return the new social activity counter
054            */
055            public com.liferay.portlet.social.model.SocialActivityCounter createSocialActivityCounter(
056                    long activityCounterId) {
057                    return _socialActivityCounterLocalService.createSocialActivityCounter(activityCounterId);
058            }
059    
060            /**
061            * Deletes the social activity counter with the primary key from the database. Also notifies the appropriate model listeners.
062            *
063            * @param activityCounterId the primary key of the social activity counter
064            * @return the social activity counter that was removed
065            * @throws PortalException if a social activity counter with the primary key could not be found
066            * @throws SystemException if a system exception occurred
067            */
068            public com.liferay.portlet.social.model.SocialActivityCounter deleteSocialActivityCounter(
069                    long activityCounterId)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException {
072                    return _socialActivityCounterLocalService.deleteSocialActivityCounter(activityCounterId);
073            }
074    
075            /**
076            * Deletes the social activity counter from the database. Also notifies the appropriate model listeners.
077            *
078            * @param socialActivityCounter the social activity counter
079            * @return the social activity counter that was removed
080            * @throws SystemException if a system exception occurred
081            */
082            public com.liferay.portlet.social.model.SocialActivityCounter deleteSocialActivityCounter(
083                    com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter)
084                    throws com.liferay.portal.kernel.exception.SystemException {
085                    return _socialActivityCounterLocalService.deleteSocialActivityCounter(socialActivityCounter);
086            }
087    
088            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
089                    return _socialActivityCounterLocalService.dynamicQuery();
090            }
091    
092            /**
093            * Performs a dynamic query on the database and returns the matching rows.
094            *
095            * @param dynamicQuery the dynamic query
096            * @return the matching rows
097            * @throws SystemException if a system exception occurred
098            */
099            @SuppressWarnings("rawtypes")
100            public java.util.List dynamicQuery(
101                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return _socialActivityCounterLocalService.dynamicQuery(dynamicQuery);
104            }
105    
106            /**
107            * Performs a dynamic query on the database and returns a range of the matching rows.
108            *
109            * <p>
110            * 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.
111            * </p>
112            *
113            * @param dynamicQuery the dynamic query
114            * @param start the lower bound of the range of model instances
115            * @param end the upper bound of the range of model instances (not inclusive)
116            * @return the range of matching rows
117            * @throws SystemException if a system exception occurred
118            */
119            @SuppressWarnings("rawtypes")
120            public java.util.List dynamicQuery(
121                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
122                    int end) throws com.liferay.portal.kernel.exception.SystemException {
123                    return _socialActivityCounterLocalService.dynamicQuery(dynamicQuery,
124                            start, end);
125            }
126    
127            /**
128            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
129            *
130            * <p>
131            * 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.
132            * </p>
133            *
134            * @param dynamicQuery the dynamic query
135            * @param start the lower bound of the range of model instances
136            * @param end the upper bound of the range of model instances (not inclusive)
137            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
138            * @return the ordered range of matching rows
139            * @throws SystemException if a system exception occurred
140            */
141            @SuppressWarnings("rawtypes")
142            public java.util.List dynamicQuery(
143                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
144                    int end,
145                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
146                    throws com.liferay.portal.kernel.exception.SystemException {
147                    return _socialActivityCounterLocalService.dynamicQuery(dynamicQuery,
148                            start, end, orderByComparator);
149            }
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                    return _socialActivityCounterLocalService.dynamicQueryCount(dynamicQuery);
162            }
163    
164            public com.liferay.portlet.social.model.SocialActivityCounter fetchSocialActivityCounter(
165                    long activityCounterId)
166                    throws com.liferay.portal.kernel.exception.SystemException {
167                    return _socialActivityCounterLocalService.fetchSocialActivityCounter(activityCounterId);
168            }
169    
170            /**
171            * Returns the social activity counter with the primary key.
172            *
173            * @param activityCounterId the primary key of the social activity counter
174            * @return the social activity counter
175            * @throws PortalException if a social activity counter with the primary key could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            public com.liferay.portlet.social.model.SocialActivityCounter getSocialActivityCounter(
179                    long activityCounterId)
180                    throws com.liferay.portal.kernel.exception.PortalException,
181                            com.liferay.portal.kernel.exception.SystemException {
182                    return _socialActivityCounterLocalService.getSocialActivityCounter(activityCounterId);
183            }
184    
185            public com.liferay.portal.model.PersistedModel getPersistedModel(
186                    java.io.Serializable primaryKeyObj)
187                    throws com.liferay.portal.kernel.exception.PortalException,
188                            com.liferay.portal.kernel.exception.SystemException {
189                    return _socialActivityCounterLocalService.getPersistedModel(primaryKeyObj);
190            }
191    
192            /**
193            * Returns a range of all the social activity counters.
194            *
195            * <p>
196            * 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.
197            * </p>
198            *
199            * @param start the lower bound of the range of social activity counters
200            * @param end the upper bound of the range of social activity counters (not inclusive)
201            * @return the range of social activity counters
202            * @throws SystemException if a system exception occurred
203            */
204            public java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getSocialActivityCounters(
205                    int start, int end)
206                    throws com.liferay.portal.kernel.exception.SystemException {
207                    return _socialActivityCounterLocalService.getSocialActivityCounters(start,
208                            end);
209            }
210    
211            /**
212            * Returns the number of social activity counters.
213            *
214            * @return the number of social activity counters
215            * @throws SystemException if a system exception occurred
216            */
217            public int getSocialActivityCountersCount()
218                    throws com.liferay.portal.kernel.exception.SystemException {
219                    return _socialActivityCounterLocalService.getSocialActivityCountersCount();
220            }
221    
222            /**
223            * Updates the social activity counter in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
224            *
225            * @param socialActivityCounter the social activity counter
226            * @return the social activity counter that was updated
227            * @throws SystemException if a system exception occurred
228            */
229            public com.liferay.portlet.social.model.SocialActivityCounter updateSocialActivityCounter(
230                    com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter)
231                    throws com.liferay.portal.kernel.exception.SystemException {
232                    return _socialActivityCounterLocalService.updateSocialActivityCounter(socialActivityCounter);
233            }
234    
235            /**
236            * Returns the Spring bean ID for this bean.
237            *
238            * @return the Spring bean ID for this bean
239            */
240            public java.lang.String getBeanIdentifier() {
241                    return _socialActivityCounterLocalService.getBeanIdentifier();
242            }
243    
244            /**
245            * Sets the Spring bean ID for this bean.
246            *
247            * @param beanIdentifier the Spring bean ID for this bean
248            */
249            public void setBeanIdentifier(java.lang.String beanIdentifier) {
250                    _socialActivityCounterLocalService.setBeanIdentifier(beanIdentifier);
251            }
252    
253            /**
254            * Adds an activity counter with a default period length.
255            *
256            * <p>
257            * This method uses the lock service to guard against multiple threads
258            * trying to insert the same counter because this service is called
259            * asynchronously from the social activity service.
260            * </p>
261            *
262            * @param groupId the primary key of the group
263            * @param classNameId the primary key of the entity's class this counter
264            belongs to
265            * @param classPK the primary key of the entity this counter belongs to
266            * @param name the counter's name
267            * @param ownerType the counter's owner type. Acceptable values are
268            <code>TYPE_ACTOR</code>, <code>TYPE_ASSET</code> and
269            <code>TYPE_CREATOR</code> defined in {@link
270            com.liferay.portlet.social.model.SocialActivityCounterConstants}.
271            * @param currentValue the counter's current value (optionally
272            <code>0</code>)
273            * @param totalValue the counter's total value (optionally <code>0</code>)
274            * @param startPeriod the counter's start period
275            * @param endPeriod the counter's end period
276            * @return the added activity counter
277            * @throws PortalException if the group or the previous activity counter
278            could not be found
279            * @throws SystemException if a system exception occurred
280            */
281            public com.liferay.portlet.social.model.SocialActivityCounter addActivityCounter(
282                    long groupId, long classNameId, long classPK, java.lang.String name,
283                    int ownerType, int currentValue, int totalValue, int startPeriod,
284                    int endPeriod)
285                    throws com.liferay.portal.kernel.exception.PortalException,
286                            com.liferay.portal.kernel.exception.SystemException {
287                    return _socialActivityCounterLocalService.addActivityCounter(groupId,
288                            classNameId, classPK, name, ownerType, currentValue, totalValue,
289                            startPeriod, endPeriod);
290            }
291    
292            /**
293            * Adds an activity counter specifying a previous activity and period
294            * length.
295            *
296            * <p>
297            * This method uses the lock service to guard against multiple threads
298            * trying to insert the same counter because this service is called
299            * asynchronously from the social activity service.
300            * </p>
301            *
302            * @param groupId the primary key of the group
303            * @param classNameId the primary key of the entity's class this counter
304            belongs to
305            * @param classPK the primary key of the entity this counter belongs to
306            * @param name the counter name
307            * @param ownerType the counter's owner type. Acceptable values are
308            <code>TYPE_ACTOR</code>, <code>TYPE_ASSET</code> and
309            <code>TYPE_CREATOR</code> defined in {@link
310            com.liferay.portlet.social.model.SocialActivityCounterConstants}.
311            * @param currentValue the current value of the counter (optionally
312            <code>0</code>)
313            * @param totalValue the counter's total value (optionally <code>0</code>)
314            * @param startPeriod the counter's start period
315            * @param endPeriod the counter's end period
316            * @param previousActivityCounterId the primary key of the activity counter
317            for the previous time period (optionally <code>0</code>, if this
318            is the first)
319            * @param periodLength the period length in days,
320            <code>PERIOD_LENGTH_INFINITE</code> for never ending counters or
321            <code>PERIOD_LENGTH_SYSTEM</code> for the period length defined
322            in <code>portal-ext.properties</code>. For more information see
323            {@link
324            com.liferay.portlet.social.model.SocialActivityCounterConstants}.
325            * @return the added activity counter
326            * @throws PortalException if the group or the previous activity counter
327            could not be found
328            * @throws SystemException if a system exception occurred
329            */
330            public com.liferay.portlet.social.model.SocialActivityCounter addActivityCounter(
331                    long groupId, long classNameId, long classPK, java.lang.String name,
332                    int ownerType, int currentValue, int totalValue, int startPeriod,
333                    int endPeriod, long previousActivityCounterId, int periodLength)
334                    throws com.liferay.portal.kernel.exception.PortalException,
335                            com.liferay.portal.kernel.exception.SystemException {
336                    return _socialActivityCounterLocalService.addActivityCounter(groupId,
337                            classNameId, classPK, name, ownerType, currentValue, totalValue,
338                            startPeriod, endPeriod, previousActivityCounterId, periodLength);
339            }
340    
341            /**
342            * Adds or increments activity counters related to an activity.
343            *
344            * </p>
345            * This method is called asynchronously from the social activity service
346            * when the user performs an activity defined in
347            * </code>liferay-social.xml</code>.
348            * </p>
349            *
350            * <p>
351            * This method first calls the activity processor class, if there is one
352            * defined for the activity, checks for limits and increments all the
353            * counters that belong to the activity. Afterwards, it processes the
354            * activity with respect to achievement classes, if any. Lastly it
355            * increments the built-in <code>user.activities</code> and
356            * <code>asset.activities</code> counters.
357            * </p>
358            *
359            * @param activity the social activity
360            * @throws PortalException if an expected group or expected previous
361            activity counters could not be found
362            * @throws SystemException if a system exception occurred
363            */
364            public void addActivityCounters(
365                    com.liferay.portlet.social.model.SocialActivity activity)
366                    throws com.liferay.portal.kernel.exception.PortalException,
367                            com.liferay.portal.kernel.exception.SystemException {
368                    _socialActivityCounterLocalService.addActivityCounters(activity);
369            }
370    
371            /**
372            * Creates an activity counter with a default period length, adding it into
373            * the database.
374            *
375            * @param groupId the primary key of the group
376            * @param classNameId the primary key of the entity's class this
377            counter belongs to
378            * @param classPK the primary key of the entity this counter belongs to
379            * @param name the counter's name
380            * @param ownerType the counter's owner type. Acceptable values are
381            <code>TYPE_ACTOR</code>, <code>TYPE_ASSET</code> and
382            <code>TYPE_CREATOR</code> defined in {@link
383            com.liferay.portlet.social.model.SocialActivityCounterConstants}.
384            * @param currentValue the counter's current value (optionally
385            <code>0</code>)
386            * @param totalValue the counter's total value (optionally
387            <code>0</code>)
388            * @param startPeriod the counter's start period
389            * @param endPeriod the counter's end period
390            * @return the created activity counter
391            * @throws PortalException if the group or a previous activity counter
392            could not be found
393            * @throws SystemException if a system exception occurred
394            * @deprecated {@link #createActivityCounter(long, long, long, String, int,
395            int, int, int, int, long, int)}
396            */
397            public com.liferay.portlet.social.model.SocialActivityCounter createActivityCounter(
398                    long groupId, long classNameId, long classPK, java.lang.String name,
399                    int ownerType, int currentValue, int totalValue, int startPeriod,
400                    int endPeriod)
401                    throws com.liferay.portal.kernel.exception.PortalException,
402                            com.liferay.portal.kernel.exception.SystemException {
403                    return _socialActivityCounterLocalService.createActivityCounter(groupId,
404                            classNameId, classPK, name, ownerType, currentValue, totalValue,
405                            startPeriod, endPeriod);
406            }
407    
408            /**
409            * Creates an activity counter, adding it into the database.
410            *
411            * <p>
412            * This method actually creates the counter in the database. It requires a
413            * new transaction so that other threads can find the new counter when the
414            * lock in the calling method is released.
415            * </p>
416            *
417            * @param groupId the primary key of the group
418            * @param classNameId the primary key of the entity's class this counter
419            belongs to
420            * @param classPK the primary key of the entity this counter belongs to
421            * @param name the counter's name
422            * @param ownerType the counter's owner type. Acceptable values are
423            <code>TYPE_ACTOR</code>, <code>TYPE_ASSET</code> and
424            <code>TYPE_CREATOR</code> defined in {@link
425            com.liferay.portlet.social.model.SocialActivityCounterConstants}.
426            * @param currentValue the counter's current value (optionally
427            <code>0</code>)
428            * @param totalValue the counter's total value of the counter (optionally
429            <code>0</code>)
430            * @param startPeriod the counter's start period
431            * @param endPeriod the counter's end period
432            * @param previousActivityCounterId the primary key of the activity counter
433            for the previous time period (optionally <code>0</code>, if this
434            is the first)
435            * @param periodLength the period length in days,
436            <code>PERIOD_LENGTH_INFINITE</code> for never ending counters or
437            <code>PERIOD_LENGTH_SYSTEM</code> for the period length defined
438            in <code>portal-ext.properties</code>. For more information see
439            {@link com.liferay.portlet.social.model.SocialActivityConstants}.
440            * @return the created activity counter
441            * @throws PortalException if the group or the previous activity counter
442            could not be found
443            * @throws SystemException if a system exception occurred
444            */
445            public com.liferay.portlet.social.model.SocialActivityCounter createActivityCounter(
446                    long groupId, long classNameId, long classPK, java.lang.String name,
447                    int ownerType, int currentValue, int totalValue, int startPeriod,
448                    int endPeriod, long previousActivityCounterId, int periodLength)
449                    throws com.liferay.portal.kernel.exception.PortalException,
450                            com.liferay.portal.kernel.exception.SystemException {
451                    return _socialActivityCounterLocalService.createActivityCounter(groupId,
452                            classNameId, classPK, name, ownerType, currentValue, totalValue,
453                            startPeriod, endPeriod, previousActivityCounterId, periodLength);
454            }
455    
456            /**
457            * Deletes all activity counters, limits, and settings related to the asset.
458            *
459            * <p>
460            * This method subtracts the asset's popularity from the owner's
461            * contribution points. It also creates a new contribution period if the
462            * latest one does not belong to the current period.
463            * </p>
464            *
465            * @param assetEntry the asset entry
466            * @throws PortalException if the new contribution counter could not be
467            created
468            * @throws SystemException if a system exception occurred
469            */
470            public void deleteActivityCounters(
471                    com.liferay.portlet.asset.model.AssetEntry assetEntry)
472                    throws com.liferay.portal.kernel.exception.PortalException,
473                            com.liferay.portal.kernel.exception.SystemException {
474                    _socialActivityCounterLocalService.deleteActivityCounters(assetEntry);
475            }
476    
477            /**
478            * Deletes all activity counters, limits, and settings related to the entity
479            * identified by the class name ID and class primary key.
480            *
481            * @param classNameId the primary key of the entity's class
482            * @param classPK the primary key of the entity
483            * @throws PortalException if the entity is an asset and its owner's
484            contribution counter could not be updated
485            * @throws SystemException if a system exception occurred
486            */
487            public void deleteActivityCounters(long classNameId, long classPK)
488                    throws com.liferay.portal.kernel.exception.PortalException,
489                            com.liferay.portal.kernel.exception.SystemException {
490                    _socialActivityCounterLocalService.deleteActivityCounters(classNameId,
491                            classPK);
492            }
493    
494            /**
495            * Deletes all activity counters for the entity identified by the class name
496            * and class primary key.
497            *
498            * @param className the entity's class name
499            * @param classPK the primary key of the entity
500            * @throws PortalException if the entity is an asset and its owner's
501            contribution counter could not be updated
502            * @throws SystemException if a system exception occurred
503            */
504            public void deleteActivityCounters(java.lang.String className, long classPK)
505                    throws com.liferay.portal.kernel.exception.PortalException,
506                            com.liferay.portal.kernel.exception.SystemException {
507                    _socialActivityCounterLocalService.deleteActivityCounters(className,
508                            classPK);
509            }
510    
511            /**
512            * Disables all the counters of an asset identified by the class name ID and
513            * class primary key.
514            *
515            * <p>
516            * This method is used by the recycle bin to disable all counters of assets
517            * put into the recycle bin. It adjusts the owner's contribution score.
518            * </p>
519            *
520            * @param classNameId the primary key of the asset's class
521            * @param classPK the primary key of the asset
522            * @throws PortalException if the asset owner's contribution counter could
523            not be updated
524            * @throws SystemException if a system exception occurred
525            */
526            public void disableActivityCounters(long classNameId, long classPK)
527                    throws com.liferay.portal.kernel.exception.PortalException,
528                            com.liferay.portal.kernel.exception.SystemException {
529                    _socialActivityCounterLocalService.disableActivityCounters(classNameId,
530                            classPK);
531            }
532    
533            /**
534            * Disables all the counters of an asset identified by the class name and
535            * class primary key.
536            *
537            * <p>
538            * This method is used by the recycle bin to disable all counters of assets
539            * put into the recycle bin. It adjusts the owner's contribution score.
540            * </p>
541            *
542            * @param className the asset's class name
543            * @param classPK the primary key of the asset
544            * @throws PortalException if the asset owner's contribution counter could
545            not be updated
546            * @throws SystemException if a system exception occurred
547            */
548            public void disableActivityCounters(java.lang.String className, long classPK)
549                    throws com.liferay.portal.kernel.exception.PortalException,
550                            com.liferay.portal.kernel.exception.SystemException {
551                    _socialActivityCounterLocalService.disableActivityCounters(className,
552                            classPK);
553            }
554    
555            /**
556            * Enables all activity counters of an asset identified by the class name ID
557            * and class primary key.
558            *
559            * <p>
560            * This method is used by the recycle bin to enable all counters of assets
561            * restored from the recycle bin. It adjusts the owner's contribution score.
562            * </p>
563            *
564            * @param classNameId the primary key of the asset's class
565            * @param classPK the primary key of the asset
566            * @throws PortalException if the asset owner's contribution counter could
567            not be updated
568            * @throws SystemException if a system exception occurred
569            */
570            public void enableActivityCounters(long classNameId, long classPK)
571                    throws com.liferay.portal.kernel.exception.PortalException,
572                            com.liferay.portal.kernel.exception.SystemException {
573                    _socialActivityCounterLocalService.enableActivityCounters(classNameId,
574                            classPK);
575            }
576    
577            /**
578            * Enables all the counters of an asset identified by the class name and
579            * class primary key.
580            *
581            * <p>
582            * This method is used by the recycle bin to enable all counters of assets
583            * restored from the recycle bin. It adjusts the owner's contribution score.
584            * </p>
585            *
586            * @param className the asset's class name
587            * @param classPK the primary key of the asset
588            * @throws PortalException if the asset owner's contribution counter could
589            not be updated
590            * @throws SystemException if a system exception occurred
591            */
592            public void enableActivityCounters(java.lang.String className, long classPK)
593                    throws com.liferay.portal.kernel.exception.PortalException,
594                            com.liferay.portal.kernel.exception.SystemException {
595                    _socialActivityCounterLocalService.enableActivityCounters(className,
596                            classPK);
597            }
598    
599            /**
600            * Returns the activity counter with the given name, owner, and end period
601            * that belong to the given entity.
602            *
603            * @param groupId the primary key of the group
604            * @param classNameId the primary key of the entity's class
605            * @param classPK the primary key of the entity
606            * @param name the counter name
607            * @param ownerType the owner type
608            * @param endPeriod the end period, <code>-1</code> for the latest one
609            * @return the matching activity counter
610            * @throws SystemException if a system exception occurred
611            */
612            public com.liferay.portlet.social.model.SocialActivityCounter fetchActivityCounterByEndPeriod(
613                    long groupId, long classNameId, long classPK, java.lang.String name,
614                    int ownerType, int endPeriod)
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    return _socialActivityCounterLocalService.fetchActivityCounterByEndPeriod(groupId,
617                            classNameId, classPK, name, ownerType, endPeriod);
618            }
619    
620            /**
621            * Returns the activity counter with the given name, owner, and start period
622            * that belong to the given entity.
623            *
624            * @param groupId the primary key of the group
625            * @param classNameId the primary key of the entity's class
626            * @param classPK the primary key of the entity
627            * @param name the counter name
628            * @param ownerType the owner type
629            * @param startPeriod the start period
630            * @return the matching activity counter
631            * @throws SystemException if a system exception occurred
632            */
633            public com.liferay.portlet.social.model.SocialActivityCounter fetchActivityCounterByStartPeriod(
634                    long groupId, long classNameId, long classPK, java.lang.String name,
635                    int ownerType, int startPeriod)
636                    throws com.liferay.portal.kernel.exception.SystemException {
637                    return _socialActivityCounterLocalService.fetchActivityCounterByStartPeriod(groupId,
638                            classNameId, classPK, name, ownerType, startPeriod);
639            }
640    
641            /**
642            * Returns the latest activity counter with the given name and owner that
643            * belong to the given entity.
644            *
645            * @param groupId the primary key of the group
646            * @param classNameId the primary key of the entity's class
647            * @param classPK the primary key of the entity
648            * @param name the counter name
649            * @param ownerType the owner type
650            * @return the matching activity counter
651            * @throws SystemException if a system exception occurred
652            */
653            public com.liferay.portlet.social.model.SocialActivityCounter fetchLatestActivityCounter(
654                    long groupId, long classNameId, long classPK, java.lang.String name,
655                    int ownerType)
656                    throws com.liferay.portal.kernel.exception.SystemException {
657                    return _socialActivityCounterLocalService.fetchLatestActivityCounter(groupId,
658                            classNameId, classPK, name, ownerType);
659            }
660    
661            /**
662            * Returns all the activity counters with the given name and period offsets.
663            *
664            * <p>
665            * The start and end offsets can belong to different periods. This method
666            * groups the counters by name and returns the sum of their current values.
667            * </p>
668            *
669            * @param groupId the primary key of the group
670            * @param name the counter name
671            * @param startOffset the offset for the start period
672            * @param endOffset the offset for the end period
673            * @return the matching activity counters
674            * @throws SystemException if a system exception occurred
675            */
676            public java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getOffsetActivityCounters(
677                    long groupId, java.lang.String name, int startOffset, int endOffset)
678                    throws com.liferay.portal.kernel.exception.SystemException {
679                    return _socialActivityCounterLocalService.getOffsetActivityCounters(groupId,
680                            name, startOffset, endOffset);
681            }
682    
683            /**
684            * Returns the distribution of the activity counters with the given name and
685            * period offsets.
686            *
687            * <p>
688            * The start and end offsets can belong to different periods. This method
689            * groups the counters by their owner entity (usually some asset) and
690            * returns a counter for each entity class with the sum of the counters'
691            * current values.
692            * </p>
693            *
694            * @param groupId the primary key of the group
695            * @param name the counter name
696            * @param startOffset the offset for the start period
697            * @param endOffset the offset for the end period
698            * @return the distribution of matching activity counters
699            * @throws SystemException if a system exception occurred
700            */
701            public java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getOffsetDistributionActivityCounters(
702                    long groupId, java.lang.String name, int startOffset, int endOffset)
703                    throws com.liferay.portal.kernel.exception.SystemException {
704                    return _socialActivityCounterLocalService.getOffsetDistributionActivityCounters(groupId,
705                            name, startOffset, endOffset);
706            }
707    
708            /**
709            * Returns all the activity counters with the given name and time period.
710            *
711            * <p>
712            * The start and end period values can belong to different periods. This
713            * method groups the counters by name and returns the sum of their current
714            * values.
715            * </p>
716            *
717            * @param groupId the primary key of the group
718            * @param name the counter name
719            * @param startPeriod the start period
720            * @param endPeriod the end period
721            * @return the matching activity counters
722            * @throws SystemException if a system exception occurred
723            */
724            public java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getPeriodActivityCounters(
725                    long groupId, java.lang.String name, int startPeriod, int endPeriod)
726                    throws com.liferay.portal.kernel.exception.SystemException {
727                    return _socialActivityCounterLocalService.getPeriodActivityCounters(groupId,
728                            name, startPeriod, endPeriod);
729            }
730    
731            /**
732            * Returns the distribution of activity counters with the given name and
733            * time period.
734            *
735            * <p>
736            * The start and end period values can belong to different periods. This
737            * method groups the counters by their owner entity (usually some asset) and
738            * returns a counter for each entity class with the sum of the counters'
739            * current values.
740            * </p>
741            *
742            * @param groupId the primary key of the group
743            * @param name the counter name
744            * @param startPeriod the start period
745            * @param endPeriod the end period
746            * @return the distribution of matching activity counters
747            * @throws SystemException if a system exception occurred
748            */
749            public java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getPeriodDistributionActivityCounters(
750                    long groupId, java.lang.String name, int startPeriod, int endPeriod)
751                    throws com.liferay.portal.kernel.exception.SystemException {
752                    return _socialActivityCounterLocalService.getPeriodDistributionActivityCounters(groupId,
753                            name, startPeriod, endPeriod);
754            }
755    
756            /**
757            * Returns the range of tuples that contain users and a list of activity
758            * counters.
759            *
760            * <p>
761            * The counters returned for each user are passed to this method in the
762            * selectedNames array. The method also accepts an array of counter names
763            * that are used to rank the users.
764            * </p>
765            *
766            * <p>
767            * Useful when paginating results. Returns a maximum of <code>end -
768            * start</code> instances. <code>start</code> and <code>end</code> are not
769            * primary keys, they are indexes in the result set. Thus, <code>0</code>
770            * refers to the first result in the set. Setting both <code>start</code>
771            * and <code>end</code> to {@link
772            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
773            * result set.
774            * </p>
775            *
776            * @param groupId the primary key of the group
777            * @param rankingNames the ranking counter names
778            * @param selectedNames the counter names that will be returned with each
779            user
780            * @param start the lower bound of the range of results
781            * @param end the upper bound of the range of results (not inclusive)
782            * @return the range of matching tuples
783            * @throws SystemException if a system exception occurred
784            */
785            public java.util.List<com.liferay.portal.kernel.util.Tuple> getUserActivityCounters(
786                    long groupId, java.lang.String[] rankingNames,
787                    java.lang.String[] selectedNames, int start, int end)
788                    throws com.liferay.portal.kernel.exception.SystemException {
789                    return _socialActivityCounterLocalService.getUserActivityCounters(groupId,
790                            rankingNames, selectedNames, start, end);
791            }
792    
793            /**
794            * Returns the number of users having a rank based on the given counters.
795            *
796            * @param groupId the primary key of the group
797            * @param rankingNames the ranking counter names
798            * @return the number of matching users
799            * @throws SystemException if a system exception occurred
800            */
801            public int getUserActivityCountersCount(long groupId,
802                    java.lang.String[] rankingNames)
803                    throws com.liferay.portal.kernel.exception.SystemException {
804                    return _socialActivityCounterLocalService.getUserActivityCountersCount(groupId,
805                            rankingNames);
806            }
807    
808            /**
809            * Increments the <code>user.achievements</code> counter for a user.
810            *
811            * <p>
812            * This method should be used by an external achievement class when the
813            * users unlocks an achievement.
814            * </p>
815            *
816            * @param userId the primary key of the user
817            * @param groupId the primary key of the group
818            * @throws PortalException if the group or an expected previous activity
819            counter could not be found
820            * @throws SystemException if a system exception occurred
821            */
822            public void incrementUserAchievementCounter(long userId, long groupId)
823                    throws com.liferay.portal.kernel.exception.PortalException,
824                            com.liferay.portal.kernel.exception.SystemException {
825                    _socialActivityCounterLocalService.incrementUserAchievementCounter(userId,
826                            groupId);
827            }
828    
829            /**
830             * @deprecated Renamed to {@link #getWrappedService}
831             */
832            public SocialActivityCounterLocalService getWrappedSocialActivityCounterLocalService() {
833                    return _socialActivityCounterLocalService;
834            }
835    
836            /**
837             * @deprecated Renamed to {@link #setWrappedService}
838             */
839            public void setWrappedSocialActivityCounterLocalService(
840                    SocialActivityCounterLocalService socialActivityCounterLocalService) {
841                    _socialActivityCounterLocalService = socialActivityCounterLocalService;
842            }
843    
844            public SocialActivityCounterLocalService getWrappedService() {
845                    return _socialActivityCounterLocalService;
846            }
847    
848            public void setWrappedService(
849                    SocialActivityCounterLocalService socialActivityCounterLocalService) {
850                    _socialActivityCounterLocalService = socialActivityCounterLocalService;
851            }
852    
853            private SocialActivityCounterLocalService _socialActivityCounterLocalService;
854    }