001
014
015 package com.liferay.portlet.imagegallery.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.GroupLocalService;
027 import com.liferay.portal.service.GroupService;
028 import com.liferay.portal.service.ImageLocalService;
029 import com.liferay.portal.service.ImageService;
030 import com.liferay.portal.service.LayoutLocalService;
031 import com.liferay.portal.service.LayoutService;
032 import com.liferay.portal.service.ResourceLocalService;
033 import com.liferay.portal.service.ResourceService;
034 import com.liferay.portal.service.UserLocalService;
035 import com.liferay.portal.service.UserService;
036 import com.liferay.portal.service.persistence.GroupFinder;
037 import com.liferay.portal.service.persistence.GroupPersistence;
038 import com.liferay.portal.service.persistence.ImagePersistence;
039 import com.liferay.portal.service.persistence.LayoutFinder;
040 import com.liferay.portal.service.persistence.LayoutPersistence;
041 import com.liferay.portal.service.persistence.ResourceFinder;
042 import com.liferay.portal.service.persistence.ResourcePersistence;
043 import com.liferay.portal.service.persistence.UserFinder;
044 import com.liferay.portal.service.persistence.UserPersistence;
045
046 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
047 import com.liferay.portlet.expando.service.ExpandoValueService;
048 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
049 import com.liferay.portlet.imagegallery.model.IGFolder;
050 import com.liferay.portlet.imagegallery.service.IGFolderLocalService;
051 import com.liferay.portlet.imagegallery.service.IGFolderService;
052 import com.liferay.portlet.imagegallery.service.IGImageLocalService;
053 import com.liferay.portlet.imagegallery.service.IGImageService;
054 import com.liferay.portlet.imagegallery.service.persistence.IGFolderPersistence;
055 import com.liferay.portlet.imagegallery.service.persistence.IGImageFinder;
056 import com.liferay.portlet.imagegallery.service.persistence.IGImagePersistence;
057
058 import java.util.List;
059
060 import javax.sql.DataSource;
061
062
078 public abstract class IGFolderLocalServiceBaseImpl
079 implements IGFolderLocalService {
080
087 public IGFolder addIGFolder(IGFolder igFolder) throws SystemException {
088 igFolder.setNew(true);
089
090 return igFolderPersistence.update(igFolder, false);
091 }
092
093
099 public IGFolder createIGFolder(long folderId) {
100 return igFolderPersistence.create(folderId);
101 }
102
103
110 public void deleteIGFolder(long folderId)
111 throws PortalException, SystemException {
112 igFolderPersistence.remove(folderId);
113 }
114
115
121 public void deleteIGFolder(IGFolder igFolder) throws SystemException {
122 igFolderPersistence.remove(igFolder);
123 }
124
125
132 @SuppressWarnings("rawtypes")
133 public List dynamicQuery(DynamicQuery dynamicQuery)
134 throws SystemException {
135 return igFolderPersistence.findWithDynamicQuery(dynamicQuery);
136 }
137
138
151 @SuppressWarnings("rawtypes")
152 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
153 throws SystemException {
154 return igFolderPersistence.findWithDynamicQuery(dynamicQuery, start, end);
155 }
156
157
171 @SuppressWarnings("rawtypes")
172 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
173 OrderByComparator orderByComparator) throws SystemException {
174 return igFolderPersistence.findWithDynamicQuery(dynamicQuery, start,
175 end, orderByComparator);
176 }
177
178
185 public long dynamicQueryCount(DynamicQuery dynamicQuery)
186 throws SystemException {
187 return igFolderPersistence.countWithDynamicQuery(dynamicQuery);
188 }
189
190
198 public IGFolder getIGFolder(long folderId)
199 throws PortalException, SystemException {
200 return igFolderPersistence.findByPrimaryKey(folderId);
201 }
202
203
212 public IGFolder getIGFolderByUuidAndGroupId(String uuid, long groupId)
213 throws PortalException, SystemException {
214 return igFolderPersistence.findByUUID_G(uuid, groupId);
215 }
216
217
229 public List<IGFolder> getIGFolders(int start, int end)
230 throws SystemException {
231 return igFolderPersistence.findAll(start, end);
232 }
233
234
240 public int getIGFoldersCount() throws SystemException {
241 return igFolderPersistence.countAll();
242 }
243
244
251 public IGFolder updateIGFolder(IGFolder igFolder) throws SystemException {
252 igFolder.setNew(false);
253
254 return igFolderPersistence.update(igFolder, true);
255 }
256
257
265 public IGFolder updateIGFolder(IGFolder igFolder, boolean merge)
266 throws SystemException {
267 igFolder.setNew(false);
268
269 return igFolderPersistence.update(igFolder, merge);
270 }
271
272
277 public IGFolderLocalService getIGFolderLocalService() {
278 return igFolderLocalService;
279 }
280
281
286 public void setIGFolderLocalService(
287 IGFolderLocalService igFolderLocalService) {
288 this.igFolderLocalService = igFolderLocalService;
289 }
290
291
296 public IGFolderService getIGFolderService() {
297 return igFolderService;
298 }
299
300
305 public void setIGFolderService(IGFolderService igFolderService) {
306 this.igFolderService = igFolderService;
307 }
308
309
314 public IGFolderPersistence getIGFolderPersistence() {
315 return igFolderPersistence;
316 }
317
318
323 public void setIGFolderPersistence(IGFolderPersistence igFolderPersistence) {
324 this.igFolderPersistence = igFolderPersistence;
325 }
326
327
332 public IGImageLocalService getIGImageLocalService() {
333 return igImageLocalService;
334 }
335
336
341 public void setIGImageLocalService(IGImageLocalService igImageLocalService) {
342 this.igImageLocalService = igImageLocalService;
343 }
344
345
350 public IGImageService getIGImageService() {
351 return igImageService;
352 }
353
354
359 public void setIGImageService(IGImageService igImageService) {
360 this.igImageService = igImageService;
361 }
362
363
368 public IGImagePersistence getIGImagePersistence() {
369 return igImagePersistence;
370 }
371
372
377 public void setIGImagePersistence(IGImagePersistence igImagePersistence) {
378 this.igImagePersistence = igImagePersistence;
379 }
380
381
386 public IGImageFinder getIGImageFinder() {
387 return igImageFinder;
388 }
389
390
395 public void setIGImageFinder(IGImageFinder igImageFinder) {
396 this.igImageFinder = igImageFinder;
397 }
398
399
404 public CounterLocalService getCounterLocalService() {
405 return counterLocalService;
406 }
407
408
413 public void setCounterLocalService(CounterLocalService counterLocalService) {
414 this.counterLocalService = counterLocalService;
415 }
416
417
422 public GroupLocalService getGroupLocalService() {
423 return groupLocalService;
424 }
425
426
431 public void setGroupLocalService(GroupLocalService groupLocalService) {
432 this.groupLocalService = groupLocalService;
433 }
434
435
440 public GroupService getGroupService() {
441 return groupService;
442 }
443
444
449 public void setGroupService(GroupService groupService) {
450 this.groupService = groupService;
451 }
452
453
458 public GroupPersistence getGroupPersistence() {
459 return groupPersistence;
460 }
461
462
467 public void setGroupPersistence(GroupPersistence groupPersistence) {
468 this.groupPersistence = groupPersistence;
469 }
470
471
476 public GroupFinder getGroupFinder() {
477 return groupFinder;
478 }
479
480
485 public void setGroupFinder(GroupFinder groupFinder) {
486 this.groupFinder = groupFinder;
487 }
488
489
494 public ImageLocalService getImageLocalService() {
495 return imageLocalService;
496 }
497
498
503 public void setImageLocalService(ImageLocalService imageLocalService) {
504 this.imageLocalService = imageLocalService;
505 }
506
507
512 public ImageService getImageService() {
513 return imageService;
514 }
515
516
521 public void setImageService(ImageService imageService) {
522 this.imageService = imageService;
523 }
524
525
530 public ImagePersistence getImagePersistence() {
531 return imagePersistence;
532 }
533
534
539 public void setImagePersistence(ImagePersistence imagePersistence) {
540 this.imagePersistence = imagePersistence;
541 }
542
543
548 public LayoutLocalService getLayoutLocalService() {
549 return layoutLocalService;
550 }
551
552
557 public void setLayoutLocalService(LayoutLocalService layoutLocalService) {
558 this.layoutLocalService = layoutLocalService;
559 }
560
561
566 public LayoutService getLayoutService() {
567 return layoutService;
568 }
569
570
575 public void setLayoutService(LayoutService layoutService) {
576 this.layoutService = layoutService;
577 }
578
579
584 public LayoutPersistence getLayoutPersistence() {
585 return layoutPersistence;
586 }
587
588
593 public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
594 this.layoutPersistence = layoutPersistence;
595 }
596
597
602 public LayoutFinder getLayoutFinder() {
603 return layoutFinder;
604 }
605
606
611 public void setLayoutFinder(LayoutFinder layoutFinder) {
612 this.layoutFinder = layoutFinder;
613 }
614
615
620 public ResourceLocalService getResourceLocalService() {
621 return resourceLocalService;
622 }
623
624
629 public void setResourceLocalService(
630 ResourceLocalService resourceLocalService) {
631 this.resourceLocalService = resourceLocalService;
632 }
633
634
639 public ResourceService getResourceService() {
640 return resourceService;
641 }
642
643
648 public void setResourceService(ResourceService resourceService) {
649 this.resourceService = resourceService;
650 }
651
652
657 public ResourcePersistence getResourcePersistence() {
658 return resourcePersistence;
659 }
660
661
666 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
667 this.resourcePersistence = resourcePersistence;
668 }
669
670
675 public ResourceFinder getResourceFinder() {
676 return resourceFinder;
677 }
678
679
684 public void setResourceFinder(ResourceFinder resourceFinder) {
685 this.resourceFinder = resourceFinder;
686 }
687
688
693 public UserLocalService getUserLocalService() {
694 return userLocalService;
695 }
696
697
702 public void setUserLocalService(UserLocalService userLocalService) {
703 this.userLocalService = userLocalService;
704 }
705
706
711 public UserService getUserService() {
712 return userService;
713 }
714
715
720 public void setUserService(UserService userService) {
721 this.userService = userService;
722 }
723
724
729 public UserPersistence getUserPersistence() {
730 return userPersistence;
731 }
732
733
738 public void setUserPersistence(UserPersistence userPersistence) {
739 this.userPersistence = userPersistence;
740 }
741
742
747 public UserFinder getUserFinder() {
748 return userFinder;
749 }
750
751
756 public void setUserFinder(UserFinder userFinder) {
757 this.userFinder = userFinder;
758 }
759
760
765 public ExpandoValueLocalService getExpandoValueLocalService() {
766 return expandoValueLocalService;
767 }
768
769
774 public void setExpandoValueLocalService(
775 ExpandoValueLocalService expandoValueLocalService) {
776 this.expandoValueLocalService = expandoValueLocalService;
777 }
778
779
784 public ExpandoValueService getExpandoValueService() {
785 return expandoValueService;
786 }
787
788
793 public void setExpandoValueService(ExpandoValueService expandoValueService) {
794 this.expandoValueService = expandoValueService;
795 }
796
797
802 public ExpandoValuePersistence getExpandoValuePersistence() {
803 return expandoValuePersistence;
804 }
805
806
811 public void setExpandoValuePersistence(
812 ExpandoValuePersistence expandoValuePersistence) {
813 this.expandoValuePersistence = expandoValuePersistence;
814 }
815
816
821 protected void runSQL(String sql) throws SystemException {
822 try {
823 DataSource dataSource = igFolderPersistence.getDataSource();
824
825 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
826 sql, new int[0]);
827
828 sqlUpdate.update();
829 }
830 catch (Exception e) {
831 throw new SystemException(e);
832 }
833 }
834
835 @BeanReference(type = IGFolderLocalService.class)
836 protected IGFolderLocalService igFolderLocalService;
837 @BeanReference(type = IGFolderService.class)
838 protected IGFolderService igFolderService;
839 @BeanReference(type = IGFolderPersistence.class)
840 protected IGFolderPersistence igFolderPersistence;
841 @BeanReference(type = IGImageLocalService.class)
842 protected IGImageLocalService igImageLocalService;
843 @BeanReference(type = IGImageService.class)
844 protected IGImageService igImageService;
845 @BeanReference(type = IGImagePersistence.class)
846 protected IGImagePersistence igImagePersistence;
847 @BeanReference(type = IGImageFinder.class)
848 protected IGImageFinder igImageFinder;
849 @BeanReference(type = CounterLocalService.class)
850 protected CounterLocalService counterLocalService;
851 @BeanReference(type = GroupLocalService.class)
852 protected GroupLocalService groupLocalService;
853 @BeanReference(type = GroupService.class)
854 protected GroupService groupService;
855 @BeanReference(type = GroupPersistence.class)
856 protected GroupPersistence groupPersistence;
857 @BeanReference(type = GroupFinder.class)
858 protected GroupFinder groupFinder;
859 @BeanReference(type = ImageLocalService.class)
860 protected ImageLocalService imageLocalService;
861 @BeanReference(type = ImageService.class)
862 protected ImageService imageService;
863 @BeanReference(type = ImagePersistence.class)
864 protected ImagePersistence imagePersistence;
865 @BeanReference(type = LayoutLocalService.class)
866 protected LayoutLocalService layoutLocalService;
867 @BeanReference(type = LayoutService.class)
868 protected LayoutService layoutService;
869 @BeanReference(type = LayoutPersistence.class)
870 protected LayoutPersistence layoutPersistence;
871 @BeanReference(type = LayoutFinder.class)
872 protected LayoutFinder layoutFinder;
873 @BeanReference(type = ResourceLocalService.class)
874 protected ResourceLocalService resourceLocalService;
875 @BeanReference(type = ResourceService.class)
876 protected ResourceService resourceService;
877 @BeanReference(type = ResourcePersistence.class)
878 protected ResourcePersistence resourcePersistence;
879 @BeanReference(type = ResourceFinder.class)
880 protected ResourceFinder resourceFinder;
881 @BeanReference(type = UserLocalService.class)
882 protected UserLocalService userLocalService;
883 @BeanReference(type = UserService.class)
884 protected UserService userService;
885 @BeanReference(type = UserPersistence.class)
886 protected UserPersistence userPersistence;
887 @BeanReference(type = UserFinder.class)
888 protected UserFinder userFinder;
889 @BeanReference(type = ExpandoValueLocalService.class)
890 protected ExpandoValueLocalService expandoValueLocalService;
891 @BeanReference(type = ExpandoValueService.class)
892 protected ExpandoValueService expandoValueService;
893 @BeanReference(type = ExpandoValuePersistence.class)
894 protected ExpandoValuePersistence expandoValuePersistence;
895 }