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.UserLocalService;
035 import com.liferay.portal.service.UserService;
036 import com.liferay.portal.service.persistence.UserFinder;
037 import com.liferay.portal.service.persistence.UserPersistence;
038
039 import com.liferay.portlet.asset.model.AssetCategory;
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.AssetLinkFinder;
061 import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
062 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
063 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
064 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyFinder;
065 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyKeyFinder;
066 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyPersistence;
067 import com.liferay.portlet.asset.service.persistence.AssetTagStatsPersistence;
068 import com.liferay.portlet.asset.service.persistence.AssetVocabularyFinder;
069 import com.liferay.portlet.asset.service.persistence.AssetVocabularyPersistence;
070
071 import java.io.Serializable;
072
073 import java.util.List;
074
075 import javax.sql.DataSource;
076
077
089 public abstract class AssetCategoryLocalServiceBaseImpl
090 extends BaseLocalServiceImpl implements AssetCategoryLocalService,
091 IdentifiableBean {
092
097
098
105 @Indexable(type = IndexableType.REINDEX)
106 public AssetCategory addAssetCategory(AssetCategory assetCategory)
107 throws SystemException {
108 assetCategory.setNew(true);
109
110 return assetCategoryPersistence.update(assetCategory);
111 }
112
113
119 public AssetCategory createAssetCategory(long categoryId) {
120 return assetCategoryPersistence.create(categoryId);
121 }
122
123
131 @Indexable(type = IndexableType.DELETE)
132 public AssetCategory deleteAssetCategory(long categoryId)
133 throws PortalException, SystemException {
134 return assetCategoryPersistence.remove(categoryId);
135 }
136
137
144 @Indexable(type = IndexableType.DELETE)
145 public AssetCategory deleteAssetCategory(AssetCategory assetCategory)
146 throws SystemException {
147 return assetCategoryPersistence.remove(assetCategory);
148 }
149
150 public DynamicQuery dynamicQuery() {
151 Class<?> clazz = getClass();
152
153 return DynamicQueryFactoryUtil.forClass(AssetCategory.class,
154 clazz.getClassLoader());
155 }
156
157
164 @SuppressWarnings("rawtypes")
165 public List dynamicQuery(DynamicQuery dynamicQuery)
166 throws SystemException {
167 return assetCategoryPersistence.findWithDynamicQuery(dynamicQuery);
168 }
169
170
183 @SuppressWarnings("rawtypes")
184 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
185 throws SystemException {
186 return assetCategoryPersistence.findWithDynamicQuery(dynamicQuery,
187 start, end);
188 }
189
190
204 @SuppressWarnings("rawtypes")
205 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
206 OrderByComparator orderByComparator) throws SystemException {
207 return assetCategoryPersistence.findWithDynamicQuery(dynamicQuery,
208 start, end, orderByComparator);
209 }
210
211
218 public long dynamicQueryCount(DynamicQuery dynamicQuery)
219 throws SystemException {
220 return assetCategoryPersistence.countWithDynamicQuery(dynamicQuery);
221 }
222
223 public AssetCategory fetchAssetCategory(long categoryId)
224 throws SystemException {
225 return assetCategoryPersistence.fetchByPrimaryKey(categoryId);
226 }
227
228
236 public AssetCategory getAssetCategory(long categoryId)
237 throws PortalException, SystemException {
238 return assetCategoryPersistence.findByPrimaryKey(categoryId);
239 }
240
241 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
242 throws PortalException, SystemException {
243 return assetCategoryPersistence.findByPrimaryKey(primaryKeyObj);
244 }
245
246
255 public AssetCategory getAssetCategoryByUuidAndGroupId(String uuid,
256 long groupId) throws PortalException, SystemException {
257 return assetCategoryPersistence.findByUUID_G(uuid, groupId);
258 }
259
260
272 public List<AssetCategory> getAssetCategories(int start, int end)
273 throws SystemException {
274 return assetCategoryPersistence.findAll(start, end);
275 }
276
277
283 public int getAssetCategoriesCount() throws SystemException {
284 return assetCategoryPersistence.countAll();
285 }
286
287
294 @Indexable(type = IndexableType.REINDEX)
295 public AssetCategory updateAssetCategory(AssetCategory assetCategory)
296 throws SystemException {
297 return assetCategoryPersistence.update(assetCategory);
298 }
299
300
305 public AssetCategoryLocalService getAssetCategoryLocalService() {
306 return assetCategoryLocalService;
307 }
308
309
314 public void setAssetCategoryLocalService(
315 AssetCategoryLocalService assetCategoryLocalService) {
316 this.assetCategoryLocalService = assetCategoryLocalService;
317 }
318
319
324 public AssetCategoryService getAssetCategoryService() {
325 return assetCategoryService;
326 }
327
328
333 public void setAssetCategoryService(
334 AssetCategoryService assetCategoryService) {
335 this.assetCategoryService = assetCategoryService;
336 }
337
338
343 public AssetCategoryPersistence getAssetCategoryPersistence() {
344 return assetCategoryPersistence;
345 }
346
347
352 public void setAssetCategoryPersistence(
353 AssetCategoryPersistence assetCategoryPersistence) {
354 this.assetCategoryPersistence = assetCategoryPersistence;
355 }
356
357
362 public AssetCategoryFinder getAssetCategoryFinder() {
363 return assetCategoryFinder;
364 }
365
366
371 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
372 this.assetCategoryFinder = assetCategoryFinder;
373 }
374
375
380 public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
381 return assetCategoryPropertyLocalService;
382 }
383
384
389 public void setAssetCategoryPropertyLocalService(
390 AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
391 this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
392 }
393
394
399 public AssetCategoryPropertyService getAssetCategoryPropertyService() {
400 return assetCategoryPropertyService;
401 }
402
403
408 public void setAssetCategoryPropertyService(
409 AssetCategoryPropertyService assetCategoryPropertyService) {
410 this.assetCategoryPropertyService = assetCategoryPropertyService;
411 }
412
413
418 public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
419 return assetCategoryPropertyPersistence;
420 }
421
422
427 public void setAssetCategoryPropertyPersistence(
428 AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
429 this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
430 }
431
432
437 public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
438 return assetCategoryPropertyFinder;
439 }
440
441
446 public void setAssetCategoryPropertyFinder(
447 AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
448 this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
449 }
450
451
456 public AssetEntryLocalService getAssetEntryLocalService() {
457 return assetEntryLocalService;
458 }
459
460
465 public void setAssetEntryLocalService(
466 AssetEntryLocalService assetEntryLocalService) {
467 this.assetEntryLocalService = assetEntryLocalService;
468 }
469
470
475 public AssetEntryService getAssetEntryService() {
476 return assetEntryService;
477 }
478
479
484 public void setAssetEntryService(AssetEntryService assetEntryService) {
485 this.assetEntryService = assetEntryService;
486 }
487
488
493 public AssetEntryPersistence getAssetEntryPersistence() {
494 return assetEntryPersistence;
495 }
496
497
502 public void setAssetEntryPersistence(
503 AssetEntryPersistence assetEntryPersistence) {
504 this.assetEntryPersistence = assetEntryPersistence;
505 }
506
507
512 public AssetEntryFinder getAssetEntryFinder() {
513 return assetEntryFinder;
514 }
515
516
521 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
522 this.assetEntryFinder = assetEntryFinder;
523 }
524
525
530 public AssetLinkLocalService getAssetLinkLocalService() {
531 return assetLinkLocalService;
532 }
533
534
539 public void setAssetLinkLocalService(
540 AssetLinkLocalService assetLinkLocalService) {
541 this.assetLinkLocalService = assetLinkLocalService;
542 }
543
544
549 public AssetLinkPersistence getAssetLinkPersistence() {
550 return assetLinkPersistence;
551 }
552
553
558 public void setAssetLinkPersistence(
559 AssetLinkPersistence assetLinkPersistence) {
560 this.assetLinkPersistence = assetLinkPersistence;
561 }
562
563
568 public AssetLinkFinder getAssetLinkFinder() {
569 return assetLinkFinder;
570 }
571
572
577 public void setAssetLinkFinder(AssetLinkFinder assetLinkFinder) {
578 this.assetLinkFinder = assetLinkFinder;
579 }
580
581
586 public AssetTagLocalService getAssetTagLocalService() {
587 return assetTagLocalService;
588 }
589
590
595 public void setAssetTagLocalService(
596 AssetTagLocalService assetTagLocalService) {
597 this.assetTagLocalService = assetTagLocalService;
598 }
599
600
605 public AssetTagService getAssetTagService() {
606 return assetTagService;
607 }
608
609
614 public void setAssetTagService(AssetTagService assetTagService) {
615 this.assetTagService = assetTagService;
616 }
617
618
623 public AssetTagPersistence getAssetTagPersistence() {
624 return assetTagPersistence;
625 }
626
627
632 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
633 this.assetTagPersistence = assetTagPersistence;
634 }
635
636
641 public AssetTagFinder getAssetTagFinder() {
642 return assetTagFinder;
643 }
644
645
650 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
651 this.assetTagFinder = assetTagFinder;
652 }
653
654
659 public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
660 return assetTagPropertyLocalService;
661 }
662
663
668 public void setAssetTagPropertyLocalService(
669 AssetTagPropertyLocalService assetTagPropertyLocalService) {
670 this.assetTagPropertyLocalService = assetTagPropertyLocalService;
671 }
672
673
678 public AssetTagPropertyService getAssetTagPropertyService() {
679 return assetTagPropertyService;
680 }
681
682
687 public void setAssetTagPropertyService(
688 AssetTagPropertyService assetTagPropertyService) {
689 this.assetTagPropertyService = assetTagPropertyService;
690 }
691
692
697 public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
698 return assetTagPropertyPersistence;
699 }
700
701
706 public void setAssetTagPropertyPersistence(
707 AssetTagPropertyPersistence assetTagPropertyPersistence) {
708 this.assetTagPropertyPersistence = assetTagPropertyPersistence;
709 }
710
711
716 public AssetTagPropertyFinder getAssetTagPropertyFinder() {
717 return assetTagPropertyFinder;
718 }
719
720
725 public void setAssetTagPropertyFinder(
726 AssetTagPropertyFinder assetTagPropertyFinder) {
727 this.assetTagPropertyFinder = assetTagPropertyFinder;
728 }
729
730
735 public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
736 return assetTagPropertyKeyFinder;
737 }
738
739
744 public void setAssetTagPropertyKeyFinder(
745 AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
746 this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
747 }
748
749
754 public AssetTagStatsLocalService getAssetTagStatsLocalService() {
755 return assetTagStatsLocalService;
756 }
757
758
763 public void setAssetTagStatsLocalService(
764 AssetTagStatsLocalService assetTagStatsLocalService) {
765 this.assetTagStatsLocalService = assetTagStatsLocalService;
766 }
767
768
773 public AssetTagStatsPersistence getAssetTagStatsPersistence() {
774 return assetTagStatsPersistence;
775 }
776
777
782 public void setAssetTagStatsPersistence(
783 AssetTagStatsPersistence assetTagStatsPersistence) {
784 this.assetTagStatsPersistence = assetTagStatsPersistence;
785 }
786
787
792 public AssetVocabularyLocalService getAssetVocabularyLocalService() {
793 return assetVocabularyLocalService;
794 }
795
796
801 public void setAssetVocabularyLocalService(
802 AssetVocabularyLocalService assetVocabularyLocalService) {
803 this.assetVocabularyLocalService = assetVocabularyLocalService;
804 }
805
806
811 public AssetVocabularyService getAssetVocabularyService() {
812 return assetVocabularyService;
813 }
814
815
820 public void setAssetVocabularyService(
821 AssetVocabularyService assetVocabularyService) {
822 this.assetVocabularyService = assetVocabularyService;
823 }
824
825
830 public AssetVocabularyPersistence getAssetVocabularyPersistence() {
831 return assetVocabularyPersistence;
832 }
833
834
839 public void setAssetVocabularyPersistence(
840 AssetVocabularyPersistence assetVocabularyPersistence) {
841 this.assetVocabularyPersistence = assetVocabularyPersistence;
842 }
843
844
849 public AssetVocabularyFinder getAssetVocabularyFinder() {
850 return assetVocabularyFinder;
851 }
852
853
858 public void setAssetVocabularyFinder(
859 AssetVocabularyFinder assetVocabularyFinder) {
860 this.assetVocabularyFinder = assetVocabularyFinder;
861 }
862
863
868 public CounterLocalService getCounterLocalService() {
869 return counterLocalService;
870 }
871
872
877 public void setCounterLocalService(CounterLocalService counterLocalService) {
878 this.counterLocalService = counterLocalService;
879 }
880
881
886 public ResourceLocalService getResourceLocalService() {
887 return resourceLocalService;
888 }
889
890
895 public void setResourceLocalService(
896 ResourceLocalService resourceLocalService) {
897 this.resourceLocalService = resourceLocalService;
898 }
899
900
905 public UserLocalService getUserLocalService() {
906 return userLocalService;
907 }
908
909
914 public void setUserLocalService(UserLocalService userLocalService) {
915 this.userLocalService = userLocalService;
916 }
917
918
923 public UserService getUserService() {
924 return userService;
925 }
926
927
932 public void setUserService(UserService userService) {
933 this.userService = userService;
934 }
935
936
941 public UserPersistence getUserPersistence() {
942 return userPersistence;
943 }
944
945
950 public void setUserPersistence(UserPersistence userPersistence) {
951 this.userPersistence = userPersistence;
952 }
953
954
959 public UserFinder getUserFinder() {
960 return userFinder;
961 }
962
963
968 public void setUserFinder(UserFinder userFinder) {
969 this.userFinder = userFinder;
970 }
971
972 public void afterPropertiesSet() {
973 persistedModelLocalServiceRegistry.register("com.liferay.portlet.asset.model.AssetCategory",
974 assetCategoryLocalService);
975 }
976
977 public void destroy() {
978 persistedModelLocalServiceRegistry.unregister(
979 "com.liferay.portlet.asset.model.AssetCategory");
980 }
981
982
987 public String getBeanIdentifier() {
988 return _beanIdentifier;
989 }
990
991
996 public void setBeanIdentifier(String beanIdentifier) {
997 _beanIdentifier = beanIdentifier;
998 }
999
1000 protected Class<?> getModelClass() {
1001 return AssetCategory.class;
1002 }
1003
1004 protected String getModelClassName() {
1005 return AssetCategory.class.getName();
1006 }
1007
1008
1013 protected void runSQL(String sql) throws SystemException {
1014 try {
1015 DataSource dataSource = assetCategoryPersistence.getDataSource();
1016
1017 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1018 sql, new int[0]);
1019
1020 sqlUpdate.update();
1021 }
1022 catch (Exception e) {
1023 throw new SystemException(e);
1024 }
1025 }
1026
1027 @BeanReference(type = AssetCategoryLocalService.class)
1028 protected AssetCategoryLocalService assetCategoryLocalService;
1029 @BeanReference(type = AssetCategoryService.class)
1030 protected AssetCategoryService assetCategoryService;
1031 @BeanReference(type = AssetCategoryPersistence.class)
1032 protected AssetCategoryPersistence assetCategoryPersistence;
1033 @BeanReference(type = AssetCategoryFinder.class)
1034 protected AssetCategoryFinder assetCategoryFinder;
1035 @BeanReference(type = AssetCategoryPropertyLocalService.class)
1036 protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
1037 @BeanReference(type = AssetCategoryPropertyService.class)
1038 protected AssetCategoryPropertyService assetCategoryPropertyService;
1039 @BeanReference(type = AssetCategoryPropertyPersistence.class)
1040 protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
1041 @BeanReference(type = AssetCategoryPropertyFinder.class)
1042 protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
1043 @BeanReference(type = AssetEntryLocalService.class)
1044 protected AssetEntryLocalService assetEntryLocalService;
1045 @BeanReference(type = AssetEntryService.class)
1046 protected AssetEntryService assetEntryService;
1047 @BeanReference(type = AssetEntryPersistence.class)
1048 protected AssetEntryPersistence assetEntryPersistence;
1049 @BeanReference(type = AssetEntryFinder.class)
1050 protected AssetEntryFinder assetEntryFinder;
1051 @BeanReference(type = AssetLinkLocalService.class)
1052 protected AssetLinkLocalService assetLinkLocalService;
1053 @BeanReference(type = AssetLinkPersistence.class)
1054 protected AssetLinkPersistence assetLinkPersistence;
1055 @BeanReference(type = AssetLinkFinder.class)
1056 protected AssetLinkFinder assetLinkFinder;
1057 @BeanReference(type = AssetTagLocalService.class)
1058 protected AssetTagLocalService assetTagLocalService;
1059 @BeanReference(type = AssetTagService.class)
1060 protected AssetTagService assetTagService;
1061 @BeanReference(type = AssetTagPersistence.class)
1062 protected AssetTagPersistence assetTagPersistence;
1063 @BeanReference(type = AssetTagFinder.class)
1064 protected AssetTagFinder assetTagFinder;
1065 @BeanReference(type = AssetTagPropertyLocalService.class)
1066 protected AssetTagPropertyLocalService assetTagPropertyLocalService;
1067 @BeanReference(type = AssetTagPropertyService.class)
1068 protected AssetTagPropertyService assetTagPropertyService;
1069 @BeanReference(type = AssetTagPropertyPersistence.class)
1070 protected AssetTagPropertyPersistence assetTagPropertyPersistence;
1071 @BeanReference(type = AssetTagPropertyFinder.class)
1072 protected AssetTagPropertyFinder assetTagPropertyFinder;
1073 @BeanReference(type = AssetTagPropertyKeyFinder.class)
1074 protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
1075 @BeanReference(type = AssetTagStatsLocalService.class)
1076 protected AssetTagStatsLocalService assetTagStatsLocalService;
1077 @BeanReference(type = AssetTagStatsPersistence.class)
1078 protected AssetTagStatsPersistence assetTagStatsPersistence;
1079 @BeanReference(type = AssetVocabularyLocalService.class)
1080 protected AssetVocabularyLocalService assetVocabularyLocalService;
1081 @BeanReference(type = AssetVocabularyService.class)
1082 protected AssetVocabularyService assetVocabularyService;
1083 @BeanReference(type = AssetVocabularyPersistence.class)
1084 protected AssetVocabularyPersistence assetVocabularyPersistence;
1085 @BeanReference(type = AssetVocabularyFinder.class)
1086 protected AssetVocabularyFinder assetVocabularyFinder;
1087 @BeanReference(type = CounterLocalService.class)
1088 protected CounterLocalService counterLocalService;
1089 @BeanReference(type = ResourceLocalService.class)
1090 protected ResourceLocalService resourceLocalService;
1091 @BeanReference(type = UserLocalService.class)
1092 protected UserLocalService userLocalService;
1093 @BeanReference(type = UserService.class)
1094 protected UserService userService;
1095 @BeanReference(type = UserPersistence.class)
1096 protected UserPersistence userPersistence;
1097 @BeanReference(type = UserFinder.class)
1098 protected UserFinder userFinder;
1099 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1100 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1101 private String _beanIdentifier;
1102 }