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.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.GroupLocalService;
027 import com.liferay.portal.service.GroupService;
028 import com.liferay.portal.service.ResourceLocalService;
029 import com.liferay.portal.service.ResourceService;
030 import com.liferay.portal.service.UserLocalService;
031 import com.liferay.portal.service.UserService;
032 import com.liferay.portal.service.persistence.GroupFinder;
033 import com.liferay.portal.service.persistence.GroupPersistence;
034 import com.liferay.portal.service.persistence.ResourceFinder;
035 import com.liferay.portal.service.persistence.ResourcePersistence;
036 import com.liferay.portal.service.persistence.UserFinder;
037 import com.liferay.portal.service.persistence.UserPersistence;
038
039 import com.liferay.portlet.asset.model.AssetVocabulary;
040 import com.liferay.portlet.asset.service.AssetCategoryLocalService;
041 import com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService;
042 import com.liferay.portlet.asset.service.AssetCategoryPropertyService;
043 import com.liferay.portlet.asset.service.AssetCategoryService;
044 import com.liferay.portlet.asset.service.AssetEntryLocalService;
045 import com.liferay.portlet.asset.service.AssetEntryService;
046 import com.liferay.portlet.asset.service.AssetLinkLocalService;
047 import com.liferay.portlet.asset.service.AssetTagLocalService;
048 import com.liferay.portlet.asset.service.AssetTagPropertyLocalService;
049 import com.liferay.portlet.asset.service.AssetTagPropertyService;
050 import com.liferay.portlet.asset.service.AssetTagService;
051 import com.liferay.portlet.asset.service.AssetTagStatsLocalService;
052 import com.liferay.portlet.asset.service.AssetVocabularyLocalService;
053 import com.liferay.portlet.asset.service.AssetVocabularyService;
054 import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
055 import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
056 import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyFinder;
057 import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyPersistence;
058 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
059 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
060 import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
061 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
062 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
063 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyFinder;
064 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyKeyFinder;
065 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyPersistence;
066 import com.liferay.portlet.asset.service.persistence.AssetTagStatsPersistence;
067 import com.liferay.portlet.asset.service.persistence.AssetVocabularyPersistence;
068
069 import java.util.List;
070
071 import javax.sql.DataSource;
072
073
089 public abstract class AssetVocabularyLocalServiceBaseImpl
090 implements AssetVocabularyLocalService {
091
098 public AssetVocabulary addAssetVocabulary(AssetVocabulary assetVocabulary)
099 throws SystemException {
100 assetVocabulary.setNew(true);
101
102 return assetVocabularyPersistence.update(assetVocabulary, false);
103 }
104
105
111 public AssetVocabulary createAssetVocabulary(long vocabularyId) {
112 return assetVocabularyPersistence.create(vocabularyId);
113 }
114
115
122 public void deleteAssetVocabulary(long vocabularyId)
123 throws PortalException, SystemException {
124 assetVocabularyPersistence.remove(vocabularyId);
125 }
126
127
133 public void deleteAssetVocabulary(AssetVocabulary assetVocabulary)
134 throws SystemException {
135 assetVocabularyPersistence.remove(assetVocabulary);
136 }
137
138
145 @SuppressWarnings("rawtypes")
146 public List dynamicQuery(DynamicQuery dynamicQuery)
147 throws SystemException {
148 return assetVocabularyPersistence.findWithDynamicQuery(dynamicQuery);
149 }
150
151
164 @SuppressWarnings("rawtypes")
165 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
166 throws SystemException {
167 return assetVocabularyPersistence.findWithDynamicQuery(dynamicQuery,
168 start, end);
169 }
170
171
185 @SuppressWarnings("rawtypes")
186 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
187 OrderByComparator orderByComparator) throws SystemException {
188 return assetVocabularyPersistence.findWithDynamicQuery(dynamicQuery,
189 start, end, orderByComparator);
190 }
191
192
199 public long dynamicQueryCount(DynamicQuery dynamicQuery)
200 throws SystemException {
201 return assetVocabularyPersistence.countWithDynamicQuery(dynamicQuery);
202 }
203
204
212 public AssetVocabulary getAssetVocabulary(long vocabularyId)
213 throws PortalException, SystemException {
214 return assetVocabularyPersistence.findByPrimaryKey(vocabularyId);
215 }
216
217
226 public AssetVocabulary getAssetVocabularyByUuidAndGroupId(String uuid,
227 long groupId) throws PortalException, SystemException {
228 return assetVocabularyPersistence.findByUUID_G(uuid, groupId);
229 }
230
231
243 public List<AssetVocabulary> getAssetVocabularies(int start, int end)
244 throws SystemException {
245 return assetVocabularyPersistence.findAll(start, end);
246 }
247
248
254 public int getAssetVocabulariesCount() throws SystemException {
255 return assetVocabularyPersistence.countAll();
256 }
257
258
265 public AssetVocabulary updateAssetVocabulary(
266 AssetVocabulary assetVocabulary) throws SystemException {
267 assetVocabulary.setNew(false);
268
269 return assetVocabularyPersistence.update(assetVocabulary, true);
270 }
271
272
280 public AssetVocabulary updateAssetVocabulary(
281 AssetVocabulary assetVocabulary, boolean merge)
282 throws SystemException {
283 assetVocabulary.setNew(false);
284
285 return assetVocabularyPersistence.update(assetVocabulary, merge);
286 }
287
288
293 public AssetCategoryLocalService getAssetCategoryLocalService() {
294 return assetCategoryLocalService;
295 }
296
297
302 public void setAssetCategoryLocalService(
303 AssetCategoryLocalService assetCategoryLocalService) {
304 this.assetCategoryLocalService = assetCategoryLocalService;
305 }
306
307
312 public AssetCategoryService getAssetCategoryService() {
313 return assetCategoryService;
314 }
315
316
321 public void setAssetCategoryService(
322 AssetCategoryService assetCategoryService) {
323 this.assetCategoryService = assetCategoryService;
324 }
325
326
331 public AssetCategoryPersistence getAssetCategoryPersistence() {
332 return assetCategoryPersistence;
333 }
334
335
340 public void setAssetCategoryPersistence(
341 AssetCategoryPersistence assetCategoryPersistence) {
342 this.assetCategoryPersistence = assetCategoryPersistence;
343 }
344
345
350 public AssetCategoryFinder getAssetCategoryFinder() {
351 return assetCategoryFinder;
352 }
353
354
359 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
360 this.assetCategoryFinder = assetCategoryFinder;
361 }
362
363
368 public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
369 return assetCategoryPropertyLocalService;
370 }
371
372
377 public void setAssetCategoryPropertyLocalService(
378 AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
379 this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
380 }
381
382
387 public AssetCategoryPropertyService getAssetCategoryPropertyService() {
388 return assetCategoryPropertyService;
389 }
390
391
396 public void setAssetCategoryPropertyService(
397 AssetCategoryPropertyService assetCategoryPropertyService) {
398 this.assetCategoryPropertyService = assetCategoryPropertyService;
399 }
400
401
406 public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
407 return assetCategoryPropertyPersistence;
408 }
409
410
415 public void setAssetCategoryPropertyPersistence(
416 AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
417 this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
418 }
419
420
425 public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
426 return assetCategoryPropertyFinder;
427 }
428
429
434 public void setAssetCategoryPropertyFinder(
435 AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
436 this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
437 }
438
439
444 public AssetEntryLocalService getAssetEntryLocalService() {
445 return assetEntryLocalService;
446 }
447
448
453 public void setAssetEntryLocalService(
454 AssetEntryLocalService assetEntryLocalService) {
455 this.assetEntryLocalService = assetEntryLocalService;
456 }
457
458
463 public AssetEntryService getAssetEntryService() {
464 return assetEntryService;
465 }
466
467
472 public void setAssetEntryService(AssetEntryService assetEntryService) {
473 this.assetEntryService = assetEntryService;
474 }
475
476
481 public AssetEntryPersistence getAssetEntryPersistence() {
482 return assetEntryPersistence;
483 }
484
485
490 public void setAssetEntryPersistence(
491 AssetEntryPersistence assetEntryPersistence) {
492 this.assetEntryPersistence = assetEntryPersistence;
493 }
494
495
500 public AssetEntryFinder getAssetEntryFinder() {
501 return assetEntryFinder;
502 }
503
504
509 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
510 this.assetEntryFinder = assetEntryFinder;
511 }
512
513
518 public AssetLinkLocalService getAssetLinkLocalService() {
519 return assetLinkLocalService;
520 }
521
522
527 public void setAssetLinkLocalService(
528 AssetLinkLocalService assetLinkLocalService) {
529 this.assetLinkLocalService = assetLinkLocalService;
530 }
531
532
537 public AssetLinkPersistence getAssetLinkPersistence() {
538 return assetLinkPersistence;
539 }
540
541
546 public void setAssetLinkPersistence(
547 AssetLinkPersistence assetLinkPersistence) {
548 this.assetLinkPersistence = assetLinkPersistence;
549 }
550
551
556 public AssetTagLocalService getAssetTagLocalService() {
557 return assetTagLocalService;
558 }
559
560
565 public void setAssetTagLocalService(
566 AssetTagLocalService assetTagLocalService) {
567 this.assetTagLocalService = assetTagLocalService;
568 }
569
570
575 public AssetTagService getAssetTagService() {
576 return assetTagService;
577 }
578
579
584 public void setAssetTagService(AssetTagService assetTagService) {
585 this.assetTagService = assetTagService;
586 }
587
588
593 public AssetTagPersistence getAssetTagPersistence() {
594 return assetTagPersistence;
595 }
596
597
602 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
603 this.assetTagPersistence = assetTagPersistence;
604 }
605
606
611 public AssetTagFinder getAssetTagFinder() {
612 return assetTagFinder;
613 }
614
615
620 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
621 this.assetTagFinder = assetTagFinder;
622 }
623
624
629 public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
630 return assetTagPropertyLocalService;
631 }
632
633
638 public void setAssetTagPropertyLocalService(
639 AssetTagPropertyLocalService assetTagPropertyLocalService) {
640 this.assetTagPropertyLocalService = assetTagPropertyLocalService;
641 }
642
643
648 public AssetTagPropertyService getAssetTagPropertyService() {
649 return assetTagPropertyService;
650 }
651
652
657 public void setAssetTagPropertyService(
658 AssetTagPropertyService assetTagPropertyService) {
659 this.assetTagPropertyService = assetTagPropertyService;
660 }
661
662
667 public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
668 return assetTagPropertyPersistence;
669 }
670
671
676 public void setAssetTagPropertyPersistence(
677 AssetTagPropertyPersistence assetTagPropertyPersistence) {
678 this.assetTagPropertyPersistence = assetTagPropertyPersistence;
679 }
680
681
686 public AssetTagPropertyFinder getAssetTagPropertyFinder() {
687 return assetTagPropertyFinder;
688 }
689
690
695 public void setAssetTagPropertyFinder(
696 AssetTagPropertyFinder assetTagPropertyFinder) {
697 this.assetTagPropertyFinder = assetTagPropertyFinder;
698 }
699
700
705 public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
706 return assetTagPropertyKeyFinder;
707 }
708
709
714 public void setAssetTagPropertyKeyFinder(
715 AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
716 this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
717 }
718
719
724 public AssetTagStatsLocalService getAssetTagStatsLocalService() {
725 return assetTagStatsLocalService;
726 }
727
728
733 public void setAssetTagStatsLocalService(
734 AssetTagStatsLocalService assetTagStatsLocalService) {
735 this.assetTagStatsLocalService = assetTagStatsLocalService;
736 }
737
738
743 public AssetTagStatsPersistence getAssetTagStatsPersistence() {
744 return assetTagStatsPersistence;
745 }
746
747
752 public void setAssetTagStatsPersistence(
753 AssetTagStatsPersistence assetTagStatsPersistence) {
754 this.assetTagStatsPersistence = assetTagStatsPersistence;
755 }
756
757
762 public AssetVocabularyLocalService getAssetVocabularyLocalService() {
763 return assetVocabularyLocalService;
764 }
765
766
771 public void setAssetVocabularyLocalService(
772 AssetVocabularyLocalService assetVocabularyLocalService) {
773 this.assetVocabularyLocalService = assetVocabularyLocalService;
774 }
775
776
781 public AssetVocabularyService getAssetVocabularyService() {
782 return assetVocabularyService;
783 }
784
785
790 public void setAssetVocabularyService(
791 AssetVocabularyService assetVocabularyService) {
792 this.assetVocabularyService = assetVocabularyService;
793 }
794
795
800 public AssetVocabularyPersistence getAssetVocabularyPersistence() {
801 return assetVocabularyPersistence;
802 }
803
804
809 public void setAssetVocabularyPersistence(
810 AssetVocabularyPersistence assetVocabularyPersistence) {
811 this.assetVocabularyPersistence = assetVocabularyPersistence;
812 }
813
814
819 public CounterLocalService getCounterLocalService() {
820 return counterLocalService;
821 }
822
823
828 public void setCounterLocalService(CounterLocalService counterLocalService) {
829 this.counterLocalService = counterLocalService;
830 }
831
832
837 public GroupLocalService getGroupLocalService() {
838 return groupLocalService;
839 }
840
841
846 public void setGroupLocalService(GroupLocalService groupLocalService) {
847 this.groupLocalService = groupLocalService;
848 }
849
850
855 public GroupService getGroupService() {
856 return groupService;
857 }
858
859
864 public void setGroupService(GroupService groupService) {
865 this.groupService = groupService;
866 }
867
868
873 public GroupPersistence getGroupPersistence() {
874 return groupPersistence;
875 }
876
877
882 public void setGroupPersistence(GroupPersistence groupPersistence) {
883 this.groupPersistence = groupPersistence;
884 }
885
886
891 public GroupFinder getGroupFinder() {
892 return groupFinder;
893 }
894
895
900 public void setGroupFinder(GroupFinder groupFinder) {
901 this.groupFinder = groupFinder;
902 }
903
904
909 public ResourceLocalService getResourceLocalService() {
910 return resourceLocalService;
911 }
912
913
918 public void setResourceLocalService(
919 ResourceLocalService resourceLocalService) {
920 this.resourceLocalService = resourceLocalService;
921 }
922
923
928 public ResourceService getResourceService() {
929 return resourceService;
930 }
931
932
937 public void setResourceService(ResourceService resourceService) {
938 this.resourceService = resourceService;
939 }
940
941
946 public ResourcePersistence getResourcePersistence() {
947 return resourcePersistence;
948 }
949
950
955 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
956 this.resourcePersistence = resourcePersistence;
957 }
958
959
964 public ResourceFinder getResourceFinder() {
965 return resourceFinder;
966 }
967
968
973 public void setResourceFinder(ResourceFinder resourceFinder) {
974 this.resourceFinder = resourceFinder;
975 }
976
977
982 public UserLocalService getUserLocalService() {
983 return userLocalService;
984 }
985
986
991 public void setUserLocalService(UserLocalService userLocalService) {
992 this.userLocalService = userLocalService;
993 }
994
995
1000 public UserService getUserService() {
1001 return userService;
1002 }
1003
1004
1009 public void setUserService(UserService userService) {
1010 this.userService = userService;
1011 }
1012
1013
1018 public UserPersistence getUserPersistence() {
1019 return userPersistence;
1020 }
1021
1022
1027 public void setUserPersistence(UserPersistence userPersistence) {
1028 this.userPersistence = userPersistence;
1029 }
1030
1031
1036 public UserFinder getUserFinder() {
1037 return userFinder;
1038 }
1039
1040
1045 public void setUserFinder(UserFinder userFinder) {
1046 this.userFinder = userFinder;
1047 }
1048
1049
1054 protected void runSQL(String sql) throws SystemException {
1055 try {
1056 DataSource dataSource = assetVocabularyPersistence.getDataSource();
1057
1058 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1059 sql, new int[0]);
1060
1061 sqlUpdate.update();
1062 }
1063 catch (Exception e) {
1064 throw new SystemException(e);
1065 }
1066 }
1067
1068 @BeanReference(type = AssetCategoryLocalService.class)
1069 protected AssetCategoryLocalService assetCategoryLocalService;
1070 @BeanReference(type = AssetCategoryService.class)
1071 protected AssetCategoryService assetCategoryService;
1072 @BeanReference(type = AssetCategoryPersistence.class)
1073 protected AssetCategoryPersistence assetCategoryPersistence;
1074 @BeanReference(type = AssetCategoryFinder.class)
1075 protected AssetCategoryFinder assetCategoryFinder;
1076 @BeanReference(type = AssetCategoryPropertyLocalService.class)
1077 protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
1078 @BeanReference(type = AssetCategoryPropertyService.class)
1079 protected AssetCategoryPropertyService assetCategoryPropertyService;
1080 @BeanReference(type = AssetCategoryPropertyPersistence.class)
1081 protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
1082 @BeanReference(type = AssetCategoryPropertyFinder.class)
1083 protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
1084 @BeanReference(type = AssetEntryLocalService.class)
1085 protected AssetEntryLocalService assetEntryLocalService;
1086 @BeanReference(type = AssetEntryService.class)
1087 protected AssetEntryService assetEntryService;
1088 @BeanReference(type = AssetEntryPersistence.class)
1089 protected AssetEntryPersistence assetEntryPersistence;
1090 @BeanReference(type = AssetEntryFinder.class)
1091 protected AssetEntryFinder assetEntryFinder;
1092 @BeanReference(type = AssetLinkLocalService.class)
1093 protected AssetLinkLocalService assetLinkLocalService;
1094 @BeanReference(type = AssetLinkPersistence.class)
1095 protected AssetLinkPersistence assetLinkPersistence;
1096 @BeanReference(type = AssetTagLocalService.class)
1097 protected AssetTagLocalService assetTagLocalService;
1098 @BeanReference(type = AssetTagService.class)
1099 protected AssetTagService assetTagService;
1100 @BeanReference(type = AssetTagPersistence.class)
1101 protected AssetTagPersistence assetTagPersistence;
1102 @BeanReference(type = AssetTagFinder.class)
1103 protected AssetTagFinder assetTagFinder;
1104 @BeanReference(type = AssetTagPropertyLocalService.class)
1105 protected AssetTagPropertyLocalService assetTagPropertyLocalService;
1106 @BeanReference(type = AssetTagPropertyService.class)
1107 protected AssetTagPropertyService assetTagPropertyService;
1108 @BeanReference(type = AssetTagPropertyPersistence.class)
1109 protected AssetTagPropertyPersistence assetTagPropertyPersistence;
1110 @BeanReference(type = AssetTagPropertyFinder.class)
1111 protected AssetTagPropertyFinder assetTagPropertyFinder;
1112 @BeanReference(type = AssetTagPropertyKeyFinder.class)
1113 protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
1114 @BeanReference(type = AssetTagStatsLocalService.class)
1115 protected AssetTagStatsLocalService assetTagStatsLocalService;
1116 @BeanReference(type = AssetTagStatsPersistence.class)
1117 protected AssetTagStatsPersistence assetTagStatsPersistence;
1118 @BeanReference(type = AssetVocabularyLocalService.class)
1119 protected AssetVocabularyLocalService assetVocabularyLocalService;
1120 @BeanReference(type = AssetVocabularyService.class)
1121 protected AssetVocabularyService assetVocabularyService;
1122 @BeanReference(type = AssetVocabularyPersistence.class)
1123 protected AssetVocabularyPersistence assetVocabularyPersistence;
1124 @BeanReference(type = CounterLocalService.class)
1125 protected CounterLocalService counterLocalService;
1126 @BeanReference(type = GroupLocalService.class)
1127 protected GroupLocalService groupLocalService;
1128 @BeanReference(type = GroupService.class)
1129 protected GroupService groupService;
1130 @BeanReference(type = GroupPersistence.class)
1131 protected GroupPersistence groupPersistence;
1132 @BeanReference(type = GroupFinder.class)
1133 protected GroupFinder groupFinder;
1134 @BeanReference(type = ResourceLocalService.class)
1135 protected ResourceLocalService resourceLocalService;
1136 @BeanReference(type = ResourceService.class)
1137 protected ResourceService resourceService;
1138 @BeanReference(type = ResourcePersistence.class)
1139 protected ResourcePersistence resourcePersistence;
1140 @BeanReference(type = ResourceFinder.class)
1141 protected ResourceFinder resourceFinder;
1142 @BeanReference(type = UserLocalService.class)
1143 protected UserLocalService userLocalService;
1144 @BeanReference(type = UserService.class)
1145 protected UserService userService;
1146 @BeanReference(type = UserPersistence.class)
1147 protected UserPersistence userPersistence;
1148 @BeanReference(type = UserFinder.class)
1149 protected UserFinder userFinder;
1150 }