001
014
015 package com.liferay.portlet.documentlibrary.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.LayoutLocalService;
027 import com.liferay.portal.service.LayoutService;
028 import com.liferay.portal.service.ResourceLocalService;
029 import com.liferay.portal.service.ResourceService;
030 import com.liferay.portal.service.UserLocalService;
031 import com.liferay.portal.service.UserService;
032 import com.liferay.portal.service.persistence.LayoutFinder;
033 import com.liferay.portal.service.persistence.LayoutPersistence;
034 import com.liferay.portal.service.persistence.ResourceFinder;
035 import com.liferay.portal.service.persistence.ResourcePersistence;
036 import com.liferay.portal.service.persistence.UserFinder;
037 import com.liferay.portal.service.persistence.UserPersistence;
038
039 import com.liferay.portlet.documentlibrary.model.DLFileRank;
040 import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService;
041 import com.liferay.portlet.documentlibrary.service.DLFileEntryService;
042 import com.liferay.portlet.documentlibrary.service.DLFileRankLocalService;
043 import com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService;
044 import com.liferay.portlet.documentlibrary.service.DLFileShortcutService;
045 import com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService;
046 import com.liferay.portlet.documentlibrary.service.DLFileVersionService;
047 import com.liferay.portlet.documentlibrary.service.DLFolderLocalService;
048 import com.liferay.portlet.documentlibrary.service.DLFolderService;
049 import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinder;
050 import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryPersistence;
051 import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankPersistence;
052 import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutPersistence;
053 import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence;
054 import com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinder;
055 import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence;
056
057 import java.util.List;
058
059 import javax.sql.DataSource;
060
061
077 public abstract class DLFileRankLocalServiceBaseImpl
078 implements DLFileRankLocalService {
079
086 public DLFileRank addDLFileRank(DLFileRank dlFileRank)
087 throws SystemException {
088 dlFileRank.setNew(true);
089
090 return dlFileRankPersistence.update(dlFileRank, false);
091 }
092
093
099 public DLFileRank createDLFileRank(long fileRankId) {
100 return dlFileRankPersistence.create(fileRankId);
101 }
102
103
110 public void deleteDLFileRank(long fileRankId)
111 throws PortalException, SystemException {
112 dlFileRankPersistence.remove(fileRankId);
113 }
114
115
121 public void deleteDLFileRank(DLFileRank dlFileRank)
122 throws SystemException {
123 dlFileRankPersistence.remove(dlFileRank);
124 }
125
126
133 @SuppressWarnings("rawtypes")
134 public List dynamicQuery(DynamicQuery dynamicQuery)
135 throws SystemException {
136 return dlFileRankPersistence.findWithDynamicQuery(dynamicQuery);
137 }
138
139
152 @SuppressWarnings("rawtypes")
153 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
154 throws SystemException {
155 return dlFileRankPersistence.findWithDynamicQuery(dynamicQuery, start,
156 end);
157 }
158
159
173 @SuppressWarnings("rawtypes")
174 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
175 OrderByComparator orderByComparator) throws SystemException {
176 return dlFileRankPersistence.findWithDynamicQuery(dynamicQuery, start,
177 end, orderByComparator);
178 }
179
180
187 public long dynamicQueryCount(DynamicQuery dynamicQuery)
188 throws SystemException {
189 return dlFileRankPersistence.countWithDynamicQuery(dynamicQuery);
190 }
191
192
200 public DLFileRank getDLFileRank(long fileRankId)
201 throws PortalException, SystemException {
202 return dlFileRankPersistence.findByPrimaryKey(fileRankId);
203 }
204
205
217 public List<DLFileRank> getDLFileRanks(int start, int end)
218 throws SystemException {
219 return dlFileRankPersistence.findAll(start, end);
220 }
221
222
228 public int getDLFileRanksCount() throws SystemException {
229 return dlFileRankPersistence.countAll();
230 }
231
232
239 public DLFileRank updateDLFileRank(DLFileRank dlFileRank)
240 throws SystemException {
241 dlFileRank.setNew(false);
242
243 return dlFileRankPersistence.update(dlFileRank, true);
244 }
245
246
254 public DLFileRank updateDLFileRank(DLFileRank dlFileRank, boolean merge)
255 throws SystemException {
256 dlFileRank.setNew(false);
257
258 return dlFileRankPersistence.update(dlFileRank, merge);
259 }
260
261
266 public DLFileEntryLocalService getDLFileEntryLocalService() {
267 return dlFileEntryLocalService;
268 }
269
270
275 public void setDLFileEntryLocalService(
276 DLFileEntryLocalService dlFileEntryLocalService) {
277 this.dlFileEntryLocalService = dlFileEntryLocalService;
278 }
279
280
285 public DLFileEntryService getDLFileEntryService() {
286 return dlFileEntryService;
287 }
288
289
294 public void setDLFileEntryService(DLFileEntryService dlFileEntryService) {
295 this.dlFileEntryService = dlFileEntryService;
296 }
297
298
303 public DLFileEntryPersistence getDLFileEntryPersistence() {
304 return dlFileEntryPersistence;
305 }
306
307
312 public void setDLFileEntryPersistence(
313 DLFileEntryPersistence dlFileEntryPersistence) {
314 this.dlFileEntryPersistence = dlFileEntryPersistence;
315 }
316
317
322 public DLFileEntryFinder getDLFileEntryFinder() {
323 return dlFileEntryFinder;
324 }
325
326
331 public void setDLFileEntryFinder(DLFileEntryFinder dlFileEntryFinder) {
332 this.dlFileEntryFinder = dlFileEntryFinder;
333 }
334
335
340 public DLFileRankLocalService getDLFileRankLocalService() {
341 return dlFileRankLocalService;
342 }
343
344
349 public void setDLFileRankLocalService(
350 DLFileRankLocalService dlFileRankLocalService) {
351 this.dlFileRankLocalService = dlFileRankLocalService;
352 }
353
354
359 public DLFileRankPersistence getDLFileRankPersistence() {
360 return dlFileRankPersistence;
361 }
362
363
368 public void setDLFileRankPersistence(
369 DLFileRankPersistence dlFileRankPersistence) {
370 this.dlFileRankPersistence = dlFileRankPersistence;
371 }
372
373
378 public DLFileShortcutLocalService getDLFileShortcutLocalService() {
379 return dlFileShortcutLocalService;
380 }
381
382
387 public void setDLFileShortcutLocalService(
388 DLFileShortcutLocalService dlFileShortcutLocalService) {
389 this.dlFileShortcutLocalService = dlFileShortcutLocalService;
390 }
391
392
397 public DLFileShortcutService getDLFileShortcutService() {
398 return dlFileShortcutService;
399 }
400
401
406 public void setDLFileShortcutService(
407 DLFileShortcutService dlFileShortcutService) {
408 this.dlFileShortcutService = dlFileShortcutService;
409 }
410
411
416 public DLFileShortcutPersistence getDLFileShortcutPersistence() {
417 return dlFileShortcutPersistence;
418 }
419
420
425 public void setDLFileShortcutPersistence(
426 DLFileShortcutPersistence dlFileShortcutPersistence) {
427 this.dlFileShortcutPersistence = dlFileShortcutPersistence;
428 }
429
430
435 public DLFileVersionLocalService getDLFileVersionLocalService() {
436 return dlFileVersionLocalService;
437 }
438
439
444 public void setDLFileVersionLocalService(
445 DLFileVersionLocalService dlFileVersionLocalService) {
446 this.dlFileVersionLocalService = dlFileVersionLocalService;
447 }
448
449
454 public DLFileVersionService getDLFileVersionService() {
455 return dlFileVersionService;
456 }
457
458
463 public void setDLFileVersionService(
464 DLFileVersionService dlFileVersionService) {
465 this.dlFileVersionService = dlFileVersionService;
466 }
467
468
473 public DLFileVersionPersistence getDLFileVersionPersistence() {
474 return dlFileVersionPersistence;
475 }
476
477
482 public void setDLFileVersionPersistence(
483 DLFileVersionPersistence dlFileVersionPersistence) {
484 this.dlFileVersionPersistence = dlFileVersionPersistence;
485 }
486
487
492 public DLFolderLocalService getDLFolderLocalService() {
493 return dlFolderLocalService;
494 }
495
496
501 public void setDLFolderLocalService(
502 DLFolderLocalService dlFolderLocalService) {
503 this.dlFolderLocalService = dlFolderLocalService;
504 }
505
506
511 public DLFolderService getDLFolderService() {
512 return dlFolderService;
513 }
514
515
520 public void setDLFolderService(DLFolderService dlFolderService) {
521 this.dlFolderService = dlFolderService;
522 }
523
524
529 public DLFolderPersistence getDLFolderPersistence() {
530 return dlFolderPersistence;
531 }
532
533
538 public void setDLFolderPersistence(DLFolderPersistence dlFolderPersistence) {
539 this.dlFolderPersistence = dlFolderPersistence;
540 }
541
542
547 public DLFolderFinder getDLFolderFinder() {
548 return dlFolderFinder;
549 }
550
551
556 public void setDLFolderFinder(DLFolderFinder dlFolderFinder) {
557 this.dlFolderFinder = dlFolderFinder;
558 }
559
560
565 public CounterLocalService getCounterLocalService() {
566 return counterLocalService;
567 }
568
569
574 public void setCounterLocalService(CounterLocalService counterLocalService) {
575 this.counterLocalService = counterLocalService;
576 }
577
578
583 public LayoutLocalService getLayoutLocalService() {
584 return layoutLocalService;
585 }
586
587
592 public void setLayoutLocalService(LayoutLocalService layoutLocalService) {
593 this.layoutLocalService = layoutLocalService;
594 }
595
596
601 public LayoutService getLayoutService() {
602 return layoutService;
603 }
604
605
610 public void setLayoutService(LayoutService layoutService) {
611 this.layoutService = layoutService;
612 }
613
614
619 public LayoutPersistence getLayoutPersistence() {
620 return layoutPersistence;
621 }
622
623
628 public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
629 this.layoutPersistence = layoutPersistence;
630 }
631
632
637 public LayoutFinder getLayoutFinder() {
638 return layoutFinder;
639 }
640
641
646 public void setLayoutFinder(LayoutFinder layoutFinder) {
647 this.layoutFinder = layoutFinder;
648 }
649
650
655 public ResourceLocalService getResourceLocalService() {
656 return resourceLocalService;
657 }
658
659
664 public void setResourceLocalService(
665 ResourceLocalService resourceLocalService) {
666 this.resourceLocalService = resourceLocalService;
667 }
668
669
674 public ResourceService getResourceService() {
675 return resourceService;
676 }
677
678
683 public void setResourceService(ResourceService resourceService) {
684 this.resourceService = resourceService;
685 }
686
687
692 public ResourcePersistence getResourcePersistence() {
693 return resourcePersistence;
694 }
695
696
701 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
702 this.resourcePersistence = resourcePersistence;
703 }
704
705
710 public ResourceFinder getResourceFinder() {
711 return resourceFinder;
712 }
713
714
719 public void setResourceFinder(ResourceFinder resourceFinder) {
720 this.resourceFinder = resourceFinder;
721 }
722
723
728 public UserLocalService getUserLocalService() {
729 return userLocalService;
730 }
731
732
737 public void setUserLocalService(UserLocalService userLocalService) {
738 this.userLocalService = userLocalService;
739 }
740
741
746 public UserService getUserService() {
747 return userService;
748 }
749
750
755 public void setUserService(UserService userService) {
756 this.userService = userService;
757 }
758
759
764 public UserPersistence getUserPersistence() {
765 return userPersistence;
766 }
767
768
773 public void setUserPersistence(UserPersistence userPersistence) {
774 this.userPersistence = userPersistence;
775 }
776
777
782 public UserFinder getUserFinder() {
783 return userFinder;
784 }
785
786
791 public void setUserFinder(UserFinder userFinder) {
792 this.userFinder = userFinder;
793 }
794
795
800 protected void runSQL(String sql) throws SystemException {
801 try {
802 DataSource dataSource = dlFileRankPersistence.getDataSource();
803
804 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
805 sql, new int[0]);
806
807 sqlUpdate.update();
808 }
809 catch (Exception e) {
810 throw new SystemException(e);
811 }
812 }
813
814 @BeanReference(type = DLFileEntryLocalService.class)
815 protected DLFileEntryLocalService dlFileEntryLocalService;
816 @BeanReference(type = DLFileEntryService.class)
817 protected DLFileEntryService dlFileEntryService;
818 @BeanReference(type = DLFileEntryPersistence.class)
819 protected DLFileEntryPersistence dlFileEntryPersistence;
820 @BeanReference(type = DLFileEntryFinder.class)
821 protected DLFileEntryFinder dlFileEntryFinder;
822 @BeanReference(type = DLFileRankLocalService.class)
823 protected DLFileRankLocalService dlFileRankLocalService;
824 @BeanReference(type = DLFileRankPersistence.class)
825 protected DLFileRankPersistence dlFileRankPersistence;
826 @BeanReference(type = DLFileShortcutLocalService.class)
827 protected DLFileShortcutLocalService dlFileShortcutLocalService;
828 @BeanReference(type = DLFileShortcutService.class)
829 protected DLFileShortcutService dlFileShortcutService;
830 @BeanReference(type = DLFileShortcutPersistence.class)
831 protected DLFileShortcutPersistence dlFileShortcutPersistence;
832 @BeanReference(type = DLFileVersionLocalService.class)
833 protected DLFileVersionLocalService dlFileVersionLocalService;
834 @BeanReference(type = DLFileVersionService.class)
835 protected DLFileVersionService dlFileVersionService;
836 @BeanReference(type = DLFileVersionPersistence.class)
837 protected DLFileVersionPersistence dlFileVersionPersistence;
838 @BeanReference(type = DLFolderLocalService.class)
839 protected DLFolderLocalService dlFolderLocalService;
840 @BeanReference(type = DLFolderService.class)
841 protected DLFolderService dlFolderService;
842 @BeanReference(type = DLFolderPersistence.class)
843 protected DLFolderPersistence dlFolderPersistence;
844 @BeanReference(type = DLFolderFinder.class)
845 protected DLFolderFinder dlFolderFinder;
846 @BeanReference(type = CounterLocalService.class)
847 protected CounterLocalService counterLocalService;
848 @BeanReference(type = LayoutLocalService.class)
849 protected LayoutLocalService layoutLocalService;
850 @BeanReference(type = LayoutService.class)
851 protected LayoutService layoutService;
852 @BeanReference(type = LayoutPersistence.class)
853 protected LayoutPersistence layoutPersistence;
854 @BeanReference(type = LayoutFinder.class)
855 protected LayoutFinder layoutFinder;
856 @BeanReference(type = ResourceLocalService.class)
857 protected ResourceLocalService resourceLocalService;
858 @BeanReference(type = ResourceService.class)
859 protected ResourceService resourceService;
860 @BeanReference(type = ResourcePersistence.class)
861 protected ResourcePersistence resourcePersistence;
862 @BeanReference(type = ResourceFinder.class)
863 protected ResourceFinder resourceFinder;
864 @BeanReference(type = UserLocalService.class)
865 protected UserLocalService userLocalService;
866 @BeanReference(type = UserService.class)
867 protected UserService userService;
868 @BeanReference(type = UserPersistence.class)
869 protected UserPersistence userPersistence;
870 @BeanReference(type = UserFinder.class)
871 protected UserFinder userFinder;
872 }