001
014
015 package com.liferay.portlet.journal.service.base;
016
017 import com.liferay.portal.kernel.bean.BeanReference;
018 import com.liferay.portal.kernel.bean.IdentifiableBean;
019 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
021 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
022 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
023 import com.liferay.portal.kernel.dao.orm.Projection;
024 import com.liferay.portal.kernel.exception.PortalException;
025 import com.liferay.portal.kernel.exception.SystemException;
026 import com.liferay.portal.kernel.search.Indexable;
027 import com.liferay.portal.kernel.search.IndexableType;
028 import com.liferay.portal.kernel.util.OrderByComparator;
029 import com.liferay.portal.model.PersistedModel;
030 import com.liferay.portal.service.BaseLocalServiceImpl;
031 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
032 import com.liferay.portal.service.persistence.ImagePersistence;
033 import com.liferay.portal.service.persistence.UserFinder;
034 import com.liferay.portal.service.persistence.UserPersistence;
035
036 import com.liferay.portlet.journal.model.JournalArticleImage;
037 import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
038 import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
039 import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
040 import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
041 import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
042 import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
043 import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
044 import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
045 import com.liferay.portlet.journal.service.persistence.JournalFolderFinder;
046 import com.liferay.portlet.journal.service.persistence.JournalFolderPersistence;
047
048 import java.io.Serializable;
049
050 import java.util.List;
051
052 import javax.sql.DataSource;
053
054
066 public abstract class JournalArticleImageLocalServiceBaseImpl
067 extends BaseLocalServiceImpl implements JournalArticleImageLocalService,
068 IdentifiableBean {
069
074
075
082 @Indexable(type = IndexableType.REINDEX)
083 @Override
084 public JournalArticleImage addJournalArticleImage(
085 JournalArticleImage journalArticleImage) throws SystemException {
086 journalArticleImage.setNew(true);
087
088 return journalArticleImagePersistence.update(journalArticleImage);
089 }
090
091
097 @Override
098 public JournalArticleImage createJournalArticleImage(long articleImageId) {
099 return journalArticleImagePersistence.create(articleImageId);
100 }
101
102
110 @Indexable(type = IndexableType.DELETE)
111 @Override
112 public JournalArticleImage deleteJournalArticleImage(long articleImageId)
113 throws PortalException, SystemException {
114 return journalArticleImagePersistence.remove(articleImageId);
115 }
116
117
124 @Indexable(type = IndexableType.DELETE)
125 @Override
126 public JournalArticleImage deleteJournalArticleImage(
127 JournalArticleImage journalArticleImage) throws SystemException {
128 return journalArticleImagePersistence.remove(journalArticleImage);
129 }
130
131 @Override
132 public DynamicQuery dynamicQuery() {
133 Class<?> clazz = getClass();
134
135 return DynamicQueryFactoryUtil.forClass(JournalArticleImage.class,
136 clazz.getClassLoader());
137 }
138
139
146 @Override
147 @SuppressWarnings("rawtypes")
148 public List dynamicQuery(DynamicQuery dynamicQuery)
149 throws SystemException {
150 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery);
151 }
152
153
166 @Override
167 @SuppressWarnings("rawtypes")
168 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
169 throws SystemException {
170 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery,
171 start, end);
172 }
173
174
188 @Override
189 @SuppressWarnings("rawtypes")
190 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
191 OrderByComparator orderByComparator) throws SystemException {
192 return journalArticleImagePersistence.findWithDynamicQuery(dynamicQuery,
193 start, end, orderByComparator);
194 }
195
196
203 @Override
204 public long dynamicQueryCount(DynamicQuery dynamicQuery)
205 throws SystemException {
206 return journalArticleImagePersistence.countWithDynamicQuery(dynamicQuery);
207 }
208
209
217 @Override
218 public long dynamicQueryCount(DynamicQuery dynamicQuery,
219 Projection projection) throws SystemException {
220 return journalArticleImagePersistence.countWithDynamicQuery(dynamicQuery,
221 projection);
222 }
223
224 @Override
225 public JournalArticleImage fetchJournalArticleImage(long articleImageId)
226 throws SystemException {
227 return journalArticleImagePersistence.fetchByPrimaryKey(articleImageId);
228 }
229
230
238 @Override
239 public JournalArticleImage getJournalArticleImage(long articleImageId)
240 throws PortalException, SystemException {
241 return journalArticleImagePersistence.findByPrimaryKey(articleImageId);
242 }
243
244 @Override
245 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
246 throws PortalException, SystemException {
247 return journalArticleImagePersistence.findByPrimaryKey(primaryKeyObj);
248 }
249
250
262 @Override
263 public List<JournalArticleImage> getJournalArticleImages(int start, int end)
264 throws SystemException {
265 return journalArticleImagePersistence.findAll(start, end);
266 }
267
268
274 @Override
275 public int getJournalArticleImagesCount() throws SystemException {
276 return journalArticleImagePersistence.countAll();
277 }
278
279
286 @Indexable(type = IndexableType.REINDEX)
287 @Override
288 public JournalArticleImage updateJournalArticleImage(
289 JournalArticleImage journalArticleImage) throws SystemException {
290 return journalArticleImagePersistence.update(journalArticleImage);
291 }
292
293
298 public com.liferay.portlet.journal.service.JournalArticleLocalService getJournalArticleLocalService() {
299 return journalArticleLocalService;
300 }
301
302
307 public void setJournalArticleLocalService(
308 com.liferay.portlet.journal.service.JournalArticleLocalService journalArticleLocalService) {
309 this.journalArticleLocalService = journalArticleLocalService;
310 }
311
312
317 public com.liferay.portlet.journal.service.JournalArticleService getJournalArticleService() {
318 return journalArticleService;
319 }
320
321
326 public void setJournalArticleService(
327 com.liferay.portlet.journal.service.JournalArticleService journalArticleService) {
328 this.journalArticleService = journalArticleService;
329 }
330
331
336 public JournalArticlePersistence getJournalArticlePersistence() {
337 return journalArticlePersistence;
338 }
339
340
345 public void setJournalArticlePersistence(
346 JournalArticlePersistence journalArticlePersistence) {
347 this.journalArticlePersistence = journalArticlePersistence;
348 }
349
350
355 public JournalArticleFinder getJournalArticleFinder() {
356 return journalArticleFinder;
357 }
358
359
364 public void setJournalArticleFinder(
365 JournalArticleFinder journalArticleFinder) {
366 this.journalArticleFinder = journalArticleFinder;
367 }
368
369
374 public com.liferay.portlet.journal.service.JournalArticleImageLocalService getJournalArticleImageLocalService() {
375 return journalArticleImageLocalService;
376 }
377
378
383 public void setJournalArticleImageLocalService(
384 com.liferay.portlet.journal.service.JournalArticleImageLocalService journalArticleImageLocalService) {
385 this.journalArticleImageLocalService = journalArticleImageLocalService;
386 }
387
388
393 public JournalArticleImagePersistence getJournalArticleImagePersistence() {
394 return journalArticleImagePersistence;
395 }
396
397
402 public void setJournalArticleImagePersistence(
403 JournalArticleImagePersistence journalArticleImagePersistence) {
404 this.journalArticleImagePersistence = journalArticleImagePersistence;
405 }
406
407
412 public com.liferay.portlet.journal.service.JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
413 return journalArticleResourceLocalService;
414 }
415
416
421 public void setJournalArticleResourceLocalService(
422 com.liferay.portlet.journal.service.JournalArticleResourceLocalService journalArticleResourceLocalService) {
423 this.journalArticleResourceLocalService = journalArticleResourceLocalService;
424 }
425
426
431 public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
432 return journalArticleResourcePersistence;
433 }
434
435
440 public void setJournalArticleResourcePersistence(
441 JournalArticleResourcePersistence journalArticleResourcePersistence) {
442 this.journalArticleResourcePersistence = journalArticleResourcePersistence;
443 }
444
445
450 public com.liferay.portlet.journal.service.JournalContentSearchLocalService getJournalContentSearchLocalService() {
451 return journalContentSearchLocalService;
452 }
453
454
459 public void setJournalContentSearchLocalService(
460 com.liferay.portlet.journal.service.JournalContentSearchLocalService journalContentSearchLocalService) {
461 this.journalContentSearchLocalService = journalContentSearchLocalService;
462 }
463
464
469 public JournalContentSearchPersistence getJournalContentSearchPersistence() {
470 return journalContentSearchPersistence;
471 }
472
473
478 public void setJournalContentSearchPersistence(
479 JournalContentSearchPersistence journalContentSearchPersistence) {
480 this.journalContentSearchPersistence = journalContentSearchPersistence;
481 }
482
483
488 public com.liferay.portlet.journal.service.JournalFeedLocalService getJournalFeedLocalService() {
489 return journalFeedLocalService;
490 }
491
492
497 public void setJournalFeedLocalService(
498 com.liferay.portlet.journal.service.JournalFeedLocalService journalFeedLocalService) {
499 this.journalFeedLocalService = journalFeedLocalService;
500 }
501
502
507 public com.liferay.portlet.journal.service.JournalFeedService getJournalFeedService() {
508 return journalFeedService;
509 }
510
511
516 public void setJournalFeedService(
517 com.liferay.portlet.journal.service.JournalFeedService journalFeedService) {
518 this.journalFeedService = journalFeedService;
519 }
520
521
526 public JournalFeedPersistence getJournalFeedPersistence() {
527 return journalFeedPersistence;
528 }
529
530
535 public void setJournalFeedPersistence(
536 JournalFeedPersistence journalFeedPersistence) {
537 this.journalFeedPersistence = journalFeedPersistence;
538 }
539
540
545 public JournalFeedFinder getJournalFeedFinder() {
546 return journalFeedFinder;
547 }
548
549
554 public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
555 this.journalFeedFinder = journalFeedFinder;
556 }
557
558
563 public com.liferay.portlet.journal.service.JournalFolderLocalService getJournalFolderLocalService() {
564 return journalFolderLocalService;
565 }
566
567
572 public void setJournalFolderLocalService(
573 com.liferay.portlet.journal.service.JournalFolderLocalService journalFolderLocalService) {
574 this.journalFolderLocalService = journalFolderLocalService;
575 }
576
577
582 public com.liferay.portlet.journal.service.JournalFolderService getJournalFolderService() {
583 return journalFolderService;
584 }
585
586
591 public void setJournalFolderService(
592 com.liferay.portlet.journal.service.JournalFolderService journalFolderService) {
593 this.journalFolderService = journalFolderService;
594 }
595
596
601 public JournalFolderPersistence getJournalFolderPersistence() {
602 return journalFolderPersistence;
603 }
604
605
610 public void setJournalFolderPersistence(
611 JournalFolderPersistence journalFolderPersistence) {
612 this.journalFolderPersistence = journalFolderPersistence;
613 }
614
615
620 public JournalFolderFinder getJournalFolderFinder() {
621 return journalFolderFinder;
622 }
623
624
629 public void setJournalFolderFinder(JournalFolderFinder journalFolderFinder) {
630 this.journalFolderFinder = journalFolderFinder;
631 }
632
633
638 @SuppressWarnings("deprecation")
639 public com.liferay.portlet.journal.service.JournalStructureLocalService getJournalStructureLocalService() {
640 return journalStructureLocalService;
641 }
642
643
648 @SuppressWarnings("deprecation")
649 public void setJournalStructureLocalService(
650 com.liferay.portlet.journal.service.JournalStructureLocalService journalStructureLocalService) {
651 this.journalStructureLocalService = journalStructureLocalService;
652 }
653
654
659 @SuppressWarnings("deprecation")
660 public com.liferay.portlet.journal.service.JournalStructureService getJournalStructureService() {
661 return journalStructureService;
662 }
663
664
669 @SuppressWarnings("deprecation")
670 public void setJournalStructureService(
671 com.liferay.portlet.journal.service.JournalStructureService journalStructureService) {
672 this.journalStructureService = journalStructureService;
673 }
674
675
680 @SuppressWarnings("deprecation")
681 public com.liferay.portlet.journal.service.JournalTemplateLocalService getJournalTemplateLocalService() {
682 return journalTemplateLocalService;
683 }
684
685
690 @SuppressWarnings("deprecation")
691 public void setJournalTemplateLocalService(
692 com.liferay.portlet.journal.service.JournalTemplateLocalService journalTemplateLocalService) {
693 this.journalTemplateLocalService = journalTemplateLocalService;
694 }
695
696
701 @SuppressWarnings("deprecation")
702 public com.liferay.portlet.journal.service.JournalTemplateService getJournalTemplateService() {
703 return journalTemplateService;
704 }
705
706
711 @SuppressWarnings("deprecation")
712 public void setJournalTemplateService(
713 com.liferay.portlet.journal.service.JournalTemplateService journalTemplateService) {
714 this.journalTemplateService = journalTemplateService;
715 }
716
717
722 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
723 return counterLocalService;
724 }
725
726
731 public void setCounterLocalService(
732 com.liferay.counter.service.CounterLocalService counterLocalService) {
733 this.counterLocalService = counterLocalService;
734 }
735
736
741 public com.liferay.portal.service.ImageLocalService getImageLocalService() {
742 return imageLocalService;
743 }
744
745
750 public void setImageLocalService(
751 com.liferay.portal.service.ImageLocalService imageLocalService) {
752 this.imageLocalService = imageLocalService;
753 }
754
755
760 public com.liferay.portal.service.ImageService getImageService() {
761 return imageService;
762 }
763
764
769 public void setImageService(
770 com.liferay.portal.service.ImageService imageService) {
771 this.imageService = imageService;
772 }
773
774
779 public ImagePersistence getImagePersistence() {
780 return imagePersistence;
781 }
782
783
788 public void setImagePersistence(ImagePersistence imagePersistence) {
789 this.imagePersistence = imagePersistence;
790 }
791
792
797 public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
798 return resourceLocalService;
799 }
800
801
806 public void setResourceLocalService(
807 com.liferay.portal.service.ResourceLocalService resourceLocalService) {
808 this.resourceLocalService = resourceLocalService;
809 }
810
811
816 public com.liferay.portal.service.UserLocalService getUserLocalService() {
817 return userLocalService;
818 }
819
820
825 public void setUserLocalService(
826 com.liferay.portal.service.UserLocalService userLocalService) {
827 this.userLocalService = userLocalService;
828 }
829
830
835 public com.liferay.portal.service.UserService getUserService() {
836 return userService;
837 }
838
839
844 public void setUserService(
845 com.liferay.portal.service.UserService userService) {
846 this.userService = userService;
847 }
848
849
854 public UserPersistence getUserPersistence() {
855 return userPersistence;
856 }
857
858
863 public void setUserPersistence(UserPersistence userPersistence) {
864 this.userPersistence = userPersistence;
865 }
866
867
872 public UserFinder getUserFinder() {
873 return userFinder;
874 }
875
876
881 public void setUserFinder(UserFinder userFinder) {
882 this.userFinder = userFinder;
883 }
884
885 public void afterPropertiesSet() {
886 persistedModelLocalServiceRegistry.register("com.liferay.portlet.journal.model.JournalArticleImage",
887 journalArticleImageLocalService);
888 }
889
890 public void destroy() {
891 persistedModelLocalServiceRegistry.unregister(
892 "com.liferay.portlet.journal.model.JournalArticleImage");
893 }
894
895
900 @Override
901 public String getBeanIdentifier() {
902 return _beanIdentifier;
903 }
904
905
910 @Override
911 public void setBeanIdentifier(String beanIdentifier) {
912 _beanIdentifier = beanIdentifier;
913 }
914
915 protected Class<?> getModelClass() {
916 return JournalArticleImage.class;
917 }
918
919 protected String getModelClassName() {
920 return JournalArticleImage.class.getName();
921 }
922
923
928 protected void runSQL(String sql) throws SystemException {
929 try {
930 DataSource dataSource = journalArticleImagePersistence.getDataSource();
931
932 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
933 sql, new int[0]);
934
935 sqlUpdate.update();
936 }
937 catch (Exception e) {
938 throw new SystemException(e);
939 }
940 }
941
942 @BeanReference(type = com.liferay.portlet.journal.service.JournalArticleLocalService.class)
943 protected com.liferay.portlet.journal.service.JournalArticleLocalService journalArticleLocalService;
944 @BeanReference(type = com.liferay.portlet.journal.service.JournalArticleService.class)
945 protected com.liferay.portlet.journal.service.JournalArticleService journalArticleService;
946 @BeanReference(type = JournalArticlePersistence.class)
947 protected JournalArticlePersistence journalArticlePersistence;
948 @BeanReference(type = JournalArticleFinder.class)
949 protected JournalArticleFinder journalArticleFinder;
950 @BeanReference(type = com.liferay.portlet.journal.service.JournalArticleImageLocalService.class)
951 protected com.liferay.portlet.journal.service.JournalArticleImageLocalService journalArticleImageLocalService;
952 @BeanReference(type = JournalArticleImagePersistence.class)
953 protected JournalArticleImagePersistence journalArticleImagePersistence;
954 @BeanReference(type = com.liferay.portlet.journal.service.JournalArticleResourceLocalService.class)
955 protected com.liferay.portlet.journal.service.JournalArticleResourceLocalService journalArticleResourceLocalService;
956 @BeanReference(type = JournalArticleResourcePersistence.class)
957 protected JournalArticleResourcePersistence journalArticleResourcePersistence;
958 @BeanReference(type = com.liferay.portlet.journal.service.JournalContentSearchLocalService.class)
959 protected com.liferay.portlet.journal.service.JournalContentSearchLocalService journalContentSearchLocalService;
960 @BeanReference(type = JournalContentSearchPersistence.class)
961 protected JournalContentSearchPersistence journalContentSearchPersistence;
962 @BeanReference(type = com.liferay.portlet.journal.service.JournalFeedLocalService.class)
963 protected com.liferay.portlet.journal.service.JournalFeedLocalService journalFeedLocalService;
964 @BeanReference(type = com.liferay.portlet.journal.service.JournalFeedService.class)
965 protected com.liferay.portlet.journal.service.JournalFeedService journalFeedService;
966 @BeanReference(type = JournalFeedPersistence.class)
967 protected JournalFeedPersistence journalFeedPersistence;
968 @BeanReference(type = JournalFeedFinder.class)
969 protected JournalFeedFinder journalFeedFinder;
970 @BeanReference(type = com.liferay.portlet.journal.service.JournalFolderLocalService.class)
971 protected com.liferay.portlet.journal.service.JournalFolderLocalService journalFolderLocalService;
972 @BeanReference(type = com.liferay.portlet.journal.service.JournalFolderService.class)
973 protected com.liferay.portlet.journal.service.JournalFolderService journalFolderService;
974 @BeanReference(type = JournalFolderPersistence.class)
975 protected JournalFolderPersistence journalFolderPersistence;
976 @BeanReference(type = JournalFolderFinder.class)
977 protected JournalFolderFinder journalFolderFinder;
978 @BeanReference(type = com.liferay.portlet.journal.service.JournalStructureLocalService.class)
979 @SuppressWarnings("deprecation")
980 protected com.liferay.portlet.journal.service.JournalStructureLocalService journalStructureLocalService;
981 @BeanReference(type = com.liferay.portlet.journal.service.JournalStructureService.class)
982 @SuppressWarnings("deprecation")
983 protected com.liferay.portlet.journal.service.JournalStructureService journalStructureService;
984 @BeanReference(type = com.liferay.portlet.journal.service.JournalTemplateLocalService.class)
985 @SuppressWarnings("deprecation")
986 protected com.liferay.portlet.journal.service.JournalTemplateLocalService journalTemplateLocalService;
987 @BeanReference(type = com.liferay.portlet.journal.service.JournalTemplateService.class)
988 @SuppressWarnings("deprecation")
989 protected com.liferay.portlet.journal.service.JournalTemplateService journalTemplateService;
990 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
991 protected com.liferay.counter.service.CounterLocalService counterLocalService;
992 @BeanReference(type = com.liferay.portal.service.ImageLocalService.class)
993 protected com.liferay.portal.service.ImageLocalService imageLocalService;
994 @BeanReference(type = com.liferay.portal.service.ImageService.class)
995 protected com.liferay.portal.service.ImageService imageService;
996 @BeanReference(type = ImagePersistence.class)
997 protected ImagePersistence imagePersistence;
998 @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
999 protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1000 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1001 protected com.liferay.portal.service.UserLocalService userLocalService;
1002 @BeanReference(type = com.liferay.portal.service.UserService.class)
1003 protected com.liferay.portal.service.UserService userService;
1004 @BeanReference(type = UserPersistence.class)
1005 protected UserPersistence userPersistence;
1006 @BeanReference(type = UserFinder.class)
1007 protected UserFinder userFinder;
1008 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1009 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1010 private String _beanIdentifier;
1011 }