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