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.AssetTag;
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 AssetTagLocalServiceBaseImpl extends BaseLocalServiceImpl
092 implements AssetTagLocalService, IdentifiableBean {
093
098
099
106 @Indexable(type = IndexableType.REINDEX)
107 public AssetTag addAssetTag(AssetTag assetTag) throws SystemException {
108 assetTag.setNew(true);
109
110 return assetTagPersistence.update(assetTag, false);
111 }
112
113
119 public AssetTag createAssetTag(long tagId) {
120 return assetTagPersistence.create(tagId);
121 }
122
123
131 @Indexable(type = IndexableType.DELETE)
132 public AssetTag deleteAssetTag(long tagId)
133 throws PortalException, SystemException {
134 return assetTagPersistence.remove(tagId);
135 }
136
137
144 @Indexable(type = IndexableType.DELETE)
145 public AssetTag deleteAssetTag(AssetTag assetTag) throws SystemException {
146 return assetTagPersistence.remove(assetTag);
147 }
148
149 public DynamicQuery dynamicQuery() {
150 Class<?> clazz = getClass();
151
152 return DynamicQueryFactoryUtil.forClass(AssetTag.class,
153 clazz.getClassLoader());
154 }
155
156
163 @SuppressWarnings("rawtypes")
164 public List dynamicQuery(DynamicQuery dynamicQuery)
165 throws SystemException {
166 return assetTagPersistence.findWithDynamicQuery(dynamicQuery);
167 }
168
169
182 @SuppressWarnings("rawtypes")
183 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
184 throws SystemException {
185 return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start, end);
186 }
187
188
202 @SuppressWarnings("rawtypes")
203 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
204 OrderByComparator orderByComparator) throws SystemException {
205 return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start,
206 end, orderByComparator);
207 }
208
209
216 public long dynamicQueryCount(DynamicQuery dynamicQuery)
217 throws SystemException {
218 return assetTagPersistence.countWithDynamicQuery(dynamicQuery);
219 }
220
221 public AssetTag fetchAssetTag(long tagId) throws SystemException {
222 return assetTagPersistence.fetchByPrimaryKey(tagId);
223 }
224
225
233 public AssetTag getAssetTag(long tagId)
234 throws PortalException, SystemException {
235 return assetTagPersistence.findByPrimaryKey(tagId);
236 }
237
238 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
239 throws PortalException, SystemException {
240 return assetTagPersistence.findByPrimaryKey(primaryKeyObj);
241 }
242
243
255 public List<AssetTag> getAssetTags(int start, int end)
256 throws SystemException {
257 return assetTagPersistence.findAll(start, end);
258 }
259
260
266 public int getAssetTagsCount() throws SystemException {
267 return assetTagPersistence.countAll();
268 }
269
270
277 @Indexable(type = IndexableType.REINDEX)
278 public AssetTag updateAssetTag(AssetTag assetTag) throws SystemException {
279 return updateAssetTag(assetTag, true);
280 }
281
282
290 @Indexable(type = IndexableType.REINDEX)
291 public AssetTag updateAssetTag(AssetTag assetTag, boolean merge)
292 throws SystemException {
293 assetTag.setNew(false);
294
295 return assetTagPersistence.update(assetTag, merge);
296 }
297
298
303 public AssetCategoryLocalService getAssetCategoryLocalService() {
304 return assetCategoryLocalService;
305 }
306
307
312 public void setAssetCategoryLocalService(
313 AssetCategoryLocalService assetCategoryLocalService) {
314 this.assetCategoryLocalService = assetCategoryLocalService;
315 }
316
317
322 public AssetCategoryService getAssetCategoryService() {
323 return assetCategoryService;
324 }
325
326
331 public void setAssetCategoryService(
332 AssetCategoryService assetCategoryService) {
333 this.assetCategoryService = assetCategoryService;
334 }
335
336
341 public AssetCategoryPersistence getAssetCategoryPersistence() {
342 return assetCategoryPersistence;
343 }
344
345
350 public void setAssetCategoryPersistence(
351 AssetCategoryPersistence assetCategoryPersistence) {
352 this.assetCategoryPersistence = assetCategoryPersistence;
353 }
354
355
360 public AssetCategoryFinder getAssetCategoryFinder() {
361 return assetCategoryFinder;
362 }
363
364
369 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
370 this.assetCategoryFinder = assetCategoryFinder;
371 }
372
373
378 public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
379 return assetCategoryPropertyLocalService;
380 }
381
382
387 public void setAssetCategoryPropertyLocalService(
388 AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
389 this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
390 }
391
392
397 public AssetCategoryPropertyService getAssetCategoryPropertyService() {
398 return assetCategoryPropertyService;
399 }
400
401
406 public void setAssetCategoryPropertyService(
407 AssetCategoryPropertyService assetCategoryPropertyService) {
408 this.assetCategoryPropertyService = assetCategoryPropertyService;
409 }
410
411
416 public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
417 return assetCategoryPropertyPersistence;
418 }
419
420
425 public void setAssetCategoryPropertyPersistence(
426 AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
427 this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
428 }
429
430
435 public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
436 return assetCategoryPropertyFinder;
437 }
438
439
444 public void setAssetCategoryPropertyFinder(
445 AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
446 this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
447 }
448
449
454 public AssetEntryLocalService getAssetEntryLocalService() {
455 return assetEntryLocalService;
456 }
457
458
463 public void setAssetEntryLocalService(
464 AssetEntryLocalService assetEntryLocalService) {
465 this.assetEntryLocalService = assetEntryLocalService;
466 }
467
468
473 public AssetEntryService getAssetEntryService() {
474 return assetEntryService;
475 }
476
477
482 public void setAssetEntryService(AssetEntryService assetEntryService) {
483 this.assetEntryService = assetEntryService;
484 }
485
486
491 public AssetEntryPersistence getAssetEntryPersistence() {
492 return assetEntryPersistence;
493 }
494
495
500 public void setAssetEntryPersistence(
501 AssetEntryPersistence assetEntryPersistence) {
502 this.assetEntryPersistence = assetEntryPersistence;
503 }
504
505
510 public AssetEntryFinder getAssetEntryFinder() {
511 return assetEntryFinder;
512 }
513
514
519 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
520 this.assetEntryFinder = assetEntryFinder;
521 }
522
523
528 public AssetLinkLocalService getAssetLinkLocalService() {
529 return assetLinkLocalService;
530 }
531
532
537 public void setAssetLinkLocalService(
538 AssetLinkLocalService assetLinkLocalService) {
539 this.assetLinkLocalService = assetLinkLocalService;
540 }
541
542
547 public AssetLinkPersistence getAssetLinkPersistence() {
548 return assetLinkPersistence;
549 }
550
551
556 public void setAssetLinkPersistence(
557 AssetLinkPersistence assetLinkPersistence) {
558 this.assetLinkPersistence = assetLinkPersistence;
559 }
560
561
566 public AssetTagLocalService getAssetTagLocalService() {
567 return assetTagLocalService;
568 }
569
570
575 public void setAssetTagLocalService(
576 AssetTagLocalService assetTagLocalService) {
577 this.assetTagLocalService = assetTagLocalService;
578 }
579
580
585 public AssetTagService getAssetTagService() {
586 return assetTagService;
587 }
588
589
594 public void setAssetTagService(AssetTagService assetTagService) {
595 this.assetTagService = assetTagService;
596 }
597
598
603 public AssetTagPersistence getAssetTagPersistence() {
604 return assetTagPersistence;
605 }
606
607
612 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
613 this.assetTagPersistence = assetTagPersistence;
614 }
615
616
621 public AssetTagFinder getAssetTagFinder() {
622 return assetTagFinder;
623 }
624
625
630 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
631 this.assetTagFinder = assetTagFinder;
632 }
633
634
639 public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
640 return assetTagPropertyLocalService;
641 }
642
643
648 public void setAssetTagPropertyLocalService(
649 AssetTagPropertyLocalService assetTagPropertyLocalService) {
650 this.assetTagPropertyLocalService = assetTagPropertyLocalService;
651 }
652
653
658 public AssetTagPropertyService getAssetTagPropertyService() {
659 return assetTagPropertyService;
660 }
661
662
667 public void setAssetTagPropertyService(
668 AssetTagPropertyService assetTagPropertyService) {
669 this.assetTagPropertyService = assetTagPropertyService;
670 }
671
672
677 public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
678 return assetTagPropertyPersistence;
679 }
680
681
686 public void setAssetTagPropertyPersistence(
687 AssetTagPropertyPersistence assetTagPropertyPersistence) {
688 this.assetTagPropertyPersistence = assetTagPropertyPersistence;
689 }
690
691
696 public AssetTagPropertyFinder getAssetTagPropertyFinder() {
697 return assetTagPropertyFinder;
698 }
699
700
705 public void setAssetTagPropertyFinder(
706 AssetTagPropertyFinder assetTagPropertyFinder) {
707 this.assetTagPropertyFinder = assetTagPropertyFinder;
708 }
709
710
715 public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
716 return assetTagPropertyKeyFinder;
717 }
718
719
724 public void setAssetTagPropertyKeyFinder(
725 AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
726 this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
727 }
728
729
734 public AssetTagStatsLocalService getAssetTagStatsLocalService() {
735 return assetTagStatsLocalService;
736 }
737
738
743 public void setAssetTagStatsLocalService(
744 AssetTagStatsLocalService assetTagStatsLocalService) {
745 this.assetTagStatsLocalService = assetTagStatsLocalService;
746 }
747
748
753 public AssetTagStatsPersistence getAssetTagStatsPersistence() {
754 return assetTagStatsPersistence;
755 }
756
757
762 public void setAssetTagStatsPersistence(
763 AssetTagStatsPersistence assetTagStatsPersistence) {
764 this.assetTagStatsPersistence = assetTagStatsPersistence;
765 }
766
767
772 public AssetVocabularyLocalService getAssetVocabularyLocalService() {
773 return assetVocabularyLocalService;
774 }
775
776
781 public void setAssetVocabularyLocalService(
782 AssetVocabularyLocalService assetVocabularyLocalService) {
783 this.assetVocabularyLocalService = assetVocabularyLocalService;
784 }
785
786
791 public AssetVocabularyService getAssetVocabularyService() {
792 return assetVocabularyService;
793 }
794
795
800 public void setAssetVocabularyService(
801 AssetVocabularyService assetVocabularyService) {
802 this.assetVocabularyService = assetVocabularyService;
803 }
804
805
810 public AssetVocabularyPersistence getAssetVocabularyPersistence() {
811 return assetVocabularyPersistence;
812 }
813
814
819 public void setAssetVocabularyPersistence(
820 AssetVocabularyPersistence assetVocabularyPersistence) {
821 this.assetVocabularyPersistence = assetVocabularyPersistence;
822 }
823
824
829 public AssetVocabularyFinder getAssetVocabularyFinder() {
830 return assetVocabularyFinder;
831 }
832
833
838 public void setAssetVocabularyFinder(
839 AssetVocabularyFinder assetVocabularyFinder) {
840 this.assetVocabularyFinder = assetVocabularyFinder;
841 }
842
843
848 public CounterLocalService getCounterLocalService() {
849 return counterLocalService;
850 }
851
852
857 public void setCounterLocalService(CounterLocalService counterLocalService) {
858 this.counterLocalService = counterLocalService;
859 }
860
861
866 public ResourceLocalService getResourceLocalService() {
867 return resourceLocalService;
868 }
869
870
875 public void setResourceLocalService(
876 ResourceLocalService resourceLocalService) {
877 this.resourceLocalService = resourceLocalService;
878 }
879
880
885 public ResourceService getResourceService() {
886 return resourceService;
887 }
888
889
894 public void setResourceService(ResourceService resourceService) {
895 this.resourceService = resourceService;
896 }
897
898
903 public ResourcePersistence getResourcePersistence() {
904 return resourcePersistence;
905 }
906
907
912 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
913 this.resourcePersistence = resourcePersistence;
914 }
915
916
921 public ResourceFinder getResourceFinder() {
922 return resourceFinder;
923 }
924
925
930 public void setResourceFinder(ResourceFinder resourceFinder) {
931 this.resourceFinder = resourceFinder;
932 }
933
934
939 public UserLocalService getUserLocalService() {
940 return userLocalService;
941 }
942
943
948 public void setUserLocalService(UserLocalService userLocalService) {
949 this.userLocalService = userLocalService;
950 }
951
952
957 public UserService getUserService() {
958 return userService;
959 }
960
961
966 public void setUserService(UserService userService) {
967 this.userService = userService;
968 }
969
970
975 public UserPersistence getUserPersistence() {
976 return userPersistence;
977 }
978
979
984 public void setUserPersistence(UserPersistence userPersistence) {
985 this.userPersistence = userPersistence;
986 }
987
988
993 public UserFinder getUserFinder() {
994 return userFinder;
995 }
996
997
1002 public void setUserFinder(UserFinder userFinder) {
1003 this.userFinder = userFinder;
1004 }
1005
1006 public void afterPropertiesSet() {
1007 persistedModelLocalServiceRegistry.register("com.liferay.portlet.asset.model.AssetTag",
1008 assetTagLocalService);
1009 }
1010
1011 public void destroy() {
1012 persistedModelLocalServiceRegistry.unregister(
1013 "com.liferay.portlet.asset.model.AssetTag");
1014 }
1015
1016
1021 public String getBeanIdentifier() {
1022 return _beanIdentifier;
1023 }
1024
1025
1030 public void setBeanIdentifier(String beanIdentifier) {
1031 _beanIdentifier = beanIdentifier;
1032 }
1033
1034 protected Class<?> getModelClass() {
1035 return AssetTag.class;
1036 }
1037
1038 protected String getModelClassName() {
1039 return AssetTag.class.getName();
1040 }
1041
1042
1047 protected void runSQL(String sql) throws SystemException {
1048 try {
1049 DataSource dataSource = assetTagPersistence.getDataSource();
1050
1051 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1052 sql, new int[0]);
1053
1054 sqlUpdate.update();
1055 }
1056 catch (Exception e) {
1057 throw new SystemException(e);
1058 }
1059 }
1060
1061 @BeanReference(type = AssetCategoryLocalService.class)
1062 protected AssetCategoryLocalService assetCategoryLocalService;
1063 @BeanReference(type = AssetCategoryService.class)
1064 protected AssetCategoryService assetCategoryService;
1065 @BeanReference(type = AssetCategoryPersistence.class)
1066 protected AssetCategoryPersistence assetCategoryPersistence;
1067 @BeanReference(type = AssetCategoryFinder.class)
1068 protected AssetCategoryFinder assetCategoryFinder;
1069 @BeanReference(type = AssetCategoryPropertyLocalService.class)
1070 protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
1071 @BeanReference(type = AssetCategoryPropertyService.class)
1072 protected AssetCategoryPropertyService assetCategoryPropertyService;
1073 @BeanReference(type = AssetCategoryPropertyPersistence.class)
1074 protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
1075 @BeanReference(type = AssetCategoryPropertyFinder.class)
1076 protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
1077 @BeanReference(type = AssetEntryLocalService.class)
1078 protected AssetEntryLocalService assetEntryLocalService;
1079 @BeanReference(type = AssetEntryService.class)
1080 protected AssetEntryService assetEntryService;
1081 @BeanReference(type = AssetEntryPersistence.class)
1082 protected AssetEntryPersistence assetEntryPersistence;
1083 @BeanReference(type = AssetEntryFinder.class)
1084 protected AssetEntryFinder assetEntryFinder;
1085 @BeanReference(type = AssetLinkLocalService.class)
1086 protected AssetLinkLocalService assetLinkLocalService;
1087 @BeanReference(type = AssetLinkPersistence.class)
1088 protected AssetLinkPersistence assetLinkPersistence;
1089 @BeanReference(type = AssetTagLocalService.class)
1090 protected AssetTagLocalService assetTagLocalService;
1091 @BeanReference(type = AssetTagService.class)
1092 protected AssetTagService assetTagService;
1093 @BeanReference(type = AssetTagPersistence.class)
1094 protected AssetTagPersistence assetTagPersistence;
1095 @BeanReference(type = AssetTagFinder.class)
1096 protected AssetTagFinder assetTagFinder;
1097 @BeanReference(type = AssetTagPropertyLocalService.class)
1098 protected AssetTagPropertyLocalService assetTagPropertyLocalService;
1099 @BeanReference(type = AssetTagPropertyService.class)
1100 protected AssetTagPropertyService assetTagPropertyService;
1101 @BeanReference(type = AssetTagPropertyPersistence.class)
1102 protected AssetTagPropertyPersistence assetTagPropertyPersistence;
1103 @BeanReference(type = AssetTagPropertyFinder.class)
1104 protected AssetTagPropertyFinder assetTagPropertyFinder;
1105 @BeanReference(type = AssetTagPropertyKeyFinder.class)
1106 protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
1107 @BeanReference(type = AssetTagStatsLocalService.class)
1108 protected AssetTagStatsLocalService assetTagStatsLocalService;
1109 @BeanReference(type = AssetTagStatsPersistence.class)
1110 protected AssetTagStatsPersistence assetTagStatsPersistence;
1111 @BeanReference(type = AssetVocabularyLocalService.class)
1112 protected AssetVocabularyLocalService assetVocabularyLocalService;
1113 @BeanReference(type = AssetVocabularyService.class)
1114 protected AssetVocabularyService assetVocabularyService;
1115 @BeanReference(type = AssetVocabularyPersistence.class)
1116 protected AssetVocabularyPersistence assetVocabularyPersistence;
1117 @BeanReference(type = AssetVocabularyFinder.class)
1118 protected AssetVocabularyFinder assetVocabularyFinder;
1119 @BeanReference(type = CounterLocalService.class)
1120 protected CounterLocalService counterLocalService;
1121 @BeanReference(type = ResourceLocalService.class)
1122 protected ResourceLocalService resourceLocalService;
1123 @BeanReference(type = ResourceService.class)
1124 protected ResourceService resourceService;
1125 @BeanReference(type = ResourcePersistence.class)
1126 protected ResourcePersistence resourcePersistence;
1127 @BeanReference(type = ResourceFinder.class)
1128 protected ResourceFinder resourceFinder;
1129 @BeanReference(type = UserLocalService.class)
1130 protected UserLocalService userLocalService;
1131 @BeanReference(type = UserService.class)
1132 protected UserService userService;
1133 @BeanReference(type = UserPersistence.class)
1134 protected UserPersistence userPersistence;
1135 @BeanReference(type = UserFinder.class)
1136 protected UserFinder userFinder;
1137 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1138 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1139 private String _beanIdentifier;
1140 }