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.persistence.ResourceFinder;
031 import com.liferay.portal.service.persistence.ResourcePersistence;
032 import com.liferay.portal.service.persistence.UserFinder;
033 import com.liferay.portal.service.persistence.UserPersistence;
034
035 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
036 import com.liferay.portlet.expando.service.ExpandoValueService;
037 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
038 import com.liferay.portlet.journal.model.JournalFeed;
039 import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
040 import com.liferay.portlet.journal.service.JournalArticleLocalService;
041 import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
042 import com.liferay.portlet.journal.service.JournalArticleService;
043 import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
044 import com.liferay.portlet.journal.service.JournalFeedLocalService;
045 import com.liferay.portlet.journal.service.JournalFeedService;
046 import com.liferay.portlet.journal.service.JournalStructureLocalService;
047 import com.liferay.portlet.journal.service.JournalStructureService;
048 import com.liferay.portlet.journal.service.JournalTemplateLocalService;
049 import com.liferay.portlet.journal.service.JournalTemplateService;
050 import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
051 import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
052 import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
053 import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
054 import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
055 import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
056 import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
057 import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
058 import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
059 import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
060 import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
061
062 import java.util.List;
063
064 import javax.sql.DataSource;
065
066
082 public abstract class JournalFeedLocalServiceBaseImpl
083 implements JournalFeedLocalService {
084
091 public JournalFeed addJournalFeed(JournalFeed journalFeed)
092 throws SystemException {
093 journalFeed.setNew(true);
094
095 return journalFeedPersistence.update(journalFeed, false);
096 }
097
098
104 public JournalFeed createJournalFeed(long id) {
105 return journalFeedPersistence.create(id);
106 }
107
108
115 public void deleteJournalFeed(long id)
116 throws PortalException, SystemException {
117 journalFeedPersistence.remove(id);
118 }
119
120
126 public void deleteJournalFeed(JournalFeed journalFeed)
127 throws SystemException {
128 journalFeedPersistence.remove(journalFeed);
129 }
130
131
138 @SuppressWarnings("rawtypes")
139 public List dynamicQuery(DynamicQuery dynamicQuery)
140 throws SystemException {
141 return journalFeedPersistence.findWithDynamicQuery(dynamicQuery);
142 }
143
144
157 @SuppressWarnings("rawtypes")
158 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
159 throws SystemException {
160 return journalFeedPersistence.findWithDynamicQuery(dynamicQuery, start,
161 end);
162 }
163
164
178 @SuppressWarnings("rawtypes")
179 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
180 OrderByComparator orderByComparator) throws SystemException {
181 return journalFeedPersistence.findWithDynamicQuery(dynamicQuery, start,
182 end, orderByComparator);
183 }
184
185
192 public long dynamicQueryCount(DynamicQuery dynamicQuery)
193 throws SystemException {
194 return journalFeedPersistence.countWithDynamicQuery(dynamicQuery);
195 }
196
197
205 public JournalFeed getJournalFeed(long id)
206 throws PortalException, SystemException {
207 return journalFeedPersistence.findByPrimaryKey(id);
208 }
209
210
219 public JournalFeed getJournalFeedByUuidAndGroupId(String uuid, long groupId)
220 throws PortalException, SystemException {
221 return journalFeedPersistence.findByUUID_G(uuid, groupId);
222 }
223
224
236 public List<JournalFeed> getJournalFeeds(int start, int end)
237 throws SystemException {
238 return journalFeedPersistence.findAll(start, end);
239 }
240
241
247 public int getJournalFeedsCount() throws SystemException {
248 return journalFeedPersistence.countAll();
249 }
250
251
258 public JournalFeed updateJournalFeed(JournalFeed journalFeed)
259 throws SystemException {
260 journalFeed.setNew(false);
261
262 return journalFeedPersistence.update(journalFeed, true);
263 }
264
265
273 public JournalFeed updateJournalFeed(JournalFeed journalFeed, boolean merge)
274 throws SystemException {
275 journalFeed.setNew(false);
276
277 return journalFeedPersistence.update(journalFeed, merge);
278 }
279
280
285 public JournalArticleLocalService getJournalArticleLocalService() {
286 return journalArticleLocalService;
287 }
288
289
294 public void setJournalArticleLocalService(
295 JournalArticleLocalService journalArticleLocalService) {
296 this.journalArticleLocalService = journalArticleLocalService;
297 }
298
299
304 public JournalArticleService getJournalArticleService() {
305 return journalArticleService;
306 }
307
308
313 public void setJournalArticleService(
314 JournalArticleService journalArticleService) {
315 this.journalArticleService = journalArticleService;
316 }
317
318
323 public JournalArticlePersistence getJournalArticlePersistence() {
324 return journalArticlePersistence;
325 }
326
327
332 public void setJournalArticlePersistence(
333 JournalArticlePersistence journalArticlePersistence) {
334 this.journalArticlePersistence = journalArticlePersistence;
335 }
336
337
342 public JournalArticleFinder getJournalArticleFinder() {
343 return journalArticleFinder;
344 }
345
346
351 public void setJournalArticleFinder(
352 JournalArticleFinder journalArticleFinder) {
353 this.journalArticleFinder = journalArticleFinder;
354 }
355
356
361 public JournalArticleImageLocalService getJournalArticleImageLocalService() {
362 return journalArticleImageLocalService;
363 }
364
365
370 public void setJournalArticleImageLocalService(
371 JournalArticleImageLocalService journalArticleImageLocalService) {
372 this.journalArticleImageLocalService = journalArticleImageLocalService;
373 }
374
375
380 public JournalArticleImagePersistence getJournalArticleImagePersistence() {
381 return journalArticleImagePersistence;
382 }
383
384
389 public void setJournalArticleImagePersistence(
390 JournalArticleImagePersistence journalArticleImagePersistence) {
391 this.journalArticleImagePersistence = journalArticleImagePersistence;
392 }
393
394
399 public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
400 return journalArticleResourceLocalService;
401 }
402
403
408 public void setJournalArticleResourceLocalService(
409 JournalArticleResourceLocalService journalArticleResourceLocalService) {
410 this.journalArticleResourceLocalService = journalArticleResourceLocalService;
411 }
412
413
418 public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
419 return journalArticleResourcePersistence;
420 }
421
422
427 public void setJournalArticleResourcePersistence(
428 JournalArticleResourcePersistence journalArticleResourcePersistence) {
429 this.journalArticleResourcePersistence = journalArticleResourcePersistence;
430 }
431
432
437 public JournalContentSearchLocalService getJournalContentSearchLocalService() {
438 return journalContentSearchLocalService;
439 }
440
441
446 public void setJournalContentSearchLocalService(
447 JournalContentSearchLocalService journalContentSearchLocalService) {
448 this.journalContentSearchLocalService = journalContentSearchLocalService;
449 }
450
451
456 public JournalContentSearchPersistence getJournalContentSearchPersistence() {
457 return journalContentSearchPersistence;
458 }
459
460
465 public void setJournalContentSearchPersistence(
466 JournalContentSearchPersistence journalContentSearchPersistence) {
467 this.journalContentSearchPersistence = journalContentSearchPersistence;
468 }
469
470
475 public JournalFeedLocalService getJournalFeedLocalService() {
476 return journalFeedLocalService;
477 }
478
479
484 public void setJournalFeedLocalService(
485 JournalFeedLocalService journalFeedLocalService) {
486 this.journalFeedLocalService = journalFeedLocalService;
487 }
488
489
494 public JournalFeedService getJournalFeedService() {
495 return journalFeedService;
496 }
497
498
503 public void setJournalFeedService(JournalFeedService journalFeedService) {
504 this.journalFeedService = journalFeedService;
505 }
506
507
512 public JournalFeedPersistence getJournalFeedPersistence() {
513 return journalFeedPersistence;
514 }
515
516
521 public void setJournalFeedPersistence(
522 JournalFeedPersistence journalFeedPersistence) {
523 this.journalFeedPersistence = journalFeedPersistence;
524 }
525
526
531 public JournalFeedFinder getJournalFeedFinder() {
532 return journalFeedFinder;
533 }
534
535
540 public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
541 this.journalFeedFinder = journalFeedFinder;
542 }
543
544
549 public JournalStructureLocalService getJournalStructureLocalService() {
550 return journalStructureLocalService;
551 }
552
553
558 public void setJournalStructureLocalService(
559 JournalStructureLocalService journalStructureLocalService) {
560 this.journalStructureLocalService = journalStructureLocalService;
561 }
562
563
568 public JournalStructureService getJournalStructureService() {
569 return journalStructureService;
570 }
571
572
577 public void setJournalStructureService(
578 JournalStructureService journalStructureService) {
579 this.journalStructureService = journalStructureService;
580 }
581
582
587 public JournalStructurePersistence getJournalStructurePersistence() {
588 return journalStructurePersistence;
589 }
590
591
596 public void setJournalStructurePersistence(
597 JournalStructurePersistence journalStructurePersistence) {
598 this.journalStructurePersistence = journalStructurePersistence;
599 }
600
601
606 public JournalStructureFinder getJournalStructureFinder() {
607 return journalStructureFinder;
608 }
609
610
615 public void setJournalStructureFinder(
616 JournalStructureFinder journalStructureFinder) {
617 this.journalStructureFinder = journalStructureFinder;
618 }
619
620
625 public JournalTemplateLocalService getJournalTemplateLocalService() {
626 return journalTemplateLocalService;
627 }
628
629
634 public void setJournalTemplateLocalService(
635 JournalTemplateLocalService journalTemplateLocalService) {
636 this.journalTemplateLocalService = journalTemplateLocalService;
637 }
638
639
644 public JournalTemplateService getJournalTemplateService() {
645 return journalTemplateService;
646 }
647
648
653 public void setJournalTemplateService(
654 JournalTemplateService journalTemplateService) {
655 this.journalTemplateService = journalTemplateService;
656 }
657
658
663 public JournalTemplatePersistence getJournalTemplatePersistence() {
664 return journalTemplatePersistence;
665 }
666
667
672 public void setJournalTemplatePersistence(
673 JournalTemplatePersistence journalTemplatePersistence) {
674 this.journalTemplatePersistence = journalTemplatePersistence;
675 }
676
677
682 public JournalTemplateFinder getJournalTemplateFinder() {
683 return journalTemplateFinder;
684 }
685
686
691 public void setJournalTemplateFinder(
692 JournalTemplateFinder journalTemplateFinder) {
693 this.journalTemplateFinder = journalTemplateFinder;
694 }
695
696
701 public CounterLocalService getCounterLocalService() {
702 return counterLocalService;
703 }
704
705
710 public void setCounterLocalService(CounterLocalService counterLocalService) {
711 this.counterLocalService = counterLocalService;
712 }
713
714
719 public ResourceLocalService getResourceLocalService() {
720 return resourceLocalService;
721 }
722
723
728 public void setResourceLocalService(
729 ResourceLocalService resourceLocalService) {
730 this.resourceLocalService = resourceLocalService;
731 }
732
733
738 public ResourceService getResourceService() {
739 return resourceService;
740 }
741
742
747 public void setResourceService(ResourceService resourceService) {
748 this.resourceService = resourceService;
749 }
750
751
756 public ResourcePersistence getResourcePersistence() {
757 return resourcePersistence;
758 }
759
760
765 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
766 this.resourcePersistence = resourcePersistence;
767 }
768
769
774 public ResourceFinder getResourceFinder() {
775 return resourceFinder;
776 }
777
778
783 public void setResourceFinder(ResourceFinder resourceFinder) {
784 this.resourceFinder = resourceFinder;
785 }
786
787
792 public UserLocalService getUserLocalService() {
793 return userLocalService;
794 }
795
796
801 public void setUserLocalService(UserLocalService userLocalService) {
802 this.userLocalService = userLocalService;
803 }
804
805
810 public UserService getUserService() {
811 return userService;
812 }
813
814
819 public void setUserService(UserService userService) {
820 this.userService = userService;
821 }
822
823
828 public UserPersistence getUserPersistence() {
829 return userPersistence;
830 }
831
832
837 public void setUserPersistence(UserPersistence userPersistence) {
838 this.userPersistence = userPersistence;
839 }
840
841
846 public UserFinder getUserFinder() {
847 return userFinder;
848 }
849
850
855 public void setUserFinder(UserFinder userFinder) {
856 this.userFinder = userFinder;
857 }
858
859
864 public ExpandoValueLocalService getExpandoValueLocalService() {
865 return expandoValueLocalService;
866 }
867
868
873 public void setExpandoValueLocalService(
874 ExpandoValueLocalService expandoValueLocalService) {
875 this.expandoValueLocalService = expandoValueLocalService;
876 }
877
878
883 public ExpandoValueService getExpandoValueService() {
884 return expandoValueService;
885 }
886
887
892 public void setExpandoValueService(ExpandoValueService expandoValueService) {
893 this.expandoValueService = expandoValueService;
894 }
895
896
901 public ExpandoValuePersistence getExpandoValuePersistence() {
902 return expandoValuePersistence;
903 }
904
905
910 public void setExpandoValuePersistence(
911 ExpandoValuePersistence expandoValuePersistence) {
912 this.expandoValuePersistence = expandoValuePersistence;
913 }
914
915
920 protected void runSQL(String sql) throws SystemException {
921 try {
922 DataSource dataSource = journalFeedPersistence.getDataSource();
923
924 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
925 sql, new int[0]);
926
927 sqlUpdate.update();
928 }
929 catch (Exception e) {
930 throw new SystemException(e);
931 }
932 }
933
934 @BeanReference(type = JournalArticleLocalService.class)
935 protected JournalArticleLocalService journalArticleLocalService;
936 @BeanReference(type = JournalArticleService.class)
937 protected JournalArticleService journalArticleService;
938 @BeanReference(type = JournalArticlePersistence.class)
939 protected JournalArticlePersistence journalArticlePersistence;
940 @BeanReference(type = JournalArticleFinder.class)
941 protected JournalArticleFinder journalArticleFinder;
942 @BeanReference(type = JournalArticleImageLocalService.class)
943 protected JournalArticleImageLocalService journalArticleImageLocalService;
944 @BeanReference(type = JournalArticleImagePersistence.class)
945 protected JournalArticleImagePersistence journalArticleImagePersistence;
946 @BeanReference(type = JournalArticleResourceLocalService.class)
947 protected JournalArticleResourceLocalService journalArticleResourceLocalService;
948 @BeanReference(type = JournalArticleResourcePersistence.class)
949 protected JournalArticleResourcePersistence journalArticleResourcePersistence;
950 @BeanReference(type = JournalContentSearchLocalService.class)
951 protected JournalContentSearchLocalService journalContentSearchLocalService;
952 @BeanReference(type = JournalContentSearchPersistence.class)
953 protected JournalContentSearchPersistence journalContentSearchPersistence;
954 @BeanReference(type = JournalFeedLocalService.class)
955 protected JournalFeedLocalService journalFeedLocalService;
956 @BeanReference(type = JournalFeedService.class)
957 protected JournalFeedService journalFeedService;
958 @BeanReference(type = JournalFeedPersistence.class)
959 protected JournalFeedPersistence journalFeedPersistence;
960 @BeanReference(type = JournalFeedFinder.class)
961 protected JournalFeedFinder journalFeedFinder;
962 @BeanReference(type = JournalStructureLocalService.class)
963 protected JournalStructureLocalService journalStructureLocalService;
964 @BeanReference(type = JournalStructureService.class)
965 protected JournalStructureService journalStructureService;
966 @BeanReference(type = JournalStructurePersistence.class)
967 protected JournalStructurePersistence journalStructurePersistence;
968 @BeanReference(type = JournalStructureFinder.class)
969 protected JournalStructureFinder journalStructureFinder;
970 @BeanReference(type = JournalTemplateLocalService.class)
971 protected JournalTemplateLocalService journalTemplateLocalService;
972 @BeanReference(type = JournalTemplateService.class)
973 protected JournalTemplateService journalTemplateService;
974 @BeanReference(type = JournalTemplatePersistence.class)
975 protected JournalTemplatePersistence journalTemplatePersistence;
976 @BeanReference(type = JournalTemplateFinder.class)
977 protected JournalTemplateFinder journalTemplateFinder;
978 @BeanReference(type = CounterLocalService.class)
979 protected CounterLocalService counterLocalService;
980 @BeanReference(type = ResourceLocalService.class)
981 protected ResourceLocalService resourceLocalService;
982 @BeanReference(type = ResourceService.class)
983 protected ResourceService resourceService;
984 @BeanReference(type = ResourcePersistence.class)
985 protected ResourcePersistence resourcePersistence;
986 @BeanReference(type = ResourceFinder.class)
987 protected ResourceFinder resourceFinder;
988 @BeanReference(type = UserLocalService.class)
989 protected UserLocalService userLocalService;
990 @BeanReference(type = UserService.class)
991 protected UserService userService;
992 @BeanReference(type = UserPersistence.class)
993 protected UserPersistence userPersistence;
994 @BeanReference(type = UserFinder.class)
995 protected UserFinder userFinder;
996 @BeanReference(type = ExpandoValueLocalService.class)
997 protected ExpandoValueLocalService expandoValueLocalService;
998 @BeanReference(type = ExpandoValueService.class)
999 protected ExpandoValueService expandoValueService;
1000 @BeanReference(type = ExpandoValuePersistence.class)
1001 protected ExpandoValuePersistence expandoValuePersistence;
1002 }