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.AssetTag;
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 AssetTagLocalServiceBaseImpl
086 implements AssetTagLocalService {
087
094 public AssetTag addAssetTag(AssetTag assetTag) throws SystemException {
095 assetTag.setNew(true);
096
097 return assetTagPersistence.update(assetTag, false);
098 }
099
100
106 public AssetTag createAssetTag(long tagId) {
107 return assetTagPersistence.create(tagId);
108 }
109
110
117 public void deleteAssetTag(long tagId)
118 throws PortalException, SystemException {
119 assetTagPersistence.remove(tagId);
120 }
121
122
128 public void deleteAssetTag(AssetTag assetTag) throws SystemException {
129 assetTagPersistence.remove(assetTag);
130 }
131
132
139 @SuppressWarnings("rawtypes")
140 public List dynamicQuery(DynamicQuery dynamicQuery)
141 throws SystemException {
142 return assetTagPersistence.findWithDynamicQuery(dynamicQuery);
143 }
144
145
158 @SuppressWarnings("rawtypes")
159 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
160 throws SystemException {
161 return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start, end);
162 }
163
164
178 @SuppressWarnings("rawtypes")
179 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
180 OrderByComparator orderByComparator) throws SystemException {
181 return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start,
182 end, orderByComparator);
183 }
184
185
192 public long dynamicQueryCount(DynamicQuery dynamicQuery)
193 throws SystemException {
194 return assetTagPersistence.countWithDynamicQuery(dynamicQuery);
195 }
196
197
205 public AssetTag getAssetTag(long tagId)
206 throws PortalException, SystemException {
207 return assetTagPersistence.findByPrimaryKey(tagId);
208 }
209
210
222 public List<AssetTag> getAssetTags(int start, int end)
223 throws SystemException {
224 return assetTagPersistence.findAll(start, end);
225 }
226
227
233 public int getAssetTagsCount() throws SystemException {
234 return assetTagPersistence.countAll();
235 }
236
237
244 public AssetTag updateAssetTag(AssetTag assetTag) throws SystemException {
245 assetTag.setNew(false);
246
247 return assetTagPersistence.update(assetTag, true);
248 }
249
250
258 public AssetTag updateAssetTag(AssetTag assetTag, boolean merge)
259 throws SystemException {
260 assetTag.setNew(false);
261
262 return assetTagPersistence.update(assetTag, merge);
263 }
264
265
270 public AssetCategoryLocalService getAssetCategoryLocalService() {
271 return assetCategoryLocalService;
272 }
273
274
279 public void setAssetCategoryLocalService(
280 AssetCategoryLocalService assetCategoryLocalService) {
281 this.assetCategoryLocalService = assetCategoryLocalService;
282 }
283
284
289 public AssetCategoryService getAssetCategoryService() {
290 return assetCategoryService;
291 }
292
293
298 public void setAssetCategoryService(
299 AssetCategoryService assetCategoryService) {
300 this.assetCategoryService = assetCategoryService;
301 }
302
303
308 public AssetCategoryPersistence getAssetCategoryPersistence() {
309 return assetCategoryPersistence;
310 }
311
312
317 public void setAssetCategoryPersistence(
318 AssetCategoryPersistence assetCategoryPersistence) {
319 this.assetCategoryPersistence = assetCategoryPersistence;
320 }
321
322
327 public AssetCategoryFinder getAssetCategoryFinder() {
328 return assetCategoryFinder;
329 }
330
331
336 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
337 this.assetCategoryFinder = assetCategoryFinder;
338 }
339
340
345 public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
346 return assetCategoryPropertyLocalService;
347 }
348
349
354 public void setAssetCategoryPropertyLocalService(
355 AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
356 this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
357 }
358
359
364 public AssetCategoryPropertyService getAssetCategoryPropertyService() {
365 return assetCategoryPropertyService;
366 }
367
368
373 public void setAssetCategoryPropertyService(
374 AssetCategoryPropertyService assetCategoryPropertyService) {
375 this.assetCategoryPropertyService = assetCategoryPropertyService;
376 }
377
378
383 public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
384 return assetCategoryPropertyPersistence;
385 }
386
387
392 public void setAssetCategoryPropertyPersistence(
393 AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
394 this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
395 }
396
397
402 public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
403 return assetCategoryPropertyFinder;
404 }
405
406
411 public void setAssetCategoryPropertyFinder(
412 AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
413 this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
414 }
415
416
421 public AssetEntryLocalService getAssetEntryLocalService() {
422 return assetEntryLocalService;
423 }
424
425
430 public void setAssetEntryLocalService(
431 AssetEntryLocalService assetEntryLocalService) {
432 this.assetEntryLocalService = assetEntryLocalService;
433 }
434
435
440 public AssetEntryService getAssetEntryService() {
441 return assetEntryService;
442 }
443
444
449 public void setAssetEntryService(AssetEntryService assetEntryService) {
450 this.assetEntryService = assetEntryService;
451 }
452
453
458 public AssetEntryPersistence getAssetEntryPersistence() {
459 return assetEntryPersistence;
460 }
461
462
467 public void setAssetEntryPersistence(
468 AssetEntryPersistence assetEntryPersistence) {
469 this.assetEntryPersistence = assetEntryPersistence;
470 }
471
472
477 public AssetEntryFinder getAssetEntryFinder() {
478 return assetEntryFinder;
479 }
480
481
486 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
487 this.assetEntryFinder = assetEntryFinder;
488 }
489
490
495 public AssetLinkLocalService getAssetLinkLocalService() {
496 return assetLinkLocalService;
497 }
498
499
504 public void setAssetLinkLocalService(
505 AssetLinkLocalService assetLinkLocalService) {
506 this.assetLinkLocalService = assetLinkLocalService;
507 }
508
509
514 public AssetLinkPersistence getAssetLinkPersistence() {
515 return assetLinkPersistence;
516 }
517
518
523 public void setAssetLinkPersistence(
524 AssetLinkPersistence assetLinkPersistence) {
525 this.assetLinkPersistence = assetLinkPersistence;
526 }
527
528
533 public AssetTagLocalService getAssetTagLocalService() {
534 return assetTagLocalService;
535 }
536
537
542 public void setAssetTagLocalService(
543 AssetTagLocalService assetTagLocalService) {
544 this.assetTagLocalService = assetTagLocalService;
545 }
546
547
552 public AssetTagService getAssetTagService() {
553 return assetTagService;
554 }
555
556
561 public void setAssetTagService(AssetTagService assetTagService) {
562 this.assetTagService = assetTagService;
563 }
564
565
570 public AssetTagPersistence getAssetTagPersistence() {
571 return assetTagPersistence;
572 }
573
574
579 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
580 this.assetTagPersistence = assetTagPersistence;
581 }
582
583
588 public AssetTagFinder getAssetTagFinder() {
589 return assetTagFinder;
590 }
591
592
597 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
598 this.assetTagFinder = assetTagFinder;
599 }
600
601
606 public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
607 return assetTagPropertyLocalService;
608 }
609
610
615 public void setAssetTagPropertyLocalService(
616 AssetTagPropertyLocalService assetTagPropertyLocalService) {
617 this.assetTagPropertyLocalService = assetTagPropertyLocalService;
618 }
619
620
625 public AssetTagPropertyService getAssetTagPropertyService() {
626 return assetTagPropertyService;
627 }
628
629
634 public void setAssetTagPropertyService(
635 AssetTagPropertyService assetTagPropertyService) {
636 this.assetTagPropertyService = assetTagPropertyService;
637 }
638
639
644 public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
645 return assetTagPropertyPersistence;
646 }
647
648
653 public void setAssetTagPropertyPersistence(
654 AssetTagPropertyPersistence assetTagPropertyPersistence) {
655 this.assetTagPropertyPersistence = assetTagPropertyPersistence;
656 }
657
658
663 public AssetTagPropertyFinder getAssetTagPropertyFinder() {
664 return assetTagPropertyFinder;
665 }
666
667
672 public void setAssetTagPropertyFinder(
673 AssetTagPropertyFinder assetTagPropertyFinder) {
674 this.assetTagPropertyFinder = assetTagPropertyFinder;
675 }
676
677
682 public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
683 return assetTagPropertyKeyFinder;
684 }
685
686
691 public void setAssetTagPropertyKeyFinder(
692 AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
693 this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
694 }
695
696
701 public AssetTagStatsLocalService getAssetTagStatsLocalService() {
702 return assetTagStatsLocalService;
703 }
704
705
710 public void setAssetTagStatsLocalService(
711 AssetTagStatsLocalService assetTagStatsLocalService) {
712 this.assetTagStatsLocalService = assetTagStatsLocalService;
713 }
714
715
720 public AssetTagStatsPersistence getAssetTagStatsPersistence() {
721 return assetTagStatsPersistence;
722 }
723
724
729 public void setAssetTagStatsPersistence(
730 AssetTagStatsPersistence assetTagStatsPersistence) {
731 this.assetTagStatsPersistence = assetTagStatsPersistence;
732 }
733
734
739 public AssetVocabularyLocalService getAssetVocabularyLocalService() {
740 return assetVocabularyLocalService;
741 }
742
743
748 public void setAssetVocabularyLocalService(
749 AssetVocabularyLocalService assetVocabularyLocalService) {
750 this.assetVocabularyLocalService = assetVocabularyLocalService;
751 }
752
753
758 public AssetVocabularyService getAssetVocabularyService() {
759 return assetVocabularyService;
760 }
761
762
767 public void setAssetVocabularyService(
768 AssetVocabularyService assetVocabularyService) {
769 this.assetVocabularyService = assetVocabularyService;
770 }
771
772
777 public AssetVocabularyPersistence getAssetVocabularyPersistence() {
778 return assetVocabularyPersistence;
779 }
780
781
786 public void setAssetVocabularyPersistence(
787 AssetVocabularyPersistence assetVocabularyPersistence) {
788 this.assetVocabularyPersistence = assetVocabularyPersistence;
789 }
790
791
796 public CounterLocalService getCounterLocalService() {
797 return counterLocalService;
798 }
799
800
805 public void setCounterLocalService(CounterLocalService counterLocalService) {
806 this.counterLocalService = counterLocalService;
807 }
808
809
814 public ResourceLocalService getResourceLocalService() {
815 return resourceLocalService;
816 }
817
818
823 public void setResourceLocalService(
824 ResourceLocalService resourceLocalService) {
825 this.resourceLocalService = resourceLocalService;
826 }
827
828
833 public ResourceService getResourceService() {
834 return resourceService;
835 }
836
837
842 public void setResourceService(ResourceService resourceService) {
843 this.resourceService = resourceService;
844 }
845
846
851 public ResourcePersistence getResourcePersistence() {
852 return resourcePersistence;
853 }
854
855
860 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
861 this.resourcePersistence = resourcePersistence;
862 }
863
864
869 public ResourceFinder getResourceFinder() {
870 return resourceFinder;
871 }
872
873
878 public void setResourceFinder(ResourceFinder resourceFinder) {
879 this.resourceFinder = resourceFinder;
880 }
881
882
887 public UserLocalService getUserLocalService() {
888 return userLocalService;
889 }
890
891
896 public void setUserLocalService(UserLocalService userLocalService) {
897 this.userLocalService = userLocalService;
898 }
899
900
905 public UserService getUserService() {
906 return userService;
907 }
908
909
914 public void setUserService(UserService userService) {
915 this.userService = userService;
916 }
917
918
923 public UserPersistence getUserPersistence() {
924 return userPersistence;
925 }
926
927
932 public void setUserPersistence(UserPersistence userPersistence) {
933 this.userPersistence = userPersistence;
934 }
935
936
941 public UserFinder getUserFinder() {
942 return userFinder;
943 }
944
945
950 public void setUserFinder(UserFinder userFinder) {
951 this.userFinder = userFinder;
952 }
953
954
959 protected void runSQL(String sql) throws SystemException {
960 try {
961 DataSource dataSource = assetTagPersistence.getDataSource();
962
963 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
964 sql, new int[0]);
965
966 sqlUpdate.update();
967 }
968 catch (Exception e) {
969 throw new SystemException(e);
970 }
971 }
972
973 @BeanReference(type = AssetCategoryLocalService.class)
974 protected AssetCategoryLocalService assetCategoryLocalService;
975 @BeanReference(type = AssetCategoryService.class)
976 protected AssetCategoryService assetCategoryService;
977 @BeanReference(type = AssetCategoryPersistence.class)
978 protected AssetCategoryPersistence assetCategoryPersistence;
979 @BeanReference(type = AssetCategoryFinder.class)
980 protected AssetCategoryFinder assetCategoryFinder;
981 @BeanReference(type = AssetCategoryPropertyLocalService.class)
982 protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
983 @BeanReference(type = AssetCategoryPropertyService.class)
984 protected AssetCategoryPropertyService assetCategoryPropertyService;
985 @BeanReference(type = AssetCategoryPropertyPersistence.class)
986 protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
987 @BeanReference(type = AssetCategoryPropertyFinder.class)
988 protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
989 @BeanReference(type = AssetEntryLocalService.class)
990 protected AssetEntryLocalService assetEntryLocalService;
991 @BeanReference(type = AssetEntryService.class)
992 protected AssetEntryService assetEntryService;
993 @BeanReference(type = AssetEntryPersistence.class)
994 protected AssetEntryPersistence assetEntryPersistence;
995 @BeanReference(type = AssetEntryFinder.class)
996 protected AssetEntryFinder assetEntryFinder;
997 @BeanReference(type = AssetLinkLocalService.class)
998 protected AssetLinkLocalService assetLinkLocalService;
999 @BeanReference(type = AssetLinkPersistence.class)
1000 protected AssetLinkPersistence assetLinkPersistence;
1001 @BeanReference(type = AssetTagLocalService.class)
1002 protected AssetTagLocalService assetTagLocalService;
1003 @BeanReference(type = AssetTagService.class)
1004 protected AssetTagService assetTagService;
1005 @BeanReference(type = AssetTagPersistence.class)
1006 protected AssetTagPersistence assetTagPersistence;
1007 @BeanReference(type = AssetTagFinder.class)
1008 protected AssetTagFinder assetTagFinder;
1009 @BeanReference(type = AssetTagPropertyLocalService.class)
1010 protected AssetTagPropertyLocalService assetTagPropertyLocalService;
1011 @BeanReference(type = AssetTagPropertyService.class)
1012 protected AssetTagPropertyService assetTagPropertyService;
1013 @BeanReference(type = AssetTagPropertyPersistence.class)
1014 protected AssetTagPropertyPersistence assetTagPropertyPersistence;
1015 @BeanReference(type = AssetTagPropertyFinder.class)
1016 protected AssetTagPropertyFinder assetTagPropertyFinder;
1017 @BeanReference(type = AssetTagPropertyKeyFinder.class)
1018 protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
1019 @BeanReference(type = AssetTagStatsLocalService.class)
1020 protected AssetTagStatsLocalService assetTagStatsLocalService;
1021 @BeanReference(type = AssetTagStatsPersistence.class)
1022 protected AssetTagStatsPersistence assetTagStatsPersistence;
1023 @BeanReference(type = AssetVocabularyLocalService.class)
1024 protected AssetVocabularyLocalService assetVocabularyLocalService;
1025 @BeanReference(type = AssetVocabularyService.class)
1026 protected AssetVocabularyService assetVocabularyService;
1027 @BeanReference(type = AssetVocabularyPersistence.class)
1028 protected AssetVocabularyPersistence assetVocabularyPersistence;
1029 @BeanReference(type = CounterLocalService.class)
1030 protected CounterLocalService counterLocalService;
1031 @BeanReference(type = ResourceLocalService.class)
1032 protected ResourceLocalService resourceLocalService;
1033 @BeanReference(type = ResourceService.class)
1034 protected ResourceService resourceService;
1035 @BeanReference(type = ResourcePersistence.class)
1036 protected ResourcePersistence resourcePersistence;
1037 @BeanReference(type = ResourceFinder.class)
1038 protected ResourceFinder resourceFinder;
1039 @BeanReference(type = UserLocalService.class)
1040 protected UserLocalService userLocalService;
1041 @BeanReference(type = UserService.class)
1042 protected UserService userService;
1043 @BeanReference(type = UserPersistence.class)
1044 protected UserPersistence userPersistence;
1045 @BeanReference(type = UserFinder.class)
1046 protected UserFinder userFinder;
1047 }