1
14
15 package com.liferay.portlet.journal.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.jdbc.SqlUpdate;
24 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
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.expando.service.ExpandoValueLocalService;
37 import com.liferay.portlet.expando.service.ExpandoValueService;
38 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
39 import com.liferay.portlet.journal.model.JournalFeed;
40 import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
41 import com.liferay.portlet.journal.service.JournalArticleLocalService;
42 import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
43 import com.liferay.portlet.journal.service.JournalArticleService;
44 import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
45 import com.liferay.portlet.journal.service.JournalFeedLocalService;
46 import com.liferay.portlet.journal.service.JournalFeedService;
47 import com.liferay.portlet.journal.service.JournalStructureLocalService;
48 import com.liferay.portlet.journal.service.JournalStructureService;
49 import com.liferay.portlet.journal.service.JournalTemplateLocalService;
50 import com.liferay.portlet.journal.service.JournalTemplateService;
51 import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
52 import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
53 import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
54 import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
55 import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
56 import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
57 import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
58 import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
59 import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
60 import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
61 import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
62
63 import java.util.List;
64
65 import javax.sql.DataSource;
66
67
73 public abstract class JournalFeedLocalServiceBaseImpl
74 implements JournalFeedLocalService {
75 public JournalFeed addJournalFeed(JournalFeed journalFeed)
76 throws SystemException {
77 journalFeed.setNew(true);
78
79 return journalFeedPersistence.update(journalFeed, false);
80 }
81
82 public JournalFeed createJournalFeed(long id) {
83 return journalFeedPersistence.create(id);
84 }
85
86 public void deleteJournalFeed(long id)
87 throws PortalException, SystemException {
88 journalFeedPersistence.remove(id);
89 }
90
91 public void deleteJournalFeed(JournalFeed journalFeed)
92 throws SystemException {
93 journalFeedPersistence.remove(journalFeed);
94 }
95
96 @SuppressWarnings("rawtypes")
97 public List dynamicQuery(DynamicQuery dynamicQuery)
98 throws SystemException {
99 return journalFeedPersistence.findWithDynamicQuery(dynamicQuery);
100 }
101
102 @SuppressWarnings("rawtypes")
103 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
104 throws SystemException {
105 return journalFeedPersistence.findWithDynamicQuery(dynamicQuery, start,
106 end);
107 }
108
109 @SuppressWarnings("rawtypes")
110 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
111 OrderByComparator orderByComparator) throws SystemException {
112 return journalFeedPersistence.findWithDynamicQuery(dynamicQuery, start,
113 end, orderByComparator);
114 }
115
116 public int dynamicQueryCount(DynamicQuery dynamicQuery)
117 throws SystemException {
118 return journalFeedPersistence.countWithDynamicQuery(dynamicQuery);
119 }
120
121 public JournalFeed getJournalFeed(long id)
122 throws PortalException, SystemException {
123 return journalFeedPersistence.findByPrimaryKey(id);
124 }
125
126 public JournalFeed getJournalFeedByUuidAndGroupId(String uuid, long groupId)
127 throws PortalException, SystemException {
128 return journalFeedPersistence.findByUUID_G(uuid, groupId);
129 }
130
131 public List<JournalFeed> getJournalFeeds(int start, int end)
132 throws SystemException {
133 return journalFeedPersistence.findAll(start, end);
134 }
135
136 public int getJournalFeedsCount() throws SystemException {
137 return journalFeedPersistence.countAll();
138 }
139
140 public JournalFeed updateJournalFeed(JournalFeed journalFeed)
141 throws SystemException {
142 journalFeed.setNew(false);
143
144 return journalFeedPersistence.update(journalFeed, true);
145 }
146
147 public JournalFeed updateJournalFeed(JournalFeed journalFeed, boolean merge)
148 throws SystemException {
149 journalFeed.setNew(false);
150
151 return journalFeedPersistence.update(journalFeed, merge);
152 }
153
154 public JournalArticleLocalService getJournalArticleLocalService() {
155 return journalArticleLocalService;
156 }
157
158 public void setJournalArticleLocalService(
159 JournalArticleLocalService journalArticleLocalService) {
160 this.journalArticleLocalService = journalArticleLocalService;
161 }
162
163 public JournalArticleService getJournalArticleService() {
164 return journalArticleService;
165 }
166
167 public void setJournalArticleService(
168 JournalArticleService journalArticleService) {
169 this.journalArticleService = journalArticleService;
170 }
171
172 public JournalArticlePersistence getJournalArticlePersistence() {
173 return journalArticlePersistence;
174 }
175
176 public void setJournalArticlePersistence(
177 JournalArticlePersistence journalArticlePersistence) {
178 this.journalArticlePersistence = journalArticlePersistence;
179 }
180
181 public JournalArticleFinder getJournalArticleFinder() {
182 return journalArticleFinder;
183 }
184
185 public void setJournalArticleFinder(
186 JournalArticleFinder journalArticleFinder) {
187 this.journalArticleFinder = journalArticleFinder;
188 }
189
190 public JournalArticleImageLocalService getJournalArticleImageLocalService() {
191 return journalArticleImageLocalService;
192 }
193
194 public void setJournalArticleImageLocalService(
195 JournalArticleImageLocalService journalArticleImageLocalService) {
196 this.journalArticleImageLocalService = journalArticleImageLocalService;
197 }
198
199 public JournalArticleImagePersistence getJournalArticleImagePersistence() {
200 return journalArticleImagePersistence;
201 }
202
203 public void setJournalArticleImagePersistence(
204 JournalArticleImagePersistence journalArticleImagePersistence) {
205 this.journalArticleImagePersistence = journalArticleImagePersistence;
206 }
207
208 public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
209 return journalArticleResourceLocalService;
210 }
211
212 public void setJournalArticleResourceLocalService(
213 JournalArticleResourceLocalService journalArticleResourceLocalService) {
214 this.journalArticleResourceLocalService = journalArticleResourceLocalService;
215 }
216
217 public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
218 return journalArticleResourcePersistence;
219 }
220
221 public void setJournalArticleResourcePersistence(
222 JournalArticleResourcePersistence journalArticleResourcePersistence) {
223 this.journalArticleResourcePersistence = journalArticleResourcePersistence;
224 }
225
226 public JournalContentSearchLocalService getJournalContentSearchLocalService() {
227 return journalContentSearchLocalService;
228 }
229
230 public void setJournalContentSearchLocalService(
231 JournalContentSearchLocalService journalContentSearchLocalService) {
232 this.journalContentSearchLocalService = journalContentSearchLocalService;
233 }
234
235 public JournalContentSearchPersistence getJournalContentSearchPersistence() {
236 return journalContentSearchPersistence;
237 }
238
239 public void setJournalContentSearchPersistence(
240 JournalContentSearchPersistence journalContentSearchPersistence) {
241 this.journalContentSearchPersistence = journalContentSearchPersistence;
242 }
243
244 public JournalFeedLocalService getJournalFeedLocalService() {
245 return journalFeedLocalService;
246 }
247
248 public void setJournalFeedLocalService(
249 JournalFeedLocalService journalFeedLocalService) {
250 this.journalFeedLocalService = journalFeedLocalService;
251 }
252
253 public JournalFeedService getJournalFeedService() {
254 return journalFeedService;
255 }
256
257 public void setJournalFeedService(JournalFeedService journalFeedService) {
258 this.journalFeedService = journalFeedService;
259 }
260
261 public JournalFeedPersistence getJournalFeedPersistence() {
262 return journalFeedPersistence;
263 }
264
265 public void setJournalFeedPersistence(
266 JournalFeedPersistence journalFeedPersistence) {
267 this.journalFeedPersistence = journalFeedPersistence;
268 }
269
270 public JournalFeedFinder getJournalFeedFinder() {
271 return journalFeedFinder;
272 }
273
274 public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
275 this.journalFeedFinder = journalFeedFinder;
276 }
277
278 public JournalStructureLocalService getJournalStructureLocalService() {
279 return journalStructureLocalService;
280 }
281
282 public void setJournalStructureLocalService(
283 JournalStructureLocalService journalStructureLocalService) {
284 this.journalStructureLocalService = journalStructureLocalService;
285 }
286
287 public JournalStructureService getJournalStructureService() {
288 return journalStructureService;
289 }
290
291 public void setJournalStructureService(
292 JournalStructureService journalStructureService) {
293 this.journalStructureService = journalStructureService;
294 }
295
296 public JournalStructurePersistence getJournalStructurePersistence() {
297 return journalStructurePersistence;
298 }
299
300 public void setJournalStructurePersistence(
301 JournalStructurePersistence journalStructurePersistence) {
302 this.journalStructurePersistence = journalStructurePersistence;
303 }
304
305 public JournalStructureFinder getJournalStructureFinder() {
306 return journalStructureFinder;
307 }
308
309 public void setJournalStructureFinder(
310 JournalStructureFinder journalStructureFinder) {
311 this.journalStructureFinder = journalStructureFinder;
312 }
313
314 public JournalTemplateLocalService getJournalTemplateLocalService() {
315 return journalTemplateLocalService;
316 }
317
318 public void setJournalTemplateLocalService(
319 JournalTemplateLocalService journalTemplateLocalService) {
320 this.journalTemplateLocalService = journalTemplateLocalService;
321 }
322
323 public JournalTemplateService getJournalTemplateService() {
324 return journalTemplateService;
325 }
326
327 public void setJournalTemplateService(
328 JournalTemplateService journalTemplateService) {
329 this.journalTemplateService = journalTemplateService;
330 }
331
332 public JournalTemplatePersistence getJournalTemplatePersistence() {
333 return journalTemplatePersistence;
334 }
335
336 public void setJournalTemplatePersistence(
337 JournalTemplatePersistence journalTemplatePersistence) {
338 this.journalTemplatePersistence = journalTemplatePersistence;
339 }
340
341 public JournalTemplateFinder getJournalTemplateFinder() {
342 return journalTemplateFinder;
343 }
344
345 public void setJournalTemplateFinder(
346 JournalTemplateFinder journalTemplateFinder) {
347 this.journalTemplateFinder = journalTemplateFinder;
348 }
349
350 public CounterLocalService getCounterLocalService() {
351 return counterLocalService;
352 }
353
354 public void setCounterLocalService(CounterLocalService counterLocalService) {
355 this.counterLocalService = counterLocalService;
356 }
357
358 public CounterService getCounterService() {
359 return counterService;
360 }
361
362 public void setCounterService(CounterService counterService) {
363 this.counterService = counterService;
364 }
365
366 public ResourceLocalService getResourceLocalService() {
367 return resourceLocalService;
368 }
369
370 public void setResourceLocalService(
371 ResourceLocalService resourceLocalService) {
372 this.resourceLocalService = resourceLocalService;
373 }
374
375 public ResourceService getResourceService() {
376 return resourceService;
377 }
378
379 public void setResourceService(ResourceService resourceService) {
380 this.resourceService = resourceService;
381 }
382
383 public ResourcePersistence getResourcePersistence() {
384 return resourcePersistence;
385 }
386
387 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
388 this.resourcePersistence = resourcePersistence;
389 }
390
391 public ResourceFinder getResourceFinder() {
392 return resourceFinder;
393 }
394
395 public void setResourceFinder(ResourceFinder resourceFinder) {
396 this.resourceFinder = resourceFinder;
397 }
398
399 public UserLocalService getUserLocalService() {
400 return userLocalService;
401 }
402
403 public void setUserLocalService(UserLocalService userLocalService) {
404 this.userLocalService = userLocalService;
405 }
406
407 public UserService getUserService() {
408 return userService;
409 }
410
411 public void setUserService(UserService userService) {
412 this.userService = userService;
413 }
414
415 public UserPersistence getUserPersistence() {
416 return userPersistence;
417 }
418
419 public void setUserPersistence(UserPersistence userPersistence) {
420 this.userPersistence = userPersistence;
421 }
422
423 public UserFinder getUserFinder() {
424 return userFinder;
425 }
426
427 public void setUserFinder(UserFinder userFinder) {
428 this.userFinder = userFinder;
429 }
430
431 public ExpandoValueLocalService getExpandoValueLocalService() {
432 return expandoValueLocalService;
433 }
434
435 public void setExpandoValueLocalService(
436 ExpandoValueLocalService expandoValueLocalService) {
437 this.expandoValueLocalService = expandoValueLocalService;
438 }
439
440 public ExpandoValueService getExpandoValueService() {
441 return expandoValueService;
442 }
443
444 public void setExpandoValueService(ExpandoValueService expandoValueService) {
445 this.expandoValueService = expandoValueService;
446 }
447
448 public ExpandoValuePersistence getExpandoValuePersistence() {
449 return expandoValuePersistence;
450 }
451
452 public void setExpandoValuePersistence(
453 ExpandoValuePersistence expandoValuePersistence) {
454 this.expandoValuePersistence = expandoValuePersistence;
455 }
456
457 protected void runSQL(String sql) throws SystemException {
458 try {
459 DataSource dataSource = journalFeedPersistence.getDataSource();
460
461 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
462 sql, new int[0]);
463
464 sqlUpdate.update(new Object[0]);
465 }
466 catch (Exception e) {
467 throw new SystemException(e);
468 }
469 }
470
471 @BeanReference(type = JournalArticleLocalService.class)
472 protected JournalArticleLocalService journalArticleLocalService;
473 @BeanReference(type = JournalArticleService.class)
474 protected JournalArticleService journalArticleService;
475 @BeanReference(type = JournalArticlePersistence.class)
476 protected JournalArticlePersistence journalArticlePersistence;
477 @BeanReference(type = JournalArticleFinder.class)
478 protected JournalArticleFinder journalArticleFinder;
479 @BeanReference(type = JournalArticleImageLocalService.class)
480 protected JournalArticleImageLocalService journalArticleImageLocalService;
481 @BeanReference(type = JournalArticleImagePersistence.class)
482 protected JournalArticleImagePersistence journalArticleImagePersistence;
483 @BeanReference(type = JournalArticleResourceLocalService.class)
484 protected JournalArticleResourceLocalService journalArticleResourceLocalService;
485 @BeanReference(type = JournalArticleResourcePersistence.class)
486 protected JournalArticleResourcePersistence journalArticleResourcePersistence;
487 @BeanReference(type = JournalContentSearchLocalService.class)
488 protected JournalContentSearchLocalService journalContentSearchLocalService;
489 @BeanReference(type = JournalContentSearchPersistence.class)
490 protected JournalContentSearchPersistence journalContentSearchPersistence;
491 @BeanReference(type = JournalFeedLocalService.class)
492 protected JournalFeedLocalService journalFeedLocalService;
493 @BeanReference(type = JournalFeedService.class)
494 protected JournalFeedService journalFeedService;
495 @BeanReference(type = JournalFeedPersistence.class)
496 protected JournalFeedPersistence journalFeedPersistence;
497 @BeanReference(type = JournalFeedFinder.class)
498 protected JournalFeedFinder journalFeedFinder;
499 @BeanReference(type = JournalStructureLocalService.class)
500 protected JournalStructureLocalService journalStructureLocalService;
501 @BeanReference(type = JournalStructureService.class)
502 protected JournalStructureService journalStructureService;
503 @BeanReference(type = JournalStructurePersistence.class)
504 protected JournalStructurePersistence journalStructurePersistence;
505 @BeanReference(type = JournalStructureFinder.class)
506 protected JournalStructureFinder journalStructureFinder;
507 @BeanReference(type = JournalTemplateLocalService.class)
508 protected JournalTemplateLocalService journalTemplateLocalService;
509 @BeanReference(type = JournalTemplateService.class)
510 protected JournalTemplateService journalTemplateService;
511 @BeanReference(type = JournalTemplatePersistence.class)
512 protected JournalTemplatePersistence journalTemplatePersistence;
513 @BeanReference(type = JournalTemplateFinder.class)
514 protected JournalTemplateFinder journalTemplateFinder;
515 @BeanReference(type = CounterLocalService.class)
516 protected CounterLocalService counterLocalService;
517 @BeanReference(type = CounterService.class)
518 protected CounterService counterService;
519 @BeanReference(type = ResourceLocalService.class)
520 protected ResourceLocalService resourceLocalService;
521 @BeanReference(type = ResourceService.class)
522 protected ResourceService resourceService;
523 @BeanReference(type = ResourcePersistence.class)
524 protected ResourcePersistence resourcePersistence;
525 @BeanReference(type = ResourceFinder.class)
526 protected ResourceFinder resourceFinder;
527 @BeanReference(type = UserLocalService.class)
528 protected UserLocalService userLocalService;
529 @BeanReference(type = UserService.class)
530 protected UserService userService;
531 @BeanReference(type = UserPersistence.class)
532 protected UserPersistence userPersistence;
533 @BeanReference(type = UserFinder.class)
534 protected UserFinder userFinder;
535 @BeanReference(type = ExpandoValueLocalService.class)
536 protected ExpandoValueLocalService expandoValueLocalService;
537 @BeanReference(type = ExpandoValueService.class)
538 protected ExpandoValueService expandoValueService;
539 @BeanReference(type = ExpandoValuePersistence.class)
540 protected ExpandoValuePersistence expandoValuePersistence;
541 }