001
014
015 package com.liferay.portal.service.base;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.asset.kernel.service.persistence.AssetCategoryFinder;
020 import com.liferay.asset.kernel.service.persistence.AssetCategoryPersistence;
021 import com.liferay.asset.kernel.service.persistence.AssetEntryFinder;
022 import com.liferay.asset.kernel.service.persistence.AssetEntryPersistence;
023 import com.liferay.asset.kernel.service.persistence.AssetTagFinder;
024 import com.liferay.asset.kernel.service.persistence.AssetTagPersistence;
025
026 import com.liferay.expando.kernel.service.persistence.ExpandoRowPersistence;
027
028 import com.liferay.exportimport.kernel.lar.ExportImportHelperUtil;
029 import com.liferay.exportimport.kernel.lar.ManifestSummary;
030 import com.liferay.exportimport.kernel.lar.PortletDataContext;
031 import com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil;
032 import com.liferay.exportimport.kernel.lar.StagedModelType;
033 import com.liferay.exportimport.kernel.service.persistence.ExportImportConfigurationFinder;
034 import com.liferay.exportimport.kernel.service.persistence.ExportImportConfigurationPersistence;
035
036 import com.liferay.portal.kernel.bean.BeanReference;
037 import com.liferay.portal.kernel.dao.db.DB;
038 import com.liferay.portal.kernel.dao.db.DBManagerUtil;
039 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
040 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
041 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
042 import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
043 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
044 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
045 import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
046 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
047 import com.liferay.portal.kernel.dao.orm.Projection;
048 import com.liferay.portal.kernel.exception.PortalException;
049 import com.liferay.portal.kernel.exception.SystemException;
050 import com.liferay.portal.kernel.model.Layout;
051 import com.liferay.portal.kernel.model.PersistedModel;
052 import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
053 import com.liferay.portal.kernel.search.Indexable;
054 import com.liferay.portal.kernel.search.IndexableType;
055 import com.liferay.portal.kernel.service.BaseLocalServiceImpl;
056 import com.liferay.portal.kernel.service.LayoutLocalService;
057 import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry;
058 import com.liferay.portal.kernel.service.persistence.ClassNamePersistence;
059 import com.liferay.portal.kernel.service.persistence.GroupFinder;
060 import com.liferay.portal.kernel.service.persistence.GroupPersistence;
061 import com.liferay.portal.kernel.service.persistence.ImagePersistence;
062 import com.liferay.portal.kernel.service.persistence.LayoutFinder;
063 import com.liferay.portal.kernel.service.persistence.LayoutFriendlyURLPersistence;
064 import com.liferay.portal.kernel.service.persistence.LayoutPersistence;
065 import com.liferay.portal.kernel.service.persistence.LayoutPrototypePersistence;
066 import com.liferay.portal.kernel.service.persistence.LayoutSetPersistence;
067 import com.liferay.portal.kernel.service.persistence.LayoutSetPrototypePersistence;
068 import com.liferay.portal.kernel.service.persistence.PluginSettingPersistence;
069 import com.liferay.portal.kernel.service.persistence.PortletPreferencesFinder;
070 import com.liferay.portal.kernel.service.persistence.PortletPreferencesPersistence;
071 import com.liferay.portal.kernel.service.persistence.ResourcePermissionFinder;
072 import com.liferay.portal.kernel.service.persistence.ResourcePermissionPersistence;
073 import com.liferay.portal.kernel.service.persistence.SubscriptionPersistence;
074 import com.liferay.portal.kernel.service.persistence.UserFinder;
075 import com.liferay.portal.kernel.service.persistence.UserPersistence;
076 import com.liferay.portal.kernel.util.OrderByComparator;
077 import com.liferay.portal.kernel.util.PortalUtil;
078
079 import com.liferay.ratings.kernel.service.persistence.RatingsStatsFinder;
080 import com.liferay.ratings.kernel.service.persistence.RatingsStatsPersistence;
081
082 import java.io.Serializable;
083
084 import java.util.List;
085
086 import javax.sql.DataSource;
087
088
100 @ProviderType
101 public abstract class LayoutLocalServiceBaseImpl extends BaseLocalServiceImpl
102 implements LayoutLocalService, IdentifiableOSGiService {
103
108
109
115 @Indexable(type = IndexableType.REINDEX)
116 @Override
117 public Layout addLayout(Layout layout) {
118 layout.setNew(true);
119
120 return layoutPersistence.update(layout);
121 }
122
123
129 @Override
130 public Layout createLayout(long plid) {
131 return layoutPersistence.create(plid);
132 }
133
134
141 @Indexable(type = IndexableType.DELETE)
142 @Override
143 public Layout deleteLayout(long plid) throws PortalException {
144 return layoutPersistence.remove(plid);
145 }
146
147
153 @Indexable(type = IndexableType.DELETE)
154 @Override
155 public Layout deleteLayout(Layout layout) {
156 return layoutPersistence.remove(layout);
157 }
158
159 @Override
160 public DynamicQuery dynamicQuery() {
161 Class<?> clazz = getClass();
162
163 return DynamicQueryFactoryUtil.forClass(Layout.class,
164 clazz.getClassLoader());
165 }
166
167
173 @Override
174 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
175 return layoutPersistence.findWithDynamicQuery(dynamicQuery);
176 }
177
178
190 @Override
191 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
192 int end) {
193 return layoutPersistence.findWithDynamicQuery(dynamicQuery, start, end);
194 }
195
196
209 @Override
210 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
211 int end, OrderByComparator<T> orderByComparator) {
212 return layoutPersistence.findWithDynamicQuery(dynamicQuery, start, end,
213 orderByComparator);
214 }
215
216
222 @Override
223 public long dynamicQueryCount(DynamicQuery dynamicQuery) {
224 return layoutPersistence.countWithDynamicQuery(dynamicQuery);
225 }
226
227
234 @Override
235 public long dynamicQueryCount(DynamicQuery dynamicQuery,
236 Projection projection) {
237 return layoutPersistence.countWithDynamicQuery(dynamicQuery, projection);
238 }
239
240 @Override
241 public Layout fetchLayout(long plid) {
242 return layoutPersistence.fetchByPrimaryKey(plid);
243 }
244
245
253 @Override
254 public Layout fetchLayoutByUuidAndGroupId(String uuid, long groupId,
255 boolean privateLayout) {
256 return layoutPersistence.fetchByUUID_G_P(uuid, groupId, privateLayout);
257 }
258
259
266 @Override
267 public Layout getLayout(long plid) throws PortalException {
268 return layoutPersistence.findByPrimaryKey(plid);
269 }
270
271 @Override
272 public ActionableDynamicQuery getActionableDynamicQuery() {
273 ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
274
275 actionableDynamicQuery.setBaseLocalService(layoutLocalService);
276 actionableDynamicQuery.setClassLoader(getClassLoader());
277 actionableDynamicQuery.setModelClass(Layout.class);
278
279 actionableDynamicQuery.setPrimaryKeyPropertyName("plid");
280
281 return actionableDynamicQuery;
282 }
283
284 @Override
285 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
286 IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
287
288 indexableActionableDynamicQuery.setBaseLocalService(layoutLocalService);
289 indexableActionableDynamicQuery.setClassLoader(getClassLoader());
290 indexableActionableDynamicQuery.setModelClass(Layout.class);
291
292 indexableActionableDynamicQuery.setPrimaryKeyPropertyName("plid");
293
294 return indexableActionableDynamicQuery;
295 }
296
297 protected void initActionableDynamicQuery(
298 ActionableDynamicQuery actionableDynamicQuery) {
299 actionableDynamicQuery.setBaseLocalService(layoutLocalService);
300 actionableDynamicQuery.setClassLoader(getClassLoader());
301 actionableDynamicQuery.setModelClass(Layout.class);
302
303 actionableDynamicQuery.setPrimaryKeyPropertyName("plid");
304 }
305
306 @Override
307 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
308 final PortletDataContext portletDataContext) {
309 final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
310 @Override
311 public long performCount() throws PortalException {
312 ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
313
314 StagedModelType stagedModelType = getStagedModelType();
315
316 long modelAdditionCount = super.performCount();
317
318 manifestSummary.addModelAdditionCount(stagedModelType,
319 modelAdditionCount);
320
321 long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
322 stagedModelType);
323
324 manifestSummary.addModelDeletionCount(stagedModelType,
325 modelDeletionCount);
326
327 return modelAdditionCount;
328 }
329 };
330
331 initActionableDynamicQuery(exportActionableDynamicQuery);
332
333 exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
334 @Override
335 public void addCriteria(DynamicQuery dynamicQuery) {
336 portletDataContext.addDateRangeCriteria(dynamicQuery,
337 "modifiedDate");
338 }
339 });
340
341 exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
342
343 exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
344
345 exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Layout>() {
346 @Override
347 public void performAction(Layout layout)
348 throws PortalException {
349 StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
350 layout);
351 }
352 });
353 exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
354 PortalUtil.getClassNameId(Layout.class.getName())));
355
356 return exportActionableDynamicQuery;
357 }
358
359
362 @Override
363 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
364 throws PortalException {
365 return layoutLocalService.deleteLayout((Layout)persistedModel);
366 }
367
368 @Override
369 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
370 throws PortalException {
371 return layoutPersistence.findByPrimaryKey(primaryKeyObj);
372 }
373
374
381 @Override
382 public List<Layout> getLayoutsByUuidAndCompanyId(String uuid, long companyId) {
383 return layoutPersistence.findByUuid_C(uuid, companyId);
384 }
385
386
396 @Override
397 public List<Layout> getLayoutsByUuidAndCompanyId(String uuid,
398 long companyId, int start, int end,
399 OrderByComparator<Layout> orderByComparator) {
400 return layoutPersistence.findByUuid_C(uuid, companyId, start, end,
401 orderByComparator);
402 }
403
404
413 @Override
414 public Layout getLayoutByUuidAndGroupId(String uuid, long groupId,
415 boolean privateLayout) throws PortalException {
416 return layoutPersistence.findByUUID_G_P(uuid, groupId, privateLayout);
417 }
418
419
430 @Override
431 public List<Layout> getLayouts(int start, int end) {
432 return layoutPersistence.findAll(start, end);
433 }
434
435
440 @Override
441 public int getLayoutsCount() {
442 return layoutPersistence.countAll();
443 }
444
445
451 @Indexable(type = IndexableType.REINDEX)
452 @Override
453 public Layout updateLayout(Layout layout) {
454 return layoutPersistence.update(layout);
455 }
456
457
462 public LayoutLocalService getLayoutLocalService() {
463 return layoutLocalService;
464 }
465
466
471 public void setLayoutLocalService(LayoutLocalService layoutLocalService) {
472 this.layoutLocalService = layoutLocalService;
473 }
474
475
480 public LayoutPersistence getLayoutPersistence() {
481 return layoutPersistence;
482 }
483
484
489 public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
490 this.layoutPersistence = layoutPersistence;
491 }
492
493
498 public LayoutFinder getLayoutFinder() {
499 return layoutFinder;
500 }
501
502
507 public void setLayoutFinder(LayoutFinder layoutFinder) {
508 this.layoutFinder = layoutFinder;
509 }
510
511
516 public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() {
517 return counterLocalService;
518 }
519
520
525 public void setCounterLocalService(
526 com.liferay.counter.kernel.service.CounterLocalService counterLocalService) {
527 this.counterLocalService = counterLocalService;
528 }
529
530
535 public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() {
536 return classNameLocalService;
537 }
538
539
544 public void setClassNameLocalService(
545 com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) {
546 this.classNameLocalService = classNameLocalService;
547 }
548
549
554 public ClassNamePersistence getClassNamePersistence() {
555 return classNamePersistence;
556 }
557
558
563 public void setClassNamePersistence(
564 ClassNamePersistence classNamePersistence) {
565 this.classNamePersistence = classNamePersistence;
566 }
567
568
573 public com.liferay.portal.kernel.service.GroupLocalService getGroupLocalService() {
574 return groupLocalService;
575 }
576
577
582 public void setGroupLocalService(
583 com.liferay.portal.kernel.service.GroupLocalService groupLocalService) {
584 this.groupLocalService = groupLocalService;
585 }
586
587
592 public GroupPersistence getGroupPersistence() {
593 return groupPersistence;
594 }
595
596
601 public void setGroupPersistence(GroupPersistence groupPersistence) {
602 this.groupPersistence = groupPersistence;
603 }
604
605
610 public GroupFinder getGroupFinder() {
611 return groupFinder;
612 }
613
614
619 public void setGroupFinder(GroupFinder groupFinder) {
620 this.groupFinder = groupFinder;
621 }
622
623
628 public com.liferay.portal.kernel.service.ImageLocalService getImageLocalService() {
629 return imageLocalService;
630 }
631
632
637 public void setImageLocalService(
638 com.liferay.portal.kernel.service.ImageLocalService imageLocalService) {
639 this.imageLocalService = imageLocalService;
640 }
641
642
647 public ImagePersistence getImagePersistence() {
648 return imagePersistence;
649 }
650
651
656 public void setImagePersistence(ImagePersistence imagePersistence) {
657 this.imagePersistence = imagePersistence;
658 }
659
660
665 public com.liferay.asset.kernel.service.AssetCategoryLocalService getAssetCategoryLocalService() {
666 return assetCategoryLocalService;
667 }
668
669
674 public void setAssetCategoryLocalService(
675 com.liferay.asset.kernel.service.AssetCategoryLocalService assetCategoryLocalService) {
676 this.assetCategoryLocalService = assetCategoryLocalService;
677 }
678
679
684 public AssetCategoryPersistence getAssetCategoryPersistence() {
685 return assetCategoryPersistence;
686 }
687
688
693 public void setAssetCategoryPersistence(
694 AssetCategoryPersistence assetCategoryPersistence) {
695 this.assetCategoryPersistence = assetCategoryPersistence;
696 }
697
698
703 public AssetCategoryFinder getAssetCategoryFinder() {
704 return assetCategoryFinder;
705 }
706
707
712 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
713 this.assetCategoryFinder = assetCategoryFinder;
714 }
715
716
721 public com.liferay.asset.kernel.service.AssetEntryLocalService getAssetEntryLocalService() {
722 return assetEntryLocalService;
723 }
724
725
730 public void setAssetEntryLocalService(
731 com.liferay.asset.kernel.service.AssetEntryLocalService assetEntryLocalService) {
732 this.assetEntryLocalService = assetEntryLocalService;
733 }
734
735
740 public AssetEntryPersistence getAssetEntryPersistence() {
741 return assetEntryPersistence;
742 }
743
744
749 public void setAssetEntryPersistence(
750 AssetEntryPersistence assetEntryPersistence) {
751 this.assetEntryPersistence = assetEntryPersistence;
752 }
753
754
759 public AssetEntryFinder getAssetEntryFinder() {
760 return assetEntryFinder;
761 }
762
763
768 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
769 this.assetEntryFinder = assetEntryFinder;
770 }
771
772
777 public com.liferay.asset.kernel.service.AssetTagLocalService getAssetTagLocalService() {
778 return assetTagLocalService;
779 }
780
781
786 public void setAssetTagLocalService(
787 com.liferay.asset.kernel.service.AssetTagLocalService assetTagLocalService) {
788 this.assetTagLocalService = assetTagLocalService;
789 }
790
791
796 public AssetTagPersistence getAssetTagPersistence() {
797 return assetTagPersistence;
798 }
799
800
805 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
806 this.assetTagPersistence = assetTagPersistence;
807 }
808
809
814 public AssetTagFinder getAssetTagFinder() {
815 return assetTagFinder;
816 }
817
818
823 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
824 this.assetTagFinder = assetTagFinder;
825 }
826
827
832 public com.liferay.expando.kernel.service.ExpandoRowLocalService getExpandoRowLocalService() {
833 return expandoRowLocalService;
834 }
835
836
841 public void setExpandoRowLocalService(
842 com.liferay.expando.kernel.service.ExpandoRowLocalService expandoRowLocalService) {
843 this.expandoRowLocalService = expandoRowLocalService;
844 }
845
846
851 public ExpandoRowPersistence getExpandoRowPersistence() {
852 return expandoRowPersistence;
853 }
854
855
860 public void setExpandoRowPersistence(
861 ExpandoRowPersistence expandoRowPersistence) {
862 this.expandoRowPersistence = expandoRowPersistence;
863 }
864
865
870 public com.liferay.exportimport.kernel.service.ExportImportConfigurationLocalService getExportImportConfigurationLocalService() {
871 return exportImportConfigurationLocalService;
872 }
873
874
879 public void setExportImportConfigurationLocalService(
880 com.liferay.exportimport.kernel.service.ExportImportConfigurationLocalService exportImportConfigurationLocalService) {
881 this.exportImportConfigurationLocalService = exportImportConfigurationLocalService;
882 }
883
884
889 public ExportImportConfigurationPersistence getExportImportConfigurationPersistence() {
890 return exportImportConfigurationPersistence;
891 }
892
893
898 public void setExportImportConfigurationPersistence(
899 ExportImportConfigurationPersistence exportImportConfigurationPersistence) {
900 this.exportImportConfigurationPersistence = exportImportConfigurationPersistence;
901 }
902
903
908 public ExportImportConfigurationFinder getExportImportConfigurationFinder() {
909 return exportImportConfigurationFinder;
910 }
911
912
917 public void setExportImportConfigurationFinder(
918 ExportImportConfigurationFinder exportImportConfigurationFinder) {
919 this.exportImportConfigurationFinder = exportImportConfigurationFinder;
920 }
921
922
927 public com.liferay.ratings.kernel.service.RatingsStatsLocalService getRatingsStatsLocalService() {
928 return ratingsStatsLocalService;
929 }
930
931
936 public void setRatingsStatsLocalService(
937 com.liferay.ratings.kernel.service.RatingsStatsLocalService ratingsStatsLocalService) {
938 this.ratingsStatsLocalService = ratingsStatsLocalService;
939 }
940
941
946 public RatingsStatsPersistence getRatingsStatsPersistence() {
947 return ratingsStatsPersistence;
948 }
949
950
955 public void setRatingsStatsPersistence(
956 RatingsStatsPersistence ratingsStatsPersistence) {
957 this.ratingsStatsPersistence = ratingsStatsPersistence;
958 }
959
960
965 public RatingsStatsFinder getRatingsStatsFinder() {
966 return ratingsStatsFinder;
967 }
968
969
974 public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
975 this.ratingsStatsFinder = ratingsStatsFinder;
976 }
977
978
983 public com.liferay.portal.kernel.service.LayoutFriendlyURLLocalService getLayoutFriendlyURLLocalService() {
984 return layoutFriendlyURLLocalService;
985 }
986
987
992 public void setLayoutFriendlyURLLocalService(
993 com.liferay.portal.kernel.service.LayoutFriendlyURLLocalService layoutFriendlyURLLocalService) {
994 this.layoutFriendlyURLLocalService = layoutFriendlyURLLocalService;
995 }
996
997
1002 public LayoutFriendlyURLPersistence getLayoutFriendlyURLPersistence() {
1003 return layoutFriendlyURLPersistence;
1004 }
1005
1006
1011 public void setLayoutFriendlyURLPersistence(
1012 LayoutFriendlyURLPersistence layoutFriendlyURLPersistence) {
1013 this.layoutFriendlyURLPersistence = layoutFriendlyURLPersistence;
1014 }
1015
1016
1021 public com.liferay.portal.kernel.service.LayoutPrototypeLocalService getLayoutPrototypeLocalService() {
1022 return layoutPrototypeLocalService;
1023 }
1024
1025
1030 public void setLayoutPrototypeLocalService(
1031 com.liferay.portal.kernel.service.LayoutPrototypeLocalService layoutPrototypeLocalService) {
1032 this.layoutPrototypeLocalService = layoutPrototypeLocalService;
1033 }
1034
1035
1040 public LayoutPrototypePersistence getLayoutPrototypePersistence() {
1041 return layoutPrototypePersistence;
1042 }
1043
1044
1049 public void setLayoutPrototypePersistence(
1050 LayoutPrototypePersistence layoutPrototypePersistence) {
1051 this.layoutPrototypePersistence = layoutPrototypePersistence;
1052 }
1053
1054
1059 public com.liferay.portal.kernel.service.LayoutSetLocalService getLayoutSetLocalService() {
1060 return layoutSetLocalService;
1061 }
1062
1063
1068 public void setLayoutSetLocalService(
1069 com.liferay.portal.kernel.service.LayoutSetLocalService layoutSetLocalService) {
1070 this.layoutSetLocalService = layoutSetLocalService;
1071 }
1072
1073
1078 public LayoutSetPersistence getLayoutSetPersistence() {
1079 return layoutSetPersistence;
1080 }
1081
1082
1087 public void setLayoutSetPersistence(
1088 LayoutSetPersistence layoutSetPersistence) {
1089 this.layoutSetPersistence = layoutSetPersistence;
1090 }
1091
1092
1097 public com.liferay.portal.kernel.service.LayoutSetPrototypeLocalService getLayoutSetPrototypeLocalService() {
1098 return layoutSetPrototypeLocalService;
1099 }
1100
1101
1106 public void setLayoutSetPrototypeLocalService(
1107 com.liferay.portal.kernel.service.LayoutSetPrototypeLocalService layoutSetPrototypeLocalService) {
1108 this.layoutSetPrototypeLocalService = layoutSetPrototypeLocalService;
1109 }
1110
1111
1116 public LayoutSetPrototypePersistence getLayoutSetPrototypePersistence() {
1117 return layoutSetPrototypePersistence;
1118 }
1119
1120
1125 public void setLayoutSetPrototypePersistence(
1126 LayoutSetPrototypePersistence layoutSetPrototypePersistence) {
1127 this.layoutSetPrototypePersistence = layoutSetPrototypePersistence;
1128 }
1129
1130
1135 public com.liferay.portal.kernel.service.PluginSettingLocalService getPluginSettingLocalService() {
1136 return pluginSettingLocalService;
1137 }
1138
1139
1144 public void setPluginSettingLocalService(
1145 com.liferay.portal.kernel.service.PluginSettingLocalService pluginSettingLocalService) {
1146 this.pluginSettingLocalService = pluginSettingLocalService;
1147 }
1148
1149
1154 public PluginSettingPersistence getPluginSettingPersistence() {
1155 return pluginSettingPersistence;
1156 }
1157
1158
1163 public void setPluginSettingPersistence(
1164 PluginSettingPersistence pluginSettingPersistence) {
1165 this.pluginSettingPersistence = pluginSettingPersistence;
1166 }
1167
1168
1173 public com.liferay.portal.kernel.service.PortletPreferencesLocalService getPortletPreferencesLocalService() {
1174 return portletPreferencesLocalService;
1175 }
1176
1177
1182 public void setPortletPreferencesLocalService(
1183 com.liferay.portal.kernel.service.PortletPreferencesLocalService portletPreferencesLocalService) {
1184 this.portletPreferencesLocalService = portletPreferencesLocalService;
1185 }
1186
1187
1192 public PortletPreferencesPersistence getPortletPreferencesPersistence() {
1193 return portletPreferencesPersistence;
1194 }
1195
1196
1201 public void setPortletPreferencesPersistence(
1202 PortletPreferencesPersistence portletPreferencesPersistence) {
1203 this.portletPreferencesPersistence = portletPreferencesPersistence;
1204 }
1205
1206
1211 public PortletPreferencesFinder getPortletPreferencesFinder() {
1212 return portletPreferencesFinder;
1213 }
1214
1215
1220 public void setPortletPreferencesFinder(
1221 PortletPreferencesFinder portletPreferencesFinder) {
1222 this.portletPreferencesFinder = portletPreferencesFinder;
1223 }
1224
1225
1230 public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() {
1231 return resourceLocalService;
1232 }
1233
1234
1239 public void setResourceLocalService(
1240 com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) {
1241 this.resourceLocalService = resourceLocalService;
1242 }
1243
1244
1249 public com.liferay.portal.kernel.service.ResourcePermissionLocalService getResourcePermissionLocalService() {
1250 return resourcePermissionLocalService;
1251 }
1252
1253
1258 public void setResourcePermissionLocalService(
1259 com.liferay.portal.kernel.service.ResourcePermissionLocalService resourcePermissionLocalService) {
1260 this.resourcePermissionLocalService = resourcePermissionLocalService;
1261 }
1262
1263
1268 public ResourcePermissionPersistence getResourcePermissionPersistence() {
1269 return resourcePermissionPersistence;
1270 }
1271
1272
1277 public void setResourcePermissionPersistence(
1278 ResourcePermissionPersistence resourcePermissionPersistence) {
1279 this.resourcePermissionPersistence = resourcePermissionPersistence;
1280 }
1281
1282
1287 public ResourcePermissionFinder getResourcePermissionFinder() {
1288 return resourcePermissionFinder;
1289 }
1290
1291
1296 public void setResourcePermissionFinder(
1297 ResourcePermissionFinder resourcePermissionFinder) {
1298 this.resourcePermissionFinder = resourcePermissionFinder;
1299 }
1300
1301
1306 public com.liferay.portal.kernel.service.SubscriptionLocalService getSubscriptionLocalService() {
1307 return subscriptionLocalService;
1308 }
1309
1310
1315 public void setSubscriptionLocalService(
1316 com.liferay.portal.kernel.service.SubscriptionLocalService subscriptionLocalService) {
1317 this.subscriptionLocalService = subscriptionLocalService;
1318 }
1319
1320
1325 public SubscriptionPersistence getSubscriptionPersistence() {
1326 return subscriptionPersistence;
1327 }
1328
1329
1334 public void setSubscriptionPersistence(
1335 SubscriptionPersistence subscriptionPersistence) {
1336 this.subscriptionPersistence = subscriptionPersistence;
1337 }
1338
1339
1344 public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() {
1345 return userLocalService;
1346 }
1347
1348
1353 public void setUserLocalService(
1354 com.liferay.portal.kernel.service.UserLocalService userLocalService) {
1355 this.userLocalService = userLocalService;
1356 }
1357
1358
1363 public UserPersistence getUserPersistence() {
1364 return userPersistence;
1365 }
1366
1367
1372 public void setUserPersistence(UserPersistence userPersistence) {
1373 this.userPersistence = userPersistence;
1374 }
1375
1376
1381 public UserFinder getUserFinder() {
1382 return userFinder;
1383 }
1384
1385
1390 public void setUserFinder(UserFinder userFinder) {
1391 this.userFinder = userFinder;
1392 }
1393
1394 public void afterPropertiesSet() {
1395 persistedModelLocalServiceRegistry.register("com.liferay.portal.kernel.model.Layout",
1396 layoutLocalService);
1397 }
1398
1399 public void destroy() {
1400 persistedModelLocalServiceRegistry.unregister(
1401 "com.liferay.portal.kernel.model.Layout");
1402 }
1403
1404
1409 @Override
1410 public String getOSGiServiceIdentifier() {
1411 return LayoutLocalService.class.getName();
1412 }
1413
1414 protected Class<?> getModelClass() {
1415 return Layout.class;
1416 }
1417
1418 protected String getModelClassName() {
1419 return Layout.class.getName();
1420 }
1421
1422
1427 protected void runSQL(String sql) {
1428 try {
1429 DataSource dataSource = layoutPersistence.getDataSource();
1430
1431 DB db = DBManagerUtil.getDB();
1432
1433 sql = db.buildSQL(sql);
1434 sql = PortalUtil.transformSQL(sql);
1435
1436 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1437 sql);
1438
1439 sqlUpdate.update();
1440 }
1441 catch (Exception e) {
1442 throw new SystemException(e);
1443 }
1444 }
1445
1446 @BeanReference(type = LayoutLocalService.class)
1447 protected LayoutLocalService layoutLocalService;
1448 @BeanReference(type = LayoutPersistence.class)
1449 protected LayoutPersistence layoutPersistence;
1450 @BeanReference(type = LayoutFinder.class)
1451 protected LayoutFinder layoutFinder;
1452 @BeanReference(type = com.liferay.counter.kernel.service.CounterLocalService.class)
1453 protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService;
1454 @BeanReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class)
1455 protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService;
1456 @BeanReference(type = ClassNamePersistence.class)
1457 protected ClassNamePersistence classNamePersistence;
1458 @BeanReference(type = com.liferay.portal.kernel.service.GroupLocalService.class)
1459 protected com.liferay.portal.kernel.service.GroupLocalService groupLocalService;
1460 @BeanReference(type = GroupPersistence.class)
1461 protected GroupPersistence groupPersistence;
1462 @BeanReference(type = GroupFinder.class)
1463 protected GroupFinder groupFinder;
1464 @BeanReference(type = com.liferay.portal.kernel.service.ImageLocalService.class)
1465 protected com.liferay.portal.kernel.service.ImageLocalService imageLocalService;
1466 @BeanReference(type = ImagePersistence.class)
1467 protected ImagePersistence imagePersistence;
1468 @BeanReference(type = com.liferay.asset.kernel.service.AssetCategoryLocalService.class)
1469 protected com.liferay.asset.kernel.service.AssetCategoryLocalService assetCategoryLocalService;
1470 @BeanReference(type = AssetCategoryPersistence.class)
1471 protected AssetCategoryPersistence assetCategoryPersistence;
1472 @BeanReference(type = AssetCategoryFinder.class)
1473 protected AssetCategoryFinder assetCategoryFinder;
1474 @BeanReference(type = com.liferay.asset.kernel.service.AssetEntryLocalService.class)
1475 protected com.liferay.asset.kernel.service.AssetEntryLocalService assetEntryLocalService;
1476 @BeanReference(type = AssetEntryPersistence.class)
1477 protected AssetEntryPersistence assetEntryPersistence;
1478 @BeanReference(type = AssetEntryFinder.class)
1479 protected AssetEntryFinder assetEntryFinder;
1480 @BeanReference(type = com.liferay.asset.kernel.service.AssetTagLocalService.class)
1481 protected com.liferay.asset.kernel.service.AssetTagLocalService assetTagLocalService;
1482 @BeanReference(type = AssetTagPersistence.class)
1483 protected AssetTagPersistence assetTagPersistence;
1484 @BeanReference(type = AssetTagFinder.class)
1485 protected AssetTagFinder assetTagFinder;
1486 @BeanReference(type = com.liferay.expando.kernel.service.ExpandoRowLocalService.class)
1487 protected com.liferay.expando.kernel.service.ExpandoRowLocalService expandoRowLocalService;
1488 @BeanReference(type = ExpandoRowPersistence.class)
1489 protected ExpandoRowPersistence expandoRowPersistence;
1490 @BeanReference(type = com.liferay.exportimport.kernel.service.ExportImportConfigurationLocalService.class)
1491 protected com.liferay.exportimport.kernel.service.ExportImportConfigurationLocalService exportImportConfigurationLocalService;
1492 @BeanReference(type = ExportImportConfigurationPersistence.class)
1493 protected ExportImportConfigurationPersistence exportImportConfigurationPersistence;
1494 @BeanReference(type = ExportImportConfigurationFinder.class)
1495 protected ExportImportConfigurationFinder exportImportConfigurationFinder;
1496 @BeanReference(type = com.liferay.ratings.kernel.service.RatingsStatsLocalService.class)
1497 protected com.liferay.ratings.kernel.service.RatingsStatsLocalService ratingsStatsLocalService;
1498 @BeanReference(type = RatingsStatsPersistence.class)
1499 protected RatingsStatsPersistence ratingsStatsPersistence;
1500 @BeanReference(type = RatingsStatsFinder.class)
1501 protected RatingsStatsFinder ratingsStatsFinder;
1502 @BeanReference(type = com.liferay.portal.kernel.service.LayoutFriendlyURLLocalService.class)
1503 protected com.liferay.portal.kernel.service.LayoutFriendlyURLLocalService layoutFriendlyURLLocalService;
1504 @BeanReference(type = LayoutFriendlyURLPersistence.class)
1505 protected LayoutFriendlyURLPersistence layoutFriendlyURLPersistence;
1506 @BeanReference(type = com.liferay.portal.kernel.service.LayoutPrototypeLocalService.class)
1507 protected com.liferay.portal.kernel.service.LayoutPrototypeLocalService layoutPrototypeLocalService;
1508 @BeanReference(type = LayoutPrototypePersistence.class)
1509 protected LayoutPrototypePersistence layoutPrototypePersistence;
1510 @BeanReference(type = com.liferay.portal.kernel.service.LayoutSetLocalService.class)
1511 protected com.liferay.portal.kernel.service.LayoutSetLocalService layoutSetLocalService;
1512 @BeanReference(type = LayoutSetPersistence.class)
1513 protected LayoutSetPersistence layoutSetPersistence;
1514 @BeanReference(type = com.liferay.portal.kernel.service.LayoutSetPrototypeLocalService.class)
1515 protected com.liferay.portal.kernel.service.LayoutSetPrototypeLocalService layoutSetPrototypeLocalService;
1516 @BeanReference(type = LayoutSetPrototypePersistence.class)
1517 protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
1518 @BeanReference(type = com.liferay.portal.kernel.service.PluginSettingLocalService.class)
1519 protected com.liferay.portal.kernel.service.PluginSettingLocalService pluginSettingLocalService;
1520 @BeanReference(type = PluginSettingPersistence.class)
1521 protected PluginSettingPersistence pluginSettingPersistence;
1522 @BeanReference(type = com.liferay.portal.kernel.service.PortletPreferencesLocalService.class)
1523 protected com.liferay.portal.kernel.service.PortletPreferencesLocalService portletPreferencesLocalService;
1524 @BeanReference(type = PortletPreferencesPersistence.class)
1525 protected PortletPreferencesPersistence portletPreferencesPersistence;
1526 @BeanReference(type = PortletPreferencesFinder.class)
1527 protected PortletPreferencesFinder portletPreferencesFinder;
1528 @BeanReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class)
1529 protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService;
1530 @BeanReference(type = com.liferay.portal.kernel.service.ResourcePermissionLocalService.class)
1531 protected com.liferay.portal.kernel.service.ResourcePermissionLocalService resourcePermissionLocalService;
1532 @BeanReference(type = ResourcePermissionPersistence.class)
1533 protected ResourcePermissionPersistence resourcePermissionPersistence;
1534 @BeanReference(type = ResourcePermissionFinder.class)
1535 protected ResourcePermissionFinder resourcePermissionFinder;
1536 @BeanReference(type = com.liferay.portal.kernel.service.SubscriptionLocalService.class)
1537 protected com.liferay.portal.kernel.service.SubscriptionLocalService subscriptionLocalService;
1538 @BeanReference(type = SubscriptionPersistence.class)
1539 protected SubscriptionPersistence subscriptionPersistence;
1540 @BeanReference(type = com.liferay.portal.kernel.service.UserLocalService.class)
1541 protected com.liferay.portal.kernel.service.UserLocalService userLocalService;
1542 @BeanReference(type = UserPersistence.class)
1543 protected UserPersistence userPersistence;
1544 @BeanReference(type = UserFinder.class)
1545 protected UserFinder userFinder;
1546 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1547 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1548 }