001
014
015 package com.liferay.portlet.social.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class SocialActivityCounterLocalServiceUtil {
035
040
041
048 public static com.liferay.portlet.social.model.SocialActivityCounter addSocialActivityCounter(
049 com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addSocialActivityCounter(socialActivityCounter);
052 }
053
054
060 public static com.liferay.portlet.social.model.SocialActivityCounter createSocialActivityCounter(
061 long activityCounterId) {
062 return getService().createSocialActivityCounter(activityCounterId);
063 }
064
065
072 public static void deleteSocialActivityCounter(long activityCounterId)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 getService().deleteSocialActivityCounter(activityCounterId);
076 }
077
078
084 public static void deleteSocialActivityCounter(
085 com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter)
086 throws com.liferay.portal.kernel.exception.SystemException {
087 getService().deleteSocialActivityCounter(socialActivityCounter);
088 }
089
090
097 @SuppressWarnings("rawtypes")
098 public static java.util.List dynamicQuery(
099 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().dynamicQuery(dynamicQuery);
102 }
103
104
117 @SuppressWarnings("rawtypes")
118 public static java.util.List dynamicQuery(
119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120 int end) throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().dynamicQuery(dynamicQuery, start, end);
122 }
123
124
138 @SuppressWarnings("rawtypes")
139 public static java.util.List dynamicQuery(
140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141 int end,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getService()
145 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146 }
147
148
155 public static long dynamicQueryCount(
156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getService().dynamicQueryCount(dynamicQuery);
159 }
160
161 public static com.liferay.portlet.social.model.SocialActivityCounter fetchSocialActivityCounter(
162 long activityCounterId)
163 throws com.liferay.portal.kernel.exception.SystemException {
164 return getService().fetchSocialActivityCounter(activityCounterId);
165 }
166
167
175 public static com.liferay.portlet.social.model.SocialActivityCounter getSocialActivityCounter(
176 long activityCounterId)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException {
179 return getService().getSocialActivityCounter(activityCounterId);
180 }
181
182 public static com.liferay.portal.model.PersistedModel getPersistedModel(
183 java.io.Serializable primaryKeyObj)
184 throws com.liferay.portal.kernel.exception.PortalException,
185 com.liferay.portal.kernel.exception.SystemException {
186 return getService().getPersistedModel(primaryKeyObj);
187 }
188
189
201 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getSocialActivityCounters(
202 int start, int end)
203 throws com.liferay.portal.kernel.exception.SystemException {
204 return getService().getSocialActivityCounters(start, end);
205 }
206
207
213 public static int getSocialActivityCountersCount()
214 throws com.liferay.portal.kernel.exception.SystemException {
215 return getService().getSocialActivityCountersCount();
216 }
217
218
225 public static com.liferay.portlet.social.model.SocialActivityCounter updateSocialActivityCounter(
226 com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter)
227 throws com.liferay.portal.kernel.exception.SystemException {
228 return getService().updateSocialActivityCounter(socialActivityCounter);
229 }
230
231
239 public static com.liferay.portlet.social.model.SocialActivityCounter updateSocialActivityCounter(
240 com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter,
241 boolean merge)
242 throws com.liferay.portal.kernel.exception.SystemException {
243 return getService()
244 .updateSocialActivityCounter(socialActivityCounter, merge);
245 }
246
247
252 public static java.lang.String getBeanIdentifier() {
253 return getService().getBeanIdentifier();
254 }
255
256
261 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
262 getService().setBeanIdentifier(beanIdentifier);
263 }
264
265 public static com.liferay.portlet.social.model.SocialActivityCounter addActivityCounter(
266 long groupId, long classNameId, long classPK, java.lang.String name,
267 int ownerType, int currentValue, int totalValue)
268 throws com.liferay.portal.kernel.exception.PortalException,
269 com.liferay.portal.kernel.exception.SystemException {
270 return getService()
271 .addActivityCounter(groupId, classNameId, classPK, name,
272 ownerType, currentValue, totalValue);
273 }
274
275 public static void addActivityCounters(
276 com.liferay.portlet.social.model.SocialActivity activity)
277 throws com.liferay.portal.kernel.exception.PortalException,
278 com.liferay.portal.kernel.exception.SystemException {
279 getService().addActivityCounters(activity);
280 }
281
282 public static void deleteActivityCounters(
283 com.liferay.portlet.asset.model.AssetEntry assetEntry)
284 throws com.liferay.portal.kernel.exception.PortalException,
285 com.liferay.portal.kernel.exception.SystemException {
286 getService().deleteActivityCounters(assetEntry);
287 }
288
289 public static void deleteActivityCounters(long classNameId, long classPK)
290 throws com.liferay.portal.kernel.exception.SystemException {
291 getService().deleteActivityCounters(classNameId, classPK);
292 }
293
294 public static com.liferay.portlet.social.model.SocialActivityCounter fetchLatestActivityCounter(
295 long groupId, long classNameId, long classPK, java.lang.String name,
296 int ownerType)
297 throws com.liferay.portal.kernel.exception.SystemException {
298 return getService()
299 .fetchLatestActivityCounter(groupId, classNameId, classPK,
300 name, ownerType);
301 }
302
303 public static com.liferay.portlet.social.model.SocialActivityCounter fetchLatestActivityCounter(
304 long groupId, long classNameId, long classPK, java.lang.String name,
305 int ownerType, boolean retrieveFromCache)
306 throws com.liferay.portal.kernel.exception.SystemException {
307 return getService()
308 .fetchLatestActivityCounter(groupId, classNameId, classPK,
309 name, ownerType, retrieveFromCache);
310 }
311
312 public static com.liferay.portlet.social.model.SocialActivityCounter getLatestActivityCounter(
313 long groupId, long classNameId, long classPK, java.lang.String name,
314 int ownerType)
315 throws com.liferay.portal.kernel.exception.SystemException,
316 com.liferay.portlet.social.NoSuchActivityCounterException {
317 return getService()
318 .getLatestActivityCounter(groupId, classNameId, classPK,
319 name, ownerType);
320 }
321
322 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getOffsetActivityCounterDistribution(
323 long groupId, java.lang.String name, int startOffset, int endOffset)
324 throws com.liferay.portal.kernel.exception.SystemException {
325 return getService()
326 .getOffsetActivityCounterDistribution(groupId, name,
327 startOffset, endOffset);
328 }
329
330 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getOffsetActivityCounters(
331 long groupId, java.lang.String name, int startOffset, int endOffset)
332 throws com.liferay.portal.kernel.exception.SystemException {
333 return getService()
334 .getOffsetActivityCounters(groupId, name, startOffset,
335 endOffset);
336 }
337
338 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getPeriodActivityCounterDistribution(
339 long groupId, java.lang.String name, int startPeriod, int endPeriod)
340 throws com.liferay.portal.kernel.exception.SystemException {
341 return getService()
342 .getPeriodActivityCounterDistribution(groupId, name,
343 startPeriod, endPeriod);
344 }
345
346 public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> getPeriodActivityCounters(
347 long groupId, java.lang.String name, int startPeriod, int endPeriod)
348 throws com.liferay.portal.kernel.exception.SystemException {
349 return getService()
350 .getPeriodActivityCounters(groupId, name, startPeriod,
351 endPeriod);
352 }
353
354 public static int getUserActivityCounters(long groupId,
355 java.lang.String[] rankingNames)
356 throws com.liferay.portal.kernel.exception.SystemException {
357 return getService().getUserActivityCounters(groupId, rankingNames);
358 }
359
360 public static java.util.List<com.liferay.portal.kernel.util.Tuple> getUserActivityCounters(
361 long groupId, java.lang.String[] rankingNames,
362 java.lang.String[] selectedNames, int start, int end)
363 throws com.liferay.portal.kernel.exception.SystemException {
364 return getService()
365 .getUserActivityCounters(groupId, rankingNames,
366 selectedNames, start, end);
367 }
368
369 public static void incrementUserAchievementCounter(long userId, long groupId)
370 throws com.liferay.portal.kernel.exception.PortalException,
371 com.liferay.portal.kernel.exception.SystemException {
372 getService().incrementUserAchievementCounter(userId, groupId);
373 }
374
375 public static SocialActivityCounterLocalService getService() {
376 if (_service == null) {
377 _service = (SocialActivityCounterLocalService)PortalBeanLocatorUtil.locate(SocialActivityCounterLocalService.class.getName());
378
379 ReferenceRegistry.registerReference(SocialActivityCounterLocalServiceUtil.class,
380 "_service");
381 MethodCache.remove(SocialActivityCounterLocalService.class);
382 }
383
384 return _service;
385 }
386
387 public void setService(SocialActivityCounterLocalService service) {
388 MethodCache.remove(SocialActivityCounterLocalService.class);
389
390 _service = service;
391
392 ReferenceRegistry.registerReference(SocialActivityCounterLocalServiceUtil.class,
393 "_service");
394 MethodCache.remove(SocialActivityCounterLocalService.class);
395 }
396
397 private static SocialActivityCounterLocalService _service;
398 }