1
14
15 package com.liferay.portlet.ratings.service.base;
16
17 import com.liferay.counter.service.CounterLocalService;
18 import com.liferay.counter.service.CounterService;
19
20 import com.liferay.portal.PortalException;
21 import com.liferay.portal.SystemException;
22 import com.liferay.portal.kernel.annotation.BeanReference;
23 import com.liferay.portal.kernel.dao.db.DB;
24 import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
25 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
26 import com.liferay.portal.kernel.util.OrderByComparator;
27 import com.liferay.portal.service.ResourceLocalService;
28 import com.liferay.portal.service.ResourceService;
29 import com.liferay.portal.service.UserLocalService;
30 import com.liferay.portal.service.UserService;
31 import com.liferay.portal.service.persistence.ResourceFinder;
32 import com.liferay.portal.service.persistence.ResourcePersistence;
33 import com.liferay.portal.service.persistence.UserFinder;
34 import com.liferay.portal.service.persistence.UserPersistence;
35
36 import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
37 import com.liferay.portlet.blogs.service.BlogsEntryService;
38 import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
39 import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
40 import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
41 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
42 import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
43 import com.liferay.portlet.ratings.model.RatingsEntry;
44 import com.liferay.portlet.ratings.service.RatingsEntryLocalService;
45 import com.liferay.portlet.ratings.service.RatingsEntryService;
46 import com.liferay.portlet.ratings.service.RatingsStatsLocalService;
47 import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence;
48 import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
49
50 import java.util.List;
51
52
58 public abstract class RatingsEntryLocalServiceBaseImpl
59 implements RatingsEntryLocalService {
60 public RatingsEntry addRatingsEntry(RatingsEntry ratingsEntry)
61 throws SystemException {
62 ratingsEntry.setNew(true);
63
64 return ratingsEntryPersistence.update(ratingsEntry, false);
65 }
66
67 public RatingsEntry createRatingsEntry(long entryId) {
68 return ratingsEntryPersistence.create(entryId);
69 }
70
71 public void deleteRatingsEntry(long entryId)
72 throws PortalException, SystemException {
73 ratingsEntryPersistence.remove(entryId);
74 }
75
76 public void deleteRatingsEntry(RatingsEntry ratingsEntry)
77 throws SystemException {
78 ratingsEntryPersistence.remove(ratingsEntry);
79 }
80
81 public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
82 throws SystemException {
83 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery);
84 }
85
86 public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
87 int end) throws SystemException {
88 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
89 start, end);
90 }
91
92 public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
93 int end, OrderByComparator orderByComparator) throws SystemException {
94 return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
95 start, end, orderByComparator);
96 }
97
98 public int dynamicQueryCount(DynamicQuery dynamicQuery)
99 throws SystemException {
100 return ratingsEntryPersistence.countWithDynamicQuery(dynamicQuery);
101 }
102
103 public RatingsEntry getRatingsEntry(long entryId)
104 throws PortalException, SystemException {
105 return ratingsEntryPersistence.findByPrimaryKey(entryId);
106 }
107
108 public List<RatingsEntry> getRatingsEntries(int start, int end)
109 throws SystemException {
110 return ratingsEntryPersistence.findAll(start, end);
111 }
112
113 public int getRatingsEntriesCount() throws SystemException {
114 return ratingsEntryPersistence.countAll();
115 }
116
117 public RatingsEntry updateRatingsEntry(RatingsEntry ratingsEntry)
118 throws SystemException {
119 ratingsEntry.setNew(false);
120
121 return ratingsEntryPersistence.update(ratingsEntry, true);
122 }
123
124 public RatingsEntry updateRatingsEntry(RatingsEntry ratingsEntry,
125 boolean merge) throws SystemException {
126 ratingsEntry.setNew(false);
127
128 return ratingsEntryPersistence.update(ratingsEntry, merge);
129 }
130
131 public RatingsEntryLocalService getRatingsEntryLocalService() {
132 return ratingsEntryLocalService;
133 }
134
135 public void setRatingsEntryLocalService(
136 RatingsEntryLocalService ratingsEntryLocalService) {
137 this.ratingsEntryLocalService = ratingsEntryLocalService;
138 }
139
140 public RatingsEntryService getRatingsEntryService() {
141 return ratingsEntryService;
142 }
143
144 public void setRatingsEntryService(RatingsEntryService ratingsEntryService) {
145 this.ratingsEntryService = ratingsEntryService;
146 }
147
148 public RatingsEntryPersistence getRatingsEntryPersistence() {
149 return ratingsEntryPersistence;
150 }
151
152 public void setRatingsEntryPersistence(
153 RatingsEntryPersistence ratingsEntryPersistence) {
154 this.ratingsEntryPersistence = ratingsEntryPersistence;
155 }
156
157 public RatingsStatsLocalService getRatingsStatsLocalService() {
158 return ratingsStatsLocalService;
159 }
160
161 public void setRatingsStatsLocalService(
162 RatingsStatsLocalService ratingsStatsLocalService) {
163 this.ratingsStatsLocalService = ratingsStatsLocalService;
164 }
165
166 public RatingsStatsPersistence getRatingsStatsPersistence() {
167 return ratingsStatsPersistence;
168 }
169
170 public void setRatingsStatsPersistence(
171 RatingsStatsPersistence ratingsStatsPersistence) {
172 this.ratingsStatsPersistence = ratingsStatsPersistence;
173 }
174
175 public CounterLocalService getCounterLocalService() {
176 return counterLocalService;
177 }
178
179 public void setCounterLocalService(CounterLocalService counterLocalService) {
180 this.counterLocalService = counterLocalService;
181 }
182
183 public CounterService getCounterService() {
184 return counterService;
185 }
186
187 public void setCounterService(CounterService counterService) {
188 this.counterService = counterService;
189 }
190
191 public ResourceLocalService getResourceLocalService() {
192 return resourceLocalService;
193 }
194
195 public void setResourceLocalService(
196 ResourceLocalService resourceLocalService) {
197 this.resourceLocalService = resourceLocalService;
198 }
199
200 public ResourceService getResourceService() {
201 return resourceService;
202 }
203
204 public void setResourceService(ResourceService resourceService) {
205 this.resourceService = resourceService;
206 }
207
208 public ResourcePersistence getResourcePersistence() {
209 return resourcePersistence;
210 }
211
212 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
213 this.resourcePersistence = resourcePersistence;
214 }
215
216 public ResourceFinder getResourceFinder() {
217 return resourceFinder;
218 }
219
220 public void setResourceFinder(ResourceFinder resourceFinder) {
221 this.resourceFinder = resourceFinder;
222 }
223
224 public UserLocalService getUserLocalService() {
225 return userLocalService;
226 }
227
228 public void setUserLocalService(UserLocalService userLocalService) {
229 this.userLocalService = userLocalService;
230 }
231
232 public UserService getUserService() {
233 return userService;
234 }
235
236 public void setUserService(UserService userService) {
237 this.userService = userService;
238 }
239
240 public UserPersistence getUserPersistence() {
241 return userPersistence;
242 }
243
244 public void setUserPersistence(UserPersistence userPersistence) {
245 this.userPersistence = userPersistence;
246 }
247
248 public UserFinder getUserFinder() {
249 return userFinder;
250 }
251
252 public void setUserFinder(UserFinder userFinder) {
253 this.userFinder = userFinder;
254 }
255
256 public BlogsEntryLocalService getBlogsEntryLocalService() {
257 return blogsEntryLocalService;
258 }
259
260 public void setBlogsEntryLocalService(
261 BlogsEntryLocalService blogsEntryLocalService) {
262 this.blogsEntryLocalService = blogsEntryLocalService;
263 }
264
265 public BlogsEntryService getBlogsEntryService() {
266 return blogsEntryService;
267 }
268
269 public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
270 this.blogsEntryService = blogsEntryService;
271 }
272
273 public BlogsEntryPersistence getBlogsEntryPersistence() {
274 return blogsEntryPersistence;
275 }
276
277 public void setBlogsEntryPersistence(
278 BlogsEntryPersistence blogsEntryPersistence) {
279 this.blogsEntryPersistence = blogsEntryPersistence;
280 }
281
282 public BlogsEntryFinder getBlogsEntryFinder() {
283 return blogsEntryFinder;
284 }
285
286 public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
287 this.blogsEntryFinder = blogsEntryFinder;
288 }
289
290 public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
291 return blogsStatsUserLocalService;
292 }
293
294 public void setBlogsStatsUserLocalService(
295 BlogsStatsUserLocalService blogsStatsUserLocalService) {
296 this.blogsStatsUserLocalService = blogsStatsUserLocalService;
297 }
298
299 public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
300 return blogsStatsUserPersistence;
301 }
302
303 public void setBlogsStatsUserPersistence(
304 BlogsStatsUserPersistence blogsStatsUserPersistence) {
305 this.blogsStatsUserPersistence = blogsStatsUserPersistence;
306 }
307
308 public BlogsStatsUserFinder getBlogsStatsUserFinder() {
309 return blogsStatsUserFinder;
310 }
311
312 public void setBlogsStatsUserFinder(
313 BlogsStatsUserFinder blogsStatsUserFinder) {
314 this.blogsStatsUserFinder = blogsStatsUserFinder;
315 }
316
317 protected void runSQL(String sql) throws SystemException {
318 try {
319 DB db = DBFactoryUtil.getDB();
320
321 db.runSQL(sql);
322 }
323 catch (Exception e) {
324 throw new SystemException(e);
325 }
326 }
327
328 @BeanReference(type = RatingsEntryLocalService.class)
329 protected RatingsEntryLocalService ratingsEntryLocalService;
330 @BeanReference(type = RatingsEntryService.class)
331 protected RatingsEntryService ratingsEntryService;
332 @BeanReference(type = RatingsEntryPersistence.class)
333 protected RatingsEntryPersistence ratingsEntryPersistence;
334 @BeanReference(type = RatingsStatsLocalService.class)
335 protected RatingsStatsLocalService ratingsStatsLocalService;
336 @BeanReference(type = RatingsStatsPersistence.class)
337 protected RatingsStatsPersistence ratingsStatsPersistence;
338 @BeanReference(type = CounterLocalService.class)
339 protected CounterLocalService counterLocalService;
340 @BeanReference(type = CounterService.class)
341 protected CounterService counterService;
342 @BeanReference(type = ResourceLocalService.class)
343 protected ResourceLocalService resourceLocalService;
344 @BeanReference(type = ResourceService.class)
345 protected ResourceService resourceService;
346 @BeanReference(type = ResourcePersistence.class)
347 protected ResourcePersistence resourcePersistence;
348 @BeanReference(type = ResourceFinder.class)
349 protected ResourceFinder resourceFinder;
350 @BeanReference(type = UserLocalService.class)
351 protected UserLocalService userLocalService;
352 @BeanReference(type = UserService.class)
353 protected UserService userService;
354 @BeanReference(type = UserPersistence.class)
355 protected UserPersistence userPersistence;
356 @BeanReference(type = UserFinder.class)
357 protected UserFinder userFinder;
358 @BeanReference(type = BlogsEntryLocalService.class)
359 protected BlogsEntryLocalService blogsEntryLocalService;
360 @BeanReference(type = BlogsEntryService.class)
361 protected BlogsEntryService blogsEntryService;
362 @BeanReference(type = BlogsEntryPersistence.class)
363 protected BlogsEntryPersistence blogsEntryPersistence;
364 @BeanReference(type = BlogsEntryFinder.class)
365 protected BlogsEntryFinder blogsEntryFinder;
366 @BeanReference(type = BlogsStatsUserLocalService.class)
367 protected BlogsStatsUserLocalService blogsStatsUserLocalService;
368 @BeanReference(type = BlogsStatsUserPersistence.class)
369 protected BlogsStatsUserPersistence blogsStatsUserPersistence;
370 @BeanReference(type = BlogsStatsUserFinder.class)
371 protected BlogsStatsUserFinder blogsStatsUserFinder;
372 }