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.bean.BeanReference;
020 import com.liferay.portal.kernel.bean.IdentifiableBean;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025 import com.liferay.portal.kernel.exception.PortalException;
026 import com.liferay.portal.kernel.exception.SystemException;
027 import com.liferay.portal.kernel.search.Indexable;
028 import com.liferay.portal.kernel.search.IndexableType;
029 import com.liferay.portal.kernel.util.OrderByComparator;
030 import com.liferay.portal.model.PersistedModel;
031 import com.liferay.portal.service.BaseLocalServiceImpl;
032 import com.liferay.portal.service.ImageLocalService;
033 import com.liferay.portal.service.ImageService;
034 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
035 import com.liferay.portal.service.ResourceLocalService;
036 import com.liferay.portal.service.UserLocalService;
037 import com.liferay.portal.service.UserService;
038 import com.liferay.portal.service.persistence.ImagePersistence;
039 import com.liferay.portal.service.persistence.UserFinder;
040 import com.liferay.portal.service.persistence.UserPersistence;
041
042 import com.liferay.portlet.journal.model.JournalArticleImage;
043 import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
044 import com.liferay.portlet.journal.service.JournalArticleLocalService;
045 import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
046 import com.liferay.portlet.journal.service.JournalArticleService;
047 import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
048 import com.liferay.portlet.journal.service.JournalFeedLocalService;
049 import com.liferay.portlet.journal.service.JournalFeedService;
050 import com.liferay.portlet.journal.service.JournalFolderLocalService;
051 import com.liferay.portlet.journal.service.JournalFolderService;
052 import com.liferay.portlet.journal.service.JournalStructureLocalService;
053 import com.liferay.portlet.journal.service.JournalStructureService;
054 import com.liferay.portlet.journal.service.JournalTemplateLocalService;
055 import com.liferay.portlet.journal.service.JournalTemplateService;
056 import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
057 import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
058 import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
059 import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
060 import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
061 import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
062 import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
063 import com.liferay.portlet.journal.service.persistence.JournalFolderFinder;
064 import com.liferay.portlet.journal.service.persistence.JournalFolderPersistence;
065 import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
066 import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
067 import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
068 import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
069
070 import java.io.Serializable;
071
072 import java.util.List;
073
074 import javax.sql.DataSource;
075
076
088 public abstract class JournalArticleImageLocalServiceBaseImpl
089 extends BaseLocalServiceImpl implements JournalArticleImageLocalService,
090 IdentifiableBean {
091
096
097
104 @Indexable(type = IndexableType.REINDEX)
105 public JournalArticleImage addJournalArticleImage(
106 JournalArticleImage journalArticleImage) throws SystemException {
107 journalArticleImage.setNew(true);
108
109 return journalArticleImagePersistence.update(journalArticleImage);
110 }
111
112
118 public JournalArticleImage createJournalArticleImage(long articleImageId) {
119 return journalArticleImagePersistence.create(articleImageId);
120 }
121
122
130 @Indexable(type = IndexableType.DELETE)
131 public JournalArticleImage deleteJournalArticleImage(long articleImageId)
132 throws PortalException, SystemException {
133 return journalArticleImagePersistence.remove(articleImageId);
134 }
135
136
143 @Indexable(type = IndexableType.DELETE)
144 public JournalArticleImage deleteJournalArticleImage(
145 JournalArticleImage journalArticleImage) throws SystemException {
146 return journalArticleImagePersistence.remove(journalArticleImage);
147 }
148
149 public DynamicQuery dynamicQuery() {
150 Class<?> clazz = getClass();
151
152 return DynamicQueryFactoryUtil.forClass(JournalArticleImage.class,
153 clazz.getClassLoader());
154 }
155
156
163 @SuppressWarnings("rawtypes")
164 public List dynamicQuery(DynamicQuery dynamicQuery)
165 throws SystemException {
166 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery);
167 }
168
169
182 @SuppressWarnings("rawtypes")
183 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
184 throws SystemException {
185 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery,
186 start, end);
187 }
188
189
203 @SuppressWarnings("rawtypes")
204 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
205 OrderByComparator orderByComparator) throws SystemException {
206 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery,
207 start, end, orderByComparator);
208 }
209
210
217 public long dynamicQueryCount(DynamicQuery dynamicQuery)
218 throws SystemException {
219 return journalArticleImagePersistence.countWithDynamicQuery(dynamicQuery);
220 }
221
222 public JournalArticleImage fetchJournalArticleImage(long articleImageId)
223 throws SystemException {
224 return journalArticleImagePersistence.fetchByPrimaryKey(articleImageId);
225 }
226
227
235 public JournalArticleImage getJournalArticleImage(long articleImageId)
236 throws PortalException, SystemException {
237 return journalArticleImagePersistence.findByPrimaryKey(articleImageId);
238 }
239
240 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
241 throws PortalException, SystemException {
242 return journalArticleImagePersistence.findByPrimaryKey(primaryKeyObj);
243 }
244
245
257 public List<JournalArticleImage> getJournalArticleImages(int start, int end)
258 throws SystemException {
259 return journalArticleImagePersistence.findAll(start, end);
260 }
261
262
268 public int getJournalArticleImagesCount() throws SystemException {
269 return journalArticleImagePersistence.countAll();
270 }
271
272
279 @Indexable(type = IndexableType.REINDEX)
280 public JournalArticleImage updateJournalArticleImage(
281 JournalArticleImage journalArticleImage) throws SystemException {
282 return journalArticleImagePersistence.update(journalArticleImage);
283 }
284
285
290 public JournalArticleLocalService getJournalArticleLocalService() {
291 return journalArticleLocalService;
292 }
293
294
299 public void setJournalArticleLocalService(
300 JournalArticleLocalService journalArticleLocalService) {
301 this.journalArticleLocalService = journalArticleLocalService;
302 }
303
304
309 public JournalArticleService getJournalArticleService() {
310 return journalArticleService;
311 }
312
313
318 public void setJournalArticleService(
319 JournalArticleService journalArticleService) {
320 this.journalArticleService = journalArticleService;
321 }
322
323
328 public JournalArticlePersistence getJournalArticlePersistence() {
329 return journalArticlePersistence;
330 }
331
332
337 public void setJournalArticlePersistence(
338 JournalArticlePersistence journalArticlePersistence) {
339 this.journalArticlePersistence = journalArticlePersistence;
340 }
341
342
347 public JournalArticleFinder getJournalArticleFinder() {
348 return journalArticleFinder;
349 }
350
351
356 public void setJournalArticleFinder(
357 JournalArticleFinder journalArticleFinder) {
358 this.journalArticleFinder = journalArticleFinder;
359 }
360
361
366 public JournalArticleImageLocalService getJournalArticleImageLocalService() {
367 return journalArticleImageLocalService;
368 }
369
370
375 public void setJournalArticleImageLocalService(
376 JournalArticleImageLocalService journalArticleImageLocalService) {
377 this.journalArticleImageLocalService = journalArticleImageLocalService;
378 }
379
380
385 public JournalArticleImagePersistence getJournalArticleImagePersistence() {
386 return journalArticleImagePersistence;
387 }
388
389
394 public void setJournalArticleImagePersistence(
395 JournalArticleImagePersistence journalArticleImagePersistence) {
396 this.journalArticleImagePersistence = journalArticleImagePersistence;
397 }
398
399
404 public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
405 return journalArticleResourceLocalService;
406 }
407
408
413 public void setJournalArticleResourceLocalService(
414 JournalArticleResourceLocalService journalArticleResourceLocalService) {
415 this.journalArticleResourceLocalService = journalArticleResourceLocalService;
416 }
417
418
423 public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
424 return journalArticleResourcePersistence;
425 }
426
427
432 public void setJournalArticleResourcePersistence(
433 JournalArticleResourcePersistence journalArticleResourcePersistence) {
434 this.journalArticleResourcePersistence = journalArticleResourcePersistence;
435 }
436
437
442 public JournalContentSearchLocalService getJournalContentSearchLocalService() {
443 return journalContentSearchLocalService;
444 }
445
446
451 public void setJournalContentSearchLocalService(
452 JournalContentSearchLocalService journalContentSearchLocalService) {
453 this.journalContentSearchLocalService = journalContentSearchLocalService;
454 }
455
456
461 public JournalContentSearchPersistence getJournalContentSearchPersistence() {
462 return journalContentSearchPersistence;
463 }
464
465
470 public void setJournalContentSearchPersistence(
471 JournalContentSearchPersistence journalContentSearchPersistence) {
472 this.journalContentSearchPersistence = journalContentSearchPersistence;
473 }
474
475
480 public JournalFeedLocalService getJournalFeedLocalService() {
481 return journalFeedLocalService;
482 }
483
484
489 public void setJournalFeedLocalService(
490 JournalFeedLocalService journalFeedLocalService) {
491 this.journalFeedLocalService = journalFeedLocalService;
492 }
493
494
499 public JournalFeedService getJournalFeedService() {
500 return journalFeedService;
501 }
502
503
508 public void setJournalFeedService(JournalFeedService journalFeedService) {
509 this.journalFeedService = journalFeedService;
510 }
511
512
517 public JournalFeedPersistence getJournalFeedPersistence() {
518 return journalFeedPersistence;
519 }
520
521
526 public void setJournalFeedPersistence(
527 JournalFeedPersistence journalFeedPersistence) {
528 this.journalFeedPersistence = journalFeedPersistence;
529 }
530
531
536 public JournalFeedFinder getJournalFeedFinder() {
537 return journalFeedFinder;
538 }
539
540
545 public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
546 this.journalFeedFinder = journalFeedFinder;
547 }
548
549
554 public JournalFolderLocalService getJournalFolderLocalService() {
555 return journalFolderLocalService;
556 }
557
558
563 public void setJournalFolderLocalService(
564 JournalFolderLocalService journalFolderLocalService) {
565 this.journalFolderLocalService = journalFolderLocalService;
566 }
567
568
573 public JournalFolderService getJournalFolderService() {
574 return journalFolderService;
575 }
576
577
582 public void setJournalFolderService(
583 JournalFolderService journalFolderService) {
584 this.journalFolderService = journalFolderService;
585 }
586
587
592 public JournalFolderPersistence getJournalFolderPersistence() {
593 return journalFolderPersistence;
594 }
595
596
601 public void setJournalFolderPersistence(
602 JournalFolderPersistence journalFolderPersistence) {
603 this.journalFolderPersistence = journalFolderPersistence;
604 }
605
606
611 public JournalFolderFinder getJournalFolderFinder() {
612 return journalFolderFinder;
613 }
614
615
620 public void setJournalFolderFinder(JournalFolderFinder journalFolderFinder) {
621 this.journalFolderFinder = journalFolderFinder;
622 }
623
624
629 public JournalStructureLocalService getJournalStructureLocalService() {
630 return journalStructureLocalService;
631 }
632
633
638 public void setJournalStructureLocalService(
639 JournalStructureLocalService journalStructureLocalService) {
640 this.journalStructureLocalService = journalStructureLocalService;
641 }
642
643
648 public JournalStructureService getJournalStructureService() {
649 return journalStructureService;
650 }
651
652
657 public void setJournalStructureService(
658 JournalStructureService journalStructureService) {
659 this.journalStructureService = journalStructureService;
660 }
661
662
667 public JournalStructurePersistence getJournalStructurePersistence() {
668 return journalStructurePersistence;
669 }
670
671
676 public void setJournalStructurePersistence(
677 JournalStructurePersistence journalStructurePersistence) {
678 this.journalStructurePersistence = journalStructurePersistence;
679 }
680
681
686 public JournalStructureFinder getJournalStructureFinder() {
687 return journalStructureFinder;
688 }
689
690
695 public void setJournalStructureFinder(
696 JournalStructureFinder journalStructureFinder) {
697 this.journalStructureFinder = journalStructureFinder;
698 }
699
700
705 public JournalTemplateLocalService getJournalTemplateLocalService() {
706 return journalTemplateLocalService;
707 }
708
709
714 public void setJournalTemplateLocalService(
715 JournalTemplateLocalService journalTemplateLocalService) {
716 this.journalTemplateLocalService = journalTemplateLocalService;
717 }
718
719
724 public JournalTemplateService getJournalTemplateService() {
725 return journalTemplateService;
726 }
727
728
733 public void setJournalTemplateService(
734 JournalTemplateService journalTemplateService) {
735 this.journalTemplateService = journalTemplateService;
736 }
737
738
743 public JournalTemplatePersistence getJournalTemplatePersistence() {
744 return journalTemplatePersistence;
745 }
746
747
752 public void setJournalTemplatePersistence(
753 JournalTemplatePersistence journalTemplatePersistence) {
754 this.journalTemplatePersistence = journalTemplatePersistence;
755 }
756
757
762 public JournalTemplateFinder getJournalTemplateFinder() {
763 return journalTemplateFinder;
764 }
765
766
771 public void setJournalTemplateFinder(
772 JournalTemplateFinder journalTemplateFinder) {
773 this.journalTemplateFinder = journalTemplateFinder;
774 }
775
776
781 public CounterLocalService getCounterLocalService() {
782 return counterLocalService;
783 }
784
785
790 public void setCounterLocalService(CounterLocalService counterLocalService) {
791 this.counterLocalService = counterLocalService;
792 }
793
794
799 public ImageLocalService getImageLocalService() {
800 return imageLocalService;
801 }
802
803
808 public void setImageLocalService(ImageLocalService imageLocalService) {
809 this.imageLocalService = imageLocalService;
810 }
811
812
817 public ImageService getImageService() {
818 return imageService;
819 }
820
821
826 public void setImageService(ImageService imageService) {
827 this.imageService = imageService;
828 }
829
830
835 public ImagePersistence getImagePersistence() {
836 return imagePersistence;
837 }
838
839
844 public void setImagePersistence(ImagePersistence imagePersistence) {
845 this.imagePersistence = imagePersistence;
846 }
847
848
853 public ResourceLocalService getResourceLocalService() {
854 return resourceLocalService;
855 }
856
857
862 public void setResourceLocalService(
863 ResourceLocalService resourceLocalService) {
864 this.resourceLocalService = resourceLocalService;
865 }
866
867
872 public UserLocalService getUserLocalService() {
873 return userLocalService;
874 }
875
876
881 public void setUserLocalService(UserLocalService userLocalService) {
882 this.userLocalService = userLocalService;
883 }
884
885
890 public UserService getUserService() {
891 return userService;
892 }
893
894
899 public void setUserService(UserService userService) {
900 this.userService = userService;
901 }
902
903
908 public UserPersistence getUserPersistence() {
909 return userPersistence;
910 }
911
912
917 public void setUserPersistence(UserPersistence userPersistence) {
918 this.userPersistence = userPersistence;
919 }
920
921
926 public UserFinder getUserFinder() {
927 return userFinder;
928 }
929
930
935 public void setUserFinder(UserFinder userFinder) {
936 this.userFinder = userFinder;
937 }
938
939 public void afterPropertiesSet() {
940 persistedModelLocalServiceRegistry.register("com.liferay.portlet.journal.model.JournalArticleImage",
941 journalArticleImageLocalService);
942 }
943
944 public void destroy() {
945 persistedModelLocalServiceRegistry.unregister(
946 "com.liferay.portlet.journal.model.JournalArticleImage");
947 }
948
949
954 public String getBeanIdentifier() {
955 return _beanIdentifier;
956 }
957
958
963 public void setBeanIdentifier(String beanIdentifier) {
964 _beanIdentifier = beanIdentifier;
965 }
966
967 protected Class<?> getModelClass() {
968 return JournalArticleImage.class;
969 }
970
971 protected String getModelClassName() {
972 return JournalArticleImage.class.getName();
973 }
974
975
980 protected void runSQL(String sql) throws SystemException {
981 try {
982 DataSource dataSource = journalArticleImagePersistence.getDataSource();
983
984 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
985 sql, new int[0]);
986
987 sqlUpdate.update();
988 }
989 catch (Exception e) {
990 throw new SystemException(e);
991 }
992 }
993
994 @BeanReference(type = JournalArticleLocalService.class)
995 protected JournalArticleLocalService journalArticleLocalService;
996 @BeanReference(type = JournalArticleService.class)
997 protected JournalArticleService journalArticleService;
998 @BeanReference(type = JournalArticlePersistence.class)
999 protected JournalArticlePersistence journalArticlePersistence;
1000 @BeanReference(type = JournalArticleFinder.class)
1001 protected JournalArticleFinder journalArticleFinder;
1002 @BeanReference(type = JournalArticleImageLocalService.class)
1003 protected JournalArticleImageLocalService journalArticleImageLocalService;
1004 @BeanReference(type = JournalArticleImagePersistence.class)
1005 protected JournalArticleImagePersistence journalArticleImagePersistence;
1006 @BeanReference(type = JournalArticleResourceLocalService.class)
1007 protected JournalArticleResourceLocalService journalArticleResourceLocalService;
1008 @BeanReference(type = JournalArticleResourcePersistence.class)
1009 protected JournalArticleResourcePersistence journalArticleResourcePersistence;
1010 @BeanReference(type = JournalContentSearchLocalService.class)
1011 protected JournalContentSearchLocalService journalContentSearchLocalService;
1012 @BeanReference(type = JournalContentSearchPersistence.class)
1013 protected JournalContentSearchPersistence journalContentSearchPersistence;
1014 @BeanReference(type = JournalFeedLocalService.class)
1015 protected JournalFeedLocalService journalFeedLocalService;
1016 @BeanReference(type = JournalFeedService.class)
1017 protected JournalFeedService journalFeedService;
1018 @BeanReference(type = JournalFeedPersistence.class)
1019 protected JournalFeedPersistence journalFeedPersistence;
1020 @BeanReference(type = JournalFeedFinder.class)
1021 protected JournalFeedFinder journalFeedFinder;
1022 @BeanReference(type = JournalFolderLocalService.class)
1023 protected JournalFolderLocalService journalFolderLocalService;
1024 @BeanReference(type = JournalFolderService.class)
1025 protected JournalFolderService journalFolderService;
1026 @BeanReference(type = JournalFolderPersistence.class)
1027 protected JournalFolderPersistence journalFolderPersistence;
1028 @BeanReference(type = JournalFolderFinder.class)
1029 protected JournalFolderFinder journalFolderFinder;
1030 @BeanReference(type = JournalStructureLocalService.class)
1031 protected JournalStructureLocalService journalStructureLocalService;
1032 @BeanReference(type = JournalStructureService.class)
1033 protected JournalStructureService journalStructureService;
1034 @BeanReference(type = JournalStructurePersistence.class)
1035 protected JournalStructurePersistence journalStructurePersistence;
1036 @BeanReference(type = JournalStructureFinder.class)
1037 protected JournalStructureFinder journalStructureFinder;
1038 @BeanReference(type = JournalTemplateLocalService.class)
1039 protected JournalTemplateLocalService journalTemplateLocalService;
1040 @BeanReference(type = JournalTemplateService.class)
1041 protected JournalTemplateService journalTemplateService;
1042 @BeanReference(type = JournalTemplatePersistence.class)
1043 protected JournalTemplatePersistence journalTemplatePersistence;
1044 @BeanReference(type = JournalTemplateFinder.class)
1045 protected JournalTemplateFinder journalTemplateFinder;
1046 @BeanReference(type = CounterLocalService.class)
1047 protected CounterLocalService counterLocalService;
1048 @BeanReference(type = ImageLocalService.class)
1049 protected ImageLocalService imageLocalService;
1050 @BeanReference(type = ImageService.class)
1051 protected ImageService imageService;
1052 @BeanReference(type = ImagePersistence.class)
1053 protected ImagePersistence imagePersistence;
1054 @BeanReference(type = ResourceLocalService.class)
1055 protected ResourceLocalService resourceLocalService;
1056 @BeanReference(type = UserLocalService.class)
1057 protected UserLocalService userLocalService;
1058 @BeanReference(type = UserService.class)
1059 protected UserService userService;
1060 @BeanReference(type = UserPersistence.class)
1061 protected UserPersistence userPersistence;
1062 @BeanReference(type = UserFinder.class)
1063 protected UserFinder userFinder;
1064 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1065 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1066 private String _beanIdentifier;
1067 }