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.journal.model.JournalArticleResource;
036 import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
037 import com.liferay.portlet.journal.service.JournalArticleLocalService;
038 import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
039 import com.liferay.portlet.journal.service.JournalArticleService;
040 import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
041 import com.liferay.portlet.journal.service.JournalFeedLocalService;
042 import com.liferay.portlet.journal.service.JournalFeedService;
043 import com.liferay.portlet.journal.service.JournalStructureLocalService;
044 import com.liferay.portlet.journal.service.JournalStructureService;
045 import com.liferay.portlet.journal.service.JournalTemplateLocalService;
046 import com.liferay.portlet.journal.service.JournalTemplateService;
047 import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
048 import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
049 import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
050 import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
051 import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
052 import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
053 import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
054 import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
055 import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
056 import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
057 import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
058
059 import java.util.List;
060
061 import javax.sql.DataSource;
062
063
079 public abstract class JournalArticleResourceLocalServiceBaseImpl
080 implements JournalArticleResourceLocalService {
081
088 public JournalArticleResource addJournalArticleResource(
089 JournalArticleResource journalArticleResource)
090 throws SystemException {
091 journalArticleResource.setNew(true);
092
093 return journalArticleResourcePersistence.update(journalArticleResource,
094 false);
095 }
096
097
103 public JournalArticleResource createJournalArticleResource(
104 long resourcePrimKey) {
105 return journalArticleResourcePersistence.create(resourcePrimKey);
106 }
107
108
115 public void deleteJournalArticleResource(long resourcePrimKey)
116 throws PortalException, SystemException {
117 journalArticleResourcePersistence.remove(resourcePrimKey);
118 }
119
120
126 public void deleteJournalArticleResource(
127 JournalArticleResource journalArticleResource)
128 throws SystemException {
129 journalArticleResourcePersistence.remove(journalArticleResource);
130 }
131
132
139 @SuppressWarnings("rawtypes")
140 public List dynamicQuery(DynamicQuery dynamicQuery)
141 throws SystemException {
142 return journalArticleResourcePersistence.findWithDynamicQuery(dynamicQuery);
143 }
144
145
158 @SuppressWarnings("rawtypes")
159 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
160 throws SystemException {
161 return journalArticleResourcePersistence.findWithDynamicQuery(dynamicQuery,
162 start, end);
163 }
164
165
179 @SuppressWarnings("rawtypes")
180 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
181 OrderByComparator orderByComparator) throws SystemException {
182 return journalArticleResourcePersistence.findWithDynamicQuery(dynamicQuery,
183 start, end, orderByComparator);
184 }
185
186
193 public long dynamicQueryCount(DynamicQuery dynamicQuery)
194 throws SystemException {
195 return journalArticleResourcePersistence.countWithDynamicQuery(dynamicQuery);
196 }
197
198
206 public JournalArticleResource getJournalArticleResource(
207 long resourcePrimKey) throws PortalException, SystemException {
208 return journalArticleResourcePersistence.findByPrimaryKey(resourcePrimKey);
209 }
210
211
223 public List<JournalArticleResource> getJournalArticleResources(int start,
224 int end) throws SystemException {
225 return journalArticleResourcePersistence.findAll(start, end);
226 }
227
228
234 public int getJournalArticleResourcesCount() throws SystemException {
235 return journalArticleResourcePersistence.countAll();
236 }
237
238
245 public JournalArticleResource updateJournalArticleResource(
246 JournalArticleResource journalArticleResource)
247 throws SystemException {
248 journalArticleResource.setNew(false);
249
250 return journalArticleResourcePersistence.update(journalArticleResource,
251 true);
252 }
253
254
262 public JournalArticleResource updateJournalArticleResource(
263 JournalArticleResource journalArticleResource, boolean merge)
264 throws SystemException {
265 journalArticleResource.setNew(false);
266
267 return journalArticleResourcePersistence.update(journalArticleResource,
268 merge);
269 }
270
271
276 public JournalArticleLocalService getJournalArticleLocalService() {
277 return journalArticleLocalService;
278 }
279
280
285 public void setJournalArticleLocalService(
286 JournalArticleLocalService journalArticleLocalService) {
287 this.journalArticleLocalService = journalArticleLocalService;
288 }
289
290
295 public JournalArticleService getJournalArticleService() {
296 return journalArticleService;
297 }
298
299
304 public void setJournalArticleService(
305 JournalArticleService journalArticleService) {
306 this.journalArticleService = journalArticleService;
307 }
308
309
314 public JournalArticlePersistence getJournalArticlePersistence() {
315 return journalArticlePersistence;
316 }
317
318
323 public void setJournalArticlePersistence(
324 JournalArticlePersistence journalArticlePersistence) {
325 this.journalArticlePersistence = journalArticlePersistence;
326 }
327
328
333 public JournalArticleFinder getJournalArticleFinder() {
334 return journalArticleFinder;
335 }
336
337
342 public void setJournalArticleFinder(
343 JournalArticleFinder journalArticleFinder) {
344 this.journalArticleFinder = journalArticleFinder;
345 }
346
347
352 public JournalArticleImageLocalService getJournalArticleImageLocalService() {
353 return journalArticleImageLocalService;
354 }
355
356
361 public void setJournalArticleImageLocalService(
362 JournalArticleImageLocalService journalArticleImageLocalService) {
363 this.journalArticleImageLocalService = journalArticleImageLocalService;
364 }
365
366
371 public JournalArticleImagePersistence getJournalArticleImagePersistence() {
372 return journalArticleImagePersistence;
373 }
374
375
380 public void setJournalArticleImagePersistence(
381 JournalArticleImagePersistence journalArticleImagePersistence) {
382 this.journalArticleImagePersistence = journalArticleImagePersistence;
383 }
384
385
390 public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
391 return journalArticleResourceLocalService;
392 }
393
394
399 public void setJournalArticleResourceLocalService(
400 JournalArticleResourceLocalService journalArticleResourceLocalService) {
401 this.journalArticleResourceLocalService = journalArticleResourceLocalService;
402 }
403
404
409 public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
410 return journalArticleResourcePersistence;
411 }
412
413
418 public void setJournalArticleResourcePersistence(
419 JournalArticleResourcePersistence journalArticleResourcePersistence) {
420 this.journalArticleResourcePersistence = journalArticleResourcePersistence;
421 }
422
423
428 public JournalContentSearchLocalService getJournalContentSearchLocalService() {
429 return journalContentSearchLocalService;
430 }
431
432
437 public void setJournalContentSearchLocalService(
438 JournalContentSearchLocalService journalContentSearchLocalService) {
439 this.journalContentSearchLocalService = journalContentSearchLocalService;
440 }
441
442
447 public JournalContentSearchPersistence getJournalContentSearchPersistence() {
448 return journalContentSearchPersistence;
449 }
450
451
456 public void setJournalContentSearchPersistence(
457 JournalContentSearchPersistence journalContentSearchPersistence) {
458 this.journalContentSearchPersistence = journalContentSearchPersistence;
459 }
460
461
466 public JournalFeedLocalService getJournalFeedLocalService() {
467 return journalFeedLocalService;
468 }
469
470
475 public void setJournalFeedLocalService(
476 JournalFeedLocalService journalFeedLocalService) {
477 this.journalFeedLocalService = journalFeedLocalService;
478 }
479
480
485 public JournalFeedService getJournalFeedService() {
486 return journalFeedService;
487 }
488
489
494 public void setJournalFeedService(JournalFeedService journalFeedService) {
495 this.journalFeedService = journalFeedService;
496 }
497
498
503 public JournalFeedPersistence getJournalFeedPersistence() {
504 return journalFeedPersistence;
505 }
506
507
512 public void setJournalFeedPersistence(
513 JournalFeedPersistence journalFeedPersistence) {
514 this.journalFeedPersistence = journalFeedPersistence;
515 }
516
517
522 public JournalFeedFinder getJournalFeedFinder() {
523 return journalFeedFinder;
524 }
525
526
531 public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
532 this.journalFeedFinder = journalFeedFinder;
533 }
534
535
540 public JournalStructureLocalService getJournalStructureLocalService() {
541 return journalStructureLocalService;
542 }
543
544
549 public void setJournalStructureLocalService(
550 JournalStructureLocalService journalStructureLocalService) {
551 this.journalStructureLocalService = journalStructureLocalService;
552 }
553
554
559 public JournalStructureService getJournalStructureService() {
560 return journalStructureService;
561 }
562
563
568 public void setJournalStructureService(
569 JournalStructureService journalStructureService) {
570 this.journalStructureService = journalStructureService;
571 }
572
573
578 public JournalStructurePersistence getJournalStructurePersistence() {
579 return journalStructurePersistence;
580 }
581
582
587 public void setJournalStructurePersistence(
588 JournalStructurePersistence journalStructurePersistence) {
589 this.journalStructurePersistence = journalStructurePersistence;
590 }
591
592
597 public JournalStructureFinder getJournalStructureFinder() {
598 return journalStructureFinder;
599 }
600
601
606 public void setJournalStructureFinder(
607 JournalStructureFinder journalStructureFinder) {
608 this.journalStructureFinder = journalStructureFinder;
609 }
610
611
616 public JournalTemplateLocalService getJournalTemplateLocalService() {
617 return journalTemplateLocalService;
618 }
619
620
625 public void setJournalTemplateLocalService(
626 JournalTemplateLocalService journalTemplateLocalService) {
627 this.journalTemplateLocalService = journalTemplateLocalService;
628 }
629
630
635 public JournalTemplateService getJournalTemplateService() {
636 return journalTemplateService;
637 }
638
639
644 public void setJournalTemplateService(
645 JournalTemplateService journalTemplateService) {
646 this.journalTemplateService = journalTemplateService;
647 }
648
649
654 public JournalTemplatePersistence getJournalTemplatePersistence() {
655 return journalTemplatePersistence;
656 }
657
658
663 public void setJournalTemplatePersistence(
664 JournalTemplatePersistence journalTemplatePersistence) {
665 this.journalTemplatePersistence = journalTemplatePersistence;
666 }
667
668
673 public JournalTemplateFinder getJournalTemplateFinder() {
674 return journalTemplateFinder;
675 }
676
677
682 public void setJournalTemplateFinder(
683 JournalTemplateFinder journalTemplateFinder) {
684 this.journalTemplateFinder = journalTemplateFinder;
685 }
686
687
692 public CounterLocalService getCounterLocalService() {
693 return counterLocalService;
694 }
695
696
701 public void setCounterLocalService(CounterLocalService counterLocalService) {
702 this.counterLocalService = counterLocalService;
703 }
704
705
710 public ResourceLocalService getResourceLocalService() {
711 return resourceLocalService;
712 }
713
714
719 public void setResourceLocalService(
720 ResourceLocalService resourceLocalService) {
721 this.resourceLocalService = resourceLocalService;
722 }
723
724
729 public ResourceService getResourceService() {
730 return resourceService;
731 }
732
733
738 public void setResourceService(ResourceService resourceService) {
739 this.resourceService = resourceService;
740 }
741
742
747 public ResourcePersistence getResourcePersistence() {
748 return resourcePersistence;
749 }
750
751
756 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
757 this.resourcePersistence = resourcePersistence;
758 }
759
760
765 public ResourceFinder getResourceFinder() {
766 return resourceFinder;
767 }
768
769
774 public void setResourceFinder(ResourceFinder resourceFinder) {
775 this.resourceFinder = resourceFinder;
776 }
777
778
783 public UserLocalService getUserLocalService() {
784 return userLocalService;
785 }
786
787
792 public void setUserLocalService(UserLocalService userLocalService) {
793 this.userLocalService = userLocalService;
794 }
795
796
801 public UserService getUserService() {
802 return userService;
803 }
804
805
810 public void setUserService(UserService userService) {
811 this.userService = userService;
812 }
813
814
819 public UserPersistence getUserPersistence() {
820 return userPersistence;
821 }
822
823
828 public void setUserPersistence(UserPersistence userPersistence) {
829 this.userPersistence = userPersistence;
830 }
831
832
837 public UserFinder getUserFinder() {
838 return userFinder;
839 }
840
841
846 public void setUserFinder(UserFinder userFinder) {
847 this.userFinder = userFinder;
848 }
849
850
855 protected void runSQL(String sql) throws SystemException {
856 try {
857 DataSource dataSource = journalArticleResourcePersistence.getDataSource();
858
859 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
860 sql, new int[0]);
861
862 sqlUpdate.update();
863 }
864 catch (Exception e) {
865 throw new SystemException(e);
866 }
867 }
868
869 @BeanReference(type = JournalArticleLocalService.class)
870 protected JournalArticleLocalService journalArticleLocalService;
871 @BeanReference(type = JournalArticleService.class)
872 protected JournalArticleService journalArticleService;
873 @BeanReference(type = JournalArticlePersistence.class)
874 protected JournalArticlePersistence journalArticlePersistence;
875 @BeanReference(type = JournalArticleFinder.class)
876 protected JournalArticleFinder journalArticleFinder;
877 @BeanReference(type = JournalArticleImageLocalService.class)
878 protected JournalArticleImageLocalService journalArticleImageLocalService;
879 @BeanReference(type = JournalArticleImagePersistence.class)
880 protected JournalArticleImagePersistence journalArticleImagePersistence;
881 @BeanReference(type = JournalArticleResourceLocalService.class)
882 protected JournalArticleResourceLocalService journalArticleResourceLocalService;
883 @BeanReference(type = JournalArticleResourcePersistence.class)
884 protected JournalArticleResourcePersistence journalArticleResourcePersistence;
885 @BeanReference(type = JournalContentSearchLocalService.class)
886 protected JournalContentSearchLocalService journalContentSearchLocalService;
887 @BeanReference(type = JournalContentSearchPersistence.class)
888 protected JournalContentSearchPersistence journalContentSearchPersistence;
889 @BeanReference(type = JournalFeedLocalService.class)
890 protected JournalFeedLocalService journalFeedLocalService;
891 @BeanReference(type = JournalFeedService.class)
892 protected JournalFeedService journalFeedService;
893 @BeanReference(type = JournalFeedPersistence.class)
894 protected JournalFeedPersistence journalFeedPersistence;
895 @BeanReference(type = JournalFeedFinder.class)
896 protected JournalFeedFinder journalFeedFinder;
897 @BeanReference(type = JournalStructureLocalService.class)
898 protected JournalStructureLocalService journalStructureLocalService;
899 @BeanReference(type = JournalStructureService.class)
900 protected JournalStructureService journalStructureService;
901 @BeanReference(type = JournalStructurePersistence.class)
902 protected JournalStructurePersistence journalStructurePersistence;
903 @BeanReference(type = JournalStructureFinder.class)
904 protected JournalStructureFinder journalStructureFinder;
905 @BeanReference(type = JournalTemplateLocalService.class)
906 protected JournalTemplateLocalService journalTemplateLocalService;
907 @BeanReference(type = JournalTemplateService.class)
908 protected JournalTemplateService journalTemplateService;
909 @BeanReference(type = JournalTemplatePersistence.class)
910 protected JournalTemplatePersistence journalTemplatePersistence;
911 @BeanReference(type = JournalTemplateFinder.class)
912 protected JournalTemplateFinder journalTemplateFinder;
913 @BeanReference(type = CounterLocalService.class)
914 protected CounterLocalService counterLocalService;
915 @BeanReference(type = ResourceLocalService.class)
916 protected ResourceLocalService resourceLocalService;
917 @BeanReference(type = ResourceService.class)
918 protected ResourceService resourceService;
919 @BeanReference(type = ResourcePersistence.class)
920 protected ResourcePersistence resourcePersistence;
921 @BeanReference(type = ResourceFinder.class)
922 protected ResourceFinder resourceFinder;
923 @BeanReference(type = UserLocalService.class)
924 protected UserLocalService userLocalService;
925 @BeanReference(type = UserService.class)
926 protected UserService userService;
927 @BeanReference(type = UserPersistence.class)
928 protected UserPersistence userPersistence;
929 @BeanReference(type = UserFinder.class)
930 protected UserFinder userFinder;
931 }