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.ImageLocalService;
027 import com.liferay.portal.service.ImageService;
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.ImagePersistence;
033 import com.liferay.portal.service.persistence.ResourceFinder;
034 import com.liferay.portal.service.persistence.ResourcePersistence;
035 import com.liferay.portal.service.persistence.UserFinder;
036 import com.liferay.portal.service.persistence.UserPersistence;
037
038 import com.liferay.portlet.asset.service.AssetCategoryLocalService;
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.AssetTagLocalService;
043 import com.liferay.portlet.asset.service.AssetTagService;
044 import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
045 import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
046 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
047 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
048 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
049 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
050 import com.liferay.portlet.expando.service.ExpandoValueLocalService;
051 import com.liferay.portlet.expando.service.ExpandoValueService;
052 import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
053 import com.liferay.portlet.imagegallery.model.IGImage;
054 import com.liferay.portlet.imagegallery.service.IGFolderLocalService;
055 import com.liferay.portlet.imagegallery.service.IGFolderService;
056 import com.liferay.portlet.imagegallery.service.IGImageLocalService;
057 import com.liferay.portlet.imagegallery.service.IGImageService;
058 import com.liferay.portlet.imagegallery.service.persistence.IGFolderPersistence;
059 import com.liferay.portlet.imagegallery.service.persistence.IGImageFinder;
060 import com.liferay.portlet.imagegallery.service.persistence.IGImagePersistence;
061 import com.liferay.portlet.social.service.SocialActivityLocalService;
062 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
063 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
064
065 import java.util.List;
066
067 import javax.sql.DataSource;
068
069
085 public abstract class IGImageLocalServiceBaseImpl implements IGImageLocalService {
086
093 public IGImage addIGImage(IGImage igImage) throws SystemException {
094 igImage.setNew(true);
095
096 return igImagePersistence.update(igImage, false);
097 }
098
099
105 public IGImage createIGImage(long imageId) {
106 return igImagePersistence.create(imageId);
107 }
108
109
116 public void deleteIGImage(long imageId)
117 throws PortalException, SystemException {
118 igImagePersistence.remove(imageId);
119 }
120
121
127 public void deleteIGImage(IGImage igImage) throws SystemException {
128 igImagePersistence.remove(igImage);
129 }
130
131
138 @SuppressWarnings("rawtypes")
139 public List dynamicQuery(DynamicQuery dynamicQuery)
140 throws SystemException {
141 return igImagePersistence.findWithDynamicQuery(dynamicQuery);
142 }
143
144
157 @SuppressWarnings("rawtypes")
158 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
159 throws SystemException {
160 return igImagePersistence.findWithDynamicQuery(dynamicQuery, start, end);
161 }
162
163
177 @SuppressWarnings("rawtypes")
178 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
179 OrderByComparator orderByComparator) throws SystemException {
180 return igImagePersistence.findWithDynamicQuery(dynamicQuery, start,
181 end, orderByComparator);
182 }
183
184
191 public long dynamicQueryCount(DynamicQuery dynamicQuery)
192 throws SystemException {
193 return igImagePersistence.countWithDynamicQuery(dynamicQuery);
194 }
195
196
204 public IGImage getIGImage(long imageId)
205 throws PortalException, SystemException {
206 return igImagePersistence.findByPrimaryKey(imageId);
207 }
208
209
218 public IGImage getIGImageByUuidAndGroupId(String uuid, long groupId)
219 throws PortalException, SystemException {
220 return igImagePersistence.findByUUID_G(uuid, groupId);
221 }
222
223
235 public List<IGImage> getIGImages(int start, int end)
236 throws SystemException {
237 return igImagePersistence.findAll(start, end);
238 }
239
240
246 public int getIGImagesCount() throws SystemException {
247 return igImagePersistence.countAll();
248 }
249
250
257 public IGImage updateIGImage(IGImage igImage) throws SystemException {
258 igImage.setNew(false);
259
260 return igImagePersistence.update(igImage, true);
261 }
262
263
271 public IGImage updateIGImage(IGImage igImage, boolean merge)
272 throws SystemException {
273 igImage.setNew(false);
274
275 return igImagePersistence.update(igImage, merge);
276 }
277
278
283 public IGFolderLocalService getIGFolderLocalService() {
284 return igFolderLocalService;
285 }
286
287
292 public void setIGFolderLocalService(
293 IGFolderLocalService igFolderLocalService) {
294 this.igFolderLocalService = igFolderLocalService;
295 }
296
297
302 public IGFolderService getIGFolderService() {
303 return igFolderService;
304 }
305
306
311 public void setIGFolderService(IGFolderService igFolderService) {
312 this.igFolderService = igFolderService;
313 }
314
315
320 public IGFolderPersistence getIGFolderPersistence() {
321 return igFolderPersistence;
322 }
323
324
329 public void setIGFolderPersistence(IGFolderPersistence igFolderPersistence) {
330 this.igFolderPersistence = igFolderPersistence;
331 }
332
333
338 public IGImageLocalService getIGImageLocalService() {
339 return igImageLocalService;
340 }
341
342
347 public void setIGImageLocalService(IGImageLocalService igImageLocalService) {
348 this.igImageLocalService = igImageLocalService;
349 }
350
351
356 public IGImageService getIGImageService() {
357 return igImageService;
358 }
359
360
365 public void setIGImageService(IGImageService igImageService) {
366 this.igImageService = igImageService;
367 }
368
369
374 public IGImagePersistence getIGImagePersistence() {
375 return igImagePersistence;
376 }
377
378
383 public void setIGImagePersistence(IGImagePersistence igImagePersistence) {
384 this.igImagePersistence = igImagePersistence;
385 }
386
387
392 public IGImageFinder getIGImageFinder() {
393 return igImageFinder;
394 }
395
396
401 public void setIGImageFinder(IGImageFinder igImageFinder) {
402 this.igImageFinder = igImageFinder;
403 }
404
405
410 public CounterLocalService getCounterLocalService() {
411 return counterLocalService;
412 }
413
414
419 public void setCounterLocalService(CounterLocalService counterLocalService) {
420 this.counterLocalService = counterLocalService;
421 }
422
423
428 public ImageLocalService getImageLocalService() {
429 return imageLocalService;
430 }
431
432
437 public void setImageLocalService(ImageLocalService imageLocalService) {
438 this.imageLocalService = imageLocalService;
439 }
440
441
446 public ImageService getImageService() {
447 return imageService;
448 }
449
450
455 public void setImageService(ImageService imageService) {
456 this.imageService = imageService;
457 }
458
459
464 public ImagePersistence getImagePersistence() {
465 return imagePersistence;
466 }
467
468
473 public void setImagePersistence(ImagePersistence imagePersistence) {
474 this.imagePersistence = imagePersistence;
475 }
476
477
482 public ResourceLocalService getResourceLocalService() {
483 return resourceLocalService;
484 }
485
486
491 public void setResourceLocalService(
492 ResourceLocalService resourceLocalService) {
493 this.resourceLocalService = resourceLocalService;
494 }
495
496
501 public ResourceService getResourceService() {
502 return resourceService;
503 }
504
505
510 public void setResourceService(ResourceService resourceService) {
511 this.resourceService = resourceService;
512 }
513
514
519 public ResourcePersistence getResourcePersistence() {
520 return resourcePersistence;
521 }
522
523
528 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
529 this.resourcePersistence = resourcePersistence;
530 }
531
532
537 public ResourceFinder getResourceFinder() {
538 return resourceFinder;
539 }
540
541
546 public void setResourceFinder(ResourceFinder resourceFinder) {
547 this.resourceFinder = resourceFinder;
548 }
549
550
555 public UserLocalService getUserLocalService() {
556 return userLocalService;
557 }
558
559
564 public void setUserLocalService(UserLocalService userLocalService) {
565 this.userLocalService = userLocalService;
566 }
567
568
573 public UserService getUserService() {
574 return userService;
575 }
576
577
582 public void setUserService(UserService userService) {
583 this.userService = userService;
584 }
585
586
591 public UserPersistence getUserPersistence() {
592 return userPersistence;
593 }
594
595
600 public void setUserPersistence(UserPersistence userPersistence) {
601 this.userPersistence = userPersistence;
602 }
603
604
609 public UserFinder getUserFinder() {
610 return userFinder;
611 }
612
613
618 public void setUserFinder(UserFinder userFinder) {
619 this.userFinder = userFinder;
620 }
621
622
627 public AssetCategoryLocalService getAssetCategoryLocalService() {
628 return assetCategoryLocalService;
629 }
630
631
636 public void setAssetCategoryLocalService(
637 AssetCategoryLocalService assetCategoryLocalService) {
638 this.assetCategoryLocalService = assetCategoryLocalService;
639 }
640
641
646 public AssetCategoryService getAssetCategoryService() {
647 return assetCategoryService;
648 }
649
650
655 public void setAssetCategoryService(
656 AssetCategoryService assetCategoryService) {
657 this.assetCategoryService = assetCategoryService;
658 }
659
660
665 public AssetCategoryPersistence getAssetCategoryPersistence() {
666 return assetCategoryPersistence;
667 }
668
669
674 public void setAssetCategoryPersistence(
675 AssetCategoryPersistence assetCategoryPersistence) {
676 this.assetCategoryPersistence = assetCategoryPersistence;
677 }
678
679
684 public AssetCategoryFinder getAssetCategoryFinder() {
685 return assetCategoryFinder;
686 }
687
688
693 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
694 this.assetCategoryFinder = assetCategoryFinder;
695 }
696
697
702 public AssetEntryLocalService getAssetEntryLocalService() {
703 return assetEntryLocalService;
704 }
705
706
711 public void setAssetEntryLocalService(
712 AssetEntryLocalService assetEntryLocalService) {
713 this.assetEntryLocalService = assetEntryLocalService;
714 }
715
716
721 public AssetEntryService getAssetEntryService() {
722 return assetEntryService;
723 }
724
725
730 public void setAssetEntryService(AssetEntryService assetEntryService) {
731 this.assetEntryService = assetEntryService;
732 }
733
734
739 public AssetEntryPersistence getAssetEntryPersistence() {
740 return assetEntryPersistence;
741 }
742
743
748 public void setAssetEntryPersistence(
749 AssetEntryPersistence assetEntryPersistence) {
750 this.assetEntryPersistence = assetEntryPersistence;
751 }
752
753
758 public AssetEntryFinder getAssetEntryFinder() {
759 return assetEntryFinder;
760 }
761
762
767 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
768 this.assetEntryFinder = assetEntryFinder;
769 }
770
771
776 public AssetTagLocalService getAssetTagLocalService() {
777 return assetTagLocalService;
778 }
779
780
785 public void setAssetTagLocalService(
786 AssetTagLocalService assetTagLocalService) {
787 this.assetTagLocalService = assetTagLocalService;
788 }
789
790
795 public AssetTagService getAssetTagService() {
796 return assetTagService;
797 }
798
799
804 public void setAssetTagService(AssetTagService assetTagService) {
805 this.assetTagService = assetTagService;
806 }
807
808
813 public AssetTagPersistence getAssetTagPersistence() {
814 return assetTagPersistence;
815 }
816
817
822 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
823 this.assetTagPersistence = assetTagPersistence;
824 }
825
826
831 public AssetTagFinder getAssetTagFinder() {
832 return assetTagFinder;
833 }
834
835
840 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
841 this.assetTagFinder = assetTagFinder;
842 }
843
844
849 public ExpandoValueLocalService getExpandoValueLocalService() {
850 return expandoValueLocalService;
851 }
852
853
858 public void setExpandoValueLocalService(
859 ExpandoValueLocalService expandoValueLocalService) {
860 this.expandoValueLocalService = expandoValueLocalService;
861 }
862
863
868 public ExpandoValueService getExpandoValueService() {
869 return expandoValueService;
870 }
871
872
877 public void setExpandoValueService(ExpandoValueService expandoValueService) {
878 this.expandoValueService = expandoValueService;
879 }
880
881
886 public ExpandoValuePersistence getExpandoValuePersistence() {
887 return expandoValuePersistence;
888 }
889
890
895 public void setExpandoValuePersistence(
896 ExpandoValuePersistence expandoValuePersistence) {
897 this.expandoValuePersistence = expandoValuePersistence;
898 }
899
900
905 public SocialActivityLocalService getSocialActivityLocalService() {
906 return socialActivityLocalService;
907 }
908
909
914 public void setSocialActivityLocalService(
915 SocialActivityLocalService socialActivityLocalService) {
916 this.socialActivityLocalService = socialActivityLocalService;
917 }
918
919
924 public SocialActivityPersistence getSocialActivityPersistence() {
925 return socialActivityPersistence;
926 }
927
928
933 public void setSocialActivityPersistence(
934 SocialActivityPersistence socialActivityPersistence) {
935 this.socialActivityPersistence = socialActivityPersistence;
936 }
937
938
943 public SocialActivityFinder getSocialActivityFinder() {
944 return socialActivityFinder;
945 }
946
947
952 public void setSocialActivityFinder(
953 SocialActivityFinder socialActivityFinder) {
954 this.socialActivityFinder = socialActivityFinder;
955 }
956
957
962 protected void runSQL(String sql) throws SystemException {
963 try {
964 DataSource dataSource = igImagePersistence.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 = IGFolderLocalService.class)
977 protected IGFolderLocalService igFolderLocalService;
978 @BeanReference(type = IGFolderService.class)
979 protected IGFolderService igFolderService;
980 @BeanReference(type = IGFolderPersistence.class)
981 protected IGFolderPersistence igFolderPersistence;
982 @BeanReference(type = IGImageLocalService.class)
983 protected IGImageLocalService igImageLocalService;
984 @BeanReference(type = IGImageService.class)
985 protected IGImageService igImageService;
986 @BeanReference(type = IGImagePersistence.class)
987 protected IGImagePersistence igImagePersistence;
988 @BeanReference(type = IGImageFinder.class)
989 protected IGImageFinder igImageFinder;
990 @BeanReference(type = CounterLocalService.class)
991 protected CounterLocalService counterLocalService;
992 @BeanReference(type = ImageLocalService.class)
993 protected ImageLocalService imageLocalService;
994 @BeanReference(type = ImageService.class)
995 protected ImageService imageService;
996 @BeanReference(type = ImagePersistence.class)
997 protected ImagePersistence imagePersistence;
998 @BeanReference(type = ResourceLocalService.class)
999 protected ResourceLocalService resourceLocalService;
1000 @BeanReference(type = ResourceService.class)
1001 protected ResourceService resourceService;
1002 @BeanReference(type = ResourcePersistence.class)
1003 protected ResourcePersistence resourcePersistence;
1004 @BeanReference(type = ResourceFinder.class)
1005 protected ResourceFinder resourceFinder;
1006 @BeanReference(type = UserLocalService.class)
1007 protected UserLocalService userLocalService;
1008 @BeanReference(type = UserService.class)
1009 protected UserService userService;
1010 @BeanReference(type = UserPersistence.class)
1011 protected UserPersistence userPersistence;
1012 @BeanReference(type = UserFinder.class)
1013 protected UserFinder userFinder;
1014 @BeanReference(type = AssetCategoryLocalService.class)
1015 protected AssetCategoryLocalService assetCategoryLocalService;
1016 @BeanReference(type = AssetCategoryService.class)
1017 protected AssetCategoryService assetCategoryService;
1018 @BeanReference(type = AssetCategoryPersistence.class)
1019 protected AssetCategoryPersistence assetCategoryPersistence;
1020 @BeanReference(type = AssetCategoryFinder.class)
1021 protected AssetCategoryFinder assetCategoryFinder;
1022 @BeanReference(type = AssetEntryLocalService.class)
1023 protected AssetEntryLocalService assetEntryLocalService;
1024 @BeanReference(type = AssetEntryService.class)
1025 protected AssetEntryService assetEntryService;
1026 @BeanReference(type = AssetEntryPersistence.class)
1027 protected AssetEntryPersistence assetEntryPersistence;
1028 @BeanReference(type = AssetEntryFinder.class)
1029 protected AssetEntryFinder assetEntryFinder;
1030 @BeanReference(type = AssetTagLocalService.class)
1031 protected AssetTagLocalService assetTagLocalService;
1032 @BeanReference(type = AssetTagService.class)
1033 protected AssetTagService assetTagService;
1034 @BeanReference(type = AssetTagPersistence.class)
1035 protected AssetTagPersistence assetTagPersistence;
1036 @BeanReference(type = AssetTagFinder.class)
1037 protected AssetTagFinder assetTagFinder;
1038 @BeanReference(type = ExpandoValueLocalService.class)
1039 protected ExpandoValueLocalService expandoValueLocalService;
1040 @BeanReference(type = ExpandoValueService.class)
1041 protected ExpandoValueService expandoValueService;
1042 @BeanReference(type = ExpandoValuePersistence.class)
1043 protected ExpandoValuePersistence expandoValuePersistence;
1044 @BeanReference(type = SocialActivityLocalService.class)
1045 protected SocialActivityLocalService socialActivityLocalService;
1046 @BeanReference(type = SocialActivityPersistence.class)
1047 protected SocialActivityPersistence socialActivityPersistence;
1048 @BeanReference(type = SocialActivityFinder.class)
1049 protected SocialActivityFinder socialActivityFinder;
1050 }