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.AssetTag;
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 AssetTagLocalServiceBaseImpl extends BaseLocalServiceImpl
090 implements AssetTagLocalService, IdentifiableBean {
091
096
097
104 @Indexable(type = IndexableType.REINDEX)
105 public AssetTag addAssetTag(AssetTag assetTag) throws SystemException {
106 assetTag.setNew(true);
107
108 return assetTagPersistence.update(assetTag);
109 }
110
111
117 public AssetTag createAssetTag(long tagId) {
118 return assetTagPersistence.create(tagId);
119 }
120
121
129 @Indexable(type = IndexableType.DELETE)
130 public AssetTag deleteAssetTag(long tagId)
131 throws PortalException, SystemException {
132 return assetTagPersistence.remove(tagId);
133 }
134
135
142 @Indexable(type = IndexableType.DELETE)
143 public AssetTag deleteAssetTag(AssetTag assetTag) throws SystemException {
144 return assetTagPersistence.remove(assetTag);
145 }
146
147 public DynamicQuery dynamicQuery() {
148 Class<?> clazz = getClass();
149
150 return DynamicQueryFactoryUtil.forClass(AssetTag.class,
151 clazz.getClassLoader());
152 }
153
154
161 @SuppressWarnings("rawtypes")
162 public List dynamicQuery(DynamicQuery dynamicQuery)
163 throws SystemException {
164 return assetTagPersistence.findWithDynamicQuery(dynamicQuery);
165 }
166
167
180 @SuppressWarnings("rawtypes")
181 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
182 throws SystemException {
183 return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start, end);
184 }
185
186
200 @SuppressWarnings("rawtypes")
201 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
202 OrderByComparator orderByComparator) throws SystemException {
203 return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start,
204 end, orderByComparator);
205 }
206
207
214 public long dynamicQueryCount(DynamicQuery dynamicQuery)
215 throws SystemException {
216 return assetTagPersistence.countWithDynamicQuery(dynamicQuery);
217 }
218
219 public AssetTag fetchAssetTag(long tagId) throws SystemException {
220 return assetTagPersistence.fetchByPrimaryKey(tagId);
221 }
222
223
231 public AssetTag getAssetTag(long tagId)
232 throws PortalException, SystemException {
233 return assetTagPersistence.findByPrimaryKey(tagId);
234 }
235
236 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
237 throws PortalException, SystemException {
238 return assetTagPersistence.findByPrimaryKey(primaryKeyObj);
239 }
240
241
253 public List<AssetTag> getAssetTags(int start, int end)
254 throws SystemException {
255 return assetTagPersistence.findAll(start, end);
256 }
257
258
264 public int getAssetTagsCount() throws SystemException {
265 return assetTagPersistence.countAll();
266 }
267
268
275 @Indexable(type = IndexableType.REINDEX)
276 public AssetTag updateAssetTag(AssetTag assetTag) throws SystemException {
277 return assetTagPersistence.update(assetTag);
278 }
279
280
285 public AssetCategoryLocalService getAssetCategoryLocalService() {
286 return assetCategoryLocalService;
287 }
288
289
294 public void setAssetCategoryLocalService(
295 AssetCategoryLocalService assetCategoryLocalService) {
296 this.assetCategoryLocalService = assetCategoryLocalService;
297 }
298
299
304 public AssetCategoryService getAssetCategoryService() {
305 return assetCategoryService;
306 }
307
308
313 public void setAssetCategoryService(
314 AssetCategoryService assetCategoryService) {
315 this.assetCategoryService = assetCategoryService;
316 }
317
318
323 public AssetCategoryPersistence getAssetCategoryPersistence() {
324 return assetCategoryPersistence;
325 }
326
327
332 public void setAssetCategoryPersistence(
333 AssetCategoryPersistence assetCategoryPersistence) {
334 this.assetCategoryPersistence = assetCategoryPersistence;
335 }
336
337
342 public AssetCategoryFinder getAssetCategoryFinder() {
343 return assetCategoryFinder;
344 }
345
346
351 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
352 this.assetCategoryFinder = assetCategoryFinder;
353 }
354
355
360 public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
361 return assetCategoryPropertyLocalService;
362 }
363
364
369 public void setAssetCategoryPropertyLocalService(
370 AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
371 this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
372 }
373
374
379 public AssetCategoryPropertyService getAssetCategoryPropertyService() {
380 return assetCategoryPropertyService;
381 }
382
383
388 public void setAssetCategoryPropertyService(
389 AssetCategoryPropertyService assetCategoryPropertyService) {
390 this.assetCategoryPropertyService = assetCategoryPropertyService;
391 }
392
393
398 public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
399 return assetCategoryPropertyPersistence;
400 }
401
402
407 public void setAssetCategoryPropertyPersistence(
408 AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
409 this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
410 }
411
412
417 public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
418 return assetCategoryPropertyFinder;
419 }
420
421
426 public void setAssetCategoryPropertyFinder(
427 AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
428 this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
429 }
430
431
436 public AssetEntryLocalService getAssetEntryLocalService() {
437 return assetEntryLocalService;
438 }
439
440
445 public void setAssetEntryLocalService(
446 AssetEntryLocalService assetEntryLocalService) {
447 this.assetEntryLocalService = assetEntryLocalService;
448 }
449
450
455 public AssetEntryService getAssetEntryService() {
456 return assetEntryService;
457 }
458
459
464 public void setAssetEntryService(AssetEntryService assetEntryService) {
465 this.assetEntryService = assetEntryService;
466 }
467
468
473 public AssetEntryPersistence getAssetEntryPersistence() {
474 return assetEntryPersistence;
475 }
476
477
482 public void setAssetEntryPersistence(
483 AssetEntryPersistence assetEntryPersistence) {
484 this.assetEntryPersistence = assetEntryPersistence;
485 }
486
487
492 public AssetEntryFinder getAssetEntryFinder() {
493 return assetEntryFinder;
494 }
495
496
501 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
502 this.assetEntryFinder = assetEntryFinder;
503 }
504
505
510 public AssetLinkLocalService getAssetLinkLocalService() {
511 return assetLinkLocalService;
512 }
513
514
519 public void setAssetLinkLocalService(
520 AssetLinkLocalService assetLinkLocalService) {
521 this.assetLinkLocalService = assetLinkLocalService;
522 }
523
524
529 public AssetLinkPersistence getAssetLinkPersistence() {
530 return assetLinkPersistence;
531 }
532
533
538 public void setAssetLinkPersistence(
539 AssetLinkPersistence assetLinkPersistence) {
540 this.assetLinkPersistence = assetLinkPersistence;
541 }
542
543
548 public AssetLinkFinder getAssetLinkFinder() {
549 return assetLinkFinder;
550 }
551
552
557 public void setAssetLinkFinder(AssetLinkFinder assetLinkFinder) {
558 this.assetLinkFinder = assetLinkFinder;
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 UserLocalService getUserLocalService() {
886 return userLocalService;
887 }
888
889
894 public void setUserLocalService(UserLocalService userLocalService) {
895 this.userLocalService = userLocalService;
896 }
897
898
903 public UserService getUserService() {
904 return userService;
905 }
906
907
912 public void setUserService(UserService userService) {
913 this.userService = userService;
914 }
915
916
921 public UserPersistence getUserPersistence() {
922 return userPersistence;
923 }
924
925
930 public void setUserPersistence(UserPersistence userPersistence) {
931 this.userPersistence = userPersistence;
932 }
933
934
939 public UserFinder getUserFinder() {
940 return userFinder;
941 }
942
943
948 public void setUserFinder(UserFinder userFinder) {
949 this.userFinder = userFinder;
950 }
951
952 public void afterPropertiesSet() {
953 persistedModelLocalServiceRegistry.register("com.liferay.portlet.asset.model.AssetTag",
954 assetTagLocalService);
955 }
956
957 public void destroy() {
958 persistedModelLocalServiceRegistry.unregister(
959 "com.liferay.portlet.asset.model.AssetTag");
960 }
961
962
967 public String getBeanIdentifier() {
968 return _beanIdentifier;
969 }
970
971
976 public void setBeanIdentifier(String beanIdentifier) {
977 _beanIdentifier = beanIdentifier;
978 }
979
980 protected Class<?> getModelClass() {
981 return AssetTag.class;
982 }
983
984 protected String getModelClassName() {
985 return AssetTag.class.getName();
986 }
987
988
993 protected void runSQL(String sql) throws SystemException {
994 try {
995 DataSource dataSource = assetTagPersistence.getDataSource();
996
997 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
998 sql, new int[0]);
999
1000 sqlUpdate.update();
1001 }
1002 catch (Exception e) {
1003 throw new SystemException(e);
1004 }
1005 }
1006
1007 @BeanReference(type = AssetCategoryLocalService.class)
1008 protected AssetCategoryLocalService assetCategoryLocalService;
1009 @BeanReference(type = AssetCategoryService.class)
1010 protected AssetCategoryService assetCategoryService;
1011 @BeanReference(type = AssetCategoryPersistence.class)
1012 protected AssetCategoryPersistence assetCategoryPersistence;
1013 @BeanReference(type = AssetCategoryFinder.class)
1014 protected AssetCategoryFinder assetCategoryFinder;
1015 @BeanReference(type = AssetCategoryPropertyLocalService.class)
1016 protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
1017 @BeanReference(type = AssetCategoryPropertyService.class)
1018 protected AssetCategoryPropertyService assetCategoryPropertyService;
1019 @BeanReference(type = AssetCategoryPropertyPersistence.class)
1020 protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
1021 @BeanReference(type = AssetCategoryPropertyFinder.class)
1022 protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
1023 @BeanReference(type = AssetEntryLocalService.class)
1024 protected AssetEntryLocalService assetEntryLocalService;
1025 @BeanReference(type = AssetEntryService.class)
1026 protected AssetEntryService assetEntryService;
1027 @BeanReference(type = AssetEntryPersistence.class)
1028 protected AssetEntryPersistence assetEntryPersistence;
1029 @BeanReference(type = AssetEntryFinder.class)
1030 protected AssetEntryFinder assetEntryFinder;
1031 @BeanReference(type = AssetLinkLocalService.class)
1032 protected AssetLinkLocalService assetLinkLocalService;
1033 @BeanReference(type = AssetLinkPersistence.class)
1034 protected AssetLinkPersistence assetLinkPersistence;
1035 @BeanReference(type = AssetLinkFinder.class)
1036 protected AssetLinkFinder assetLinkFinder;
1037 @BeanReference(type = AssetTagLocalService.class)
1038 protected AssetTagLocalService assetTagLocalService;
1039 @BeanReference(type = AssetTagService.class)
1040 protected AssetTagService assetTagService;
1041 @BeanReference(type = AssetTagPersistence.class)
1042 protected AssetTagPersistence assetTagPersistence;
1043 @BeanReference(type = AssetTagFinder.class)
1044 protected AssetTagFinder assetTagFinder;
1045 @BeanReference(type = AssetTagPropertyLocalService.class)
1046 protected AssetTagPropertyLocalService assetTagPropertyLocalService;
1047 @BeanReference(type = AssetTagPropertyService.class)
1048 protected AssetTagPropertyService assetTagPropertyService;
1049 @BeanReference(type = AssetTagPropertyPersistence.class)
1050 protected AssetTagPropertyPersistence assetTagPropertyPersistence;
1051 @BeanReference(type = AssetTagPropertyFinder.class)
1052 protected AssetTagPropertyFinder assetTagPropertyFinder;
1053 @BeanReference(type = AssetTagPropertyKeyFinder.class)
1054 protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
1055 @BeanReference(type = AssetTagStatsLocalService.class)
1056 protected AssetTagStatsLocalService assetTagStatsLocalService;
1057 @BeanReference(type = AssetTagStatsPersistence.class)
1058 protected AssetTagStatsPersistence assetTagStatsPersistence;
1059 @BeanReference(type = AssetVocabularyLocalService.class)
1060 protected AssetVocabularyLocalService assetVocabularyLocalService;
1061 @BeanReference(type = AssetVocabularyService.class)
1062 protected AssetVocabularyService assetVocabularyService;
1063 @BeanReference(type = AssetVocabularyPersistence.class)
1064 protected AssetVocabularyPersistence assetVocabularyPersistence;
1065 @BeanReference(type = AssetVocabularyFinder.class)
1066 protected AssetVocabularyFinder assetVocabularyFinder;
1067 @BeanReference(type = CounterLocalService.class)
1068 protected CounterLocalService counterLocalService;
1069 @BeanReference(type = ResourceLocalService.class)
1070 protected ResourceLocalService resourceLocalService;
1071 @BeanReference(type = UserLocalService.class)
1072 protected UserLocalService userLocalService;
1073 @BeanReference(type = UserService.class)
1074 protected UserService userService;
1075 @BeanReference(type = UserPersistence.class)
1076 protected UserPersistence userPersistence;
1077 @BeanReference(type = UserFinder.class)
1078 protected UserFinder userFinder;
1079 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1080 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1081 private String _beanIdentifier;
1082 }