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.AssetLink;
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 AssetLinkLocalServiceBaseImpl
086 implements AssetLinkLocalService {
087
094 public AssetLink addAssetLink(AssetLink assetLink)
095 throws SystemException {
096 assetLink.setNew(true);
097
098 return assetLinkPersistence.update(assetLink, false);
099 }
100
101
107 public AssetLink createAssetLink(long linkId) {
108 return assetLinkPersistence.create(linkId);
109 }
110
111
118 public void deleteAssetLink(long linkId)
119 throws PortalException, SystemException {
120 assetLinkPersistence.remove(linkId);
121 }
122
123
129 public void deleteAssetLink(AssetLink assetLink) throws SystemException {
130 assetLinkPersistence.remove(assetLink);
131 }
132
133
140 @SuppressWarnings("rawtypes")
141 public List dynamicQuery(DynamicQuery dynamicQuery)
142 throws SystemException {
143 return assetLinkPersistence.findWithDynamicQuery(dynamicQuery);
144 }
145
146
159 @SuppressWarnings("rawtypes")
160 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
161 throws SystemException {
162 return assetLinkPersistence.findWithDynamicQuery(dynamicQuery, start,
163 end);
164 }
165
166
180 @SuppressWarnings("rawtypes")
181 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
182 OrderByComparator orderByComparator) throws SystemException {
183 return assetLinkPersistence.findWithDynamicQuery(dynamicQuery, start,
184 end, orderByComparator);
185 }
186
187
194 public long dynamicQueryCount(DynamicQuery dynamicQuery)
195 throws SystemException {
196 return assetLinkPersistence.countWithDynamicQuery(dynamicQuery);
197 }
198
199
207 public AssetLink getAssetLink(long linkId)
208 throws PortalException, SystemException {
209 return assetLinkPersistence.findByPrimaryKey(linkId);
210 }
211
212
224 public List<AssetLink> getAssetLinks(int start, int end)
225 throws SystemException {
226 return assetLinkPersistence.findAll(start, end);
227 }
228
229
235 public int getAssetLinksCount() throws SystemException {
236 return assetLinkPersistence.countAll();
237 }
238
239
246 public AssetLink updateAssetLink(AssetLink assetLink)
247 throws SystemException {
248 assetLink.setNew(false);
249
250 return assetLinkPersistence.update(assetLink, true);
251 }
252
253
261 public AssetLink updateAssetLink(AssetLink assetLink, boolean merge)
262 throws SystemException {
263 assetLink.setNew(false);
264
265 return assetLinkPersistence.update(assetLink, merge);
266 }
267
268
273 public AssetCategoryLocalService getAssetCategoryLocalService() {
274 return assetCategoryLocalService;
275 }
276
277
282 public void setAssetCategoryLocalService(
283 AssetCategoryLocalService assetCategoryLocalService) {
284 this.assetCategoryLocalService = assetCategoryLocalService;
285 }
286
287
292 public AssetCategoryService getAssetCategoryService() {
293 return assetCategoryService;
294 }
295
296
301 public void setAssetCategoryService(
302 AssetCategoryService assetCategoryService) {
303 this.assetCategoryService = assetCategoryService;
304 }
305
306
311 public AssetCategoryPersistence getAssetCategoryPersistence() {
312 return assetCategoryPersistence;
313 }
314
315
320 public void setAssetCategoryPersistence(
321 AssetCategoryPersistence assetCategoryPersistence) {
322 this.assetCategoryPersistence = assetCategoryPersistence;
323 }
324
325
330 public AssetCategoryFinder getAssetCategoryFinder() {
331 return assetCategoryFinder;
332 }
333
334
339 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
340 this.assetCategoryFinder = assetCategoryFinder;
341 }
342
343
348 public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
349 return assetCategoryPropertyLocalService;
350 }
351
352
357 public void setAssetCategoryPropertyLocalService(
358 AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
359 this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
360 }
361
362
367 public AssetCategoryPropertyService getAssetCategoryPropertyService() {
368 return assetCategoryPropertyService;
369 }
370
371
376 public void setAssetCategoryPropertyService(
377 AssetCategoryPropertyService assetCategoryPropertyService) {
378 this.assetCategoryPropertyService = assetCategoryPropertyService;
379 }
380
381
386 public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
387 return assetCategoryPropertyPersistence;
388 }
389
390
395 public void setAssetCategoryPropertyPersistence(
396 AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
397 this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
398 }
399
400
405 public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
406 return assetCategoryPropertyFinder;
407 }
408
409
414 public void setAssetCategoryPropertyFinder(
415 AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
416 this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
417 }
418
419
424 public AssetEntryLocalService getAssetEntryLocalService() {
425 return assetEntryLocalService;
426 }
427
428
433 public void setAssetEntryLocalService(
434 AssetEntryLocalService assetEntryLocalService) {
435 this.assetEntryLocalService = assetEntryLocalService;
436 }
437
438
443 public AssetEntryService getAssetEntryService() {
444 return assetEntryService;
445 }
446
447
452 public void setAssetEntryService(AssetEntryService assetEntryService) {
453 this.assetEntryService = assetEntryService;
454 }
455
456
461 public AssetEntryPersistence getAssetEntryPersistence() {
462 return assetEntryPersistence;
463 }
464
465
470 public void setAssetEntryPersistence(
471 AssetEntryPersistence assetEntryPersistence) {
472 this.assetEntryPersistence = assetEntryPersistence;
473 }
474
475
480 public AssetEntryFinder getAssetEntryFinder() {
481 return assetEntryFinder;
482 }
483
484
489 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
490 this.assetEntryFinder = assetEntryFinder;
491 }
492
493
498 public AssetLinkLocalService getAssetLinkLocalService() {
499 return assetLinkLocalService;
500 }
501
502
507 public void setAssetLinkLocalService(
508 AssetLinkLocalService assetLinkLocalService) {
509 this.assetLinkLocalService = assetLinkLocalService;
510 }
511
512
517 public AssetLinkPersistence getAssetLinkPersistence() {
518 return assetLinkPersistence;
519 }
520
521
526 public void setAssetLinkPersistence(
527 AssetLinkPersistence assetLinkPersistence) {
528 this.assetLinkPersistence = assetLinkPersistence;
529 }
530
531
536 public AssetTagLocalService getAssetTagLocalService() {
537 return assetTagLocalService;
538 }
539
540
545 public void setAssetTagLocalService(
546 AssetTagLocalService assetTagLocalService) {
547 this.assetTagLocalService = assetTagLocalService;
548 }
549
550
555 public AssetTagService getAssetTagService() {
556 return assetTagService;
557 }
558
559
564 public void setAssetTagService(AssetTagService assetTagService) {
565 this.assetTagService = assetTagService;
566 }
567
568
573 public AssetTagPersistence getAssetTagPersistence() {
574 return assetTagPersistence;
575 }
576
577
582 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
583 this.assetTagPersistence = assetTagPersistence;
584 }
585
586
591 public AssetTagFinder getAssetTagFinder() {
592 return assetTagFinder;
593 }
594
595
600 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
601 this.assetTagFinder = assetTagFinder;
602 }
603
604
609 public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
610 return assetTagPropertyLocalService;
611 }
612
613
618 public void setAssetTagPropertyLocalService(
619 AssetTagPropertyLocalService assetTagPropertyLocalService) {
620 this.assetTagPropertyLocalService = assetTagPropertyLocalService;
621 }
622
623
628 public AssetTagPropertyService getAssetTagPropertyService() {
629 return assetTagPropertyService;
630 }
631
632
637 public void setAssetTagPropertyService(
638 AssetTagPropertyService assetTagPropertyService) {
639 this.assetTagPropertyService = assetTagPropertyService;
640 }
641
642
647 public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
648 return assetTagPropertyPersistence;
649 }
650
651
656 public void setAssetTagPropertyPersistence(
657 AssetTagPropertyPersistence assetTagPropertyPersistence) {
658 this.assetTagPropertyPersistence = assetTagPropertyPersistence;
659 }
660
661
666 public AssetTagPropertyFinder getAssetTagPropertyFinder() {
667 return assetTagPropertyFinder;
668 }
669
670
675 public void setAssetTagPropertyFinder(
676 AssetTagPropertyFinder assetTagPropertyFinder) {
677 this.assetTagPropertyFinder = assetTagPropertyFinder;
678 }
679
680
685 public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
686 return assetTagPropertyKeyFinder;
687 }
688
689
694 public void setAssetTagPropertyKeyFinder(
695 AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
696 this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
697 }
698
699
704 public AssetTagStatsLocalService getAssetTagStatsLocalService() {
705 return assetTagStatsLocalService;
706 }
707
708
713 public void setAssetTagStatsLocalService(
714 AssetTagStatsLocalService assetTagStatsLocalService) {
715 this.assetTagStatsLocalService = assetTagStatsLocalService;
716 }
717
718
723 public AssetTagStatsPersistence getAssetTagStatsPersistence() {
724 return assetTagStatsPersistence;
725 }
726
727
732 public void setAssetTagStatsPersistence(
733 AssetTagStatsPersistence assetTagStatsPersistence) {
734 this.assetTagStatsPersistence = assetTagStatsPersistence;
735 }
736
737
742 public AssetVocabularyLocalService getAssetVocabularyLocalService() {
743 return assetVocabularyLocalService;
744 }
745
746
751 public void setAssetVocabularyLocalService(
752 AssetVocabularyLocalService assetVocabularyLocalService) {
753 this.assetVocabularyLocalService = assetVocabularyLocalService;
754 }
755
756
761 public AssetVocabularyService getAssetVocabularyService() {
762 return assetVocabularyService;
763 }
764
765
770 public void setAssetVocabularyService(
771 AssetVocabularyService assetVocabularyService) {
772 this.assetVocabularyService = assetVocabularyService;
773 }
774
775
780 public AssetVocabularyPersistence getAssetVocabularyPersistence() {
781 return assetVocabularyPersistence;
782 }
783
784
789 public void setAssetVocabularyPersistence(
790 AssetVocabularyPersistence assetVocabularyPersistence) {
791 this.assetVocabularyPersistence = assetVocabularyPersistence;
792 }
793
794
799 public CounterLocalService getCounterLocalService() {
800 return counterLocalService;
801 }
802
803
808 public void setCounterLocalService(CounterLocalService counterLocalService) {
809 this.counterLocalService = counterLocalService;
810 }
811
812
817 public ResourceLocalService getResourceLocalService() {
818 return resourceLocalService;
819 }
820
821
826 public void setResourceLocalService(
827 ResourceLocalService resourceLocalService) {
828 this.resourceLocalService = resourceLocalService;
829 }
830
831
836 public ResourceService getResourceService() {
837 return resourceService;
838 }
839
840
845 public void setResourceService(ResourceService resourceService) {
846 this.resourceService = resourceService;
847 }
848
849
854 public ResourcePersistence getResourcePersistence() {
855 return resourcePersistence;
856 }
857
858
863 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
864 this.resourcePersistence = resourcePersistence;
865 }
866
867
872 public ResourceFinder getResourceFinder() {
873 return resourceFinder;
874 }
875
876
881 public void setResourceFinder(ResourceFinder resourceFinder) {
882 this.resourceFinder = resourceFinder;
883 }
884
885
890 public UserLocalService getUserLocalService() {
891 return userLocalService;
892 }
893
894
899 public void setUserLocalService(UserLocalService userLocalService) {
900 this.userLocalService = userLocalService;
901 }
902
903
908 public UserService getUserService() {
909 return userService;
910 }
911
912
917 public void setUserService(UserService userService) {
918 this.userService = userService;
919 }
920
921
926 public UserPersistence getUserPersistence() {
927 return userPersistence;
928 }
929
930
935 public void setUserPersistence(UserPersistence userPersistence) {
936 this.userPersistence = userPersistence;
937 }
938
939
944 public UserFinder getUserFinder() {
945 return userFinder;
946 }
947
948
953 public void setUserFinder(UserFinder userFinder) {
954 this.userFinder = userFinder;
955 }
956
957
962 protected void runSQL(String sql) throws SystemException {
963 try {
964 DataSource dataSource = assetLinkPersistence.getDataSource();
965
966 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
967 sql, new int[0]);
968
969 sqlUpdate.update();
970 }
971 catch (Exception e) {
972 throw new SystemException(e);
973 }
974 }
975
976 @BeanReference(type = AssetCategoryLocalService.class)
977 protected AssetCategoryLocalService assetCategoryLocalService;
978 @BeanReference(type = AssetCategoryService.class)
979 protected AssetCategoryService assetCategoryService;
980 @BeanReference(type = AssetCategoryPersistence.class)
981 protected AssetCategoryPersistence assetCategoryPersistence;
982 @BeanReference(type = AssetCategoryFinder.class)
983 protected AssetCategoryFinder assetCategoryFinder;
984 @BeanReference(type = AssetCategoryPropertyLocalService.class)
985 protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
986 @BeanReference(type = AssetCategoryPropertyService.class)
987 protected AssetCategoryPropertyService assetCategoryPropertyService;
988 @BeanReference(type = AssetCategoryPropertyPersistence.class)
989 protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
990 @BeanReference(type = AssetCategoryPropertyFinder.class)
991 protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
992 @BeanReference(type = AssetEntryLocalService.class)
993 protected AssetEntryLocalService assetEntryLocalService;
994 @BeanReference(type = AssetEntryService.class)
995 protected AssetEntryService assetEntryService;
996 @BeanReference(type = AssetEntryPersistence.class)
997 protected AssetEntryPersistence assetEntryPersistence;
998 @BeanReference(type = AssetEntryFinder.class)
999 protected AssetEntryFinder assetEntryFinder;
1000 @BeanReference(type = AssetLinkLocalService.class)
1001 protected AssetLinkLocalService assetLinkLocalService;
1002 @BeanReference(type = AssetLinkPersistence.class)
1003 protected AssetLinkPersistence assetLinkPersistence;
1004 @BeanReference(type = AssetTagLocalService.class)
1005 protected AssetTagLocalService assetTagLocalService;
1006 @BeanReference(type = AssetTagService.class)
1007 protected AssetTagService assetTagService;
1008 @BeanReference(type = AssetTagPersistence.class)
1009 protected AssetTagPersistence assetTagPersistence;
1010 @BeanReference(type = AssetTagFinder.class)
1011 protected AssetTagFinder assetTagFinder;
1012 @BeanReference(type = AssetTagPropertyLocalService.class)
1013 protected AssetTagPropertyLocalService assetTagPropertyLocalService;
1014 @BeanReference(type = AssetTagPropertyService.class)
1015 protected AssetTagPropertyService assetTagPropertyService;
1016 @BeanReference(type = AssetTagPropertyPersistence.class)
1017 protected AssetTagPropertyPersistence assetTagPropertyPersistence;
1018 @BeanReference(type = AssetTagPropertyFinder.class)
1019 protected AssetTagPropertyFinder assetTagPropertyFinder;
1020 @BeanReference(type = AssetTagPropertyKeyFinder.class)
1021 protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
1022 @BeanReference(type = AssetTagStatsLocalService.class)
1023 protected AssetTagStatsLocalService assetTagStatsLocalService;
1024 @BeanReference(type = AssetTagStatsPersistence.class)
1025 protected AssetTagStatsPersistence assetTagStatsPersistence;
1026 @BeanReference(type = AssetVocabularyLocalService.class)
1027 protected AssetVocabularyLocalService assetVocabularyLocalService;
1028 @BeanReference(type = AssetVocabularyService.class)
1029 protected AssetVocabularyService assetVocabularyService;
1030 @BeanReference(type = AssetVocabularyPersistence.class)
1031 protected AssetVocabularyPersistence assetVocabularyPersistence;
1032 @BeanReference(type = CounterLocalService.class)
1033 protected CounterLocalService counterLocalService;
1034 @BeanReference(type = ResourceLocalService.class)
1035 protected ResourceLocalService resourceLocalService;
1036 @BeanReference(type = ResourceService.class)
1037 protected ResourceService resourceService;
1038 @BeanReference(type = ResourcePersistence.class)
1039 protected ResourcePersistence resourcePersistence;
1040 @BeanReference(type = ResourceFinder.class)
1041 protected ResourceFinder resourceFinder;
1042 @BeanReference(type = UserLocalService.class)
1043 protected UserLocalService userLocalService;
1044 @BeanReference(type = UserService.class)
1045 protected UserService userService;
1046 @BeanReference(type = UserPersistence.class)
1047 protected UserPersistence userPersistence;
1048 @BeanReference(type = UserFinder.class)
1049 protected UserFinder userFinder;
1050 }