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.ResourceLocalService;
027 import com.liferay.portal.service.ResourceService;
028 import com.liferay.portal.service.UserLocalService;
029 import com.liferay.portal.service.UserService;
030 import com.liferay.portal.service.WebDAVPropsLocalService;
031 import com.liferay.portal.service.persistence.ResourceFinder;
032 import com.liferay.portal.service.persistence.ResourcePersistence;
033 import com.liferay.portal.service.persistence.UserFinder;
034 import com.liferay.portal.service.persistence.UserPersistence;
035 import com.liferay.portal.service.persistence.WebDAVPropsPersistence;
036
037 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
038 import com.liferay.portlet.expando.service.ExpandoValueService;
039 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
040 import com.liferay.portlet.journal.model.JournalStructure;
041 import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
042 import com.liferay.portlet.journal.service.JournalArticleLocalService;
043 import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
044 import com.liferay.portlet.journal.service.JournalArticleService;
045 import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
046 import com.liferay.portlet.journal.service.JournalFeedLocalService;
047 import com.liferay.portlet.journal.service.JournalFeedService;
048 import com.liferay.portlet.journal.service.JournalStructureLocalService;
049 import com.liferay.portlet.journal.service.JournalStructureService;
050 import com.liferay.portlet.journal.service.JournalTemplateLocalService;
051 import com.liferay.portlet.journal.service.JournalTemplateService;
052 import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
053 import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
054 import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
055 import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
056 import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
057 import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
058 import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
059 import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
060 import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
061 import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
062 import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
063
064 import java.util.List;
065
066 import javax.sql.DataSource;
067
068
084 public abstract class JournalStructureLocalServiceBaseImpl
085 implements JournalStructureLocalService {
086
093 public JournalStructure addJournalStructure(
094 JournalStructure journalStructure) throws SystemException {
095 journalStructure.setNew(true);
096
097 return journalStructurePersistence.update(journalStructure, false);
098 }
099
100
106 public JournalStructure createJournalStructure(long id) {
107 return journalStructurePersistence.create(id);
108 }
109
110
117 public void deleteJournalStructure(long id)
118 throws PortalException, SystemException {
119 journalStructurePersistence.remove(id);
120 }
121
122
128 public void deleteJournalStructure(JournalStructure journalStructure)
129 throws SystemException {
130 journalStructurePersistence.remove(journalStructure);
131 }
132
133
140 @SuppressWarnings("rawtypes")
141 public List dynamicQuery(DynamicQuery dynamicQuery)
142 throws SystemException {
143 return journalStructurePersistence.findWithDynamicQuery(dynamicQuery);
144 }
145
146
159 @SuppressWarnings("rawtypes")
160 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
161 throws SystemException {
162 return journalStructurePersistence.findWithDynamicQuery(dynamicQuery,
163 start, end);
164 }
165
166
180 @SuppressWarnings("rawtypes")
181 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
182 OrderByComparator orderByComparator) throws SystemException {
183 return journalStructurePersistence.findWithDynamicQuery(dynamicQuery,
184 start, end, orderByComparator);
185 }
186
187
194 public long dynamicQueryCount(DynamicQuery dynamicQuery)
195 throws SystemException {
196 return journalStructurePersistence.countWithDynamicQuery(dynamicQuery);
197 }
198
199
207 public JournalStructure getJournalStructure(long id)
208 throws PortalException, SystemException {
209 return journalStructurePersistence.findByPrimaryKey(id);
210 }
211
212
221 public JournalStructure getJournalStructureByUuidAndGroupId(String uuid,
222 long groupId) throws PortalException, SystemException {
223 return journalStructurePersistence.findByUUID_G(uuid, groupId);
224 }
225
226
238 public List<JournalStructure> getJournalStructures(int start, int end)
239 throws SystemException {
240 return journalStructurePersistence.findAll(start, end);
241 }
242
243
249 public int getJournalStructuresCount() throws SystemException {
250 return journalStructurePersistence.countAll();
251 }
252
253
260 public JournalStructure updateJournalStructure(
261 JournalStructure journalStructure) throws SystemException {
262 journalStructure.setNew(false);
263
264 return journalStructurePersistence.update(journalStructure, true);
265 }
266
267
275 public JournalStructure updateJournalStructure(
276 JournalStructure journalStructure, boolean merge)
277 throws SystemException {
278 journalStructure.setNew(false);
279
280 return journalStructurePersistence.update(journalStructure, merge);
281 }
282
283
288 public JournalArticleLocalService getJournalArticleLocalService() {
289 return journalArticleLocalService;
290 }
291
292
297 public void setJournalArticleLocalService(
298 JournalArticleLocalService journalArticleLocalService) {
299 this.journalArticleLocalService = journalArticleLocalService;
300 }
301
302
307 public JournalArticleService getJournalArticleService() {
308 return journalArticleService;
309 }
310
311
316 public void setJournalArticleService(
317 JournalArticleService journalArticleService) {
318 this.journalArticleService = journalArticleService;
319 }
320
321
326 public JournalArticlePersistence getJournalArticlePersistence() {
327 return journalArticlePersistence;
328 }
329
330
335 public void setJournalArticlePersistence(
336 JournalArticlePersistence journalArticlePersistence) {
337 this.journalArticlePersistence = journalArticlePersistence;
338 }
339
340
345 public JournalArticleFinder getJournalArticleFinder() {
346 return journalArticleFinder;
347 }
348
349
354 public void setJournalArticleFinder(
355 JournalArticleFinder journalArticleFinder) {
356 this.journalArticleFinder = journalArticleFinder;
357 }
358
359
364 public JournalArticleImageLocalService getJournalArticleImageLocalService() {
365 return journalArticleImageLocalService;
366 }
367
368
373 public void setJournalArticleImageLocalService(
374 JournalArticleImageLocalService journalArticleImageLocalService) {
375 this.journalArticleImageLocalService = journalArticleImageLocalService;
376 }
377
378
383 public JournalArticleImagePersistence getJournalArticleImagePersistence() {
384 return journalArticleImagePersistence;
385 }
386
387
392 public void setJournalArticleImagePersistence(
393 JournalArticleImagePersistence journalArticleImagePersistence) {
394 this.journalArticleImagePersistence = journalArticleImagePersistence;
395 }
396
397
402 public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
403 return journalArticleResourceLocalService;
404 }
405
406
411 public void setJournalArticleResourceLocalService(
412 JournalArticleResourceLocalService journalArticleResourceLocalService) {
413 this.journalArticleResourceLocalService = journalArticleResourceLocalService;
414 }
415
416
421 public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
422 return journalArticleResourcePersistence;
423 }
424
425
430 public void setJournalArticleResourcePersistence(
431 JournalArticleResourcePersistence journalArticleResourcePersistence) {
432 this.journalArticleResourcePersistence = journalArticleResourcePersistence;
433 }
434
435
440 public JournalContentSearchLocalService getJournalContentSearchLocalService() {
441 return journalContentSearchLocalService;
442 }
443
444
449 public void setJournalContentSearchLocalService(
450 JournalContentSearchLocalService journalContentSearchLocalService) {
451 this.journalContentSearchLocalService = journalContentSearchLocalService;
452 }
453
454
459 public JournalContentSearchPersistence getJournalContentSearchPersistence() {
460 return journalContentSearchPersistence;
461 }
462
463
468 public void setJournalContentSearchPersistence(
469 JournalContentSearchPersistence journalContentSearchPersistence) {
470 this.journalContentSearchPersistence = journalContentSearchPersistence;
471 }
472
473
478 public JournalFeedLocalService getJournalFeedLocalService() {
479 return journalFeedLocalService;
480 }
481
482
487 public void setJournalFeedLocalService(
488 JournalFeedLocalService journalFeedLocalService) {
489 this.journalFeedLocalService = journalFeedLocalService;
490 }
491
492
497 public JournalFeedService getJournalFeedService() {
498 return journalFeedService;
499 }
500
501
506 public void setJournalFeedService(JournalFeedService journalFeedService) {
507 this.journalFeedService = journalFeedService;
508 }
509
510
515 public JournalFeedPersistence getJournalFeedPersistence() {
516 return journalFeedPersistence;
517 }
518
519
524 public void setJournalFeedPersistence(
525 JournalFeedPersistence journalFeedPersistence) {
526 this.journalFeedPersistence = journalFeedPersistence;
527 }
528
529
534 public JournalFeedFinder getJournalFeedFinder() {
535 return journalFeedFinder;
536 }
537
538
543 public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
544 this.journalFeedFinder = journalFeedFinder;
545 }
546
547
552 public JournalStructureLocalService getJournalStructureLocalService() {
553 return journalStructureLocalService;
554 }
555
556
561 public void setJournalStructureLocalService(
562 JournalStructureLocalService journalStructureLocalService) {
563 this.journalStructureLocalService = journalStructureLocalService;
564 }
565
566
571 public JournalStructureService getJournalStructureService() {
572 return journalStructureService;
573 }
574
575
580 public void setJournalStructureService(
581 JournalStructureService journalStructureService) {
582 this.journalStructureService = journalStructureService;
583 }
584
585
590 public JournalStructurePersistence getJournalStructurePersistence() {
591 return journalStructurePersistence;
592 }
593
594
599 public void setJournalStructurePersistence(
600 JournalStructurePersistence journalStructurePersistence) {
601 this.journalStructurePersistence = journalStructurePersistence;
602 }
603
604
609 public JournalStructureFinder getJournalStructureFinder() {
610 return journalStructureFinder;
611 }
612
613
618 public void setJournalStructureFinder(
619 JournalStructureFinder journalStructureFinder) {
620 this.journalStructureFinder = journalStructureFinder;
621 }
622
623
628 public JournalTemplateLocalService getJournalTemplateLocalService() {
629 return journalTemplateLocalService;
630 }
631
632
637 public void setJournalTemplateLocalService(
638 JournalTemplateLocalService journalTemplateLocalService) {
639 this.journalTemplateLocalService = journalTemplateLocalService;
640 }
641
642
647 public JournalTemplateService getJournalTemplateService() {
648 return journalTemplateService;
649 }
650
651
656 public void setJournalTemplateService(
657 JournalTemplateService journalTemplateService) {
658 this.journalTemplateService = journalTemplateService;
659 }
660
661
666 public JournalTemplatePersistence getJournalTemplatePersistence() {
667 return journalTemplatePersistence;
668 }
669
670
675 public void setJournalTemplatePersistence(
676 JournalTemplatePersistence journalTemplatePersistence) {
677 this.journalTemplatePersistence = journalTemplatePersistence;
678 }
679
680
685 public JournalTemplateFinder getJournalTemplateFinder() {
686 return journalTemplateFinder;
687 }
688
689
694 public void setJournalTemplateFinder(
695 JournalTemplateFinder journalTemplateFinder) {
696 this.journalTemplateFinder = journalTemplateFinder;
697 }
698
699
704 public CounterLocalService getCounterLocalService() {
705 return counterLocalService;
706 }
707
708
713 public void setCounterLocalService(CounterLocalService counterLocalService) {
714 this.counterLocalService = counterLocalService;
715 }
716
717
722 public ResourceLocalService getResourceLocalService() {
723 return resourceLocalService;
724 }
725
726
731 public void setResourceLocalService(
732 ResourceLocalService resourceLocalService) {
733 this.resourceLocalService = resourceLocalService;
734 }
735
736
741 public ResourceService getResourceService() {
742 return resourceService;
743 }
744
745
750 public void setResourceService(ResourceService resourceService) {
751 this.resourceService = resourceService;
752 }
753
754
759 public ResourcePersistence getResourcePersistence() {
760 return resourcePersistence;
761 }
762
763
768 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
769 this.resourcePersistence = resourcePersistence;
770 }
771
772
777 public ResourceFinder getResourceFinder() {
778 return resourceFinder;
779 }
780
781
786 public void setResourceFinder(ResourceFinder resourceFinder) {
787 this.resourceFinder = resourceFinder;
788 }
789
790
795 public UserLocalService getUserLocalService() {
796 return userLocalService;
797 }
798
799
804 public void setUserLocalService(UserLocalService userLocalService) {
805 this.userLocalService = userLocalService;
806 }
807
808
813 public UserService getUserService() {
814 return userService;
815 }
816
817
822 public void setUserService(UserService userService) {
823 this.userService = userService;
824 }
825
826
831 public UserPersistence getUserPersistence() {
832 return userPersistence;
833 }
834
835
840 public void setUserPersistence(UserPersistence userPersistence) {
841 this.userPersistence = userPersistence;
842 }
843
844
849 public UserFinder getUserFinder() {
850 return userFinder;
851 }
852
853
858 public void setUserFinder(UserFinder userFinder) {
859 this.userFinder = userFinder;
860 }
861
862
867 public WebDAVPropsLocalService getWebDAVPropsLocalService() {
868 return webDAVPropsLocalService;
869 }
870
871
876 public void setWebDAVPropsLocalService(
877 WebDAVPropsLocalService webDAVPropsLocalService) {
878 this.webDAVPropsLocalService = webDAVPropsLocalService;
879 }
880
881
886 public WebDAVPropsPersistence getWebDAVPropsPersistence() {
887 return webDAVPropsPersistence;
888 }
889
890
895 public void setWebDAVPropsPersistence(
896 WebDAVPropsPersistence webDAVPropsPersistence) {
897 this.webDAVPropsPersistence = webDAVPropsPersistence;
898 }
899
900
905 public ExpandoValueLocalService getExpandoValueLocalService() {
906 return expandoValueLocalService;
907 }
908
909
914 public void setExpandoValueLocalService(
915 ExpandoValueLocalService expandoValueLocalService) {
916 this.expandoValueLocalService = expandoValueLocalService;
917 }
918
919
924 public ExpandoValueService getExpandoValueService() {
925 return expandoValueService;
926 }
927
928
933 public void setExpandoValueService(ExpandoValueService expandoValueService) {
934 this.expandoValueService = expandoValueService;
935 }
936
937
942 public ExpandoValuePersistence getExpandoValuePersistence() {
943 return expandoValuePersistence;
944 }
945
946
951 public void setExpandoValuePersistence(
952 ExpandoValuePersistence expandoValuePersistence) {
953 this.expandoValuePersistence = expandoValuePersistence;
954 }
955
956
961 protected void runSQL(String sql) throws SystemException {
962 try {
963 DataSource dataSource = journalStructurePersistence.getDataSource();
964
965 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
966 sql, new int[0]);
967
968 sqlUpdate.update();
969 }
970 catch (Exception e) {
971 throw new SystemException(e);
972 }
973 }
974
975 @BeanReference(type = JournalArticleLocalService.class)
976 protected JournalArticleLocalService journalArticleLocalService;
977 @BeanReference(type = JournalArticleService.class)
978 protected JournalArticleService journalArticleService;
979 @BeanReference(type = JournalArticlePersistence.class)
980 protected JournalArticlePersistence journalArticlePersistence;
981 @BeanReference(type = JournalArticleFinder.class)
982 protected JournalArticleFinder journalArticleFinder;
983 @BeanReference(type = JournalArticleImageLocalService.class)
984 protected JournalArticleImageLocalService journalArticleImageLocalService;
985 @BeanReference(type = JournalArticleImagePersistence.class)
986 protected JournalArticleImagePersistence journalArticleImagePersistence;
987 @BeanReference(type = JournalArticleResourceLocalService.class)
988 protected JournalArticleResourceLocalService journalArticleResourceLocalService;
989 @BeanReference(type = JournalArticleResourcePersistence.class)
990 protected JournalArticleResourcePersistence journalArticleResourcePersistence;
991 @BeanReference(type = JournalContentSearchLocalService.class)
992 protected JournalContentSearchLocalService journalContentSearchLocalService;
993 @BeanReference(type = JournalContentSearchPersistence.class)
994 protected JournalContentSearchPersistence journalContentSearchPersistence;
995 @BeanReference(type = JournalFeedLocalService.class)
996 protected JournalFeedLocalService journalFeedLocalService;
997 @BeanReference(type = JournalFeedService.class)
998 protected JournalFeedService journalFeedService;
999 @BeanReference(type = JournalFeedPersistence.class)
1000 protected JournalFeedPersistence journalFeedPersistence;
1001 @BeanReference(type = JournalFeedFinder.class)
1002 protected JournalFeedFinder journalFeedFinder;
1003 @BeanReference(type = JournalStructureLocalService.class)
1004 protected JournalStructureLocalService journalStructureLocalService;
1005 @BeanReference(type = JournalStructureService.class)
1006 protected JournalStructureService journalStructureService;
1007 @BeanReference(type = JournalStructurePersistence.class)
1008 protected JournalStructurePersistence journalStructurePersistence;
1009 @BeanReference(type = JournalStructureFinder.class)
1010 protected JournalStructureFinder journalStructureFinder;
1011 @BeanReference(type = JournalTemplateLocalService.class)
1012 protected JournalTemplateLocalService journalTemplateLocalService;
1013 @BeanReference(type = JournalTemplateService.class)
1014 protected JournalTemplateService journalTemplateService;
1015 @BeanReference(type = JournalTemplatePersistence.class)
1016 protected JournalTemplatePersistence journalTemplatePersistence;
1017 @BeanReference(type = JournalTemplateFinder.class)
1018 protected JournalTemplateFinder journalTemplateFinder;
1019 @BeanReference(type = CounterLocalService.class)
1020 protected CounterLocalService counterLocalService;
1021 @BeanReference(type = ResourceLocalService.class)
1022 protected ResourceLocalService resourceLocalService;
1023 @BeanReference(type = ResourceService.class)
1024 protected ResourceService resourceService;
1025 @BeanReference(type = ResourcePersistence.class)
1026 protected ResourcePersistence resourcePersistence;
1027 @BeanReference(type = ResourceFinder.class)
1028 protected ResourceFinder resourceFinder;
1029 @BeanReference(type = UserLocalService.class)
1030 protected UserLocalService userLocalService;
1031 @BeanReference(type = UserService.class)
1032 protected UserService userService;
1033 @BeanReference(type = UserPersistence.class)
1034 protected UserPersistence userPersistence;
1035 @BeanReference(type = UserFinder.class)
1036 protected UserFinder userFinder;
1037 @BeanReference(type = WebDAVPropsLocalService.class)
1038 protected WebDAVPropsLocalService webDAVPropsLocalService;
1039 @BeanReference(type = WebDAVPropsPersistence.class)
1040 protected WebDAVPropsPersistence webDAVPropsPersistence;
1041 @BeanReference(type = ExpandoValueLocalService.class)
1042 protected ExpandoValueLocalService expandoValueLocalService;
1043 @BeanReference(type = ExpandoValueService.class)
1044 protected ExpandoValueService expandoValueService;
1045 @BeanReference(type = ExpandoValuePersistence.class)
1046 protected ExpandoValuePersistence expandoValuePersistence;
1047 }