001
014
015 package com.liferay.portlet.journal.service.base;
016
017 import com.liferay.counter.service.CounterLocalService;
018
019 import com.liferay.portal.kernel.annotation.BeanReference;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023 import com.liferay.portal.kernel.exception.PortalException;
024 import com.liferay.portal.kernel.exception.SystemException;
025 import com.liferay.portal.kernel.util.OrderByComparator;
026 import com.liferay.portal.service.ImageLocalService;
027 import com.liferay.portal.service.ImageService;
028 import com.liferay.portal.service.ResourceLocalService;
029 import com.liferay.portal.service.ResourceService;
030 import com.liferay.portal.service.UserLocalService;
031 import com.liferay.portal.service.UserService;
032 import com.liferay.portal.service.persistence.ImagePersistence;
033 import com.liferay.portal.service.persistence.ResourceFinder;
034 import com.liferay.portal.service.persistence.ResourcePersistence;
035 import com.liferay.portal.service.persistence.UserFinder;
036 import com.liferay.portal.service.persistence.UserPersistence;
037
038 import com.liferay.portlet.journal.model.JournalArticleImage;
039 import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
040 import com.liferay.portlet.journal.service.JournalArticleLocalService;
041 import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
042 import com.liferay.portlet.journal.service.JournalArticleService;
043 import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
044 import com.liferay.portlet.journal.service.JournalFeedLocalService;
045 import com.liferay.portlet.journal.service.JournalFeedService;
046 import com.liferay.portlet.journal.service.JournalStructureLocalService;
047 import com.liferay.portlet.journal.service.JournalStructureService;
048 import com.liferay.portlet.journal.service.JournalTemplateLocalService;
049 import com.liferay.portlet.journal.service.JournalTemplateService;
050 import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
051 import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
052 import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
053 import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
054 import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
055 import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
056 import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
057 import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
058 import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
059 import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
060 import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
061
062 import java.util.List;
063
064 import javax.sql.DataSource;
065
066
082 public abstract class JournalArticleImageLocalServiceBaseImpl
083 implements JournalArticleImageLocalService {
084
091 public JournalArticleImage addJournalArticleImage(
092 JournalArticleImage journalArticleImage) throws SystemException {
093 journalArticleImage.setNew(true);
094
095 return journalArticleImagePersistence.update(journalArticleImage, false);
096 }
097
098
104 public JournalArticleImage createJournalArticleImage(long articleImageId) {
105 return journalArticleImagePersistence.create(articleImageId);
106 }
107
108
115 public void deleteJournalArticleImage(long articleImageId)
116 throws PortalException, SystemException {
117 journalArticleImagePersistence.remove(articleImageId);
118 }
119
120
126 public void deleteJournalArticleImage(
127 JournalArticleImage journalArticleImage) throws SystemException {
128 journalArticleImagePersistence.remove(journalArticleImage);
129 }
130
131
138 @SuppressWarnings("rawtypes")
139 public List dynamicQuery(DynamicQuery dynamicQuery)
140 throws SystemException {
141 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery);
142 }
143
144
157 @SuppressWarnings("rawtypes")
158 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
159 throws SystemException {
160 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery,
161 start, end);
162 }
163
164
178 @SuppressWarnings("rawtypes")
179 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
180 OrderByComparator orderByComparator) throws SystemException {
181 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery,
182 start, end, orderByComparator);
183 }
184
185
192 public long dynamicQueryCount(DynamicQuery dynamicQuery)
193 throws SystemException {
194 return journalArticleImagePersistence.countWithDynamicQuery(dynamicQuery);
195 }
196
197
205 public JournalArticleImage getJournalArticleImage(long articleImageId)
206 throws PortalException, SystemException {
207 return journalArticleImagePersistence.findByPrimaryKey(articleImageId);
208 }
209
210
222 public List<JournalArticleImage> getJournalArticleImages(int start, int end)
223 throws SystemException {
224 return journalArticleImagePersistence.findAll(start, end);
225 }
226
227
233 public int getJournalArticleImagesCount() throws SystemException {
234 return journalArticleImagePersistence.countAll();
235 }
236
237
244 public JournalArticleImage updateJournalArticleImage(
245 JournalArticleImage journalArticleImage) throws SystemException {
246 journalArticleImage.setNew(false);
247
248 return journalArticleImagePersistence.update(journalArticleImage, true);
249 }
250
251
259 public JournalArticleImage updateJournalArticleImage(
260 JournalArticleImage journalArticleImage, boolean merge)
261 throws SystemException {
262 journalArticleImage.setNew(false);
263
264 return journalArticleImagePersistence.update(journalArticleImage, merge);
265 }
266
267
272 public JournalArticleLocalService getJournalArticleLocalService() {
273 return journalArticleLocalService;
274 }
275
276
281 public void setJournalArticleLocalService(
282 JournalArticleLocalService journalArticleLocalService) {
283 this.journalArticleLocalService = journalArticleLocalService;
284 }
285
286
291 public JournalArticleService getJournalArticleService() {
292 return journalArticleService;
293 }
294
295
300 public void setJournalArticleService(
301 JournalArticleService journalArticleService) {
302 this.journalArticleService = journalArticleService;
303 }
304
305
310 public JournalArticlePersistence getJournalArticlePersistence() {
311 return journalArticlePersistence;
312 }
313
314
319 public void setJournalArticlePersistence(
320 JournalArticlePersistence journalArticlePersistence) {
321 this.journalArticlePersistence = journalArticlePersistence;
322 }
323
324
329 public JournalArticleFinder getJournalArticleFinder() {
330 return journalArticleFinder;
331 }
332
333
338 public void setJournalArticleFinder(
339 JournalArticleFinder journalArticleFinder) {
340 this.journalArticleFinder = journalArticleFinder;
341 }
342
343
348 public JournalArticleImageLocalService getJournalArticleImageLocalService() {
349 return journalArticleImageLocalService;
350 }
351
352
357 public void setJournalArticleImageLocalService(
358 JournalArticleImageLocalService journalArticleImageLocalService) {
359 this.journalArticleImageLocalService = journalArticleImageLocalService;
360 }
361
362
367 public JournalArticleImagePersistence getJournalArticleImagePersistence() {
368 return journalArticleImagePersistence;
369 }
370
371
376 public void setJournalArticleImagePersistence(
377 JournalArticleImagePersistence journalArticleImagePersistence) {
378 this.journalArticleImagePersistence = journalArticleImagePersistence;
379 }
380
381
386 public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
387 return journalArticleResourceLocalService;
388 }
389
390
395 public void setJournalArticleResourceLocalService(
396 JournalArticleResourceLocalService journalArticleResourceLocalService) {
397 this.journalArticleResourceLocalService = journalArticleResourceLocalService;
398 }
399
400
405 public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
406 return journalArticleResourcePersistence;
407 }
408
409
414 public void setJournalArticleResourcePersistence(
415 JournalArticleResourcePersistence journalArticleResourcePersistence) {
416 this.journalArticleResourcePersistence = journalArticleResourcePersistence;
417 }
418
419
424 public JournalContentSearchLocalService getJournalContentSearchLocalService() {
425 return journalContentSearchLocalService;
426 }
427
428
433 public void setJournalContentSearchLocalService(
434 JournalContentSearchLocalService journalContentSearchLocalService) {
435 this.journalContentSearchLocalService = journalContentSearchLocalService;
436 }
437
438
443 public JournalContentSearchPersistence getJournalContentSearchPersistence() {
444 return journalContentSearchPersistence;
445 }
446
447
452 public void setJournalContentSearchPersistence(
453 JournalContentSearchPersistence journalContentSearchPersistence) {
454 this.journalContentSearchPersistence = journalContentSearchPersistence;
455 }
456
457
462 public JournalFeedLocalService getJournalFeedLocalService() {
463 return journalFeedLocalService;
464 }
465
466
471 public void setJournalFeedLocalService(
472 JournalFeedLocalService journalFeedLocalService) {
473 this.journalFeedLocalService = journalFeedLocalService;
474 }
475
476
481 public JournalFeedService getJournalFeedService() {
482 return journalFeedService;
483 }
484
485
490 public void setJournalFeedService(JournalFeedService journalFeedService) {
491 this.journalFeedService = journalFeedService;
492 }
493
494
499 public JournalFeedPersistence getJournalFeedPersistence() {
500 return journalFeedPersistence;
501 }
502
503
508 public void setJournalFeedPersistence(
509 JournalFeedPersistence journalFeedPersistence) {
510 this.journalFeedPersistence = journalFeedPersistence;
511 }
512
513
518 public JournalFeedFinder getJournalFeedFinder() {
519 return journalFeedFinder;
520 }
521
522
527 public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
528 this.journalFeedFinder = journalFeedFinder;
529 }
530
531
536 public JournalStructureLocalService getJournalStructureLocalService() {
537 return journalStructureLocalService;
538 }
539
540
545 public void setJournalStructureLocalService(
546 JournalStructureLocalService journalStructureLocalService) {
547 this.journalStructureLocalService = journalStructureLocalService;
548 }
549
550
555 public JournalStructureService getJournalStructureService() {
556 return journalStructureService;
557 }
558
559
564 public void setJournalStructureService(
565 JournalStructureService journalStructureService) {
566 this.journalStructureService = journalStructureService;
567 }
568
569
574 public JournalStructurePersistence getJournalStructurePersistence() {
575 return journalStructurePersistence;
576 }
577
578
583 public void setJournalStructurePersistence(
584 JournalStructurePersistence journalStructurePersistence) {
585 this.journalStructurePersistence = journalStructurePersistence;
586 }
587
588
593 public JournalStructureFinder getJournalStructureFinder() {
594 return journalStructureFinder;
595 }
596
597
602 public void setJournalStructureFinder(
603 JournalStructureFinder journalStructureFinder) {
604 this.journalStructureFinder = journalStructureFinder;
605 }
606
607
612 public JournalTemplateLocalService getJournalTemplateLocalService() {
613 return journalTemplateLocalService;
614 }
615
616
621 public void setJournalTemplateLocalService(
622 JournalTemplateLocalService journalTemplateLocalService) {
623 this.journalTemplateLocalService = journalTemplateLocalService;
624 }
625
626
631 public JournalTemplateService getJournalTemplateService() {
632 return journalTemplateService;
633 }
634
635
640 public void setJournalTemplateService(
641 JournalTemplateService journalTemplateService) {
642 this.journalTemplateService = journalTemplateService;
643 }
644
645
650 public JournalTemplatePersistence getJournalTemplatePersistence() {
651 return journalTemplatePersistence;
652 }
653
654
659 public void setJournalTemplatePersistence(
660 JournalTemplatePersistence journalTemplatePersistence) {
661 this.journalTemplatePersistence = journalTemplatePersistence;
662 }
663
664
669 public JournalTemplateFinder getJournalTemplateFinder() {
670 return journalTemplateFinder;
671 }
672
673
678 public void setJournalTemplateFinder(
679 JournalTemplateFinder journalTemplateFinder) {
680 this.journalTemplateFinder = journalTemplateFinder;
681 }
682
683
688 public CounterLocalService getCounterLocalService() {
689 return counterLocalService;
690 }
691
692
697 public void setCounterLocalService(CounterLocalService counterLocalService) {
698 this.counterLocalService = counterLocalService;
699 }
700
701
706 public ImageLocalService getImageLocalService() {
707 return imageLocalService;
708 }
709
710
715 public void setImageLocalService(ImageLocalService imageLocalService) {
716 this.imageLocalService = imageLocalService;
717 }
718
719
724 public ImageService getImageService() {
725 return imageService;
726 }
727
728
733 public void setImageService(ImageService imageService) {
734 this.imageService = imageService;
735 }
736
737
742 public ImagePersistence getImagePersistence() {
743 return imagePersistence;
744 }
745
746
751 public void setImagePersistence(ImagePersistence imagePersistence) {
752 this.imagePersistence = imagePersistence;
753 }
754
755
760 public ResourceLocalService getResourceLocalService() {
761 return resourceLocalService;
762 }
763
764
769 public void setResourceLocalService(
770 ResourceLocalService resourceLocalService) {
771 this.resourceLocalService = resourceLocalService;
772 }
773
774
779 public ResourceService getResourceService() {
780 return resourceService;
781 }
782
783
788 public void setResourceService(ResourceService resourceService) {
789 this.resourceService = resourceService;
790 }
791
792
797 public ResourcePersistence getResourcePersistence() {
798 return resourcePersistence;
799 }
800
801
806 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
807 this.resourcePersistence = resourcePersistence;
808 }
809
810
815 public ResourceFinder getResourceFinder() {
816 return resourceFinder;
817 }
818
819
824 public void setResourceFinder(ResourceFinder resourceFinder) {
825 this.resourceFinder = resourceFinder;
826 }
827
828
833 public UserLocalService getUserLocalService() {
834 return userLocalService;
835 }
836
837
842 public void setUserLocalService(UserLocalService userLocalService) {
843 this.userLocalService = userLocalService;
844 }
845
846
851 public UserService getUserService() {
852 return userService;
853 }
854
855
860 public void setUserService(UserService userService) {
861 this.userService = userService;
862 }
863
864
869 public UserPersistence getUserPersistence() {
870 return userPersistence;
871 }
872
873
878 public void setUserPersistence(UserPersistence userPersistence) {
879 this.userPersistence = userPersistence;
880 }
881
882
887 public UserFinder getUserFinder() {
888 return userFinder;
889 }
890
891
896 public void setUserFinder(UserFinder userFinder) {
897 this.userFinder = userFinder;
898 }
899
900
905 protected void runSQL(String sql) throws SystemException {
906 try {
907 DataSource dataSource = journalArticleImagePersistence.getDataSource();
908
909 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
910 sql, new int[0]);
911
912 sqlUpdate.update();
913 }
914 catch (Exception e) {
915 throw new SystemException(e);
916 }
917 }
918
919 @BeanReference(type = JournalArticleLocalService.class)
920 protected JournalArticleLocalService journalArticleLocalService;
921 @BeanReference(type = JournalArticleService.class)
922 protected JournalArticleService journalArticleService;
923 @BeanReference(type = JournalArticlePersistence.class)
924 protected JournalArticlePersistence journalArticlePersistence;
925 @BeanReference(type = JournalArticleFinder.class)
926 protected JournalArticleFinder journalArticleFinder;
927 @BeanReference(type = JournalArticleImageLocalService.class)
928 protected JournalArticleImageLocalService journalArticleImageLocalService;
929 @BeanReference(type = JournalArticleImagePersistence.class)
930 protected JournalArticleImagePersistence journalArticleImagePersistence;
931 @BeanReference(type = JournalArticleResourceLocalService.class)
932 protected JournalArticleResourceLocalService journalArticleResourceLocalService;
933 @BeanReference(type = JournalArticleResourcePersistence.class)
934 protected JournalArticleResourcePersistence journalArticleResourcePersistence;
935 @BeanReference(type = JournalContentSearchLocalService.class)
936 protected JournalContentSearchLocalService journalContentSearchLocalService;
937 @BeanReference(type = JournalContentSearchPersistence.class)
938 protected JournalContentSearchPersistence journalContentSearchPersistence;
939 @BeanReference(type = JournalFeedLocalService.class)
940 protected JournalFeedLocalService journalFeedLocalService;
941 @BeanReference(type = JournalFeedService.class)
942 protected JournalFeedService journalFeedService;
943 @BeanReference(type = JournalFeedPersistence.class)
944 protected JournalFeedPersistence journalFeedPersistence;
945 @BeanReference(type = JournalFeedFinder.class)
946 protected JournalFeedFinder journalFeedFinder;
947 @BeanReference(type = JournalStructureLocalService.class)
948 protected JournalStructureLocalService journalStructureLocalService;
949 @BeanReference(type = JournalStructureService.class)
950 protected JournalStructureService journalStructureService;
951 @BeanReference(type = JournalStructurePersistence.class)
952 protected JournalStructurePersistence journalStructurePersistence;
953 @BeanReference(type = JournalStructureFinder.class)
954 protected JournalStructureFinder journalStructureFinder;
955 @BeanReference(type = JournalTemplateLocalService.class)
956 protected JournalTemplateLocalService journalTemplateLocalService;
957 @BeanReference(type = JournalTemplateService.class)
958 protected JournalTemplateService journalTemplateService;
959 @BeanReference(type = JournalTemplatePersistence.class)
960 protected JournalTemplatePersistence journalTemplatePersistence;
961 @BeanReference(type = JournalTemplateFinder.class)
962 protected JournalTemplateFinder journalTemplateFinder;
963 @BeanReference(type = CounterLocalService.class)
964 protected CounterLocalService counterLocalService;
965 @BeanReference(type = ImageLocalService.class)
966 protected ImageLocalService imageLocalService;
967 @BeanReference(type = ImageService.class)
968 protected ImageService imageService;
969 @BeanReference(type = ImagePersistence.class)
970 protected ImagePersistence imagePersistence;
971 @BeanReference(type = ResourceLocalService.class)
972 protected ResourceLocalService resourceLocalService;
973 @BeanReference(type = ResourceService.class)
974 protected ResourceService resourceService;
975 @BeanReference(type = ResourcePersistence.class)
976 protected ResourcePersistence resourcePersistence;
977 @BeanReference(type = ResourceFinder.class)
978 protected ResourceFinder resourceFinder;
979 @BeanReference(type = UserLocalService.class)
980 protected UserLocalService userLocalService;
981 @BeanReference(type = UserService.class)
982 protected UserService userService;
983 @BeanReference(type = UserPersistence.class)
984 protected UserPersistence userPersistence;
985 @BeanReference(type = UserFinder.class)
986 protected UserFinder userFinder;
987 }