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