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.ResourceService;
037 import com.liferay.portal.service.UserLocalService;
038 import com.liferay.portal.service.UserService;
039 import com.liferay.portal.service.persistence.ImagePersistence;
040 import com.liferay.portal.service.persistence.ResourceFinder;
041 import com.liferay.portal.service.persistence.ResourcePersistence;
042 import com.liferay.portal.service.persistence.UserFinder;
043 import com.liferay.portal.service.persistence.UserPersistence;
044
045 import com.liferay.portlet.journal.model.JournalArticleImage;
046 import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
047 import com.liferay.portlet.journal.service.JournalArticleLocalService;
048 import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
049 import com.liferay.portlet.journal.service.JournalArticleService;
050 import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
051 import com.liferay.portlet.journal.service.JournalFeedLocalService;
052 import com.liferay.portlet.journal.service.JournalFeedService;
053 import com.liferay.portlet.journal.service.JournalStructureLocalService;
054 import com.liferay.portlet.journal.service.JournalStructureService;
055 import com.liferay.portlet.journal.service.JournalTemplateLocalService;
056 import com.liferay.portlet.journal.service.JournalTemplateService;
057 import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
058 import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
059 import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
060 import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
061 import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
062 import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
063 import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
064 import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
065 import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
066 import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
067 import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
068
069 import java.io.Serializable;
070
071 import java.util.List;
072
073 import javax.sql.DataSource;
074
075
087 public abstract class JournalArticleImageLocalServiceBaseImpl
088 extends BaseLocalServiceImpl implements JournalArticleImageLocalService,
089 IdentifiableBean {
090
095
096
103 @Indexable(type = IndexableType.REINDEX)
104 public JournalArticleImage addJournalArticleImage(
105 JournalArticleImage journalArticleImage) throws SystemException {
106 journalArticleImage.setNew(true);
107
108 return journalArticleImagePersistence.update(journalArticleImage, false);
109 }
110
111
117 public JournalArticleImage createJournalArticleImage(long articleImageId) {
118 return journalArticleImagePersistence.create(articleImageId);
119 }
120
121
129 @Indexable(type = IndexableType.DELETE)
130 public JournalArticleImage deleteJournalArticleImage(long articleImageId)
131 throws PortalException, SystemException {
132 return journalArticleImagePersistence.remove(articleImageId);
133 }
134
135
142 @Indexable(type = IndexableType.DELETE)
143 public JournalArticleImage deleteJournalArticleImage(
144 JournalArticleImage journalArticleImage) throws SystemException {
145 return journalArticleImagePersistence.remove(journalArticleImage);
146 }
147
148 public DynamicQuery dynamicQuery() {
149 Class<?> clazz = getClass();
150
151 return DynamicQueryFactoryUtil.forClass(JournalArticleImage.class,
152 clazz.getClassLoader());
153 }
154
155
162 @SuppressWarnings("rawtypes")
163 public List dynamicQuery(DynamicQuery dynamicQuery)
164 throws SystemException {
165 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery);
166 }
167
168
181 @SuppressWarnings("rawtypes")
182 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
183 throws SystemException {
184 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery,
185 start, end);
186 }
187
188
202 @SuppressWarnings("rawtypes")
203 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
204 OrderByComparator orderByComparator) throws SystemException {
205 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery,
206 start, end, orderByComparator);
207 }
208
209
216 public long dynamicQueryCount(DynamicQuery dynamicQuery)
217 throws SystemException {
218 return journalArticleImagePersistence.countWithDynamicQuery(dynamicQuery);
219 }
220
221 public JournalArticleImage fetchJournalArticleImage(long articleImageId)
222 throws SystemException {
223 return journalArticleImagePersistence.fetchByPrimaryKey(articleImageId);
224 }
225
226
234 public JournalArticleImage getJournalArticleImage(long articleImageId)
235 throws PortalException, SystemException {
236 return journalArticleImagePersistence.findByPrimaryKey(articleImageId);
237 }
238
239 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
240 throws PortalException, SystemException {
241 return journalArticleImagePersistence.findByPrimaryKey(primaryKeyObj);
242 }
243
244
256 public List<JournalArticleImage> getJournalArticleImages(int start, int end)
257 throws SystemException {
258 return journalArticleImagePersistence.findAll(start, end);
259 }
260
261
267 public int getJournalArticleImagesCount() throws SystemException {
268 return journalArticleImagePersistence.countAll();
269 }
270
271
278 @Indexable(type = IndexableType.REINDEX)
279 public JournalArticleImage updateJournalArticleImage(
280 JournalArticleImage journalArticleImage) throws SystemException {
281 return updateJournalArticleImage(journalArticleImage, true);
282 }
283
284
292 @Indexable(type = IndexableType.REINDEX)
293 public JournalArticleImage updateJournalArticleImage(
294 JournalArticleImage journalArticleImage, boolean merge)
295 throws SystemException {
296 journalArticleImage.setNew(false);
297
298 return journalArticleImagePersistence.update(journalArticleImage, merge);
299 }
300
301
306 public JournalArticleLocalService getJournalArticleLocalService() {
307 return journalArticleLocalService;
308 }
309
310
315 public void setJournalArticleLocalService(
316 JournalArticleLocalService journalArticleLocalService) {
317 this.journalArticleLocalService = journalArticleLocalService;
318 }
319
320
325 public JournalArticleService getJournalArticleService() {
326 return journalArticleService;
327 }
328
329
334 public void setJournalArticleService(
335 JournalArticleService journalArticleService) {
336 this.journalArticleService = journalArticleService;
337 }
338
339
344 public JournalArticlePersistence getJournalArticlePersistence() {
345 return journalArticlePersistence;
346 }
347
348
353 public void setJournalArticlePersistence(
354 JournalArticlePersistence journalArticlePersistence) {
355 this.journalArticlePersistence = journalArticlePersistence;
356 }
357
358
363 public JournalArticleFinder getJournalArticleFinder() {
364 return journalArticleFinder;
365 }
366
367
372 public void setJournalArticleFinder(
373 JournalArticleFinder journalArticleFinder) {
374 this.journalArticleFinder = journalArticleFinder;
375 }
376
377
382 public JournalArticleImageLocalService getJournalArticleImageLocalService() {
383 return journalArticleImageLocalService;
384 }
385
386
391 public void setJournalArticleImageLocalService(
392 JournalArticleImageLocalService journalArticleImageLocalService) {
393 this.journalArticleImageLocalService = journalArticleImageLocalService;
394 }
395
396
401 public JournalArticleImagePersistence getJournalArticleImagePersistence() {
402 return journalArticleImagePersistence;
403 }
404
405
410 public void setJournalArticleImagePersistence(
411 JournalArticleImagePersistence journalArticleImagePersistence) {
412 this.journalArticleImagePersistence = journalArticleImagePersistence;
413 }
414
415
420 public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
421 return journalArticleResourceLocalService;
422 }
423
424
429 public void setJournalArticleResourceLocalService(
430 JournalArticleResourceLocalService journalArticleResourceLocalService) {
431 this.journalArticleResourceLocalService = journalArticleResourceLocalService;
432 }
433
434
439 public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
440 return journalArticleResourcePersistence;
441 }
442
443
448 public void setJournalArticleResourcePersistence(
449 JournalArticleResourcePersistence journalArticleResourcePersistence) {
450 this.journalArticleResourcePersistence = journalArticleResourcePersistence;
451 }
452
453
458 public JournalContentSearchLocalService getJournalContentSearchLocalService() {
459 return journalContentSearchLocalService;
460 }
461
462
467 public void setJournalContentSearchLocalService(
468 JournalContentSearchLocalService journalContentSearchLocalService) {
469 this.journalContentSearchLocalService = journalContentSearchLocalService;
470 }
471
472
477 public JournalContentSearchPersistence getJournalContentSearchPersistence() {
478 return journalContentSearchPersistence;
479 }
480
481
486 public void setJournalContentSearchPersistence(
487 JournalContentSearchPersistence journalContentSearchPersistence) {
488 this.journalContentSearchPersistence = journalContentSearchPersistence;
489 }
490
491
496 public JournalFeedLocalService getJournalFeedLocalService() {
497 return journalFeedLocalService;
498 }
499
500
505 public void setJournalFeedLocalService(
506 JournalFeedLocalService journalFeedLocalService) {
507 this.journalFeedLocalService = journalFeedLocalService;
508 }
509
510
515 public JournalFeedService getJournalFeedService() {
516 return journalFeedService;
517 }
518
519
524 public void setJournalFeedService(JournalFeedService journalFeedService) {
525 this.journalFeedService = journalFeedService;
526 }
527
528
533 public JournalFeedPersistence getJournalFeedPersistence() {
534 return journalFeedPersistence;
535 }
536
537
542 public void setJournalFeedPersistence(
543 JournalFeedPersistence journalFeedPersistence) {
544 this.journalFeedPersistence = journalFeedPersistence;
545 }
546
547
552 public JournalFeedFinder getJournalFeedFinder() {
553 return journalFeedFinder;
554 }
555
556
561 public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
562 this.journalFeedFinder = journalFeedFinder;
563 }
564
565
570 public JournalStructureLocalService getJournalStructureLocalService() {
571 return journalStructureLocalService;
572 }
573
574
579 public void setJournalStructureLocalService(
580 JournalStructureLocalService journalStructureLocalService) {
581 this.journalStructureLocalService = journalStructureLocalService;
582 }
583
584
589 public JournalStructureService getJournalStructureService() {
590 return journalStructureService;
591 }
592
593
598 public void setJournalStructureService(
599 JournalStructureService journalStructureService) {
600 this.journalStructureService = journalStructureService;
601 }
602
603
608 public JournalStructurePersistence getJournalStructurePersistence() {
609 return journalStructurePersistence;
610 }
611
612
617 public void setJournalStructurePersistence(
618 JournalStructurePersistence journalStructurePersistence) {
619 this.journalStructurePersistence = journalStructurePersistence;
620 }
621
622
627 public JournalStructureFinder getJournalStructureFinder() {
628 return journalStructureFinder;
629 }
630
631
636 public void setJournalStructureFinder(
637 JournalStructureFinder journalStructureFinder) {
638 this.journalStructureFinder = journalStructureFinder;
639 }
640
641
646 public JournalTemplateLocalService getJournalTemplateLocalService() {
647 return journalTemplateLocalService;
648 }
649
650
655 public void setJournalTemplateLocalService(
656 JournalTemplateLocalService journalTemplateLocalService) {
657 this.journalTemplateLocalService = journalTemplateLocalService;
658 }
659
660
665 public JournalTemplateService getJournalTemplateService() {
666 return journalTemplateService;
667 }
668
669
674 public void setJournalTemplateService(
675 JournalTemplateService journalTemplateService) {
676 this.journalTemplateService = journalTemplateService;
677 }
678
679
684 public JournalTemplatePersistence getJournalTemplatePersistence() {
685 return journalTemplatePersistence;
686 }
687
688
693 public void setJournalTemplatePersistence(
694 JournalTemplatePersistence journalTemplatePersistence) {
695 this.journalTemplatePersistence = journalTemplatePersistence;
696 }
697
698
703 public JournalTemplateFinder getJournalTemplateFinder() {
704 return journalTemplateFinder;
705 }
706
707
712 public void setJournalTemplateFinder(
713 JournalTemplateFinder journalTemplateFinder) {
714 this.journalTemplateFinder = journalTemplateFinder;
715 }
716
717
722 public CounterLocalService getCounterLocalService() {
723 return counterLocalService;
724 }
725
726
731 public void setCounterLocalService(CounterLocalService counterLocalService) {
732 this.counterLocalService = counterLocalService;
733 }
734
735
740 public ImageLocalService getImageLocalService() {
741 return imageLocalService;
742 }
743
744
749 public void setImageLocalService(ImageLocalService imageLocalService) {
750 this.imageLocalService = imageLocalService;
751 }
752
753
758 public ImageService getImageService() {
759 return imageService;
760 }
761
762
767 public void setImageService(ImageService imageService) {
768 this.imageService = imageService;
769 }
770
771
776 public ImagePersistence getImagePersistence() {
777 return imagePersistence;
778 }
779
780
785 public void setImagePersistence(ImagePersistence imagePersistence) {
786 this.imagePersistence = imagePersistence;
787 }
788
789
794 public ResourceLocalService getResourceLocalService() {
795 return resourceLocalService;
796 }
797
798
803 public void setResourceLocalService(
804 ResourceLocalService resourceLocalService) {
805 this.resourceLocalService = resourceLocalService;
806 }
807
808
813 public ResourceService getResourceService() {
814 return resourceService;
815 }
816
817
822 public void setResourceService(ResourceService resourceService) {
823 this.resourceService = resourceService;
824 }
825
826
831 public ResourcePersistence getResourcePersistence() {
832 return resourcePersistence;
833 }
834
835
840 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
841 this.resourcePersistence = resourcePersistence;
842 }
843
844
849 public ResourceFinder getResourceFinder() {
850 return resourceFinder;
851 }
852
853
858 public void setResourceFinder(ResourceFinder resourceFinder) {
859 this.resourceFinder = resourceFinder;
860 }
861
862
867 public UserLocalService getUserLocalService() {
868 return userLocalService;
869 }
870
871
876 public void setUserLocalService(UserLocalService userLocalService) {
877 this.userLocalService = userLocalService;
878 }
879
880
885 public UserService getUserService() {
886 return userService;
887 }
888
889
894 public void setUserService(UserService userService) {
895 this.userService = userService;
896 }
897
898
903 public UserPersistence getUserPersistence() {
904 return userPersistence;
905 }
906
907
912 public void setUserPersistence(UserPersistence userPersistence) {
913 this.userPersistence = userPersistence;
914 }
915
916
921 public UserFinder getUserFinder() {
922 return userFinder;
923 }
924
925
930 public void setUserFinder(UserFinder userFinder) {
931 this.userFinder = userFinder;
932 }
933
934 public void afterPropertiesSet() {
935 persistedModelLocalServiceRegistry.register("com.liferay.portlet.journal.model.JournalArticleImage",
936 journalArticleImageLocalService);
937 }
938
939 public void destroy() {
940 persistedModelLocalServiceRegistry.unregister(
941 "com.liferay.portlet.journal.model.JournalArticleImage");
942 }
943
944
949 public String getBeanIdentifier() {
950 return _beanIdentifier;
951 }
952
953
958 public void setBeanIdentifier(String beanIdentifier) {
959 _beanIdentifier = beanIdentifier;
960 }
961
962 protected Class<?> getModelClass() {
963 return JournalArticleImage.class;
964 }
965
966 protected String getModelClassName() {
967 return JournalArticleImage.class.getName();
968 }
969
970
975 protected void runSQL(String sql) throws SystemException {
976 try {
977 DataSource dataSource = journalArticleImagePersistence.getDataSource();
978
979 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
980 sql, new int[0]);
981
982 sqlUpdate.update();
983 }
984 catch (Exception e) {
985 throw new SystemException(e);
986 }
987 }
988
989 @BeanReference(type = JournalArticleLocalService.class)
990 protected JournalArticleLocalService journalArticleLocalService;
991 @BeanReference(type = JournalArticleService.class)
992 protected JournalArticleService journalArticleService;
993 @BeanReference(type = JournalArticlePersistence.class)
994 protected JournalArticlePersistence journalArticlePersistence;
995 @BeanReference(type = JournalArticleFinder.class)
996 protected JournalArticleFinder journalArticleFinder;
997 @BeanReference(type = JournalArticleImageLocalService.class)
998 protected JournalArticleImageLocalService journalArticleImageLocalService;
999 @BeanReference(type = JournalArticleImagePersistence.class)
1000 protected JournalArticleImagePersistence journalArticleImagePersistence;
1001 @BeanReference(type = JournalArticleResourceLocalService.class)
1002 protected JournalArticleResourceLocalService journalArticleResourceLocalService;
1003 @BeanReference(type = JournalArticleResourcePersistence.class)
1004 protected JournalArticleResourcePersistence journalArticleResourcePersistence;
1005 @BeanReference(type = JournalContentSearchLocalService.class)
1006 protected JournalContentSearchLocalService journalContentSearchLocalService;
1007 @BeanReference(type = JournalContentSearchPersistence.class)
1008 protected JournalContentSearchPersistence journalContentSearchPersistence;
1009 @BeanReference(type = JournalFeedLocalService.class)
1010 protected JournalFeedLocalService journalFeedLocalService;
1011 @BeanReference(type = JournalFeedService.class)
1012 protected JournalFeedService journalFeedService;
1013 @BeanReference(type = JournalFeedPersistence.class)
1014 protected JournalFeedPersistence journalFeedPersistence;
1015 @BeanReference(type = JournalFeedFinder.class)
1016 protected JournalFeedFinder journalFeedFinder;
1017 @BeanReference(type = JournalStructureLocalService.class)
1018 protected JournalStructureLocalService journalStructureLocalService;
1019 @BeanReference(type = JournalStructureService.class)
1020 protected JournalStructureService journalStructureService;
1021 @BeanReference(type = JournalStructurePersistence.class)
1022 protected JournalStructurePersistence journalStructurePersistence;
1023 @BeanReference(type = JournalStructureFinder.class)
1024 protected JournalStructureFinder journalStructureFinder;
1025 @BeanReference(type = JournalTemplateLocalService.class)
1026 protected JournalTemplateLocalService journalTemplateLocalService;
1027 @BeanReference(type = JournalTemplateService.class)
1028 protected JournalTemplateService journalTemplateService;
1029 @BeanReference(type = JournalTemplatePersistence.class)
1030 protected JournalTemplatePersistence journalTemplatePersistence;
1031 @BeanReference(type = JournalTemplateFinder.class)
1032 protected JournalTemplateFinder journalTemplateFinder;
1033 @BeanReference(type = CounterLocalService.class)
1034 protected CounterLocalService counterLocalService;
1035 @BeanReference(type = ImageLocalService.class)
1036 protected ImageLocalService imageLocalService;
1037 @BeanReference(type = ImageService.class)
1038 protected ImageService imageService;
1039 @BeanReference(type = ImagePersistence.class)
1040 protected ImagePersistence imagePersistence;
1041 @BeanReference(type = ResourceLocalService.class)
1042 protected ResourceLocalService resourceLocalService;
1043 @BeanReference(type = ResourceService.class)
1044 protected ResourceService resourceService;
1045 @BeanReference(type = ResourcePersistence.class)
1046 protected ResourcePersistence resourcePersistence;
1047 @BeanReference(type = ResourceFinder.class)
1048 protected ResourceFinder resourceFinder;
1049 @BeanReference(type = UserLocalService.class)
1050 protected UserLocalService userLocalService;
1051 @BeanReference(type = UserService.class)
1052 protected UserService userService;
1053 @BeanReference(type = UserPersistence.class)
1054 protected UserPersistence userPersistence;
1055 @BeanReference(type = UserFinder.class)
1056 protected UserFinder userFinder;
1057 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1058 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1059 private String _beanIdentifier;
1060 }