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.PersistedModelLocalServiceRegistry;
033 import com.liferay.portal.service.ResourceLocalService;
034 import com.liferay.portal.service.ResourceService;
035 import com.liferay.portal.service.UserLocalService;
036 import com.liferay.portal.service.UserService;
037 import com.liferay.portal.service.persistence.ResourceFinder;
038 import com.liferay.portal.service.persistence.ResourcePersistence;
039 import com.liferay.portal.service.persistence.UserFinder;
040 import com.liferay.portal.service.persistence.UserPersistence;
041
042 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
043 import com.liferay.portlet.expando.service.ExpandoValueService;
044 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
045 import com.liferay.portlet.journal.model.JournalFeed;
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 JournalFeedLocalServiceBaseImpl
088 extends BaseLocalServiceImpl implements JournalFeedLocalService,
089 IdentifiableBean {
090
095
096
103 @Indexable(type = IndexableType.REINDEX)
104 public JournalFeed addJournalFeed(JournalFeed journalFeed)
105 throws SystemException {
106 journalFeed.setNew(true);
107
108 return journalFeedPersistence.update(journalFeed, false);
109 }
110
111
117 public JournalFeed createJournalFeed(long id) {
118 return journalFeedPersistence.create(id);
119 }
120
121
129 @Indexable(type = IndexableType.DELETE)
130 public JournalFeed deleteJournalFeed(long id)
131 throws PortalException, SystemException {
132 return journalFeedPersistence.remove(id);
133 }
134
135
142 @Indexable(type = IndexableType.DELETE)
143 public JournalFeed deleteJournalFeed(JournalFeed journalFeed)
144 throws SystemException {
145 return journalFeedPersistence.remove(journalFeed);
146 }
147
148 public DynamicQuery dynamicQuery() {
149 Class<?> clazz = getClass();
150
151 return DynamicQueryFactoryUtil.forClass(JournalFeed.class,
152 clazz.getClassLoader());
153 }
154
155
162 @SuppressWarnings("rawtypes")
163 public List dynamicQuery(DynamicQuery dynamicQuery)
164 throws SystemException {
165 return journalFeedPersistence.findWithDynamicQuery(dynamicQuery);
166 }
167
168
181 @SuppressWarnings("rawtypes")
182 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
183 throws SystemException {
184 return journalFeedPersistence.findWithDynamicQuery(dynamicQuery, start,
185 end);
186 }
187
188
202 @SuppressWarnings("rawtypes")
203 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
204 OrderByComparator orderByComparator) throws SystemException {
205 return journalFeedPersistence.findWithDynamicQuery(dynamicQuery, start,
206 end, orderByComparator);
207 }
208
209
216 public long dynamicQueryCount(DynamicQuery dynamicQuery)
217 throws SystemException {
218 return journalFeedPersistence.countWithDynamicQuery(dynamicQuery);
219 }
220
221 public JournalFeed fetchJournalFeed(long id) throws SystemException {
222 return journalFeedPersistence.fetchByPrimaryKey(id);
223 }
224
225
233 public JournalFeed getJournalFeed(long id)
234 throws PortalException, SystemException {
235 return journalFeedPersistence.findByPrimaryKey(id);
236 }
237
238 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
239 throws PortalException, SystemException {
240 return journalFeedPersistence.findByPrimaryKey(primaryKeyObj);
241 }
242
243
252 public JournalFeed getJournalFeedByUuidAndGroupId(String uuid, long groupId)
253 throws PortalException, SystemException {
254 return journalFeedPersistence.findByUUID_G(uuid, groupId);
255 }
256
257
269 public List<JournalFeed> getJournalFeeds(int start, int end)
270 throws SystemException {
271 return journalFeedPersistence.findAll(start, end);
272 }
273
274
280 public int getJournalFeedsCount() throws SystemException {
281 return journalFeedPersistence.countAll();
282 }
283
284
291 @Indexable(type = IndexableType.REINDEX)
292 public JournalFeed updateJournalFeed(JournalFeed journalFeed)
293 throws SystemException {
294 return updateJournalFeed(journalFeed, true);
295 }
296
297
305 @Indexable(type = IndexableType.REINDEX)
306 public JournalFeed updateJournalFeed(JournalFeed journalFeed, boolean merge)
307 throws SystemException {
308 journalFeed.setNew(false);
309
310 return journalFeedPersistence.update(journalFeed, merge);
311 }
312
313
318 public JournalArticleLocalService getJournalArticleLocalService() {
319 return journalArticleLocalService;
320 }
321
322
327 public void setJournalArticleLocalService(
328 JournalArticleLocalService journalArticleLocalService) {
329 this.journalArticleLocalService = journalArticleLocalService;
330 }
331
332
337 public JournalArticleService getJournalArticleService() {
338 return journalArticleService;
339 }
340
341
346 public void setJournalArticleService(
347 JournalArticleService journalArticleService) {
348 this.journalArticleService = journalArticleService;
349 }
350
351
356 public JournalArticlePersistence getJournalArticlePersistence() {
357 return journalArticlePersistence;
358 }
359
360
365 public void setJournalArticlePersistence(
366 JournalArticlePersistence journalArticlePersistence) {
367 this.journalArticlePersistence = journalArticlePersistence;
368 }
369
370
375 public JournalArticleFinder getJournalArticleFinder() {
376 return journalArticleFinder;
377 }
378
379
384 public void setJournalArticleFinder(
385 JournalArticleFinder journalArticleFinder) {
386 this.journalArticleFinder = journalArticleFinder;
387 }
388
389
394 public JournalArticleImageLocalService getJournalArticleImageLocalService() {
395 return journalArticleImageLocalService;
396 }
397
398
403 public void setJournalArticleImageLocalService(
404 JournalArticleImageLocalService journalArticleImageLocalService) {
405 this.journalArticleImageLocalService = journalArticleImageLocalService;
406 }
407
408
413 public JournalArticleImagePersistence getJournalArticleImagePersistence() {
414 return journalArticleImagePersistence;
415 }
416
417
422 public void setJournalArticleImagePersistence(
423 JournalArticleImagePersistence journalArticleImagePersistence) {
424 this.journalArticleImagePersistence = journalArticleImagePersistence;
425 }
426
427
432 public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
433 return journalArticleResourceLocalService;
434 }
435
436
441 public void setJournalArticleResourceLocalService(
442 JournalArticleResourceLocalService journalArticleResourceLocalService) {
443 this.journalArticleResourceLocalService = journalArticleResourceLocalService;
444 }
445
446
451 public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
452 return journalArticleResourcePersistence;
453 }
454
455
460 public void setJournalArticleResourcePersistence(
461 JournalArticleResourcePersistence journalArticleResourcePersistence) {
462 this.journalArticleResourcePersistence = journalArticleResourcePersistence;
463 }
464
465
470 public JournalContentSearchLocalService getJournalContentSearchLocalService() {
471 return journalContentSearchLocalService;
472 }
473
474
479 public void setJournalContentSearchLocalService(
480 JournalContentSearchLocalService journalContentSearchLocalService) {
481 this.journalContentSearchLocalService = journalContentSearchLocalService;
482 }
483
484
489 public JournalContentSearchPersistence getJournalContentSearchPersistence() {
490 return journalContentSearchPersistence;
491 }
492
493
498 public void setJournalContentSearchPersistence(
499 JournalContentSearchPersistence journalContentSearchPersistence) {
500 this.journalContentSearchPersistence = journalContentSearchPersistence;
501 }
502
503
508 public JournalFeedLocalService getJournalFeedLocalService() {
509 return journalFeedLocalService;
510 }
511
512
517 public void setJournalFeedLocalService(
518 JournalFeedLocalService journalFeedLocalService) {
519 this.journalFeedLocalService = journalFeedLocalService;
520 }
521
522
527 public JournalFeedService getJournalFeedService() {
528 return journalFeedService;
529 }
530
531
536 public void setJournalFeedService(JournalFeedService journalFeedService) {
537 this.journalFeedService = journalFeedService;
538 }
539
540
545 public JournalFeedPersistence getJournalFeedPersistence() {
546 return journalFeedPersistence;
547 }
548
549
554 public void setJournalFeedPersistence(
555 JournalFeedPersistence journalFeedPersistence) {
556 this.journalFeedPersistence = journalFeedPersistence;
557 }
558
559
564 public JournalFeedFinder getJournalFeedFinder() {
565 return journalFeedFinder;
566 }
567
568
573 public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
574 this.journalFeedFinder = journalFeedFinder;
575 }
576
577
582 public JournalStructureLocalService getJournalStructureLocalService() {
583 return journalStructureLocalService;
584 }
585
586
591 public void setJournalStructureLocalService(
592 JournalStructureLocalService journalStructureLocalService) {
593 this.journalStructureLocalService = journalStructureLocalService;
594 }
595
596
601 public JournalStructureService getJournalStructureService() {
602 return journalStructureService;
603 }
604
605
610 public void setJournalStructureService(
611 JournalStructureService journalStructureService) {
612 this.journalStructureService = journalStructureService;
613 }
614
615
620 public JournalStructurePersistence getJournalStructurePersistence() {
621 return journalStructurePersistence;
622 }
623
624
629 public void setJournalStructurePersistence(
630 JournalStructurePersistence journalStructurePersistence) {
631 this.journalStructurePersistence = journalStructurePersistence;
632 }
633
634
639 public JournalStructureFinder getJournalStructureFinder() {
640 return journalStructureFinder;
641 }
642
643
648 public void setJournalStructureFinder(
649 JournalStructureFinder journalStructureFinder) {
650 this.journalStructureFinder = journalStructureFinder;
651 }
652
653
658 public JournalTemplateLocalService getJournalTemplateLocalService() {
659 return journalTemplateLocalService;
660 }
661
662
667 public void setJournalTemplateLocalService(
668 JournalTemplateLocalService journalTemplateLocalService) {
669 this.journalTemplateLocalService = journalTemplateLocalService;
670 }
671
672
677 public JournalTemplateService getJournalTemplateService() {
678 return journalTemplateService;
679 }
680
681
686 public void setJournalTemplateService(
687 JournalTemplateService journalTemplateService) {
688 this.journalTemplateService = journalTemplateService;
689 }
690
691
696 public JournalTemplatePersistence getJournalTemplatePersistence() {
697 return journalTemplatePersistence;
698 }
699
700
705 public void setJournalTemplatePersistence(
706 JournalTemplatePersistence journalTemplatePersistence) {
707 this.journalTemplatePersistence = journalTemplatePersistence;
708 }
709
710
715 public JournalTemplateFinder getJournalTemplateFinder() {
716 return journalTemplateFinder;
717 }
718
719
724 public void setJournalTemplateFinder(
725 JournalTemplateFinder journalTemplateFinder) {
726 this.journalTemplateFinder = journalTemplateFinder;
727 }
728
729
734 public CounterLocalService getCounterLocalService() {
735 return counterLocalService;
736 }
737
738
743 public void setCounterLocalService(CounterLocalService counterLocalService) {
744 this.counterLocalService = counterLocalService;
745 }
746
747
752 public ResourceLocalService getResourceLocalService() {
753 return resourceLocalService;
754 }
755
756
761 public void setResourceLocalService(
762 ResourceLocalService resourceLocalService) {
763 this.resourceLocalService = resourceLocalService;
764 }
765
766
771 public ResourceService getResourceService() {
772 return resourceService;
773 }
774
775
780 public void setResourceService(ResourceService resourceService) {
781 this.resourceService = resourceService;
782 }
783
784
789 public ResourcePersistence getResourcePersistence() {
790 return resourcePersistence;
791 }
792
793
798 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
799 this.resourcePersistence = resourcePersistence;
800 }
801
802
807 public ResourceFinder getResourceFinder() {
808 return resourceFinder;
809 }
810
811
816 public void setResourceFinder(ResourceFinder resourceFinder) {
817 this.resourceFinder = resourceFinder;
818 }
819
820
825 public UserLocalService getUserLocalService() {
826 return userLocalService;
827 }
828
829
834 public void setUserLocalService(UserLocalService userLocalService) {
835 this.userLocalService = userLocalService;
836 }
837
838
843 public UserService getUserService() {
844 return userService;
845 }
846
847
852 public void setUserService(UserService userService) {
853 this.userService = userService;
854 }
855
856
861 public UserPersistence getUserPersistence() {
862 return userPersistence;
863 }
864
865
870 public void setUserPersistence(UserPersistence userPersistence) {
871 this.userPersistence = userPersistence;
872 }
873
874
879 public UserFinder getUserFinder() {
880 return userFinder;
881 }
882
883
888 public void setUserFinder(UserFinder userFinder) {
889 this.userFinder = userFinder;
890 }
891
892
897 public ExpandoValueLocalService getExpandoValueLocalService() {
898 return expandoValueLocalService;
899 }
900
901
906 public void setExpandoValueLocalService(
907 ExpandoValueLocalService expandoValueLocalService) {
908 this.expandoValueLocalService = expandoValueLocalService;
909 }
910
911
916 public ExpandoValueService getExpandoValueService() {
917 return expandoValueService;
918 }
919
920
925 public void setExpandoValueService(ExpandoValueService expandoValueService) {
926 this.expandoValueService = expandoValueService;
927 }
928
929
934 public ExpandoValuePersistence getExpandoValuePersistence() {
935 return expandoValuePersistence;
936 }
937
938
943 public void setExpandoValuePersistence(
944 ExpandoValuePersistence expandoValuePersistence) {
945 this.expandoValuePersistence = expandoValuePersistence;
946 }
947
948 public void afterPropertiesSet() {
949 persistedModelLocalServiceRegistry.register("com.liferay.portlet.journal.model.JournalFeed",
950 journalFeedLocalService);
951 }
952
953 public void destroy() {
954 persistedModelLocalServiceRegistry.unregister(
955 "com.liferay.portlet.journal.model.JournalFeed");
956 }
957
958
963 public String getBeanIdentifier() {
964 return _beanIdentifier;
965 }
966
967
972 public void setBeanIdentifier(String beanIdentifier) {
973 _beanIdentifier = beanIdentifier;
974 }
975
976 protected Class<?> getModelClass() {
977 return JournalFeed.class;
978 }
979
980 protected String getModelClassName() {
981 return JournalFeed.class.getName();
982 }
983
984
989 protected void runSQL(String sql) throws SystemException {
990 try {
991 DataSource dataSource = journalFeedPersistence.getDataSource();
992
993 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
994 sql, new int[0]);
995
996 sqlUpdate.update();
997 }
998 catch (Exception e) {
999 throw new SystemException(e);
1000 }
1001 }
1002
1003 @BeanReference(type = JournalArticleLocalService.class)
1004 protected JournalArticleLocalService journalArticleLocalService;
1005 @BeanReference(type = JournalArticleService.class)
1006 protected JournalArticleService journalArticleService;
1007 @BeanReference(type = JournalArticlePersistence.class)
1008 protected JournalArticlePersistence journalArticlePersistence;
1009 @BeanReference(type = JournalArticleFinder.class)
1010 protected JournalArticleFinder journalArticleFinder;
1011 @BeanReference(type = JournalArticleImageLocalService.class)
1012 protected JournalArticleImageLocalService journalArticleImageLocalService;
1013 @BeanReference(type = JournalArticleImagePersistence.class)
1014 protected JournalArticleImagePersistence journalArticleImagePersistence;
1015 @BeanReference(type = JournalArticleResourceLocalService.class)
1016 protected JournalArticleResourceLocalService journalArticleResourceLocalService;
1017 @BeanReference(type = JournalArticleResourcePersistence.class)
1018 protected JournalArticleResourcePersistence journalArticleResourcePersistence;
1019 @BeanReference(type = JournalContentSearchLocalService.class)
1020 protected JournalContentSearchLocalService journalContentSearchLocalService;
1021 @BeanReference(type = JournalContentSearchPersistence.class)
1022 protected JournalContentSearchPersistence journalContentSearchPersistence;
1023 @BeanReference(type = JournalFeedLocalService.class)
1024 protected JournalFeedLocalService journalFeedLocalService;
1025 @BeanReference(type = JournalFeedService.class)
1026 protected JournalFeedService journalFeedService;
1027 @BeanReference(type = JournalFeedPersistence.class)
1028 protected JournalFeedPersistence journalFeedPersistence;
1029 @BeanReference(type = JournalFeedFinder.class)
1030 protected JournalFeedFinder journalFeedFinder;
1031 @BeanReference(type = JournalStructureLocalService.class)
1032 protected JournalStructureLocalService journalStructureLocalService;
1033 @BeanReference(type = JournalStructureService.class)
1034 protected JournalStructureService journalStructureService;
1035 @BeanReference(type = JournalStructurePersistence.class)
1036 protected JournalStructurePersistence journalStructurePersistence;
1037 @BeanReference(type = JournalStructureFinder.class)
1038 protected JournalStructureFinder journalStructureFinder;
1039 @BeanReference(type = JournalTemplateLocalService.class)
1040 protected JournalTemplateLocalService journalTemplateLocalService;
1041 @BeanReference(type = JournalTemplateService.class)
1042 protected JournalTemplateService journalTemplateService;
1043 @BeanReference(type = JournalTemplatePersistence.class)
1044 protected JournalTemplatePersistence journalTemplatePersistence;
1045 @BeanReference(type = JournalTemplateFinder.class)
1046 protected JournalTemplateFinder journalTemplateFinder;
1047 @BeanReference(type = CounterLocalService.class)
1048 protected CounterLocalService counterLocalService;
1049 @BeanReference(type = ResourceLocalService.class)
1050 protected ResourceLocalService resourceLocalService;
1051 @BeanReference(type = ResourceService.class)
1052 protected ResourceService resourceService;
1053 @BeanReference(type = ResourcePersistence.class)
1054 protected ResourcePersistence resourcePersistence;
1055 @BeanReference(type = ResourceFinder.class)
1056 protected ResourceFinder resourceFinder;
1057 @BeanReference(type = UserLocalService.class)
1058 protected UserLocalService userLocalService;
1059 @BeanReference(type = UserService.class)
1060 protected UserService userService;
1061 @BeanReference(type = UserPersistence.class)
1062 protected UserPersistence userPersistence;
1063 @BeanReference(type = UserFinder.class)
1064 protected UserFinder userFinder;
1065 @BeanReference(type = ExpandoValueLocalService.class)
1066 protected ExpandoValueLocalService expandoValueLocalService;
1067 @BeanReference(type = ExpandoValueService.class)
1068 protected ExpandoValueService expandoValueService;
1069 @BeanReference(type = ExpandoValuePersistence.class)
1070 protected ExpandoValuePersistence expandoValuePersistence;
1071 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1072 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1073 private String _beanIdentifier;
1074 }