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.AssetLink;
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 AssetLinkLocalServiceBaseImpl extends BaseLocalServiceImpl
090 implements AssetLinkLocalService, IdentifiableBean {
091
096
097
104 @Indexable(type = IndexableType.REINDEX)
105 public AssetLink addAssetLink(AssetLink assetLink)
106 throws SystemException {
107 assetLink.setNew(true);
108
109 return assetLinkPersistence.update(assetLink);
110 }
111
112
118 public AssetLink createAssetLink(long linkId) {
119 return assetLinkPersistence.create(linkId);
120 }
121
122
130 @Indexable(type = IndexableType.DELETE)
131 public AssetLink deleteAssetLink(long linkId)
132 throws PortalException, SystemException {
133 return assetLinkPersistence.remove(linkId);
134 }
135
136
143 @Indexable(type = IndexableType.DELETE)
144 public AssetLink deleteAssetLink(AssetLink assetLink)
145 throws SystemException {
146 return assetLinkPersistence.remove(assetLink);
147 }
148
149 public DynamicQuery dynamicQuery() {
150 Class<?> clazz = getClass();
151
152 return DynamicQueryFactoryUtil.forClass(AssetLink.class,
153 clazz.getClassLoader());
154 }
155
156
163 @SuppressWarnings("rawtypes")
164 public List dynamicQuery(DynamicQuery dynamicQuery)
165 throws SystemException {
166 return assetLinkPersistence.findWithDynamicQuery(dynamicQuery);
167 }
168
169
182 @SuppressWarnings("rawtypes")
183 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
184 throws SystemException {
185 return assetLinkPersistence.findWithDynamicQuery(dynamicQuery, start,
186 end);
187 }
188
189
203 @SuppressWarnings("rawtypes")
204 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
205 OrderByComparator orderByComparator) throws SystemException {
206 return assetLinkPersistence.findWithDynamicQuery(dynamicQuery, start,
207 end, orderByComparator);
208 }
209
210
217 public long dynamicQueryCount(DynamicQuery dynamicQuery)
218 throws SystemException {
219 return assetLinkPersistence.countWithDynamicQuery(dynamicQuery);
220 }
221
222 public AssetLink fetchAssetLink(long linkId) throws SystemException {
223 return assetLinkPersistence.fetchByPrimaryKey(linkId);
224 }
225
226
234 public AssetLink getAssetLink(long linkId)
235 throws PortalException, SystemException {
236 return assetLinkPersistence.findByPrimaryKey(linkId);
237 }
238
239 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
240 throws PortalException, SystemException {
241 return assetLinkPersistence.findByPrimaryKey(primaryKeyObj);
242 }
243
244
256 public List<AssetLink> getAssetLinks(int start, int end)
257 throws SystemException {
258 return assetLinkPersistence.findAll(start, end);
259 }
260
261
267 public int getAssetLinksCount() throws SystemException {
268 return assetLinkPersistence.countAll();
269 }
270
271
278 @Indexable(type = IndexableType.REINDEX)
279 public AssetLink updateAssetLink(AssetLink assetLink)
280 throws SystemException {
281 return assetLinkPersistence.update(assetLink);
282 }
283
284
289 public AssetCategoryLocalService getAssetCategoryLocalService() {
290 return assetCategoryLocalService;
291 }
292
293
298 public void setAssetCategoryLocalService(
299 AssetCategoryLocalService assetCategoryLocalService) {
300 this.assetCategoryLocalService = assetCategoryLocalService;
301 }
302
303
308 public AssetCategoryService getAssetCategoryService() {
309 return assetCategoryService;
310 }
311
312
317 public void setAssetCategoryService(
318 AssetCategoryService assetCategoryService) {
319 this.assetCategoryService = assetCategoryService;
320 }
321
322
327 public AssetCategoryPersistence getAssetCategoryPersistence() {
328 return assetCategoryPersistence;
329 }
330
331
336 public void setAssetCategoryPersistence(
337 AssetCategoryPersistence assetCategoryPersistence) {
338 this.assetCategoryPersistence = assetCategoryPersistence;
339 }
340
341
346 public AssetCategoryFinder getAssetCategoryFinder() {
347 return assetCategoryFinder;
348 }
349
350
355 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
356 this.assetCategoryFinder = assetCategoryFinder;
357 }
358
359
364 public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
365 return assetCategoryPropertyLocalService;
366 }
367
368
373 public void setAssetCategoryPropertyLocalService(
374 AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
375 this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
376 }
377
378
383 public AssetCategoryPropertyService getAssetCategoryPropertyService() {
384 return assetCategoryPropertyService;
385 }
386
387
392 public void setAssetCategoryPropertyService(
393 AssetCategoryPropertyService assetCategoryPropertyService) {
394 this.assetCategoryPropertyService = assetCategoryPropertyService;
395 }
396
397
402 public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
403 return assetCategoryPropertyPersistence;
404 }
405
406
411 public void setAssetCategoryPropertyPersistence(
412 AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
413 this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
414 }
415
416
421 public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
422 return assetCategoryPropertyFinder;
423 }
424
425
430 public void setAssetCategoryPropertyFinder(
431 AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
432 this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
433 }
434
435
440 public AssetEntryLocalService getAssetEntryLocalService() {
441 return assetEntryLocalService;
442 }
443
444
449 public void setAssetEntryLocalService(
450 AssetEntryLocalService assetEntryLocalService) {
451 this.assetEntryLocalService = assetEntryLocalService;
452 }
453
454
459 public AssetEntryService getAssetEntryService() {
460 return assetEntryService;
461 }
462
463
468 public void setAssetEntryService(AssetEntryService assetEntryService) {
469 this.assetEntryService = assetEntryService;
470 }
471
472
477 public AssetEntryPersistence getAssetEntryPersistence() {
478 return assetEntryPersistence;
479 }
480
481
486 public void setAssetEntryPersistence(
487 AssetEntryPersistence assetEntryPersistence) {
488 this.assetEntryPersistence = assetEntryPersistence;
489 }
490
491
496 public AssetEntryFinder getAssetEntryFinder() {
497 return assetEntryFinder;
498 }
499
500
505 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
506 this.assetEntryFinder = assetEntryFinder;
507 }
508
509
514 public AssetLinkLocalService getAssetLinkLocalService() {
515 return assetLinkLocalService;
516 }
517
518
523 public void setAssetLinkLocalService(
524 AssetLinkLocalService assetLinkLocalService) {
525 this.assetLinkLocalService = assetLinkLocalService;
526 }
527
528
533 public AssetLinkPersistence getAssetLinkPersistence() {
534 return assetLinkPersistence;
535 }
536
537
542 public void setAssetLinkPersistence(
543 AssetLinkPersistence assetLinkPersistence) {
544 this.assetLinkPersistence = assetLinkPersistence;
545 }
546
547
552 public AssetLinkFinder getAssetLinkFinder() {
553 return assetLinkFinder;
554 }
555
556
561 public void setAssetLinkFinder(AssetLinkFinder assetLinkFinder) {
562 this.assetLinkFinder = assetLinkFinder;
563 }
564
565
570 public AssetTagLocalService getAssetTagLocalService() {
571 return assetTagLocalService;
572 }
573
574
579 public void setAssetTagLocalService(
580 AssetTagLocalService assetTagLocalService) {
581 this.assetTagLocalService = assetTagLocalService;
582 }
583
584
589 public AssetTagService getAssetTagService() {
590 return assetTagService;
591 }
592
593
598 public void setAssetTagService(AssetTagService assetTagService) {
599 this.assetTagService = assetTagService;
600 }
601
602
607 public AssetTagPersistence getAssetTagPersistence() {
608 return assetTagPersistence;
609 }
610
611
616 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
617 this.assetTagPersistence = assetTagPersistence;
618 }
619
620
625 public AssetTagFinder getAssetTagFinder() {
626 return assetTagFinder;
627 }
628
629
634 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
635 this.assetTagFinder = assetTagFinder;
636 }
637
638
643 public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
644 return assetTagPropertyLocalService;
645 }
646
647
652 public void setAssetTagPropertyLocalService(
653 AssetTagPropertyLocalService assetTagPropertyLocalService) {
654 this.assetTagPropertyLocalService = assetTagPropertyLocalService;
655 }
656
657
662 public AssetTagPropertyService getAssetTagPropertyService() {
663 return assetTagPropertyService;
664 }
665
666
671 public void setAssetTagPropertyService(
672 AssetTagPropertyService assetTagPropertyService) {
673 this.assetTagPropertyService = assetTagPropertyService;
674 }
675
676
681 public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
682 return assetTagPropertyPersistence;
683 }
684
685
690 public void setAssetTagPropertyPersistence(
691 AssetTagPropertyPersistence assetTagPropertyPersistence) {
692 this.assetTagPropertyPersistence = assetTagPropertyPersistence;
693 }
694
695
700 public AssetTagPropertyFinder getAssetTagPropertyFinder() {
701 return assetTagPropertyFinder;
702 }
703
704
709 public void setAssetTagPropertyFinder(
710 AssetTagPropertyFinder assetTagPropertyFinder) {
711 this.assetTagPropertyFinder = assetTagPropertyFinder;
712 }
713
714
719 public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
720 return assetTagPropertyKeyFinder;
721 }
722
723
728 public void setAssetTagPropertyKeyFinder(
729 AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
730 this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
731 }
732
733
738 public AssetTagStatsLocalService getAssetTagStatsLocalService() {
739 return assetTagStatsLocalService;
740 }
741
742
747 public void setAssetTagStatsLocalService(
748 AssetTagStatsLocalService assetTagStatsLocalService) {
749 this.assetTagStatsLocalService = assetTagStatsLocalService;
750 }
751
752
757 public AssetTagStatsPersistence getAssetTagStatsPersistence() {
758 return assetTagStatsPersistence;
759 }
760
761
766 public void setAssetTagStatsPersistence(
767 AssetTagStatsPersistence assetTagStatsPersistence) {
768 this.assetTagStatsPersistence = assetTagStatsPersistence;
769 }
770
771
776 public AssetVocabularyLocalService getAssetVocabularyLocalService() {
777 return assetVocabularyLocalService;
778 }
779
780
785 public void setAssetVocabularyLocalService(
786 AssetVocabularyLocalService assetVocabularyLocalService) {
787 this.assetVocabularyLocalService = assetVocabularyLocalService;
788 }
789
790
795 public AssetVocabularyService getAssetVocabularyService() {
796 return assetVocabularyService;
797 }
798
799
804 public void setAssetVocabularyService(
805 AssetVocabularyService assetVocabularyService) {
806 this.assetVocabularyService = assetVocabularyService;
807 }
808
809
814 public AssetVocabularyPersistence getAssetVocabularyPersistence() {
815 return assetVocabularyPersistence;
816 }
817
818
823 public void setAssetVocabularyPersistence(
824 AssetVocabularyPersistence assetVocabularyPersistence) {
825 this.assetVocabularyPersistence = assetVocabularyPersistence;
826 }
827
828
833 public AssetVocabularyFinder getAssetVocabularyFinder() {
834 return assetVocabularyFinder;
835 }
836
837
842 public void setAssetVocabularyFinder(
843 AssetVocabularyFinder assetVocabularyFinder) {
844 this.assetVocabularyFinder = assetVocabularyFinder;
845 }
846
847
852 public CounterLocalService getCounterLocalService() {
853 return counterLocalService;
854 }
855
856
861 public void setCounterLocalService(CounterLocalService counterLocalService) {
862 this.counterLocalService = counterLocalService;
863 }
864
865
870 public ResourceLocalService getResourceLocalService() {
871 return resourceLocalService;
872 }
873
874
879 public void setResourceLocalService(
880 ResourceLocalService resourceLocalService) {
881 this.resourceLocalService = resourceLocalService;
882 }
883
884
889 public UserLocalService getUserLocalService() {
890 return userLocalService;
891 }
892
893
898 public void setUserLocalService(UserLocalService userLocalService) {
899 this.userLocalService = userLocalService;
900 }
901
902
907 public UserService getUserService() {
908 return userService;
909 }
910
911
916 public void setUserService(UserService userService) {
917 this.userService = userService;
918 }
919
920
925 public UserPersistence getUserPersistence() {
926 return userPersistence;
927 }
928
929
934 public void setUserPersistence(UserPersistence userPersistence) {
935 this.userPersistence = userPersistence;
936 }
937
938
943 public UserFinder getUserFinder() {
944 return userFinder;
945 }
946
947
952 public void setUserFinder(UserFinder userFinder) {
953 this.userFinder = userFinder;
954 }
955
956 public void afterPropertiesSet() {
957 persistedModelLocalServiceRegistry.register("com.liferay.portlet.asset.model.AssetLink",
958 assetLinkLocalService);
959 }
960
961 public void destroy() {
962 persistedModelLocalServiceRegistry.unregister(
963 "com.liferay.portlet.asset.model.AssetLink");
964 }
965
966
971 public String getBeanIdentifier() {
972 return _beanIdentifier;
973 }
974
975
980 public void setBeanIdentifier(String beanIdentifier) {
981 _beanIdentifier = beanIdentifier;
982 }
983
984 protected Class<?> getModelClass() {
985 return AssetLink.class;
986 }
987
988 protected String getModelClassName() {
989 return AssetLink.class.getName();
990 }
991
992
997 protected void runSQL(String sql) throws SystemException {
998 try {
999 DataSource dataSource = assetLinkPersistence.getDataSource();
1000
1001 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1002 sql, new int[0]);
1003
1004 sqlUpdate.update();
1005 }
1006 catch (Exception e) {
1007 throw new SystemException(e);
1008 }
1009 }
1010
1011 @BeanReference(type = AssetCategoryLocalService.class)
1012 protected AssetCategoryLocalService assetCategoryLocalService;
1013 @BeanReference(type = AssetCategoryService.class)
1014 protected AssetCategoryService assetCategoryService;
1015 @BeanReference(type = AssetCategoryPersistence.class)
1016 protected AssetCategoryPersistence assetCategoryPersistence;
1017 @BeanReference(type = AssetCategoryFinder.class)
1018 protected AssetCategoryFinder assetCategoryFinder;
1019 @BeanReference(type = AssetCategoryPropertyLocalService.class)
1020 protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
1021 @BeanReference(type = AssetCategoryPropertyService.class)
1022 protected AssetCategoryPropertyService assetCategoryPropertyService;
1023 @BeanReference(type = AssetCategoryPropertyPersistence.class)
1024 protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
1025 @BeanReference(type = AssetCategoryPropertyFinder.class)
1026 protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
1027 @BeanReference(type = AssetEntryLocalService.class)
1028 protected AssetEntryLocalService assetEntryLocalService;
1029 @BeanReference(type = AssetEntryService.class)
1030 protected AssetEntryService assetEntryService;
1031 @BeanReference(type = AssetEntryPersistence.class)
1032 protected AssetEntryPersistence assetEntryPersistence;
1033 @BeanReference(type = AssetEntryFinder.class)
1034 protected AssetEntryFinder assetEntryFinder;
1035 @BeanReference(type = AssetLinkLocalService.class)
1036 protected AssetLinkLocalService assetLinkLocalService;
1037 @BeanReference(type = AssetLinkPersistence.class)
1038 protected AssetLinkPersistence assetLinkPersistence;
1039 @BeanReference(type = AssetLinkFinder.class)
1040 protected AssetLinkFinder assetLinkFinder;
1041 @BeanReference(type = AssetTagLocalService.class)
1042 protected AssetTagLocalService assetTagLocalService;
1043 @BeanReference(type = AssetTagService.class)
1044 protected AssetTagService assetTagService;
1045 @BeanReference(type = AssetTagPersistence.class)
1046 protected AssetTagPersistence assetTagPersistence;
1047 @BeanReference(type = AssetTagFinder.class)
1048 protected AssetTagFinder assetTagFinder;
1049 @BeanReference(type = AssetTagPropertyLocalService.class)
1050 protected AssetTagPropertyLocalService assetTagPropertyLocalService;
1051 @BeanReference(type = AssetTagPropertyService.class)
1052 protected AssetTagPropertyService assetTagPropertyService;
1053 @BeanReference(type = AssetTagPropertyPersistence.class)
1054 protected AssetTagPropertyPersistence assetTagPropertyPersistence;
1055 @BeanReference(type = AssetTagPropertyFinder.class)
1056 protected AssetTagPropertyFinder assetTagPropertyFinder;
1057 @BeanReference(type = AssetTagPropertyKeyFinder.class)
1058 protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
1059 @BeanReference(type = AssetTagStatsLocalService.class)
1060 protected AssetTagStatsLocalService assetTagStatsLocalService;
1061 @BeanReference(type = AssetTagStatsPersistence.class)
1062 protected AssetTagStatsPersistence assetTagStatsPersistence;
1063 @BeanReference(type = AssetVocabularyLocalService.class)
1064 protected AssetVocabularyLocalService assetVocabularyLocalService;
1065 @BeanReference(type = AssetVocabularyService.class)
1066 protected AssetVocabularyService assetVocabularyService;
1067 @BeanReference(type = AssetVocabularyPersistence.class)
1068 protected AssetVocabularyPersistence assetVocabularyPersistence;
1069 @BeanReference(type = AssetVocabularyFinder.class)
1070 protected AssetVocabularyFinder assetVocabularyFinder;
1071 @BeanReference(type = CounterLocalService.class)
1072 protected CounterLocalService counterLocalService;
1073 @BeanReference(type = ResourceLocalService.class)
1074 protected ResourceLocalService resourceLocalService;
1075 @BeanReference(type = UserLocalService.class)
1076 protected UserLocalService userLocalService;
1077 @BeanReference(type = UserService.class)
1078 protected UserService userService;
1079 @BeanReference(type = UserPersistence.class)
1080 protected UserPersistence userPersistence;
1081 @BeanReference(type = UserFinder.class)
1082 protected UserFinder userFinder;
1083 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1084 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1085 private String _beanIdentifier;
1086 }