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.ResourceLocalService;
027 import com.liferay.portal.service.ResourceService;
028 import com.liferay.portal.service.UserLocalService;
029 import com.liferay.portal.service.UserService;
030 import com.liferay.portal.service.persistence.ResourceFinder;
031 import com.liferay.portal.service.persistence.ResourcePersistence;
032 import com.liferay.portal.service.persistence.UserFinder;
033 import com.liferay.portal.service.persistence.UserPersistence;
034
035 import com.liferay.portlet.asset.model.AssetCategory;
036 import com.liferay.portlet.asset.service.AssetCategoryLocalService;
037 import com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService;
038 import com.liferay.portlet.asset.service.AssetCategoryPropertyService;
039 import com.liferay.portlet.asset.service.AssetCategoryService;
040 import com.liferay.portlet.asset.service.AssetEntryLocalService;
041 import com.liferay.portlet.asset.service.AssetEntryService;
042 import com.liferay.portlet.asset.service.AssetLinkLocalService;
043 import com.liferay.portlet.asset.service.AssetTagLocalService;
044 import com.liferay.portlet.asset.service.AssetTagPropertyLocalService;
045 import com.liferay.portlet.asset.service.AssetTagPropertyService;
046 import com.liferay.portlet.asset.service.AssetTagService;
047 import com.liferay.portlet.asset.service.AssetTagStatsLocalService;
048 import com.liferay.portlet.asset.service.AssetVocabularyLocalService;
049 import com.liferay.portlet.asset.service.AssetVocabularyService;
050 import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
051 import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
052 import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyFinder;
053 import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyPersistence;
054 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
055 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
056 import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
057 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
058 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
059 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyFinder;
060 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyKeyFinder;
061 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyPersistence;
062 import com.liferay.portlet.asset.service.persistence.AssetTagStatsPersistence;
063 import com.liferay.portlet.asset.service.persistence.AssetVocabularyPersistence;
064
065 import java.util.List;
066
067 import javax.sql.DataSource;
068
069
085 public abstract class AssetCategoryLocalServiceBaseImpl
086 implements AssetCategoryLocalService {
087
094 public AssetCategory addAssetCategory(AssetCategory assetCategory)
095 throws SystemException {
096 assetCategory.setNew(true);
097
098 return assetCategoryPersistence.update(assetCategory, false);
099 }
100
101
107 public AssetCategory createAssetCategory(long categoryId) {
108 return assetCategoryPersistence.create(categoryId);
109 }
110
111
118 public void deleteAssetCategory(long categoryId)
119 throws PortalException, SystemException {
120 assetCategoryPersistence.remove(categoryId);
121 }
122
123
129 public void deleteAssetCategory(AssetCategory assetCategory)
130 throws SystemException {
131 assetCategoryPersistence.remove(assetCategory);
132 }
133
134
141 @SuppressWarnings("rawtypes")
142 public List dynamicQuery(DynamicQuery dynamicQuery)
143 throws SystemException {
144 return assetCategoryPersistence.findWithDynamicQuery(dynamicQuery);
145 }
146
147
160 @SuppressWarnings("rawtypes")
161 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
162 throws SystemException {
163 return assetCategoryPersistence.findWithDynamicQuery(dynamicQuery,
164 start, end);
165 }
166
167
181 @SuppressWarnings("rawtypes")
182 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
183 OrderByComparator orderByComparator) throws SystemException {
184 return assetCategoryPersistence.findWithDynamicQuery(dynamicQuery,
185 start, end, orderByComparator);
186 }
187
188
195 public long dynamicQueryCount(DynamicQuery dynamicQuery)
196 throws SystemException {
197 return assetCategoryPersistence.countWithDynamicQuery(dynamicQuery);
198 }
199
200
208 public AssetCategory getAssetCategory(long categoryId)
209 throws PortalException, SystemException {
210 return assetCategoryPersistence.findByPrimaryKey(categoryId);
211 }
212
213
222 public AssetCategory getAssetCategoryByUuidAndGroupId(String uuid,
223 long groupId) throws PortalException, SystemException {
224 return assetCategoryPersistence.findByUUID_G(uuid, groupId);
225 }
226
227
239 public List<AssetCategory> getAssetCategories(int start, int end)
240 throws SystemException {
241 return assetCategoryPersistence.findAll(start, end);
242 }
243
244
250 public int getAssetCategoriesCount() throws SystemException {
251 return assetCategoryPersistence.countAll();
252 }
253
254
261 public AssetCategory updateAssetCategory(AssetCategory assetCategory)
262 throws SystemException {
263 assetCategory.setNew(false);
264
265 return assetCategoryPersistence.update(assetCategory, true);
266 }
267
268
276 public AssetCategory updateAssetCategory(AssetCategory assetCategory,
277 boolean merge) throws SystemException {
278 assetCategory.setNew(false);
279
280 return assetCategoryPersistence.update(assetCategory, merge);
281 }
282
283
288 public AssetCategoryLocalService getAssetCategoryLocalService() {
289 return assetCategoryLocalService;
290 }
291
292
297 public void setAssetCategoryLocalService(
298 AssetCategoryLocalService assetCategoryLocalService) {
299 this.assetCategoryLocalService = assetCategoryLocalService;
300 }
301
302
307 public AssetCategoryService getAssetCategoryService() {
308 return assetCategoryService;
309 }
310
311
316 public void setAssetCategoryService(
317 AssetCategoryService assetCategoryService) {
318 this.assetCategoryService = assetCategoryService;
319 }
320
321
326 public AssetCategoryPersistence getAssetCategoryPersistence() {
327 return assetCategoryPersistence;
328 }
329
330
335 public void setAssetCategoryPersistence(
336 AssetCategoryPersistence assetCategoryPersistence) {
337 this.assetCategoryPersistence = assetCategoryPersistence;
338 }
339
340
345 public AssetCategoryFinder getAssetCategoryFinder() {
346 return assetCategoryFinder;
347 }
348
349
354 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
355 this.assetCategoryFinder = assetCategoryFinder;
356 }
357
358
363 public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
364 return assetCategoryPropertyLocalService;
365 }
366
367
372 public void setAssetCategoryPropertyLocalService(
373 AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
374 this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
375 }
376
377
382 public AssetCategoryPropertyService getAssetCategoryPropertyService() {
383 return assetCategoryPropertyService;
384 }
385
386
391 public void setAssetCategoryPropertyService(
392 AssetCategoryPropertyService assetCategoryPropertyService) {
393 this.assetCategoryPropertyService = assetCategoryPropertyService;
394 }
395
396
401 public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
402 return assetCategoryPropertyPersistence;
403 }
404
405
410 public void setAssetCategoryPropertyPersistence(
411 AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
412 this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
413 }
414
415
420 public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
421 return assetCategoryPropertyFinder;
422 }
423
424
429 public void setAssetCategoryPropertyFinder(
430 AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
431 this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
432 }
433
434
439 public AssetEntryLocalService getAssetEntryLocalService() {
440 return assetEntryLocalService;
441 }
442
443
448 public void setAssetEntryLocalService(
449 AssetEntryLocalService assetEntryLocalService) {
450 this.assetEntryLocalService = assetEntryLocalService;
451 }
452
453
458 public AssetEntryService getAssetEntryService() {
459 return assetEntryService;
460 }
461
462
467 public void setAssetEntryService(AssetEntryService assetEntryService) {
468 this.assetEntryService = assetEntryService;
469 }
470
471
476 public AssetEntryPersistence getAssetEntryPersistence() {
477 return assetEntryPersistence;
478 }
479
480
485 public void setAssetEntryPersistence(
486 AssetEntryPersistence assetEntryPersistence) {
487 this.assetEntryPersistence = assetEntryPersistence;
488 }
489
490
495 public AssetEntryFinder getAssetEntryFinder() {
496 return assetEntryFinder;
497 }
498
499
504 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
505 this.assetEntryFinder = assetEntryFinder;
506 }
507
508
513 public AssetLinkLocalService getAssetLinkLocalService() {
514 return assetLinkLocalService;
515 }
516
517
522 public void setAssetLinkLocalService(
523 AssetLinkLocalService assetLinkLocalService) {
524 this.assetLinkLocalService = assetLinkLocalService;
525 }
526
527
532 public AssetLinkPersistence getAssetLinkPersistence() {
533 return assetLinkPersistence;
534 }
535
536
541 public void setAssetLinkPersistence(
542 AssetLinkPersistence assetLinkPersistence) {
543 this.assetLinkPersistence = assetLinkPersistence;
544 }
545
546
551 public AssetTagLocalService getAssetTagLocalService() {
552 return assetTagLocalService;
553 }
554
555
560 public void setAssetTagLocalService(
561 AssetTagLocalService assetTagLocalService) {
562 this.assetTagLocalService = assetTagLocalService;
563 }
564
565
570 public AssetTagService getAssetTagService() {
571 return assetTagService;
572 }
573
574
579 public void setAssetTagService(AssetTagService assetTagService) {
580 this.assetTagService = assetTagService;
581 }
582
583
588 public AssetTagPersistence getAssetTagPersistence() {
589 return assetTagPersistence;
590 }
591
592
597 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
598 this.assetTagPersistence = assetTagPersistence;
599 }
600
601
606 public AssetTagFinder getAssetTagFinder() {
607 return assetTagFinder;
608 }
609
610
615 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
616 this.assetTagFinder = assetTagFinder;
617 }
618
619
624 public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
625 return assetTagPropertyLocalService;
626 }
627
628
633 public void setAssetTagPropertyLocalService(
634 AssetTagPropertyLocalService assetTagPropertyLocalService) {
635 this.assetTagPropertyLocalService = assetTagPropertyLocalService;
636 }
637
638
643 public AssetTagPropertyService getAssetTagPropertyService() {
644 return assetTagPropertyService;
645 }
646
647
652 public void setAssetTagPropertyService(
653 AssetTagPropertyService assetTagPropertyService) {
654 this.assetTagPropertyService = assetTagPropertyService;
655 }
656
657
662 public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
663 return assetTagPropertyPersistence;
664 }
665
666
671 public void setAssetTagPropertyPersistence(
672 AssetTagPropertyPersistence assetTagPropertyPersistence) {
673 this.assetTagPropertyPersistence = assetTagPropertyPersistence;
674 }
675
676
681 public AssetTagPropertyFinder getAssetTagPropertyFinder() {
682 return assetTagPropertyFinder;
683 }
684
685
690 public void setAssetTagPropertyFinder(
691 AssetTagPropertyFinder assetTagPropertyFinder) {
692 this.assetTagPropertyFinder = assetTagPropertyFinder;
693 }
694
695
700 public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
701 return assetTagPropertyKeyFinder;
702 }
703
704
709 public void setAssetTagPropertyKeyFinder(
710 AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
711 this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
712 }
713
714
719 public AssetTagStatsLocalService getAssetTagStatsLocalService() {
720 return assetTagStatsLocalService;
721 }
722
723
728 public void setAssetTagStatsLocalService(
729 AssetTagStatsLocalService assetTagStatsLocalService) {
730 this.assetTagStatsLocalService = assetTagStatsLocalService;
731 }
732
733
738 public AssetTagStatsPersistence getAssetTagStatsPersistence() {
739 return assetTagStatsPersistence;
740 }
741
742
747 public void setAssetTagStatsPersistence(
748 AssetTagStatsPersistence assetTagStatsPersistence) {
749 this.assetTagStatsPersistence = assetTagStatsPersistence;
750 }
751
752
757 public AssetVocabularyLocalService getAssetVocabularyLocalService() {
758 return assetVocabularyLocalService;
759 }
760
761
766 public void setAssetVocabularyLocalService(
767 AssetVocabularyLocalService assetVocabularyLocalService) {
768 this.assetVocabularyLocalService = assetVocabularyLocalService;
769 }
770
771
776 public AssetVocabularyService getAssetVocabularyService() {
777 return assetVocabularyService;
778 }
779
780
785 public void setAssetVocabularyService(
786 AssetVocabularyService assetVocabularyService) {
787 this.assetVocabularyService = assetVocabularyService;
788 }
789
790
795 public AssetVocabularyPersistence getAssetVocabularyPersistence() {
796 return assetVocabularyPersistence;
797 }
798
799
804 public void setAssetVocabularyPersistence(
805 AssetVocabularyPersistence assetVocabularyPersistence) {
806 this.assetVocabularyPersistence = assetVocabularyPersistence;
807 }
808
809
814 public CounterLocalService getCounterLocalService() {
815 return counterLocalService;
816 }
817
818
823 public void setCounterLocalService(CounterLocalService counterLocalService) {
824 this.counterLocalService = counterLocalService;
825 }
826
827
832 public ResourceLocalService getResourceLocalService() {
833 return resourceLocalService;
834 }
835
836
841 public void setResourceLocalService(
842 ResourceLocalService resourceLocalService) {
843 this.resourceLocalService = resourceLocalService;
844 }
845
846
851 public ResourceService getResourceService() {
852 return resourceService;
853 }
854
855
860 public void setResourceService(ResourceService resourceService) {
861 this.resourceService = resourceService;
862 }
863
864
869 public ResourcePersistence getResourcePersistence() {
870 return resourcePersistence;
871 }
872
873
878 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
879 this.resourcePersistence = resourcePersistence;
880 }
881
882
887 public ResourceFinder getResourceFinder() {
888 return resourceFinder;
889 }
890
891
896 public void setResourceFinder(ResourceFinder resourceFinder) {
897 this.resourceFinder = resourceFinder;
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
977 protected void runSQL(String sql) throws SystemException {
978 try {
979 DataSource dataSource = assetCategoryPersistence.getDataSource();
980
981 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
982 sql, new int[0]);
983
984 sqlUpdate.update();
985 }
986 catch (Exception e) {
987 throw new SystemException(e);
988 }
989 }
990
991 @BeanReference(type = AssetCategoryLocalService.class)
992 protected AssetCategoryLocalService assetCategoryLocalService;
993 @BeanReference(type = AssetCategoryService.class)
994 protected AssetCategoryService assetCategoryService;
995 @BeanReference(type = AssetCategoryPersistence.class)
996 protected AssetCategoryPersistence assetCategoryPersistence;
997 @BeanReference(type = AssetCategoryFinder.class)
998 protected AssetCategoryFinder assetCategoryFinder;
999 @BeanReference(type = AssetCategoryPropertyLocalService.class)
1000 protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
1001 @BeanReference(type = AssetCategoryPropertyService.class)
1002 protected AssetCategoryPropertyService assetCategoryPropertyService;
1003 @BeanReference(type = AssetCategoryPropertyPersistence.class)
1004 protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
1005 @BeanReference(type = AssetCategoryPropertyFinder.class)
1006 protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
1007 @BeanReference(type = AssetEntryLocalService.class)
1008 protected AssetEntryLocalService assetEntryLocalService;
1009 @BeanReference(type = AssetEntryService.class)
1010 protected AssetEntryService assetEntryService;
1011 @BeanReference(type = AssetEntryPersistence.class)
1012 protected AssetEntryPersistence assetEntryPersistence;
1013 @BeanReference(type = AssetEntryFinder.class)
1014 protected AssetEntryFinder assetEntryFinder;
1015 @BeanReference(type = AssetLinkLocalService.class)
1016 protected AssetLinkLocalService assetLinkLocalService;
1017 @BeanReference(type = AssetLinkPersistence.class)
1018 protected AssetLinkPersistence assetLinkPersistence;
1019 @BeanReference(type = AssetTagLocalService.class)
1020 protected AssetTagLocalService assetTagLocalService;
1021 @BeanReference(type = AssetTagService.class)
1022 protected AssetTagService assetTagService;
1023 @BeanReference(type = AssetTagPersistence.class)
1024 protected AssetTagPersistence assetTagPersistence;
1025 @BeanReference(type = AssetTagFinder.class)
1026 protected AssetTagFinder assetTagFinder;
1027 @BeanReference(type = AssetTagPropertyLocalService.class)
1028 protected AssetTagPropertyLocalService assetTagPropertyLocalService;
1029 @BeanReference(type = AssetTagPropertyService.class)
1030 protected AssetTagPropertyService assetTagPropertyService;
1031 @BeanReference(type = AssetTagPropertyPersistence.class)
1032 protected AssetTagPropertyPersistence assetTagPropertyPersistence;
1033 @BeanReference(type = AssetTagPropertyFinder.class)
1034 protected AssetTagPropertyFinder assetTagPropertyFinder;
1035 @BeanReference(type = AssetTagPropertyKeyFinder.class)
1036 protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
1037 @BeanReference(type = AssetTagStatsLocalService.class)
1038 protected AssetTagStatsLocalService assetTagStatsLocalService;
1039 @BeanReference(type = AssetTagStatsPersistence.class)
1040 protected AssetTagStatsPersistence assetTagStatsPersistence;
1041 @BeanReference(type = AssetVocabularyLocalService.class)
1042 protected AssetVocabularyLocalService assetVocabularyLocalService;
1043 @BeanReference(type = AssetVocabularyService.class)
1044 protected AssetVocabularyService assetVocabularyService;
1045 @BeanReference(type = AssetVocabularyPersistence.class)
1046 protected AssetVocabularyPersistence assetVocabularyPersistence;
1047 @BeanReference(type = CounterLocalService.class)
1048 protected CounterLocalService counterLocalService;
1049 @BeanReference(type = ResourceLocalService.class)
1050 protected ResourceLocalService resourceLocalService;
1051 @BeanReference(type = ResourceService.class)
1052 protected ResourceService resourceService;
1053 @BeanReference(type = ResourcePersistence.class)
1054 protected ResourcePersistence resourcePersistence;
1055 @BeanReference(type = ResourceFinder.class)
1056 protected ResourceFinder resourceFinder;
1057 @BeanReference(type = UserLocalService.class)
1058 protected UserLocalService userLocalService;
1059 @BeanReference(type = UserService.class)
1060 protected UserService userService;
1061 @BeanReference(type = UserPersistence.class)
1062 protected UserPersistence userPersistence;
1063 @BeanReference(type = UserFinder.class)
1064 protected UserFinder userFinder;
1065 }