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.journal.model.JournalArticleResource;
043 import com.liferay.portlet.journal.service.JournalArticleImageLocalService;
044 import com.liferay.portlet.journal.service.JournalArticleLocalService;
045 import com.liferay.portlet.journal.service.JournalArticleResourceLocalService;
046 import com.liferay.portlet.journal.service.JournalArticleService;
047 import com.liferay.portlet.journal.service.JournalContentSearchLocalService;
048 import com.liferay.portlet.journal.service.JournalFeedLocalService;
049 import com.liferay.portlet.journal.service.JournalFeedService;
050 import com.liferay.portlet.journal.service.JournalStructureLocalService;
051 import com.liferay.portlet.journal.service.JournalStructureService;
052 import com.liferay.portlet.journal.service.JournalTemplateLocalService;
053 import com.liferay.portlet.journal.service.JournalTemplateService;
054 import com.liferay.portlet.journal.service.persistence.JournalArticleFinder;
055 import com.liferay.portlet.journal.service.persistence.JournalArticleImagePersistence;
056 import com.liferay.portlet.journal.service.persistence.JournalArticlePersistence;
057 import com.liferay.portlet.journal.service.persistence.JournalArticleResourcePersistence;
058 import com.liferay.portlet.journal.service.persistence.JournalContentSearchPersistence;
059 import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
060 import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
061 import com.liferay.portlet.journal.service.persistence.JournalStructureFinder;
062 import com.liferay.portlet.journal.service.persistence.JournalStructurePersistence;
063 import com.liferay.portlet.journal.service.persistence.JournalTemplateFinder;
064 import com.liferay.portlet.journal.service.persistence.JournalTemplatePersistence;
065
066 import java.io.Serializable;
067
068 import java.util.List;
069
070 import javax.sql.DataSource;
071
072
084 public abstract class JournalArticleResourceLocalServiceBaseImpl
085 extends BaseLocalServiceImpl implements JournalArticleResourceLocalService,
086 IdentifiableBean {
087
092
093
100 @Indexable(type = IndexableType.REINDEX)
101 public JournalArticleResource addJournalArticleResource(
102 JournalArticleResource journalArticleResource)
103 throws SystemException {
104 journalArticleResource.setNew(true);
105
106 return journalArticleResourcePersistence.update(journalArticleResource,
107 false);
108 }
109
110
116 public JournalArticleResource createJournalArticleResource(
117 long resourcePrimKey) {
118 return journalArticleResourcePersistence.create(resourcePrimKey);
119 }
120
121
129 @Indexable(type = IndexableType.DELETE)
130 public JournalArticleResource deleteJournalArticleResource(
131 long resourcePrimKey) throws PortalException, SystemException {
132 return journalArticleResourcePersistence.remove(resourcePrimKey);
133 }
134
135
142 @Indexable(type = IndexableType.DELETE)
143 public JournalArticleResource deleteJournalArticleResource(
144 JournalArticleResource journalArticleResource)
145 throws SystemException {
146 return journalArticleResourcePersistence.remove(journalArticleResource);
147 }
148
149 public DynamicQuery dynamicQuery() {
150 Class<?> clazz = getClass();
151
152 return DynamicQueryFactoryUtil.forClass(JournalArticleResource.class,
153 clazz.getClassLoader());
154 }
155
156
163 @SuppressWarnings("rawtypes")
164 public List dynamicQuery(DynamicQuery dynamicQuery)
165 throws SystemException {
166 return journalArticleResourcePersistence.findWithDynamicQuery(dynamicQuery);
167 }
168
169
182 @SuppressWarnings("rawtypes")
183 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
184 throws SystemException {
185 return journalArticleResourcePersistence.findWithDynamicQuery(dynamicQuery,
186 start, end);
187 }
188
189
203 @SuppressWarnings("rawtypes")
204 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
205 OrderByComparator orderByComparator) throws SystemException {
206 return journalArticleResourcePersistence.findWithDynamicQuery(dynamicQuery,
207 start, end, orderByComparator);
208 }
209
210
217 public long dynamicQueryCount(DynamicQuery dynamicQuery)
218 throws SystemException {
219 return journalArticleResourcePersistence.countWithDynamicQuery(dynamicQuery);
220 }
221
222 public JournalArticleResource fetchJournalArticleResource(
223 long resourcePrimKey) throws SystemException {
224 return journalArticleResourcePersistence.fetchByPrimaryKey(resourcePrimKey);
225 }
226
227
235 public JournalArticleResource getJournalArticleResource(
236 long resourcePrimKey) throws PortalException, SystemException {
237 return journalArticleResourcePersistence.findByPrimaryKey(resourcePrimKey);
238 }
239
240 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
241 throws PortalException, SystemException {
242 return journalArticleResourcePersistence.findByPrimaryKey(primaryKeyObj);
243 }
244
245
254 public JournalArticleResource getJournalArticleResourceByUuidAndGroupId(
255 String uuid, long groupId) throws PortalException, SystemException {
256 return journalArticleResourcePersistence.findByUUID_G(uuid, groupId);
257 }
258
259
271 public List<JournalArticleResource> getJournalArticleResources(int start,
272 int end) throws SystemException {
273 return journalArticleResourcePersistence.findAll(start, end);
274 }
275
276
282 public int getJournalArticleResourcesCount() throws SystemException {
283 return journalArticleResourcePersistence.countAll();
284 }
285
286
293 @Indexable(type = IndexableType.REINDEX)
294 public JournalArticleResource updateJournalArticleResource(
295 JournalArticleResource journalArticleResource)
296 throws SystemException {
297 return updateJournalArticleResource(journalArticleResource, true);
298 }
299
300
308 @Indexable(type = IndexableType.REINDEX)
309 public JournalArticleResource updateJournalArticleResource(
310 JournalArticleResource journalArticleResource, boolean merge)
311 throws SystemException {
312 journalArticleResource.setNew(false);
313
314 return journalArticleResourcePersistence.update(journalArticleResource,
315 merge);
316 }
317
318
323 public JournalArticleLocalService getJournalArticleLocalService() {
324 return journalArticleLocalService;
325 }
326
327
332 public void setJournalArticleLocalService(
333 JournalArticleLocalService journalArticleLocalService) {
334 this.journalArticleLocalService = journalArticleLocalService;
335 }
336
337
342 public JournalArticleService getJournalArticleService() {
343 return journalArticleService;
344 }
345
346
351 public void setJournalArticleService(
352 JournalArticleService journalArticleService) {
353 this.journalArticleService = journalArticleService;
354 }
355
356
361 public JournalArticlePersistence getJournalArticlePersistence() {
362 return journalArticlePersistence;
363 }
364
365
370 public void setJournalArticlePersistence(
371 JournalArticlePersistence journalArticlePersistence) {
372 this.journalArticlePersistence = journalArticlePersistence;
373 }
374
375
380 public JournalArticleFinder getJournalArticleFinder() {
381 return journalArticleFinder;
382 }
383
384
389 public void setJournalArticleFinder(
390 JournalArticleFinder journalArticleFinder) {
391 this.journalArticleFinder = journalArticleFinder;
392 }
393
394
399 public JournalArticleImageLocalService getJournalArticleImageLocalService() {
400 return journalArticleImageLocalService;
401 }
402
403
408 public void setJournalArticleImageLocalService(
409 JournalArticleImageLocalService journalArticleImageLocalService) {
410 this.journalArticleImageLocalService = journalArticleImageLocalService;
411 }
412
413
418 public JournalArticleImagePersistence getJournalArticleImagePersistence() {
419 return journalArticleImagePersistence;
420 }
421
422
427 public void setJournalArticleImagePersistence(
428 JournalArticleImagePersistence journalArticleImagePersistence) {
429 this.journalArticleImagePersistence = journalArticleImagePersistence;
430 }
431
432
437 public JournalArticleResourceLocalService getJournalArticleResourceLocalService() {
438 return journalArticleResourceLocalService;
439 }
440
441
446 public void setJournalArticleResourceLocalService(
447 JournalArticleResourceLocalService journalArticleResourceLocalService) {
448 this.journalArticleResourceLocalService = journalArticleResourceLocalService;
449 }
450
451
456 public JournalArticleResourcePersistence getJournalArticleResourcePersistence() {
457 return journalArticleResourcePersistence;
458 }
459
460
465 public void setJournalArticleResourcePersistence(
466 JournalArticleResourcePersistence journalArticleResourcePersistence) {
467 this.journalArticleResourcePersistence = journalArticleResourcePersistence;
468 }
469
470
475 public JournalContentSearchLocalService getJournalContentSearchLocalService() {
476 return journalContentSearchLocalService;
477 }
478
479
484 public void setJournalContentSearchLocalService(
485 JournalContentSearchLocalService journalContentSearchLocalService) {
486 this.journalContentSearchLocalService = journalContentSearchLocalService;
487 }
488
489
494 public JournalContentSearchPersistence getJournalContentSearchPersistence() {
495 return journalContentSearchPersistence;
496 }
497
498
503 public void setJournalContentSearchPersistence(
504 JournalContentSearchPersistence journalContentSearchPersistence) {
505 this.journalContentSearchPersistence = journalContentSearchPersistence;
506 }
507
508
513 public JournalFeedLocalService getJournalFeedLocalService() {
514 return journalFeedLocalService;
515 }
516
517
522 public void setJournalFeedLocalService(
523 JournalFeedLocalService journalFeedLocalService) {
524 this.journalFeedLocalService = journalFeedLocalService;
525 }
526
527
532 public JournalFeedService getJournalFeedService() {
533 return journalFeedService;
534 }
535
536
541 public void setJournalFeedService(JournalFeedService journalFeedService) {
542 this.journalFeedService = journalFeedService;
543 }
544
545
550 public JournalFeedPersistence getJournalFeedPersistence() {
551 return journalFeedPersistence;
552 }
553
554
559 public void setJournalFeedPersistence(
560 JournalFeedPersistence journalFeedPersistence) {
561 this.journalFeedPersistence = journalFeedPersistence;
562 }
563
564
569 public JournalFeedFinder getJournalFeedFinder() {
570 return journalFeedFinder;
571 }
572
573
578 public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
579 this.journalFeedFinder = journalFeedFinder;
580 }
581
582
587 public JournalStructureLocalService getJournalStructureLocalService() {
588 return journalStructureLocalService;
589 }
590
591
596 public void setJournalStructureLocalService(
597 JournalStructureLocalService journalStructureLocalService) {
598 this.journalStructureLocalService = journalStructureLocalService;
599 }
600
601
606 public JournalStructureService getJournalStructureService() {
607 return journalStructureService;
608 }
609
610
615 public void setJournalStructureService(
616 JournalStructureService journalStructureService) {
617 this.journalStructureService = journalStructureService;
618 }
619
620
625 public JournalStructurePersistence getJournalStructurePersistence() {
626 return journalStructurePersistence;
627 }
628
629
634 public void setJournalStructurePersistence(
635 JournalStructurePersistence journalStructurePersistence) {
636 this.journalStructurePersistence = journalStructurePersistence;
637 }
638
639
644 public JournalStructureFinder getJournalStructureFinder() {
645 return journalStructureFinder;
646 }
647
648
653 public void setJournalStructureFinder(
654 JournalStructureFinder journalStructureFinder) {
655 this.journalStructureFinder = journalStructureFinder;
656 }
657
658
663 public JournalTemplateLocalService getJournalTemplateLocalService() {
664 return journalTemplateLocalService;
665 }
666
667
672 public void setJournalTemplateLocalService(
673 JournalTemplateLocalService journalTemplateLocalService) {
674 this.journalTemplateLocalService = journalTemplateLocalService;
675 }
676
677
682 public JournalTemplateService getJournalTemplateService() {
683 return journalTemplateService;
684 }
685
686
691 public void setJournalTemplateService(
692 JournalTemplateService journalTemplateService) {
693 this.journalTemplateService = journalTemplateService;
694 }
695
696
701 public JournalTemplatePersistence getJournalTemplatePersistence() {
702 return journalTemplatePersistence;
703 }
704
705
710 public void setJournalTemplatePersistence(
711 JournalTemplatePersistence journalTemplatePersistence) {
712 this.journalTemplatePersistence = journalTemplatePersistence;
713 }
714
715
720 public JournalTemplateFinder getJournalTemplateFinder() {
721 return journalTemplateFinder;
722 }
723
724
729 public void setJournalTemplateFinder(
730 JournalTemplateFinder journalTemplateFinder) {
731 this.journalTemplateFinder = journalTemplateFinder;
732 }
733
734
739 public CounterLocalService getCounterLocalService() {
740 return counterLocalService;
741 }
742
743
748 public void setCounterLocalService(CounterLocalService counterLocalService) {
749 this.counterLocalService = counterLocalService;
750 }
751
752
757 public ResourceLocalService getResourceLocalService() {
758 return resourceLocalService;
759 }
760
761
766 public void setResourceLocalService(
767 ResourceLocalService resourceLocalService) {
768 this.resourceLocalService = resourceLocalService;
769 }
770
771
776 public ResourceService getResourceService() {
777 return resourceService;
778 }
779
780
785 public void setResourceService(ResourceService resourceService) {
786 this.resourceService = resourceService;
787 }
788
789
794 public ResourcePersistence getResourcePersistence() {
795 return resourcePersistence;
796 }
797
798
803 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
804 this.resourcePersistence = resourcePersistence;
805 }
806
807
812 public ResourceFinder getResourceFinder() {
813 return resourceFinder;
814 }
815
816
821 public void setResourceFinder(ResourceFinder resourceFinder) {
822 this.resourceFinder = resourceFinder;
823 }
824
825
830 public UserLocalService getUserLocalService() {
831 return userLocalService;
832 }
833
834
839 public void setUserLocalService(UserLocalService userLocalService) {
840 this.userLocalService = userLocalService;
841 }
842
843
848 public UserService getUserService() {
849 return userService;
850 }
851
852
857 public void setUserService(UserService userService) {
858 this.userService = userService;
859 }
860
861
866 public UserPersistence getUserPersistence() {
867 return userPersistence;
868 }
869
870
875 public void setUserPersistence(UserPersistence userPersistence) {
876 this.userPersistence = userPersistence;
877 }
878
879
884 public UserFinder getUserFinder() {
885 return userFinder;
886 }
887
888
893 public void setUserFinder(UserFinder userFinder) {
894 this.userFinder = userFinder;
895 }
896
897 public void afterPropertiesSet() {
898 persistedModelLocalServiceRegistry.register("com.liferay.portlet.journal.model.JournalArticleResource",
899 journalArticleResourceLocalService);
900 }
901
902 public void destroy() {
903 persistedModelLocalServiceRegistry.unregister(
904 "com.liferay.portlet.journal.model.JournalArticleResource");
905 }
906
907
912 public String getBeanIdentifier() {
913 return _beanIdentifier;
914 }
915
916
921 public void setBeanIdentifier(String beanIdentifier) {
922 _beanIdentifier = beanIdentifier;
923 }
924
925 protected Class<?> getModelClass() {
926 return JournalArticleResource.class;
927 }
928
929 protected String getModelClassName() {
930 return JournalArticleResource.class.getName();
931 }
932
933
938 protected void runSQL(String sql) throws SystemException {
939 try {
940 DataSource dataSource = journalArticleResourcePersistence.getDataSource();
941
942 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
943 sql, new int[0]);
944
945 sqlUpdate.update();
946 }
947 catch (Exception e) {
948 throw new SystemException(e);
949 }
950 }
951
952 @BeanReference(type = JournalArticleLocalService.class)
953 protected JournalArticleLocalService journalArticleLocalService;
954 @BeanReference(type = JournalArticleService.class)
955 protected JournalArticleService journalArticleService;
956 @BeanReference(type = JournalArticlePersistence.class)
957 protected JournalArticlePersistence journalArticlePersistence;
958 @BeanReference(type = JournalArticleFinder.class)
959 protected JournalArticleFinder journalArticleFinder;
960 @BeanReference(type = JournalArticleImageLocalService.class)
961 protected JournalArticleImageLocalService journalArticleImageLocalService;
962 @BeanReference(type = JournalArticleImagePersistence.class)
963 protected JournalArticleImagePersistence journalArticleImagePersistence;
964 @BeanReference(type = JournalArticleResourceLocalService.class)
965 protected JournalArticleResourceLocalService journalArticleResourceLocalService;
966 @BeanReference(type = JournalArticleResourcePersistence.class)
967 protected JournalArticleResourcePersistence journalArticleResourcePersistence;
968 @BeanReference(type = JournalContentSearchLocalService.class)
969 protected JournalContentSearchLocalService journalContentSearchLocalService;
970 @BeanReference(type = JournalContentSearchPersistence.class)
971 protected JournalContentSearchPersistence journalContentSearchPersistence;
972 @BeanReference(type = JournalFeedLocalService.class)
973 protected JournalFeedLocalService journalFeedLocalService;
974 @BeanReference(type = JournalFeedService.class)
975 protected JournalFeedService journalFeedService;
976 @BeanReference(type = JournalFeedPersistence.class)
977 protected JournalFeedPersistence journalFeedPersistence;
978 @BeanReference(type = JournalFeedFinder.class)
979 protected JournalFeedFinder journalFeedFinder;
980 @BeanReference(type = JournalStructureLocalService.class)
981 protected JournalStructureLocalService journalStructureLocalService;
982 @BeanReference(type = JournalStructureService.class)
983 protected JournalStructureService journalStructureService;
984 @BeanReference(type = JournalStructurePersistence.class)
985 protected JournalStructurePersistence journalStructurePersistence;
986 @BeanReference(type = JournalStructureFinder.class)
987 protected JournalStructureFinder journalStructureFinder;
988 @BeanReference(type = JournalTemplateLocalService.class)
989 protected JournalTemplateLocalService journalTemplateLocalService;
990 @BeanReference(type = JournalTemplateService.class)
991 protected JournalTemplateService journalTemplateService;
992 @BeanReference(type = JournalTemplatePersistence.class)
993 protected JournalTemplatePersistence journalTemplatePersistence;
994 @BeanReference(type = JournalTemplateFinder.class)
995 protected JournalTemplateFinder journalTemplateFinder;
996 @BeanReference(type = CounterLocalService.class)
997 protected CounterLocalService counterLocalService;
998 @BeanReference(type = ResourceLocalService.class)
999 protected ResourceLocalService resourceLocalService;
1000 @BeanReference(type = ResourceService.class)
1001 protected ResourceService resourceService;
1002 @BeanReference(type = ResourcePersistence.class)
1003 protected ResourcePersistence resourcePersistence;
1004 @BeanReference(type = ResourceFinder.class)
1005 protected ResourceFinder resourceFinder;
1006 @BeanReference(type = UserLocalService.class)
1007 protected UserLocalService userLocalService;
1008 @BeanReference(type = UserService.class)
1009 protected UserService userService;
1010 @BeanReference(type = UserPersistence.class)
1011 protected UserPersistence userPersistence;
1012 @BeanReference(type = UserFinder.class)
1013 protected UserFinder userFinder;
1014 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1015 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1016 private String _beanIdentifier;
1017 }