001
014
015 package com.liferay.portlet.asset.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.asset.model.AssetLink;
043 import com.liferay.portlet.asset.service.AssetCategoryLocalService;
044 import com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService;
045 import com.liferay.portlet.asset.service.AssetCategoryPropertyService;
046 import com.liferay.portlet.asset.service.AssetCategoryService;
047 import com.liferay.portlet.asset.service.AssetEntryLocalService;
048 import com.liferay.portlet.asset.service.AssetEntryService;
049 import com.liferay.portlet.asset.service.AssetLinkLocalService;
050 import com.liferay.portlet.asset.service.AssetTagLocalService;
051 import com.liferay.portlet.asset.service.AssetTagPropertyLocalService;
052 import com.liferay.portlet.asset.service.AssetTagPropertyService;
053 import com.liferay.portlet.asset.service.AssetTagService;
054 import com.liferay.portlet.asset.service.AssetTagStatsLocalService;
055 import com.liferay.portlet.asset.service.AssetVocabularyLocalService;
056 import com.liferay.portlet.asset.service.AssetVocabularyService;
057 import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
058 import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
059 import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyFinder;
060 import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyPersistence;
061 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
062 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
063 import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
064 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
065 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
066 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyFinder;
067 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyKeyFinder;
068 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyPersistence;
069 import com.liferay.portlet.asset.service.persistence.AssetTagStatsPersistence;
070 import com.liferay.portlet.asset.service.persistence.AssetVocabularyFinder;
071 import com.liferay.portlet.asset.service.persistence.AssetVocabularyPersistence;
072
073 import java.io.Serializable;
074
075 import java.util.List;
076
077 import javax.sql.DataSource;
078
079
091 public abstract class AssetLinkLocalServiceBaseImpl extends BaseLocalServiceImpl
092 implements AssetLinkLocalService, IdentifiableBean {
093
098
099
106 @Indexable(type = IndexableType.REINDEX)
107 public AssetLink addAssetLink(AssetLink assetLink)
108 throws SystemException {
109 assetLink.setNew(true);
110
111 return assetLinkPersistence.update(assetLink, false);
112 }
113
114
120 public AssetLink createAssetLink(long linkId) {
121 return assetLinkPersistence.create(linkId);
122 }
123
124
132 @Indexable(type = IndexableType.DELETE)
133 public AssetLink deleteAssetLink(long linkId)
134 throws PortalException, SystemException {
135 return assetLinkPersistence.remove(linkId);
136 }
137
138
145 @Indexable(type = IndexableType.DELETE)
146 public AssetLink deleteAssetLink(AssetLink assetLink)
147 throws SystemException {
148 return assetLinkPersistence.remove(assetLink);
149 }
150
151 public DynamicQuery dynamicQuery() {
152 Class<?> clazz = getClass();
153
154 return DynamicQueryFactoryUtil.forClass(AssetLink.class,
155 clazz.getClassLoader());
156 }
157
158
165 @SuppressWarnings("rawtypes")
166 public List dynamicQuery(DynamicQuery dynamicQuery)
167 throws SystemException {
168 return assetLinkPersistence.findWithDynamicQuery(dynamicQuery);
169 }
170
171
184 @SuppressWarnings("rawtypes")
185 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
186 throws SystemException {
187 return assetLinkPersistence.findWithDynamicQuery(dynamicQuery, start,
188 end);
189 }
190
191
205 @SuppressWarnings("rawtypes")
206 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
207 OrderByComparator orderByComparator) throws SystemException {
208 return assetLinkPersistence.findWithDynamicQuery(dynamicQuery, start,
209 end, orderByComparator);
210 }
211
212
219 public long dynamicQueryCount(DynamicQuery dynamicQuery)
220 throws SystemException {
221 return assetLinkPersistence.countWithDynamicQuery(dynamicQuery);
222 }
223
224 public AssetLink fetchAssetLink(long linkId) throws SystemException {
225 return assetLinkPersistence.fetchByPrimaryKey(linkId);
226 }
227
228
236 public AssetLink getAssetLink(long linkId)
237 throws PortalException, SystemException {
238 return assetLinkPersistence.findByPrimaryKey(linkId);
239 }
240
241 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
242 throws PortalException, SystemException {
243 return assetLinkPersistence.findByPrimaryKey(primaryKeyObj);
244 }
245
246
258 public List<AssetLink> getAssetLinks(int start, int end)
259 throws SystemException {
260 return assetLinkPersistence.findAll(start, end);
261 }
262
263
269 public int getAssetLinksCount() throws SystemException {
270 return assetLinkPersistence.countAll();
271 }
272
273
280 @Indexable(type = IndexableType.REINDEX)
281 public AssetLink updateAssetLink(AssetLink assetLink)
282 throws SystemException {
283 return updateAssetLink(assetLink, true);
284 }
285
286
294 @Indexable(type = IndexableType.REINDEX)
295 public AssetLink updateAssetLink(AssetLink assetLink, boolean merge)
296 throws SystemException {
297 assetLink.setNew(false);
298
299 return assetLinkPersistence.update(assetLink, merge);
300 }
301
302
307 public AssetCategoryLocalService getAssetCategoryLocalService() {
308 return assetCategoryLocalService;
309 }
310
311
316 public void setAssetCategoryLocalService(
317 AssetCategoryLocalService assetCategoryLocalService) {
318 this.assetCategoryLocalService = assetCategoryLocalService;
319 }
320
321
326 public AssetCategoryService getAssetCategoryService() {
327 return assetCategoryService;
328 }
329
330
335 public void setAssetCategoryService(
336 AssetCategoryService assetCategoryService) {
337 this.assetCategoryService = assetCategoryService;
338 }
339
340
345 public AssetCategoryPersistence getAssetCategoryPersistence() {
346 return assetCategoryPersistence;
347 }
348
349
354 public void setAssetCategoryPersistence(
355 AssetCategoryPersistence assetCategoryPersistence) {
356 this.assetCategoryPersistence = assetCategoryPersistence;
357 }
358
359
364 public AssetCategoryFinder getAssetCategoryFinder() {
365 return assetCategoryFinder;
366 }
367
368
373 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
374 this.assetCategoryFinder = assetCategoryFinder;
375 }
376
377
382 public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
383 return assetCategoryPropertyLocalService;
384 }
385
386
391 public void setAssetCategoryPropertyLocalService(
392 AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
393 this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
394 }
395
396
401 public AssetCategoryPropertyService getAssetCategoryPropertyService() {
402 return assetCategoryPropertyService;
403 }
404
405
410 public void setAssetCategoryPropertyService(
411 AssetCategoryPropertyService assetCategoryPropertyService) {
412 this.assetCategoryPropertyService = assetCategoryPropertyService;
413 }
414
415
420 public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
421 return assetCategoryPropertyPersistence;
422 }
423
424
429 public void setAssetCategoryPropertyPersistence(
430 AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
431 this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
432 }
433
434
439 public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
440 return assetCategoryPropertyFinder;
441 }
442
443
448 public void setAssetCategoryPropertyFinder(
449 AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
450 this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
451 }
452
453
458 public AssetEntryLocalService getAssetEntryLocalService() {
459 return assetEntryLocalService;
460 }
461
462
467 public void setAssetEntryLocalService(
468 AssetEntryLocalService assetEntryLocalService) {
469 this.assetEntryLocalService = assetEntryLocalService;
470 }
471
472
477 public AssetEntryService getAssetEntryService() {
478 return assetEntryService;
479 }
480
481
486 public void setAssetEntryService(AssetEntryService assetEntryService) {
487 this.assetEntryService = assetEntryService;
488 }
489
490
495 public AssetEntryPersistence getAssetEntryPersistence() {
496 return assetEntryPersistence;
497 }
498
499
504 public void setAssetEntryPersistence(
505 AssetEntryPersistence assetEntryPersistence) {
506 this.assetEntryPersistence = assetEntryPersistence;
507 }
508
509
514 public AssetEntryFinder getAssetEntryFinder() {
515 return assetEntryFinder;
516 }
517
518
523 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
524 this.assetEntryFinder = assetEntryFinder;
525 }
526
527
532 public AssetLinkLocalService getAssetLinkLocalService() {
533 return assetLinkLocalService;
534 }
535
536
541 public void setAssetLinkLocalService(
542 AssetLinkLocalService assetLinkLocalService) {
543 this.assetLinkLocalService = assetLinkLocalService;
544 }
545
546
551 public AssetLinkPersistence getAssetLinkPersistence() {
552 return assetLinkPersistence;
553 }
554
555
560 public void setAssetLinkPersistence(
561 AssetLinkPersistence assetLinkPersistence) {
562 this.assetLinkPersistence = assetLinkPersistence;
563 }
564
565
570 public AssetTagLocalService getAssetTagLocalService() {
571 return assetTagLocalService;
572 }
573
574
579 public void setAssetTagLocalService(
580 AssetTagLocalService assetTagLocalService) {
581 this.assetTagLocalService = assetTagLocalService;
582 }
583
584
589 public AssetTagService getAssetTagService() {
590 return assetTagService;
591 }
592
593
598 public void setAssetTagService(AssetTagService assetTagService) {
599 this.assetTagService = assetTagService;
600 }
601
602
607 public AssetTagPersistence getAssetTagPersistence() {
608 return assetTagPersistence;
609 }
610
611
616 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
617 this.assetTagPersistence = assetTagPersistence;
618 }
619
620
625 public AssetTagFinder getAssetTagFinder() {
626 return assetTagFinder;
627 }
628
629
634 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
635 this.assetTagFinder = assetTagFinder;
636 }
637
638
643 public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
644 return assetTagPropertyLocalService;
645 }
646
647
652 public void setAssetTagPropertyLocalService(
653 AssetTagPropertyLocalService assetTagPropertyLocalService) {
654 this.assetTagPropertyLocalService = assetTagPropertyLocalService;
655 }
656
657
662 public AssetTagPropertyService getAssetTagPropertyService() {
663 return assetTagPropertyService;
664 }
665
666
671 public void setAssetTagPropertyService(
672 AssetTagPropertyService assetTagPropertyService) {
673 this.assetTagPropertyService = assetTagPropertyService;
674 }
675
676
681 public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
682 return assetTagPropertyPersistence;
683 }
684
685
690 public void setAssetTagPropertyPersistence(
691 AssetTagPropertyPersistence assetTagPropertyPersistence) {
692 this.assetTagPropertyPersistence = assetTagPropertyPersistence;
693 }
694
695
700 public AssetTagPropertyFinder getAssetTagPropertyFinder() {
701 return assetTagPropertyFinder;
702 }
703
704
709 public void setAssetTagPropertyFinder(
710 AssetTagPropertyFinder assetTagPropertyFinder) {
711 this.assetTagPropertyFinder = assetTagPropertyFinder;
712 }
713
714
719 public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
720 return assetTagPropertyKeyFinder;
721 }
722
723
728 public void setAssetTagPropertyKeyFinder(
729 AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
730 this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
731 }
732
733
738 public AssetTagStatsLocalService getAssetTagStatsLocalService() {
739 return assetTagStatsLocalService;
740 }
741
742
747 public void setAssetTagStatsLocalService(
748 AssetTagStatsLocalService assetTagStatsLocalService) {
749 this.assetTagStatsLocalService = assetTagStatsLocalService;
750 }
751
752
757 public AssetTagStatsPersistence getAssetTagStatsPersistence() {
758 return assetTagStatsPersistence;
759 }
760
761
766 public void setAssetTagStatsPersistence(
767 AssetTagStatsPersistence assetTagStatsPersistence) {
768 this.assetTagStatsPersistence = assetTagStatsPersistence;
769 }
770
771
776 public AssetVocabularyLocalService getAssetVocabularyLocalService() {
777 return assetVocabularyLocalService;
778 }
779
780
785 public void setAssetVocabularyLocalService(
786 AssetVocabularyLocalService assetVocabularyLocalService) {
787 this.assetVocabularyLocalService = assetVocabularyLocalService;
788 }
789
790
795 public AssetVocabularyService getAssetVocabularyService() {
796 return assetVocabularyService;
797 }
798
799
804 public void setAssetVocabularyService(
805 AssetVocabularyService assetVocabularyService) {
806 this.assetVocabularyService = assetVocabularyService;
807 }
808
809
814 public AssetVocabularyPersistence getAssetVocabularyPersistence() {
815 return assetVocabularyPersistence;
816 }
817
818
823 public void setAssetVocabularyPersistence(
824 AssetVocabularyPersistence assetVocabularyPersistence) {
825 this.assetVocabularyPersistence = assetVocabularyPersistence;
826 }
827
828
833 public AssetVocabularyFinder getAssetVocabularyFinder() {
834 return assetVocabularyFinder;
835 }
836
837
842 public void setAssetVocabularyFinder(
843 AssetVocabularyFinder assetVocabularyFinder) {
844 this.assetVocabularyFinder = assetVocabularyFinder;
845 }
846
847
852 public CounterLocalService getCounterLocalService() {
853 return counterLocalService;
854 }
855
856
861 public void setCounterLocalService(CounterLocalService counterLocalService) {
862 this.counterLocalService = counterLocalService;
863 }
864
865
870 public ResourceLocalService getResourceLocalService() {
871 return resourceLocalService;
872 }
873
874
879 public void setResourceLocalService(
880 ResourceLocalService resourceLocalService) {
881 this.resourceLocalService = resourceLocalService;
882 }
883
884
889 public ResourceService getResourceService() {
890 return resourceService;
891 }
892
893
898 public void setResourceService(ResourceService resourceService) {
899 this.resourceService = resourceService;
900 }
901
902
907 public ResourcePersistence getResourcePersistence() {
908 return resourcePersistence;
909 }
910
911
916 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
917 this.resourcePersistence = resourcePersistence;
918 }
919
920
925 public ResourceFinder getResourceFinder() {
926 return resourceFinder;
927 }
928
929
934 public void setResourceFinder(ResourceFinder resourceFinder) {
935 this.resourceFinder = resourceFinder;
936 }
937
938
943 public UserLocalService getUserLocalService() {
944 return userLocalService;
945 }
946
947
952 public void setUserLocalService(UserLocalService userLocalService) {
953 this.userLocalService = userLocalService;
954 }
955
956
961 public UserService getUserService() {
962 return userService;
963 }
964
965
970 public void setUserService(UserService userService) {
971 this.userService = userService;
972 }
973
974
979 public UserPersistence getUserPersistence() {
980 return userPersistence;
981 }
982
983
988 public void setUserPersistence(UserPersistence userPersistence) {
989 this.userPersistence = userPersistence;
990 }
991
992
997 public UserFinder getUserFinder() {
998 return userFinder;
999 }
1000
1001
1006 public void setUserFinder(UserFinder userFinder) {
1007 this.userFinder = userFinder;
1008 }
1009
1010 public void afterPropertiesSet() {
1011 persistedModelLocalServiceRegistry.register("com.liferay.portlet.asset.model.AssetLink",
1012 assetLinkLocalService);
1013 }
1014
1015 public void destroy() {
1016 persistedModelLocalServiceRegistry.unregister(
1017 "com.liferay.portlet.asset.model.AssetLink");
1018 }
1019
1020
1025 public String getBeanIdentifier() {
1026 return _beanIdentifier;
1027 }
1028
1029
1034 public void setBeanIdentifier(String beanIdentifier) {
1035 _beanIdentifier = beanIdentifier;
1036 }
1037
1038 protected Class<?> getModelClass() {
1039 return AssetLink.class;
1040 }
1041
1042 protected String getModelClassName() {
1043 return AssetLink.class.getName();
1044 }
1045
1046
1051 protected void runSQL(String sql) throws SystemException {
1052 try {
1053 DataSource dataSource = assetLinkPersistence.getDataSource();
1054
1055 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1056 sql, new int[0]);
1057
1058 sqlUpdate.update();
1059 }
1060 catch (Exception e) {
1061 throw new SystemException(e);
1062 }
1063 }
1064
1065 @BeanReference(type = AssetCategoryLocalService.class)
1066 protected AssetCategoryLocalService assetCategoryLocalService;
1067 @BeanReference(type = AssetCategoryService.class)
1068 protected AssetCategoryService assetCategoryService;
1069 @BeanReference(type = AssetCategoryPersistence.class)
1070 protected AssetCategoryPersistence assetCategoryPersistence;
1071 @BeanReference(type = AssetCategoryFinder.class)
1072 protected AssetCategoryFinder assetCategoryFinder;
1073 @BeanReference(type = AssetCategoryPropertyLocalService.class)
1074 protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
1075 @BeanReference(type = AssetCategoryPropertyService.class)
1076 protected AssetCategoryPropertyService assetCategoryPropertyService;
1077 @BeanReference(type = AssetCategoryPropertyPersistence.class)
1078 protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
1079 @BeanReference(type = AssetCategoryPropertyFinder.class)
1080 protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
1081 @BeanReference(type = AssetEntryLocalService.class)
1082 protected AssetEntryLocalService assetEntryLocalService;
1083 @BeanReference(type = AssetEntryService.class)
1084 protected AssetEntryService assetEntryService;
1085 @BeanReference(type = AssetEntryPersistence.class)
1086 protected AssetEntryPersistence assetEntryPersistence;
1087 @BeanReference(type = AssetEntryFinder.class)
1088 protected AssetEntryFinder assetEntryFinder;
1089 @BeanReference(type = AssetLinkLocalService.class)
1090 protected AssetLinkLocalService assetLinkLocalService;
1091 @BeanReference(type = AssetLinkPersistence.class)
1092 protected AssetLinkPersistence assetLinkPersistence;
1093 @BeanReference(type = AssetTagLocalService.class)
1094 protected AssetTagLocalService assetTagLocalService;
1095 @BeanReference(type = AssetTagService.class)
1096 protected AssetTagService assetTagService;
1097 @BeanReference(type = AssetTagPersistence.class)
1098 protected AssetTagPersistence assetTagPersistence;
1099 @BeanReference(type = AssetTagFinder.class)
1100 protected AssetTagFinder assetTagFinder;
1101 @BeanReference(type = AssetTagPropertyLocalService.class)
1102 protected AssetTagPropertyLocalService assetTagPropertyLocalService;
1103 @BeanReference(type = AssetTagPropertyService.class)
1104 protected AssetTagPropertyService assetTagPropertyService;
1105 @BeanReference(type = AssetTagPropertyPersistence.class)
1106 protected AssetTagPropertyPersistence assetTagPropertyPersistence;
1107 @BeanReference(type = AssetTagPropertyFinder.class)
1108 protected AssetTagPropertyFinder assetTagPropertyFinder;
1109 @BeanReference(type = AssetTagPropertyKeyFinder.class)
1110 protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
1111 @BeanReference(type = AssetTagStatsLocalService.class)
1112 protected AssetTagStatsLocalService assetTagStatsLocalService;
1113 @BeanReference(type = AssetTagStatsPersistence.class)
1114 protected AssetTagStatsPersistence assetTagStatsPersistence;
1115 @BeanReference(type = AssetVocabularyLocalService.class)
1116 protected AssetVocabularyLocalService assetVocabularyLocalService;
1117 @BeanReference(type = AssetVocabularyService.class)
1118 protected AssetVocabularyService assetVocabularyService;
1119 @BeanReference(type = AssetVocabularyPersistence.class)
1120 protected AssetVocabularyPersistence assetVocabularyPersistence;
1121 @BeanReference(type = AssetVocabularyFinder.class)
1122 protected AssetVocabularyFinder assetVocabularyFinder;
1123 @BeanReference(type = CounterLocalService.class)
1124 protected CounterLocalService counterLocalService;
1125 @BeanReference(type = ResourceLocalService.class)
1126 protected ResourceLocalService resourceLocalService;
1127 @BeanReference(type = ResourceService.class)
1128 protected ResourceService resourceService;
1129 @BeanReference(type = ResourcePersistence.class)
1130 protected ResourcePersistence resourcePersistence;
1131 @BeanReference(type = ResourceFinder.class)
1132 protected ResourceFinder resourceFinder;
1133 @BeanReference(type = UserLocalService.class)
1134 protected UserLocalService userLocalService;
1135 @BeanReference(type = UserService.class)
1136 protected UserService userService;
1137 @BeanReference(type = UserPersistence.class)
1138 protected UserPersistence userPersistence;
1139 @BeanReference(type = UserFinder.class)
1140 protected UserFinder userFinder;
1141 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1142 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1143 private String _beanIdentifier;
1144 }