1
14
15 package com.liferay.portlet.ratings.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class RatingsEntryServiceUtil {
42 public static void deleteEntry(java.lang.String className, long classPK)
43 throws com.liferay.portal.PortalException,
44 com.liferay.portal.SystemException {
45 getService().deleteEntry(className, classPK);
46 }
47
48 public static com.liferay.portlet.ratings.model.RatingsEntry updateEntry(
49 java.lang.String className, long classPK, double score)
50 throws com.liferay.portal.PortalException,
51 com.liferay.portal.SystemException {
52 return getService().updateEntry(className, classPK, score);
53 }
54
55 public static RatingsEntryService getService() {
56 if (_service == null) {
57 _service = (RatingsEntryService)PortalBeanLocatorUtil.locate(RatingsEntryService.class.getName());
58
59 ReferenceRegistry.registerReference(RatingsEntryServiceUtil.class,
60 "_service");
61 MethodCache.remove(RatingsEntryService.class);
62 }
63
64 return _service;
65 }
66
67 public void setService(RatingsEntryService service) {
68 MethodCache.remove(RatingsEntryService.class);
69
70 _service = service;
71
72 ReferenceRegistry.registerReference(RatingsEntryServiceUtil.class,
73 "_service");
74 MethodCache.remove(RatingsEntryService.class);
75 }
76
77 private static RatingsEntryService _service;
78 }