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.WebDAVPropsLocalService;
033 import com.liferay.portal.service.persistence.ImagePersistence;
034 import com.liferay.portal.service.persistence.ResourceFinder;
035 import com.liferay.portal.service.persistence.ResourcePersistence;
036 import com.liferay.portal.service.persistence.UserFinder;
037 import com.liferay.portal.service.persistence.UserPersistence;
038 import com.liferay.portal.service.persistence.WebDAVPropsPersistence;
039
040 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
041 import com.liferay.portlet.expando.service.ExpandoValueService;
042 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
043 import com.liferay.portlet.journal.model.JournalTemplate;
044 import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
045 import com.liferay.portlet.journal.service.JournalArticleLocalService;
046 import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
047 import com.liferay.portlet.journal.service.JournalArticleService;
048 import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
049 import com.liferay.portlet.journal.service.JournalFeedLocalService;
050 import com.liferay.portlet.journal.service.JournalFeedService;
051 import com.liferay.portlet.journal.service.JournalStructureLocalService;
052 import com.liferay.portlet.journal.service.JournalStructureService;
053 import com.liferay.portlet.journal.service.JournalTemplateLocalService;
054 import com.liferay.portlet.journal.service.JournalTemplateService;
055 import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
056 import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
057 import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
058 import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
059 import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
060 import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
061 import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
062 import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
063 import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
064 import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
065 import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
066
067 import java.util.List;
068
069 import javax.sql.DataSource;
070
071
087 public abstract class JournalTemplateLocalServiceBaseImpl
088 implements JournalTemplateLocalService {
089
096 public JournalTemplate addJournalTemplate(JournalTemplate journalTemplate)
097 throws SystemException {
098 journalTemplate.setNew(true);
099
100 return journalTemplatePersistence.update(journalTemplate, false);
101 }
102
103
109 public JournalTemplate createJournalTemplate(long id) {
110 return journalTemplatePersistence.create(id);
111 }
112
113
120 public void deleteJournalTemplate(long id)
121 throws PortalException, SystemException {
122 journalTemplatePersistence.remove(id);
123 }
124
125
131 public void deleteJournalTemplate(JournalTemplate journalTemplate)
132 throws SystemException {
133 journalTemplatePersistence.remove(journalTemplate);
134 }
135
136
143 @SuppressWarnings("rawtypes")
144 public List dynamicQuery(DynamicQuery dynamicQuery)
145 throws SystemException {
146 return journalTemplatePersistence.findWithDynamicQuery(dynamicQuery);
147 }
148
149
162 @SuppressWarnings("rawtypes")
163 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
164 throws SystemException {
165 return journalTemplatePersistence.findWithDynamicQuery(dynamicQuery,
166 start, end);
167 }
168
169
183 @SuppressWarnings("rawtypes")
184 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
185 OrderByComparator orderByComparator) throws SystemException {
186 return journalTemplatePersistence.findWithDynamicQuery(dynamicQuery,
187 start, end, orderByComparator);
188 }
189
190
197 public long dynamicQueryCount(DynamicQuery dynamicQuery)
198 throws SystemException {
199 return journalTemplatePersistence.countWithDynamicQuery(dynamicQuery);
200 }
201
202
210 public JournalTemplate getJournalTemplate(long id)
211 throws PortalException, SystemException {
212 return journalTemplatePersistence.findByPrimaryKey(id);
213 }
214
215
224 public JournalTemplate getJournalTemplateByUuidAndGroupId(String uuid,
225 long groupId) throws PortalException, SystemException {
226 return journalTemplatePersistence.findByUUID_G(uuid, groupId);
227 }
228
229
241 public List<JournalTemplate> getJournalTemplates(int start, int end)
242 throws SystemException {
243 return journalTemplatePersistence.findAll(start, end);
244 }
245
246
252 public int getJournalTemplatesCount() throws SystemException {
253 return journalTemplatePersistence.countAll();
254 }
255
256
263 public JournalTemplate updateJournalTemplate(
264 JournalTemplate journalTemplate) throws SystemException {
265 journalTemplate.setNew(false);
266
267 return journalTemplatePersistence.update(journalTemplate, true);
268 }
269
270
278 public JournalTemplate updateJournalTemplate(
279 JournalTemplate journalTemplate, boolean merge)
280 throws SystemException {
281 journalTemplate.setNew(false);
282
283 return journalTemplatePersistence.update(journalTemplate, merge);
284 }
285
286
291 public JournalArticleLocalService getJournalArticleLocalService() {
292 return journalArticleLocalService;
293 }
294
295
300 public void setJournalArticleLocalService(
301 JournalArticleLocalService journalArticleLocalService) {
302 this.journalArticleLocalService = journalArticleLocalService;
303 }
304
305
310 public JournalArticleService getJournalArticleService() {
311 return journalArticleService;
312 }
313
314
319 public void setJournalArticleService(
320 JournalArticleService journalArticleService) {
321 this.journalArticleService = journalArticleService;
322 }
323
324
329 public JournalArticlePersistence getJournalArticlePersistence() {
330 return journalArticlePersistence;
331 }
332
333
338 public void setJournalArticlePersistence(
339 JournalArticlePersistence journalArticlePersistence) {
340 this.journalArticlePersistence = journalArticlePersistence;
341 }
342
343
348 public JournalArticleFinder getJournalArticleFinder() {
349 return journalArticleFinder;
350 }
351
352
357 public void setJournalArticleFinder(
358 JournalArticleFinder journalArticleFinder) {
359 this.journalArticleFinder = journalArticleFinder;
360 }
361
362
367 public JournalArticleImageLocalService getJournalArticleImageLocalService() {
368 return journalArticleImageLocalService;
369 }
370
371
376 public void setJournalArticleImageLocalService(
377 JournalArticleImageLocalService journalArticleImageLocalService) {
378 this.journalArticleImageLocalService = journalArticleImageLocalService;
379 }
380
381
386 public JournalArticleImagePersistence getJournalArticleImagePersistence() {
387 return journalArticleImagePersistence;
388 }
389
390
395 public void setJournalArticleImagePersistence(
396 JournalArticleImagePersistence journalArticleImagePersistence) {
397 this.journalArticleImagePersistence = journalArticleImagePersistence;
398 }
399
400
405 public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
406 return journalArticleResourceLocalService;
407 }
408
409
414 public void setJournalArticleResourceLocalService(
415 JournalArticleResourceLocalService journalArticleResourceLocalService) {
416 this.journalArticleResourceLocalService = journalArticleResourceLocalService;
417 }
418
419
424 public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
425 return journalArticleResourcePersistence;
426 }
427
428
433 public void setJournalArticleResourcePersistence(
434 JournalArticleResourcePersistence journalArticleResourcePersistence) {
435 this.journalArticleResourcePersistence = journalArticleResourcePersistence;
436 }
437
438
443 public JournalContentSearchLocalService getJournalContentSearchLocalService() {
444 return journalContentSearchLocalService;
445 }
446
447
452 public void setJournalContentSearchLocalService(
453 JournalContentSearchLocalService journalContentSearchLocalService) {
454 this.journalContentSearchLocalService = journalContentSearchLocalService;
455 }
456
457
462 public JournalContentSearchPersistence getJournalContentSearchPersistence() {
463 return journalContentSearchPersistence;
464 }
465
466
471 public void setJournalContentSearchPersistence(
472 JournalContentSearchPersistence journalContentSearchPersistence) {
473 this.journalContentSearchPersistence = journalContentSearchPersistence;
474 }
475
476
481 public JournalFeedLocalService getJournalFeedLocalService() {
482 return journalFeedLocalService;
483 }
484
485
490 public void setJournalFeedLocalService(
491 JournalFeedLocalService journalFeedLocalService) {
492 this.journalFeedLocalService = journalFeedLocalService;
493 }
494
495
500 public JournalFeedService getJournalFeedService() {
501 return journalFeedService;
502 }
503
504
509 public void setJournalFeedService(JournalFeedService journalFeedService) {
510 this.journalFeedService = journalFeedService;
511 }
512
513
518 public JournalFeedPersistence getJournalFeedPersistence() {
519 return journalFeedPersistence;
520 }
521
522
527 public void setJournalFeedPersistence(
528 JournalFeedPersistence journalFeedPersistence) {
529 this.journalFeedPersistence = journalFeedPersistence;
530 }
531
532
537 public JournalFeedFinder getJournalFeedFinder() {
538 return journalFeedFinder;
539 }
540
541
546 public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
547 this.journalFeedFinder = journalFeedFinder;
548 }
549
550
555 public JournalStructureLocalService getJournalStructureLocalService() {
556 return journalStructureLocalService;
557 }
558
559
564 public void setJournalStructureLocalService(
565 JournalStructureLocalService journalStructureLocalService) {
566 this.journalStructureLocalService = journalStructureLocalService;
567 }
568
569
574 public JournalStructureService getJournalStructureService() {
575 return journalStructureService;
576 }
577
578
583 public void setJournalStructureService(
584 JournalStructureService journalStructureService) {
585 this.journalStructureService = journalStructureService;
586 }
587
588
593 public JournalStructurePersistence getJournalStructurePersistence() {
594 return journalStructurePersistence;
595 }
596
597
602 public void setJournalStructurePersistence(
603 JournalStructurePersistence journalStructurePersistence) {
604 this.journalStructurePersistence = journalStructurePersistence;
605 }
606
607
612 public JournalStructureFinder getJournalStructureFinder() {
613 return journalStructureFinder;
614 }
615
616
621 public void setJournalStructureFinder(
622 JournalStructureFinder journalStructureFinder) {
623 this.journalStructureFinder = journalStructureFinder;
624 }
625
626
631 public JournalTemplateLocalService getJournalTemplateLocalService() {
632 return journalTemplateLocalService;
633 }
634
635
640 public void setJournalTemplateLocalService(
641 JournalTemplateLocalService journalTemplateLocalService) {
642 this.journalTemplateLocalService = journalTemplateLocalService;
643 }
644
645
650 public JournalTemplateService getJournalTemplateService() {
651 return journalTemplateService;
652 }
653
654
659 public void setJournalTemplateService(
660 JournalTemplateService journalTemplateService) {
661 this.journalTemplateService = journalTemplateService;
662 }
663
664
669 public JournalTemplatePersistence getJournalTemplatePersistence() {
670 return journalTemplatePersistence;
671 }
672
673
678 public void setJournalTemplatePersistence(
679 JournalTemplatePersistence journalTemplatePersistence) {
680 this.journalTemplatePersistence = journalTemplatePersistence;
681 }
682
683
688 public JournalTemplateFinder getJournalTemplateFinder() {
689 return journalTemplateFinder;
690 }
691
692
697 public void setJournalTemplateFinder(
698 JournalTemplateFinder journalTemplateFinder) {
699 this.journalTemplateFinder = journalTemplateFinder;
700 }
701
702
707 public CounterLocalService getCounterLocalService() {
708 return counterLocalService;
709 }
710
711
716 public void setCounterLocalService(CounterLocalService counterLocalService) {
717 this.counterLocalService = counterLocalService;
718 }
719
720
725 public ImageLocalService getImageLocalService() {
726 return imageLocalService;
727 }
728
729
734 public void setImageLocalService(ImageLocalService imageLocalService) {
735 this.imageLocalService = imageLocalService;
736 }
737
738
743 public ImageService getImageService() {
744 return imageService;
745 }
746
747
752 public void setImageService(ImageService imageService) {
753 this.imageService = imageService;
754 }
755
756
761 public ImagePersistence getImagePersistence() {
762 return imagePersistence;
763 }
764
765
770 public void setImagePersistence(ImagePersistence imagePersistence) {
771 this.imagePersistence = imagePersistence;
772 }
773
774
779 public ResourceLocalService getResourceLocalService() {
780 return resourceLocalService;
781 }
782
783
788 public void setResourceLocalService(
789 ResourceLocalService resourceLocalService) {
790 this.resourceLocalService = resourceLocalService;
791 }
792
793
798 public ResourceService getResourceService() {
799 return resourceService;
800 }
801
802
807 public void setResourceService(ResourceService resourceService) {
808 this.resourceService = resourceService;
809 }
810
811
816 public ResourcePersistence getResourcePersistence() {
817 return resourcePersistence;
818 }
819
820
825 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
826 this.resourcePersistence = resourcePersistence;
827 }
828
829
834 public ResourceFinder getResourceFinder() {
835 return resourceFinder;
836 }
837
838
843 public void setResourceFinder(ResourceFinder resourceFinder) {
844 this.resourceFinder = resourceFinder;
845 }
846
847
852 public UserLocalService getUserLocalService() {
853 return userLocalService;
854 }
855
856
861 public void setUserLocalService(UserLocalService userLocalService) {
862 this.userLocalService = userLocalService;
863 }
864
865
870 public UserService getUserService() {
871 return userService;
872 }
873
874
879 public void setUserService(UserService userService) {
880 this.userService = userService;
881 }
882
883
888 public UserPersistence getUserPersistence() {
889 return userPersistence;
890 }
891
892
897 public void setUserPersistence(UserPersistence userPersistence) {
898 this.userPersistence = userPersistence;
899 }
900
901
906 public UserFinder getUserFinder() {
907 return userFinder;
908 }
909
910
915 public void setUserFinder(UserFinder userFinder) {
916 this.userFinder = userFinder;
917 }
918
919
924 public WebDAVPropsLocalService getWebDAVPropsLocalService() {
925 return webDAVPropsLocalService;
926 }
927
928
933 public void setWebDAVPropsLocalService(
934 WebDAVPropsLocalService webDAVPropsLocalService) {
935 this.webDAVPropsLocalService = webDAVPropsLocalService;
936 }
937
938
943 public WebDAVPropsPersistence getWebDAVPropsPersistence() {
944 return webDAVPropsPersistence;
945 }
946
947
952 public void setWebDAVPropsPersistence(
953 WebDAVPropsPersistence webDAVPropsPersistence) {
954 this.webDAVPropsPersistence = webDAVPropsPersistence;
955 }
956
957
962 public ExpandoValueLocalService getExpandoValueLocalService() {
963 return expandoValueLocalService;
964 }
965
966
971 public void setExpandoValueLocalService(
972 ExpandoValueLocalService expandoValueLocalService) {
973 this.expandoValueLocalService = expandoValueLocalService;
974 }
975
976
981 public ExpandoValueService getExpandoValueService() {
982 return expandoValueService;
983 }
984
985
990 public void setExpandoValueService(ExpandoValueService expandoValueService) {
991 this.expandoValueService = expandoValueService;
992 }
993
994
999 public ExpandoValuePersistence getExpandoValuePersistence() {
1000 return expandoValuePersistence;
1001 }
1002
1003
1008 public void setExpandoValuePersistence(
1009 ExpandoValuePersistence expandoValuePersistence) {
1010 this.expandoValuePersistence = expandoValuePersistence;
1011 }
1012
1013
1018 protected void runSQL(String sql) throws SystemException {
1019 try {
1020 DataSource dataSource = journalTemplatePersistence.getDataSource();
1021
1022 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1023 sql, new int[0]);
1024
1025 sqlUpdate.update();
1026 }
1027 catch (Exception e) {
1028 throw new SystemException(e);
1029 }
1030 }
1031
1032 @BeanReference(type = JournalArticleLocalService.class)
1033 protected JournalArticleLocalService journalArticleLocalService;
1034 @BeanReference(type = JournalArticleService.class)
1035 protected JournalArticleService journalArticleService;
1036 @BeanReference(type = JournalArticlePersistence.class)
1037 protected JournalArticlePersistence journalArticlePersistence;
1038 @BeanReference(type = JournalArticleFinder.class)
1039 protected JournalArticleFinder journalArticleFinder;
1040 @BeanReference(type = JournalArticleImageLocalService.class)
1041 protected JournalArticleImageLocalService journalArticleImageLocalService;
1042 @BeanReference(type = JournalArticleImagePersistence.class)
1043 protected JournalArticleImagePersistence journalArticleImagePersistence;
1044 @BeanReference(type = JournalArticleResourceLocalService.class)
1045 protected JournalArticleResourceLocalService journalArticleResourceLocalService;
1046 @BeanReference(type = JournalArticleResourcePersistence.class)
1047 protected JournalArticleResourcePersistence journalArticleResourcePersistence;
1048 @BeanReference(type = JournalContentSearchLocalService.class)
1049 protected JournalContentSearchLocalService journalContentSearchLocalService;
1050 @BeanReference(type = JournalContentSearchPersistence.class)
1051 protected JournalContentSearchPersistence journalContentSearchPersistence;
1052 @BeanReference(type = JournalFeedLocalService.class)
1053 protected JournalFeedLocalService journalFeedLocalService;
1054 @BeanReference(type = JournalFeedService.class)
1055 protected JournalFeedService journalFeedService;
1056 @BeanReference(type = JournalFeedPersistence.class)
1057 protected JournalFeedPersistence journalFeedPersistence;
1058 @BeanReference(type = JournalFeedFinder.class)
1059 protected JournalFeedFinder journalFeedFinder;
1060 @BeanReference(type = JournalStructureLocalService.class)
1061 protected JournalStructureLocalService journalStructureLocalService;
1062 @BeanReference(type = JournalStructureService.class)
1063 protected JournalStructureService journalStructureService;
1064 @BeanReference(type = JournalStructurePersistence.class)
1065 protected JournalStructurePersistence journalStructurePersistence;
1066 @BeanReference(type = JournalStructureFinder.class)
1067 protected JournalStructureFinder journalStructureFinder;
1068 @BeanReference(type = JournalTemplateLocalService.class)
1069 protected JournalTemplateLocalService journalTemplateLocalService;
1070 @BeanReference(type = JournalTemplateService.class)
1071 protected JournalTemplateService journalTemplateService;
1072 @BeanReference(type = JournalTemplatePersistence.class)
1073 protected JournalTemplatePersistence journalTemplatePersistence;
1074 @BeanReference(type = JournalTemplateFinder.class)
1075 protected JournalTemplateFinder journalTemplateFinder;
1076 @BeanReference(type = CounterLocalService.class)
1077 protected CounterLocalService counterLocalService;
1078 @BeanReference(type = ImageLocalService.class)
1079 protected ImageLocalService imageLocalService;
1080 @BeanReference(type = ImageService.class)
1081 protected ImageService imageService;
1082 @BeanReference(type = ImagePersistence.class)
1083 protected ImagePersistence imagePersistence;
1084 @BeanReference(type = ResourceLocalService.class)
1085 protected ResourceLocalService resourceLocalService;
1086 @BeanReference(type = ResourceService.class)
1087 protected ResourceService resourceService;
1088 @BeanReference(type = ResourcePersistence.class)
1089 protected ResourcePersistence resourcePersistence;
1090 @BeanReference(type = ResourceFinder.class)
1091 protected ResourceFinder resourceFinder;
1092 @BeanReference(type = UserLocalService.class)
1093 protected UserLocalService userLocalService;
1094 @BeanReference(type = UserService.class)
1095 protected UserService userService;
1096 @BeanReference(type = UserPersistence.class)
1097 protected UserPersistence userPersistence;
1098 @BeanReference(type = UserFinder.class)
1099 protected UserFinder userFinder;
1100 @BeanReference(type = WebDAVPropsLocalService.class)
1101 protected WebDAVPropsLocalService webDAVPropsLocalService;
1102 @BeanReference(type = WebDAVPropsPersistence.class)
1103 protected WebDAVPropsPersistence webDAVPropsPersistence;
1104 @BeanReference(type = ExpandoValueLocalService.class)
1105 protected ExpandoValueLocalService expandoValueLocalService;
1106 @BeanReference(type = ExpandoValueService.class)
1107 protected ExpandoValueService expandoValueService;
1108 @BeanReference(type = ExpandoValuePersistence.class)
1109 protected ExpandoValuePersistence expandoValuePersistence;
1110 }