1
22
23 package com.liferay.portlet.ratings.service.base;
24
25 import com.liferay.counter.service.CounterLocalService;
26 import com.liferay.counter.service.CounterService;
27
28 import com.liferay.portal.PortalException;
29 import com.liferay.portal.SystemException;
30 import com.liferay.portal.kernel.annotation.BeanReference;
31 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
32
33 import com.liferay.portlet.ratings.model.RatingsStats;
34 import com.liferay.portlet.ratings.service.RatingsEntryLocalService;
35 import com.liferay.portlet.ratings.service.RatingsEntryService;
36 import com.liferay.portlet.ratings.service.RatingsStatsLocalService;
37 import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence;
38 import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
39
40 import java.util.List;
41
42
48 public abstract class RatingsStatsLocalServiceBaseImpl
49 implements RatingsStatsLocalService {
50 public RatingsStats addRatingsStats(RatingsStats ratingsStats)
51 throws SystemException {
52 ratingsStats.setNew(true);
53
54 return ratingsStatsPersistence.update(ratingsStats, false);
55 }
56
57 public RatingsStats createRatingsStats(long statsId) {
58 return ratingsStatsPersistence.create(statsId);
59 }
60
61 public void deleteRatingsStats(long statsId)
62 throws PortalException, SystemException {
63 ratingsStatsPersistence.remove(statsId);
64 }
65
66 public void deleteRatingsStats(RatingsStats ratingsStats)
67 throws SystemException {
68 ratingsStatsPersistence.remove(ratingsStats);
69 }
70
71 public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
72 throws SystemException {
73 return ratingsStatsPersistence.findWithDynamicQuery(dynamicQuery);
74 }
75
76 public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
77 int end) throws SystemException {
78 return ratingsStatsPersistence.findWithDynamicQuery(dynamicQuery,
79 start, end);
80 }
81
82 public RatingsStats getRatingsStats(long statsId)
83 throws PortalException, SystemException {
84 return ratingsStatsPersistence.findByPrimaryKey(statsId);
85 }
86
87 public List<RatingsStats> getRatingsStatses(int start, int end)
88 throws SystemException {
89 return ratingsStatsPersistence.findAll(start, end);
90 }
91
92 public int getRatingsStatsesCount() throws SystemException {
93 return ratingsStatsPersistence.countAll();
94 }
95
96 public RatingsStats updateRatingsStats(RatingsStats ratingsStats)
97 throws SystemException {
98 ratingsStats.setNew(false);
99
100 return ratingsStatsPersistence.update(ratingsStats, true);
101 }
102
103 public RatingsEntryLocalService getRatingsEntryLocalService() {
104 return ratingsEntryLocalService;
105 }
106
107 public void setRatingsEntryLocalService(
108 RatingsEntryLocalService ratingsEntryLocalService) {
109 this.ratingsEntryLocalService = ratingsEntryLocalService;
110 }
111
112 public RatingsEntryService getRatingsEntryService() {
113 return ratingsEntryService;
114 }
115
116 public void setRatingsEntryService(RatingsEntryService ratingsEntryService) {
117 this.ratingsEntryService = ratingsEntryService;
118 }
119
120 public RatingsEntryPersistence getRatingsEntryPersistence() {
121 return ratingsEntryPersistence;
122 }
123
124 public void setRatingsEntryPersistence(
125 RatingsEntryPersistence ratingsEntryPersistence) {
126 this.ratingsEntryPersistence = ratingsEntryPersistence;
127 }
128
129 public RatingsStatsLocalService getRatingsStatsLocalService() {
130 return ratingsStatsLocalService;
131 }
132
133 public void setRatingsStatsLocalService(
134 RatingsStatsLocalService ratingsStatsLocalService) {
135 this.ratingsStatsLocalService = ratingsStatsLocalService;
136 }
137
138 public RatingsStatsPersistence getRatingsStatsPersistence() {
139 return ratingsStatsPersistence;
140 }
141
142 public void setRatingsStatsPersistence(
143 RatingsStatsPersistence ratingsStatsPersistence) {
144 this.ratingsStatsPersistence = ratingsStatsPersistence;
145 }
146
147 public CounterLocalService getCounterLocalService() {
148 return counterLocalService;
149 }
150
151 public void setCounterLocalService(CounterLocalService counterLocalService) {
152 this.counterLocalService = counterLocalService;
153 }
154
155 public CounterService getCounterService() {
156 return counterService;
157 }
158
159 public void setCounterService(CounterService counterService) {
160 this.counterService = counterService;
161 }
162
163 @BeanReference(name = "com.liferay.portlet.ratings.service.RatingsEntryLocalService.impl")
164 protected RatingsEntryLocalService ratingsEntryLocalService;
165 @BeanReference(name = "com.liferay.portlet.ratings.service.RatingsEntryService.impl")
166 protected RatingsEntryService ratingsEntryService;
167 @BeanReference(name = "com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence.impl")
168 protected RatingsEntryPersistence ratingsEntryPersistence;
169 @BeanReference(name = "com.liferay.portlet.ratings.service.RatingsStatsLocalService.impl")
170 protected RatingsStatsLocalService ratingsStatsLocalService;
171 @BeanReference(name = "com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence.impl")
172 protected RatingsStatsPersistence ratingsStatsPersistence;
173 @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
174 protected CounterLocalService counterLocalService;
175 @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
176 protected CounterService counterService;
177 }