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.bean.InitializingBean;
31 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
32 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
33 import com.liferay.portal.service.UserLocalService;
34 import com.liferay.portal.service.UserService;
35 import com.liferay.portal.service.persistence.UserFinder;
36 import com.liferay.portal.service.persistence.UserPersistence;
37
38 import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
39 import com.liferay.portlet.blogs.service.BlogsEntryService;
40 import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
41 import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
42 import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
43 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
44 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
45 import com.liferay.portlet.ratings.model.RatingsEntry;
46 import com.liferay.portlet.ratings.service.RatingsEntryLocalService;
47 import com.liferay.portlet.ratings.service.RatingsStatsLocalService;
48 import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence;
49 import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
50
51 import java.util.List;
52
53
59 public abstract class RatingsEntryLocalServiceBaseImpl
60 implements RatingsEntryLocalService, InitializingBean {
61 public RatingsEntry addRatingsEntry(RatingsEntry ratingsEntry)
62 throws SystemException {
63 ratingsEntry.setNew(true);
64
65 return ratingsEntryPersistence.update(ratingsEntry, false);
66 }
67
68 public void deleteRatingsEntry(long entryId)
69 throws PortalException, SystemException {
70 ratingsEntryPersistence.remove(entryId);
71 }
72
73 public void deleteRatingsEntry(RatingsEntry ratingsEntry)
74 throws SystemException {
75 ratingsEntryPersistence.remove(ratingsEntry);
76 }
77
78 public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
79 throws SystemException {
80 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery);
81 }
82
83 public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
84 int end) throws SystemException {
85 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
86 start, end);
87 }
88
89 public RatingsEntry getRatingsEntry(long entryId)
90 throws PortalException, SystemException {
91 return ratingsEntryPersistence.findByPrimaryKey(entryId);
92 }
93
94 public List<RatingsEntry> getRatingsEntries(int start, int end)
95 throws SystemException {
96 return ratingsEntryPersistence.findAll(start, end);
97 }
98
99 public int getRatingsEntriesCount() throws SystemException {
100 return ratingsEntryPersistence.countAll();
101 }
102
103 public RatingsEntry updateRatingsEntry(RatingsEntry ratingsEntry)
104 throws SystemException {
105 ratingsEntry.setNew(false);
106
107 return ratingsEntryPersistence.update(ratingsEntry, true);
108 }
109
110 public RatingsEntryPersistence getRatingsEntryPersistence() {
111 return ratingsEntryPersistence;
112 }
113
114 public void setRatingsEntryPersistence(
115 RatingsEntryPersistence ratingsEntryPersistence) {
116 this.ratingsEntryPersistence = ratingsEntryPersistence;
117 }
118
119 public RatingsStatsLocalService getRatingsStatsLocalService() {
120 return ratingsStatsLocalService;
121 }
122
123 public void setRatingsStatsLocalService(
124 RatingsStatsLocalService ratingsStatsLocalService) {
125 this.ratingsStatsLocalService = ratingsStatsLocalService;
126 }
127
128 public RatingsStatsPersistence getRatingsStatsPersistence() {
129 return ratingsStatsPersistence;
130 }
131
132 public void setRatingsStatsPersistence(
133 RatingsStatsPersistence ratingsStatsPersistence) {
134 this.ratingsStatsPersistence = ratingsStatsPersistence;
135 }
136
137 public CounterLocalService getCounterLocalService() {
138 return counterLocalService;
139 }
140
141 public void setCounterLocalService(CounterLocalService counterLocalService) {
142 this.counterLocalService = counterLocalService;
143 }
144
145 public CounterService getCounterService() {
146 return counterService;
147 }
148
149 public void setCounterService(CounterService counterService) {
150 this.counterService = counterService;
151 }
152
153 public UserLocalService getUserLocalService() {
154 return userLocalService;
155 }
156
157 public void setUserLocalService(UserLocalService userLocalService) {
158 this.userLocalService = userLocalService;
159 }
160
161 public UserService getUserService() {
162 return userService;
163 }
164
165 public void setUserService(UserService userService) {
166 this.userService = userService;
167 }
168
169 public UserPersistence getUserPersistence() {
170 return userPersistence;
171 }
172
173 public void setUserPersistence(UserPersistence userPersistence) {
174 this.userPersistence = userPersistence;
175 }
176
177 public UserFinder getUserFinder() {
178 return userFinder;
179 }
180
181 public void setUserFinder(UserFinder userFinder) {
182 this.userFinder = userFinder;
183 }
184
185 public BlogsEntryLocalService getBlogsEntryLocalService() {
186 return blogsEntryLocalService;
187 }
188
189 public void setBlogsEntryLocalService(
190 BlogsEntryLocalService blogsEntryLocalService) {
191 this.blogsEntryLocalService = blogsEntryLocalService;
192 }
193
194 public BlogsEntryService getBlogsEntryService() {
195 return blogsEntryService;
196 }
197
198 public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
199 this.blogsEntryService = blogsEntryService;
200 }
201
202 public BlogsEntryPersistence getBlogsEntryPersistence() {
203 return blogsEntryPersistence;
204 }
205
206 public void setBlogsEntryPersistence(
207 BlogsEntryPersistence blogsEntryPersistence) {
208 this.blogsEntryPersistence = blogsEntryPersistence;
209 }
210
211 public BlogsEntryFinder getBlogsEntryFinder() {
212 return blogsEntryFinder;
213 }
214
215 public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
216 this.blogsEntryFinder = blogsEntryFinder;
217 }
218
219 public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
220 return blogsStatsUserLocalService;
221 }
222
223 public void setBlogsStatsUserLocalService(
224 BlogsStatsUserLocalService blogsStatsUserLocalService) {
225 this.blogsStatsUserLocalService = blogsStatsUserLocalService;
226 }
227
228 public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
229 return blogsStatsUserPersistence;
230 }
231
232 public void setBlogsStatsUserPersistence(
233 BlogsStatsUserPersistence blogsStatsUserPersistence) {
234 this.blogsStatsUserPersistence = blogsStatsUserPersistence;
235 }
236
237 public BlogsStatsUserFinder getBlogsStatsUserFinder() {
238 return blogsStatsUserFinder;
239 }
240
241 public void setBlogsStatsUserFinder(
242 BlogsStatsUserFinder blogsStatsUserFinder) {
243 this.blogsStatsUserFinder = blogsStatsUserFinder;
244 }
245
246 public void afterPropertiesSet() {
247 if (ratingsEntryPersistence == null) {
248 ratingsEntryPersistence = (RatingsEntryPersistence)PortalBeanLocatorUtil.locate(RatingsEntryPersistence.class.getName() +
249 ".impl");
250 }
251
252 if (ratingsStatsLocalService == null) {
253 ratingsStatsLocalService = (RatingsStatsLocalService)PortalBeanLocatorUtil.locate(RatingsStatsLocalService.class.getName() +
254 ".impl");
255 }
256
257 if (ratingsStatsPersistence == null) {
258 ratingsStatsPersistence = (RatingsStatsPersistence)PortalBeanLocatorUtil.locate(RatingsStatsPersistence.class.getName() +
259 ".impl");
260 }
261
262 if (counterLocalService == null) {
263 counterLocalService = (CounterLocalService)PortalBeanLocatorUtil.locate(CounterLocalService.class.getName() +
264 ".impl");
265 }
266
267 if (counterService == null) {
268 counterService = (CounterService)PortalBeanLocatorUtil.locate(CounterService.class.getName() +
269 ".impl");
270 }
271
272 if (userLocalService == null) {
273 userLocalService = (UserLocalService)PortalBeanLocatorUtil.locate(UserLocalService.class.getName() +
274 ".impl");
275 }
276
277 if (userService == null) {
278 userService = (UserService)PortalBeanLocatorUtil.locate(UserService.class.getName() +
279 ".impl");
280 }
281
282 if (userPersistence == null) {
283 userPersistence = (UserPersistence)PortalBeanLocatorUtil.locate(UserPersistence.class.getName() +
284 ".impl");
285 }
286
287 if (userFinder == null) {
288 userFinder = (UserFinder)PortalBeanLocatorUtil.locate(UserFinder.class.getName() +
289 ".impl");
290 }
291
292 if (blogsEntryLocalService == null) {
293 blogsEntryLocalService = (BlogsEntryLocalService)PortalBeanLocatorUtil.locate(BlogsEntryLocalService.class.getName() +
294 ".impl");
295 }
296
297 if (blogsEntryService == null) {
298 blogsEntryService = (BlogsEntryService)PortalBeanLocatorUtil.locate(BlogsEntryService.class.getName() +
299 ".impl");
300 }
301
302 if (blogsEntryPersistence == null) {
303 blogsEntryPersistence = (BlogsEntryPersistence)PortalBeanLocatorUtil.locate(BlogsEntryPersistence.class.getName() +
304 ".impl");
305 }
306
307 if (blogsEntryFinder == null) {
308 blogsEntryFinder = (BlogsEntryFinder)PortalBeanLocatorUtil.locate(BlogsEntryFinder.class.getName() +
309 ".impl");
310 }
311
312 if (blogsStatsUserLocalService == null) {
313 blogsStatsUserLocalService = (BlogsStatsUserLocalService)PortalBeanLocatorUtil.locate(BlogsStatsUserLocalService.class.getName() +
314 ".impl");
315 }
316
317 if (blogsStatsUserPersistence == null) {
318 blogsStatsUserPersistence = (BlogsStatsUserPersistence)PortalBeanLocatorUtil.locate(BlogsStatsUserPersistence.class.getName() +
319 ".impl");
320 }
321
322 if (blogsStatsUserFinder == null) {
323 blogsStatsUserFinder = (BlogsStatsUserFinder)PortalBeanLocatorUtil.locate(BlogsStatsUserFinder.class.getName() +
324 ".impl");
325 }
326 }
327
328 protected RatingsEntryPersistence ratingsEntryPersistence;
329 protected RatingsStatsLocalService ratingsStatsLocalService;
330 protected RatingsStatsPersistence ratingsStatsPersistence;
331 protected CounterLocalService counterLocalService;
332 protected CounterService counterService;
333 protected UserLocalService userLocalService;
334 protected UserService userService;
335 protected UserPersistence userPersistence;
336 protected UserFinder userFinder;
337 protected BlogsEntryLocalService blogsEntryLocalService;
338 protected BlogsEntryService blogsEntryService;
339 protected BlogsEntryPersistence blogsEntryPersistence;
340 protected BlogsEntryFinder blogsEntryFinder;
341 protected BlogsStatsUserLocalService blogsStatsUserLocalService;
342 protected BlogsStatsUserPersistence blogsStatsUserPersistence;
343 protected BlogsStatsUserFinder blogsStatsUserFinder;
344 }