001
014
015 package com.liferay.portlet.documentlibrary.service.base;
016
017 import com.liferay.counter.service.CounterLocalService;
018
019 import com.liferay.documentlibrary.service.DLLocalService;
020 import com.liferay.documentlibrary.service.DLService;
021
022 import com.liferay.portal.kernel.annotation.BeanReference;
023 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
026 import com.liferay.portal.kernel.exception.PortalException;
027 import com.liferay.portal.kernel.exception.SystemException;
028 import com.liferay.portal.kernel.util.OrderByComparator;
029 import com.liferay.portal.service.GroupLocalService;
030 import com.liferay.portal.service.GroupService;
031 import com.liferay.portal.service.LayoutLocalService;
032 import com.liferay.portal.service.LayoutService;
033 import com.liferay.portal.service.LockLocalService;
034 import com.liferay.portal.service.ResourceLocalService;
035 import com.liferay.portal.service.ResourceService;
036 import com.liferay.portal.service.UserLocalService;
037 import com.liferay.portal.service.UserService;
038 import com.liferay.portal.service.WebDAVPropsLocalService;
039 import com.liferay.portal.service.persistence.GroupFinder;
040 import com.liferay.portal.service.persistence.GroupPersistence;
041 import com.liferay.portal.service.persistence.LayoutFinder;
042 import com.liferay.portal.service.persistence.LayoutPersistence;
043 import com.liferay.portal.service.persistence.LockPersistence;
044 import com.liferay.portal.service.persistence.ResourceFinder;
045 import com.liferay.portal.service.persistence.ResourcePersistence;
046 import com.liferay.portal.service.persistence.UserFinder;
047 import com.liferay.portal.service.persistence.UserPersistence;
048 import com.liferay.portal.service.persistence.WebDAVPropsPersistence;
049
050 import com.liferay.portlet.documentlibrary.model.DLFolder;
051 import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService;
052 import com.liferay.portlet.documentlibrary.service.DLFileEntryService;
053 import com.liferay.portlet.documentlibrary.service.DLFileRankLocalService;
054 import com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService;
055 import com.liferay.portlet.documentlibrary.service.DLFileShortcutService;
056 import com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService;
057 import com.liferay.portlet.documentlibrary.service.DLFileVersionService;
058 import com.liferay.portlet.documentlibrary.service.DLFolderLocalService;
059 import com.liferay.portlet.documentlibrary.service.DLFolderService;
060 import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinder;
061 import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryPersistence;
062 import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankPersistence;
063 import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutPersistence;
064 import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence;
065 import com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinder;
066 import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence;
067 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
068 import com.liferay.portlet.expando.service.ExpandoValueService;
069 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
070
071 import java.util.List;
072
073 import javax.sql.DataSource;
074
075
091 public abstract class DLFolderLocalServiceBaseImpl
092 implements DLFolderLocalService {
093
100 public DLFolder addDLFolder(DLFolder dlFolder) throws SystemException {
101 dlFolder.setNew(true);
102
103 return dlFolderPersistence.update(dlFolder, false);
104 }
105
106
112 public DLFolder createDLFolder(long folderId) {
113 return dlFolderPersistence.create(folderId);
114 }
115
116
123 public void deleteDLFolder(long folderId)
124 throws PortalException, SystemException {
125 dlFolderPersistence.remove(folderId);
126 }
127
128
134 public void deleteDLFolder(DLFolder dlFolder) throws SystemException {
135 dlFolderPersistence.remove(dlFolder);
136 }
137
138
145 @SuppressWarnings("rawtypes")
146 public List dynamicQuery(DynamicQuery dynamicQuery)
147 throws SystemException {
148 return dlFolderPersistence.findWithDynamicQuery(dynamicQuery);
149 }
150
151
164 @SuppressWarnings("rawtypes")
165 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
166 throws SystemException {
167 return dlFolderPersistence.findWithDynamicQuery(dynamicQuery, start, end);
168 }
169
170
184 @SuppressWarnings("rawtypes")
185 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
186 OrderByComparator orderByComparator) throws SystemException {
187 return dlFolderPersistence.findWithDynamicQuery(dynamicQuery, start,
188 end, orderByComparator);
189 }
190
191
198 public long dynamicQueryCount(DynamicQuery dynamicQuery)
199 throws SystemException {
200 return dlFolderPersistence.countWithDynamicQuery(dynamicQuery);
201 }
202
203
211 public DLFolder getDLFolder(long folderId)
212 throws PortalException, SystemException {
213 return dlFolderPersistence.findByPrimaryKey(folderId);
214 }
215
216
225 public DLFolder getDLFolderByUuidAndGroupId(String uuid, long groupId)
226 throws PortalException, SystemException {
227 return dlFolderPersistence.findByUUID_G(uuid, groupId);
228 }
229
230
242 public List<DLFolder> getDLFolders(int start, int end)
243 throws SystemException {
244 return dlFolderPersistence.findAll(start, end);
245 }
246
247
253 public int getDLFoldersCount() throws SystemException {
254 return dlFolderPersistence.countAll();
255 }
256
257
264 public DLFolder updateDLFolder(DLFolder dlFolder) throws SystemException {
265 dlFolder.setNew(false);
266
267 return dlFolderPersistence.update(dlFolder, true);
268 }
269
270
278 public DLFolder updateDLFolder(DLFolder dlFolder, boolean merge)
279 throws SystemException {
280 dlFolder.setNew(false);
281
282 return dlFolderPersistence.update(dlFolder, merge);
283 }
284
285
290 public DLFileEntryLocalService getDLFileEntryLocalService() {
291 return dlFileEntryLocalService;
292 }
293
294
299 public void setDLFileEntryLocalService(
300 DLFileEntryLocalService dlFileEntryLocalService) {
301 this.dlFileEntryLocalService = dlFileEntryLocalService;
302 }
303
304
309 public DLFileEntryService getDLFileEntryService() {
310 return dlFileEntryService;
311 }
312
313
318 public void setDLFileEntryService(DLFileEntryService dlFileEntryService) {
319 this.dlFileEntryService = dlFileEntryService;
320 }
321
322
327 public DLFileEntryPersistence getDLFileEntryPersistence() {
328 return dlFileEntryPersistence;
329 }
330
331
336 public void setDLFileEntryPersistence(
337 DLFileEntryPersistence dlFileEntryPersistence) {
338 this.dlFileEntryPersistence = dlFileEntryPersistence;
339 }
340
341
346 public DLFileEntryFinder getDLFileEntryFinder() {
347 return dlFileEntryFinder;
348 }
349
350
355 public void setDLFileEntryFinder(DLFileEntryFinder dlFileEntryFinder) {
356 this.dlFileEntryFinder = dlFileEntryFinder;
357 }
358
359
364 public DLFileRankLocalService getDLFileRankLocalService() {
365 return dlFileRankLocalService;
366 }
367
368
373 public void setDLFileRankLocalService(
374 DLFileRankLocalService dlFileRankLocalService) {
375 this.dlFileRankLocalService = dlFileRankLocalService;
376 }
377
378
383 public DLFileRankPersistence getDLFileRankPersistence() {
384 return dlFileRankPersistence;
385 }
386
387
392 public void setDLFileRankPersistence(
393 DLFileRankPersistence dlFileRankPersistence) {
394 this.dlFileRankPersistence = dlFileRankPersistence;
395 }
396
397
402 public DLFileShortcutLocalService getDLFileShortcutLocalService() {
403 return dlFileShortcutLocalService;
404 }
405
406
411 public void setDLFileShortcutLocalService(
412 DLFileShortcutLocalService dlFileShortcutLocalService) {
413 this.dlFileShortcutLocalService = dlFileShortcutLocalService;
414 }
415
416
421 public DLFileShortcutService getDLFileShortcutService() {
422 return dlFileShortcutService;
423 }
424
425
430 public void setDLFileShortcutService(
431 DLFileShortcutService dlFileShortcutService) {
432 this.dlFileShortcutService = dlFileShortcutService;
433 }
434
435
440 public DLFileShortcutPersistence getDLFileShortcutPersistence() {
441 return dlFileShortcutPersistence;
442 }
443
444
449 public void setDLFileShortcutPersistence(
450 DLFileShortcutPersistence dlFileShortcutPersistence) {
451 this.dlFileShortcutPersistence = dlFileShortcutPersistence;
452 }
453
454
459 public DLFileVersionLocalService getDLFileVersionLocalService() {
460 return dlFileVersionLocalService;
461 }
462
463
468 public void setDLFileVersionLocalService(
469 DLFileVersionLocalService dlFileVersionLocalService) {
470 this.dlFileVersionLocalService = dlFileVersionLocalService;
471 }
472
473
478 public DLFileVersionService getDLFileVersionService() {
479 return dlFileVersionService;
480 }
481
482
487 public void setDLFileVersionService(
488 DLFileVersionService dlFileVersionService) {
489 this.dlFileVersionService = dlFileVersionService;
490 }
491
492
497 public DLFileVersionPersistence getDLFileVersionPersistence() {
498 return dlFileVersionPersistence;
499 }
500
501
506 public void setDLFileVersionPersistence(
507 DLFileVersionPersistence dlFileVersionPersistence) {
508 this.dlFileVersionPersistence = dlFileVersionPersistence;
509 }
510
511
516 public DLFolderLocalService getDLFolderLocalService() {
517 return dlFolderLocalService;
518 }
519
520
525 public void setDLFolderLocalService(
526 DLFolderLocalService dlFolderLocalService) {
527 this.dlFolderLocalService = dlFolderLocalService;
528 }
529
530
535 public DLFolderService getDLFolderService() {
536 return dlFolderService;
537 }
538
539
544 public void setDLFolderService(DLFolderService dlFolderService) {
545 this.dlFolderService = dlFolderService;
546 }
547
548
553 public DLFolderPersistence getDLFolderPersistence() {
554 return dlFolderPersistence;
555 }
556
557
562 public void setDLFolderPersistence(DLFolderPersistence dlFolderPersistence) {
563 this.dlFolderPersistence = dlFolderPersistence;
564 }
565
566
571 public DLFolderFinder getDLFolderFinder() {
572 return dlFolderFinder;
573 }
574
575
580 public void setDLFolderFinder(DLFolderFinder dlFolderFinder) {
581 this.dlFolderFinder = dlFolderFinder;
582 }
583
584
589 public CounterLocalService getCounterLocalService() {
590 return counterLocalService;
591 }
592
593
598 public void setCounterLocalService(CounterLocalService counterLocalService) {
599 this.counterLocalService = counterLocalService;
600 }
601
602
607 public DLLocalService getDLLocalService() {
608 return dlLocalService;
609 }
610
611
616 public void setDLLocalService(DLLocalService dlLocalService) {
617 this.dlLocalService = dlLocalService;
618 }
619
620
625 public DLService getDLService() {
626 return dlService;
627 }
628
629
634 public void setDLService(DLService dlService) {
635 this.dlService = dlService;
636 }
637
638
643 public GroupLocalService getGroupLocalService() {
644 return groupLocalService;
645 }
646
647
652 public void setGroupLocalService(GroupLocalService groupLocalService) {
653 this.groupLocalService = groupLocalService;
654 }
655
656
661 public GroupService getGroupService() {
662 return groupService;
663 }
664
665
670 public void setGroupService(GroupService groupService) {
671 this.groupService = groupService;
672 }
673
674
679 public GroupPersistence getGroupPersistence() {
680 return groupPersistence;
681 }
682
683
688 public void setGroupPersistence(GroupPersistence groupPersistence) {
689 this.groupPersistence = groupPersistence;
690 }
691
692
697 public GroupFinder getGroupFinder() {
698 return groupFinder;
699 }
700
701
706 public void setGroupFinder(GroupFinder groupFinder) {
707 this.groupFinder = groupFinder;
708 }
709
710
715 public LayoutLocalService getLayoutLocalService() {
716 return layoutLocalService;
717 }
718
719
724 public void setLayoutLocalService(LayoutLocalService layoutLocalService) {
725 this.layoutLocalService = layoutLocalService;
726 }
727
728
733 public LayoutService getLayoutService() {
734 return layoutService;
735 }
736
737
742 public void setLayoutService(LayoutService layoutService) {
743 this.layoutService = layoutService;
744 }
745
746
751 public LayoutPersistence getLayoutPersistence() {
752 return layoutPersistence;
753 }
754
755
760 public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
761 this.layoutPersistence = layoutPersistence;
762 }
763
764
769 public LayoutFinder getLayoutFinder() {
770 return layoutFinder;
771 }
772
773
778 public void setLayoutFinder(LayoutFinder layoutFinder) {
779 this.layoutFinder = layoutFinder;
780 }
781
782
787 public LockLocalService getLockLocalService() {
788 return lockLocalService;
789 }
790
791
796 public void setLockLocalService(LockLocalService lockLocalService) {
797 this.lockLocalService = lockLocalService;
798 }
799
800
805 public LockPersistence getLockPersistence() {
806 return lockPersistence;
807 }
808
809
814 public void setLockPersistence(LockPersistence lockPersistence) {
815 this.lockPersistence = lockPersistence;
816 }
817
818
823 public ResourceLocalService getResourceLocalService() {
824 return resourceLocalService;
825 }
826
827
832 public void setResourceLocalService(
833 ResourceLocalService resourceLocalService) {
834 this.resourceLocalService = resourceLocalService;
835 }
836
837
842 public ResourceService getResourceService() {
843 return resourceService;
844 }
845
846
851 public void setResourceService(ResourceService resourceService) {
852 this.resourceService = resourceService;
853 }
854
855
860 public ResourcePersistence getResourcePersistence() {
861 return resourcePersistence;
862 }
863
864
869 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
870 this.resourcePersistence = resourcePersistence;
871 }
872
873
878 public ResourceFinder getResourceFinder() {
879 return resourceFinder;
880 }
881
882
887 public void setResourceFinder(ResourceFinder resourceFinder) {
888 this.resourceFinder = resourceFinder;
889 }
890
891
896 public UserLocalService getUserLocalService() {
897 return userLocalService;
898 }
899
900
905 public void setUserLocalService(UserLocalService userLocalService) {
906 this.userLocalService = userLocalService;
907 }
908
909
914 public UserService getUserService() {
915 return userService;
916 }
917
918
923 public void setUserService(UserService userService) {
924 this.userService = userService;
925 }
926
927
932 public UserPersistence getUserPersistence() {
933 return userPersistence;
934 }
935
936
941 public void setUserPersistence(UserPersistence userPersistence) {
942 this.userPersistence = userPersistence;
943 }
944
945
950 public UserFinder getUserFinder() {
951 return userFinder;
952 }
953
954
959 public void setUserFinder(UserFinder userFinder) {
960 this.userFinder = userFinder;
961 }
962
963
968 public WebDAVPropsLocalService getWebDAVPropsLocalService() {
969 return webDAVPropsLocalService;
970 }
971
972
977 public void setWebDAVPropsLocalService(
978 WebDAVPropsLocalService webDAVPropsLocalService) {
979 this.webDAVPropsLocalService = webDAVPropsLocalService;
980 }
981
982
987 public WebDAVPropsPersistence getWebDAVPropsPersistence() {
988 return webDAVPropsPersistence;
989 }
990
991
996 public void setWebDAVPropsPersistence(
997 WebDAVPropsPersistence webDAVPropsPersistence) {
998 this.webDAVPropsPersistence = webDAVPropsPersistence;
999 }
1000
1001
1006 public ExpandoValueLocalService getExpandoValueLocalService() {
1007 return expandoValueLocalService;
1008 }
1009
1010
1015 public void setExpandoValueLocalService(
1016 ExpandoValueLocalService expandoValueLocalService) {
1017 this.expandoValueLocalService = expandoValueLocalService;
1018 }
1019
1020
1025 public ExpandoValueService getExpandoValueService() {
1026 return expandoValueService;
1027 }
1028
1029
1034 public void setExpandoValueService(ExpandoValueService expandoValueService) {
1035 this.expandoValueService = expandoValueService;
1036 }
1037
1038
1043 public ExpandoValuePersistence getExpandoValuePersistence() {
1044 return expandoValuePersistence;
1045 }
1046
1047
1052 public void setExpandoValuePersistence(
1053 ExpandoValuePersistence expandoValuePersistence) {
1054 this.expandoValuePersistence = expandoValuePersistence;
1055 }
1056
1057
1062 protected void runSQL(String sql) throws SystemException {
1063 try {
1064 DataSource dataSource = dlFolderPersistence.getDataSource();
1065
1066 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1067 sql, new int[0]);
1068
1069 sqlUpdate.update();
1070 }
1071 catch (Exception e) {
1072 throw new SystemException(e);
1073 }
1074 }
1075
1076 @BeanReference(type = DLFileEntryLocalService.class)
1077 protected DLFileEntryLocalService dlFileEntryLocalService;
1078 @BeanReference(type = DLFileEntryService.class)
1079 protected DLFileEntryService dlFileEntryService;
1080 @BeanReference(type = DLFileEntryPersistence.class)
1081 protected DLFileEntryPersistence dlFileEntryPersistence;
1082 @BeanReference(type = DLFileEntryFinder.class)
1083 protected DLFileEntryFinder dlFileEntryFinder;
1084 @BeanReference(type = DLFileRankLocalService.class)
1085 protected DLFileRankLocalService dlFileRankLocalService;
1086 @BeanReference(type = DLFileRankPersistence.class)
1087 protected DLFileRankPersistence dlFileRankPersistence;
1088 @BeanReference(type = DLFileShortcutLocalService.class)
1089 protected DLFileShortcutLocalService dlFileShortcutLocalService;
1090 @BeanReference(type = DLFileShortcutService.class)
1091 protected DLFileShortcutService dlFileShortcutService;
1092 @BeanReference(type = DLFileShortcutPersistence.class)
1093 protected DLFileShortcutPersistence dlFileShortcutPersistence;
1094 @BeanReference(type = DLFileVersionLocalService.class)
1095 protected DLFileVersionLocalService dlFileVersionLocalService;
1096 @BeanReference(type = DLFileVersionService.class)
1097 protected DLFileVersionService dlFileVersionService;
1098 @BeanReference(type = DLFileVersionPersistence.class)
1099 protected DLFileVersionPersistence dlFileVersionPersistence;
1100 @BeanReference(type = DLFolderLocalService.class)
1101 protected DLFolderLocalService dlFolderLocalService;
1102 @BeanReference(type = DLFolderService.class)
1103 protected DLFolderService dlFolderService;
1104 @BeanReference(type = DLFolderPersistence.class)
1105 protected DLFolderPersistence dlFolderPersistence;
1106 @BeanReference(type = DLFolderFinder.class)
1107 protected DLFolderFinder dlFolderFinder;
1108 @BeanReference(type = CounterLocalService.class)
1109 protected CounterLocalService counterLocalService;
1110 @BeanReference(type = DLLocalService.class)
1111 protected DLLocalService dlLocalService;
1112 @BeanReference(type = DLService.class)
1113 protected DLService dlService;
1114 @BeanReference(type = GroupLocalService.class)
1115 protected GroupLocalService groupLocalService;
1116 @BeanReference(type = GroupService.class)
1117 protected GroupService groupService;
1118 @BeanReference(type = GroupPersistence.class)
1119 protected GroupPersistence groupPersistence;
1120 @BeanReference(type = GroupFinder.class)
1121 protected GroupFinder groupFinder;
1122 @BeanReference(type = LayoutLocalService.class)
1123 protected LayoutLocalService layoutLocalService;
1124 @BeanReference(type = LayoutService.class)
1125 protected LayoutService layoutService;
1126 @BeanReference(type = LayoutPersistence.class)
1127 protected LayoutPersistence layoutPersistence;
1128 @BeanReference(type = LayoutFinder.class)
1129 protected LayoutFinder layoutFinder;
1130 @BeanReference(type = LockLocalService.class)
1131 protected LockLocalService lockLocalService;
1132 @BeanReference(type = LockPersistence.class)
1133 protected LockPersistence lockPersistence;
1134 @BeanReference(type = ResourceLocalService.class)
1135 protected ResourceLocalService resourceLocalService;
1136 @BeanReference(type = ResourceService.class)
1137 protected ResourceService resourceService;
1138 @BeanReference(type = ResourcePersistence.class)
1139 protected ResourcePersistence resourcePersistence;
1140 @BeanReference(type = ResourceFinder.class)
1141 protected ResourceFinder resourceFinder;
1142 @BeanReference(type = UserLocalService.class)
1143 protected UserLocalService userLocalService;
1144 @BeanReference(type = UserService.class)
1145 protected UserService userService;
1146 @BeanReference(type = UserPersistence.class)
1147 protected UserPersistence userPersistence;
1148 @BeanReference(type = UserFinder.class)
1149 protected UserFinder userFinder;
1150 @BeanReference(type = WebDAVPropsLocalService.class)
1151 protected WebDAVPropsLocalService webDAVPropsLocalService;
1152 @BeanReference(type = WebDAVPropsPersistence.class)
1153 protected WebDAVPropsPersistence webDAVPropsPersistence;
1154 @BeanReference(type = ExpandoValueLocalService.class)
1155 protected ExpandoValueLocalService expandoValueLocalService;
1156 @BeanReference(type = ExpandoValueService.class)
1157 protected ExpandoValueService expandoValueService;
1158 @BeanReference(type = ExpandoValuePersistence.class)
1159 protected ExpandoValuePersistence expandoValuePersistence;
1160 }