001
014
015 package com.liferay.portal.service.base;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.BeanReference;
020 import com.liferay.portal.kernel.dao.db.DB;
021 import com.liferay.portal.kernel.dao.db.DBManagerUtil;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
025 import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
026 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
027 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
028 import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
029 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
030 import com.liferay.portal.kernel.dao.orm.Projection;
031 import com.liferay.portal.kernel.exception.PortalException;
032 import com.liferay.portal.kernel.exception.SystemException;
033 import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
034 import com.liferay.portal.kernel.search.Indexable;
035 import com.liferay.portal.kernel.search.IndexableType;
036 import com.liferay.portal.kernel.util.OrderByComparator;
037 import com.liferay.portal.model.Layout;
038 import com.liferay.portal.model.PersistedModel;
039 import com.liferay.portal.service.BaseLocalServiceImpl;
040 import com.liferay.portal.service.LayoutLocalService;
041 import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
042 import com.liferay.portal.service.persistence.ClassNamePersistence;
043 import com.liferay.portal.service.persistence.GroupFinder;
044 import com.liferay.portal.service.persistence.GroupPersistence;
045 import com.liferay.portal.service.persistence.ImagePersistence;
046 import com.liferay.portal.service.persistence.LayoutFinder;
047 import com.liferay.portal.service.persistence.LayoutFriendlyURLPersistence;
048 import com.liferay.portal.service.persistence.LayoutPersistence;
049 import com.liferay.portal.service.persistence.LayoutPrototypePersistence;
050 import com.liferay.portal.service.persistence.LayoutSetPersistence;
051 import com.liferay.portal.service.persistence.LayoutSetPrototypePersistence;
052 import com.liferay.portal.service.persistence.PluginSettingPersistence;
053 import com.liferay.portal.service.persistence.PortletPreferencesFinder;
054 import com.liferay.portal.service.persistence.PortletPreferencesPersistence;
055 import com.liferay.portal.service.persistence.ResourcePermissionFinder;
056 import com.liferay.portal.service.persistence.ResourcePermissionPersistence;
057 import com.liferay.portal.service.persistence.SubscriptionPersistence;
058 import com.liferay.portal.service.persistence.UserFinder;
059 import com.liferay.portal.service.persistence.UserPersistence;
060 import com.liferay.portal.util.PortalUtil;
061
062 import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
063 import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
064 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
065 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
066 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
067 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
068 import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
069 import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil;
070 import com.liferay.portlet.exportimport.lar.ManifestSummary;
071 import com.liferay.portlet.exportimport.lar.PortletDataContext;
072 import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
073 import com.liferay.portlet.exportimport.lar.StagedModelType;
074 import com.liferay.portlet.exportimport.service.persistence.ExportImportConfigurationPersistence;
075 import com.liferay.portlet.ratings.service.persistence.RatingsStatsFinder;
076 import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
077
078 import java.io.Serializable;
079
080 import java.util.List;
081
082 import javax.sql.DataSource;
083
084
096 @ProviderType
097 public abstract class LayoutLocalServiceBaseImpl extends BaseLocalServiceImpl
098 implements LayoutLocalService, IdentifiableOSGiService {
099
104
105
111 @Indexable(type = IndexableType.REINDEX)
112 @Override
113 public Layout addLayout(Layout layout) {
114 layout.setNew(true);
115
116 return layoutPersistence.update(layout);
117 }
118
119
125 @Override
126 public Layout createLayout(long plid) {
127 return layoutPersistence.create(plid);
128 }
129
130
137 @Indexable(type = IndexableType.DELETE)
138 @Override
139 public Layout deleteLayout(long plid) throws PortalException {
140 return layoutPersistence.remove(plid);
141 }
142
143
149 @Indexable(type = IndexableType.DELETE)
150 @Override
151 public Layout deleteLayout(Layout layout) {
152 return layoutPersistence.remove(layout);
153 }
154
155 @Override
156 public DynamicQuery dynamicQuery() {
157 Class<?> clazz = getClass();
158
159 return DynamicQueryFactoryUtil.forClass(Layout.class,
160 clazz.getClassLoader());
161 }
162
163
169 @Override
170 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
171 return layoutPersistence.findWithDynamicQuery(dynamicQuery);
172 }
173
174
186 @Override
187 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
188 int end) {
189 return layoutPersistence.findWithDynamicQuery(dynamicQuery, start, end);
190 }
191
192
205 @Override
206 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
207 int end, OrderByComparator<T> orderByComparator) {
208 return layoutPersistence.findWithDynamicQuery(dynamicQuery, start, end,
209 orderByComparator);
210 }
211
212
218 @Override
219 public long dynamicQueryCount(DynamicQuery dynamicQuery) {
220 return layoutPersistence.countWithDynamicQuery(dynamicQuery);
221 }
222
223
230 @Override
231 public long dynamicQueryCount(DynamicQuery dynamicQuery,
232 Projection projection) {
233 return layoutPersistence.countWithDynamicQuery(dynamicQuery, projection);
234 }
235
236 @Override
237 public Layout fetchLayout(long plid) {
238 return layoutPersistence.fetchByPrimaryKey(plid);
239 }
240
241
249 @Override
250 public Layout fetchLayoutByUuidAndGroupId(String uuid, long groupId,
251 boolean privateLayout) {
252 return layoutPersistence.fetchByUUID_G_P(uuid, groupId, privateLayout);
253 }
254
255
262 @Override
263 public Layout getLayout(long plid) throws PortalException {
264 return layoutPersistence.findByPrimaryKey(plid);
265 }
266
267 @Override
268 public ActionableDynamicQuery getActionableDynamicQuery() {
269 ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
270
271 actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutLocalServiceUtil.getService());
272 actionableDynamicQuery.setClassLoader(getClassLoader());
273 actionableDynamicQuery.setModelClass(Layout.class);
274
275 actionableDynamicQuery.setPrimaryKeyPropertyName("plid");
276
277 return actionableDynamicQuery;
278 }
279
280 @Override
281 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
282 IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
283
284 indexableActionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutLocalServiceUtil.getService());
285 indexableActionableDynamicQuery.setClassLoader(getClassLoader());
286 indexableActionableDynamicQuery.setModelClass(Layout.class);
287
288 indexableActionableDynamicQuery.setPrimaryKeyPropertyName("plid");
289
290 return indexableActionableDynamicQuery;
291 }
292
293 protected void initActionableDynamicQuery(
294 ActionableDynamicQuery actionableDynamicQuery) {
295 actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutLocalServiceUtil.getService());
296 actionableDynamicQuery.setClassLoader(getClassLoader());
297 actionableDynamicQuery.setModelClass(Layout.class);
298
299 actionableDynamicQuery.setPrimaryKeyPropertyName("plid");
300 }
301
302 @Override
303 public ExportActionableDynamicQuery getExportActionableDynamicQuery(
304 final PortletDataContext portletDataContext) {
305 final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
306 @Override
307 public long performCount() throws PortalException {
308 ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
309
310 StagedModelType stagedModelType = getStagedModelType();
311
312 long modelAdditionCount = super.performCount();
313
314 manifestSummary.addModelAdditionCount(stagedModelType,
315 modelAdditionCount);
316
317 long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
318 stagedModelType);
319
320 manifestSummary.addModelDeletionCount(stagedModelType,
321 modelDeletionCount);
322
323 return modelAdditionCount;
324 }
325 };
326
327 initActionableDynamicQuery(exportActionableDynamicQuery);
328
329 exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
330 @Override
331 public void addCriteria(DynamicQuery dynamicQuery) {
332 portletDataContext.addDateRangeCriteria(dynamicQuery,
333 "modifiedDate");
334 }
335 });
336
337 exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
338
339 exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
340
341 exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Layout>() {
342 @Override
343 public void performAction(Layout layout)
344 throws PortalException {
345 StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
346 layout);
347 }
348 });
349 exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
350 PortalUtil.getClassNameId(Layout.class.getName())));
351
352 return exportActionableDynamicQuery;
353 }
354
355
358 @Override
359 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
360 throws PortalException {
361 return layoutLocalService.deleteLayout((Layout)persistedModel);
362 }
363
364 @Override
365 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
366 throws PortalException {
367 return layoutPersistence.findByPrimaryKey(primaryKeyObj);
368 }
369
370
377 @Override
378 public List<Layout> getLayoutsByUuidAndCompanyId(String uuid, long companyId) {
379 return layoutPersistence.findByUuid_C(uuid, companyId);
380 }
381
382
392 @Override
393 public List<Layout> getLayoutsByUuidAndCompanyId(String uuid,
394 long companyId, int start, int end,
395 OrderByComparator<Layout> orderByComparator) {
396 return layoutPersistence.findByUuid_C(uuid, companyId, start, end,
397 orderByComparator);
398 }
399
400
409 @Override
410 public Layout getLayoutByUuidAndGroupId(String uuid, long groupId,
411 boolean privateLayout) throws PortalException {
412 return layoutPersistence.findByUUID_G_P(uuid, groupId, privateLayout);
413 }
414
415
426 @Override
427 public List<Layout> getLayouts(int start, int end) {
428 return layoutPersistence.findAll(start, end);
429 }
430
431
436 @Override
437 public int getLayoutsCount() {
438 return layoutPersistence.countAll();
439 }
440
441
447 @Indexable(type = IndexableType.REINDEX)
448 @Override
449 public Layout updateLayout(Layout layout) {
450 return layoutPersistence.update(layout);
451 }
452
453
458 public LayoutLocalService getLayoutLocalService() {
459 return layoutLocalService;
460 }
461
462
467 public void setLayoutLocalService(LayoutLocalService layoutLocalService) {
468 this.layoutLocalService = layoutLocalService;
469 }
470
471
476 public LayoutPersistence getLayoutPersistence() {
477 return layoutPersistence;
478 }
479
480
485 public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
486 this.layoutPersistence = layoutPersistence;
487 }
488
489
494 public LayoutFinder getLayoutFinder() {
495 return layoutFinder;
496 }
497
498
503 public void setLayoutFinder(LayoutFinder layoutFinder) {
504 this.layoutFinder = layoutFinder;
505 }
506
507
512 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
513 return counterLocalService;
514 }
515
516
521 public void setCounterLocalService(
522 com.liferay.counter.service.CounterLocalService counterLocalService) {
523 this.counterLocalService = counterLocalService;
524 }
525
526
531 public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
532 return classNameLocalService;
533 }
534
535
540 public void setClassNameLocalService(
541 com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
542 this.classNameLocalService = classNameLocalService;
543 }
544
545
550 public ClassNamePersistence getClassNamePersistence() {
551 return classNamePersistence;
552 }
553
554
559 public void setClassNamePersistence(
560 ClassNamePersistence classNamePersistence) {
561 this.classNamePersistence = classNamePersistence;
562 }
563
564
569 public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
570 return groupLocalService;
571 }
572
573
578 public void setGroupLocalService(
579 com.liferay.portal.service.GroupLocalService groupLocalService) {
580 this.groupLocalService = groupLocalService;
581 }
582
583
588 public GroupPersistence getGroupPersistence() {
589 return groupPersistence;
590 }
591
592
597 public void setGroupPersistence(GroupPersistence groupPersistence) {
598 this.groupPersistence = groupPersistence;
599 }
600
601
606 public GroupFinder getGroupFinder() {
607 return groupFinder;
608 }
609
610
615 public void setGroupFinder(GroupFinder groupFinder) {
616 this.groupFinder = groupFinder;
617 }
618
619
624 public com.liferay.portal.service.ImageLocalService getImageLocalService() {
625 return imageLocalService;
626 }
627
628
633 public void setImageLocalService(
634 com.liferay.portal.service.ImageLocalService imageLocalService) {
635 this.imageLocalService = imageLocalService;
636 }
637
638
643 public ImagePersistence getImagePersistence() {
644 return imagePersistence;
645 }
646
647
652 public void setImagePersistence(ImagePersistence imagePersistence) {
653 this.imagePersistence = imagePersistence;
654 }
655
656
661 public com.liferay.portlet.asset.service.AssetCategoryLocalService getAssetCategoryLocalService() {
662 return assetCategoryLocalService;
663 }
664
665
670 public void setAssetCategoryLocalService(
671 com.liferay.portlet.asset.service.AssetCategoryLocalService assetCategoryLocalService) {
672 this.assetCategoryLocalService = assetCategoryLocalService;
673 }
674
675
680 public AssetCategoryPersistence getAssetCategoryPersistence() {
681 return assetCategoryPersistence;
682 }
683
684
689 public void setAssetCategoryPersistence(
690 AssetCategoryPersistence assetCategoryPersistence) {
691 this.assetCategoryPersistence = assetCategoryPersistence;
692 }
693
694
699 public AssetCategoryFinder getAssetCategoryFinder() {
700 return assetCategoryFinder;
701 }
702
703
708 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
709 this.assetCategoryFinder = assetCategoryFinder;
710 }
711
712
717 public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
718 return assetEntryLocalService;
719 }
720
721
726 public void setAssetEntryLocalService(
727 com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
728 this.assetEntryLocalService = assetEntryLocalService;
729 }
730
731
736 public AssetEntryPersistence getAssetEntryPersistence() {
737 return assetEntryPersistence;
738 }
739
740
745 public void setAssetEntryPersistence(
746 AssetEntryPersistence assetEntryPersistence) {
747 this.assetEntryPersistence = assetEntryPersistence;
748 }
749
750
755 public AssetEntryFinder getAssetEntryFinder() {
756 return assetEntryFinder;
757 }
758
759
764 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
765 this.assetEntryFinder = assetEntryFinder;
766 }
767
768
773 public com.liferay.portlet.asset.service.AssetTagLocalService getAssetTagLocalService() {
774 return assetTagLocalService;
775 }
776
777
782 public void setAssetTagLocalService(
783 com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService) {
784 this.assetTagLocalService = assetTagLocalService;
785 }
786
787
792 public AssetTagPersistence getAssetTagPersistence() {
793 return assetTagPersistence;
794 }
795
796
801 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
802 this.assetTagPersistence = assetTagPersistence;
803 }
804
805
810 public AssetTagFinder getAssetTagFinder() {
811 return assetTagFinder;
812 }
813
814
819 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
820 this.assetTagFinder = assetTagFinder;
821 }
822
823
828 public com.liferay.portlet.expando.service.ExpandoRowLocalService getExpandoRowLocalService() {
829 return expandoRowLocalService;
830 }
831
832
837 public void setExpandoRowLocalService(
838 com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService) {
839 this.expandoRowLocalService = expandoRowLocalService;
840 }
841
842
847 public ExpandoRowPersistence getExpandoRowPersistence() {
848 return expandoRowPersistence;
849 }
850
851
856 public void setExpandoRowPersistence(
857 ExpandoRowPersistence expandoRowPersistence) {
858 this.expandoRowPersistence = expandoRowPersistence;
859 }
860
861
866 public com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalService getExportImportConfigurationLocalService() {
867 return exportImportConfigurationLocalService;
868 }
869
870
875 public void setExportImportConfigurationLocalService(
876 com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalService exportImportConfigurationLocalService) {
877 this.exportImportConfigurationLocalService = exportImportConfigurationLocalService;
878 }
879
880
885 public ExportImportConfigurationPersistence getExportImportConfigurationPersistence() {
886 return exportImportConfigurationPersistence;
887 }
888
889
894 public void setExportImportConfigurationPersistence(
895 ExportImportConfigurationPersistence exportImportConfigurationPersistence) {
896 this.exportImportConfigurationPersistence = exportImportConfigurationPersistence;
897 }
898
899
904 public com.liferay.portlet.ratings.service.RatingsStatsLocalService getRatingsStatsLocalService() {
905 return ratingsStatsLocalService;
906 }
907
908
913 public void setRatingsStatsLocalService(
914 com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService) {
915 this.ratingsStatsLocalService = ratingsStatsLocalService;
916 }
917
918
923 public RatingsStatsPersistence getRatingsStatsPersistence() {
924 return ratingsStatsPersistence;
925 }
926
927
932 public void setRatingsStatsPersistence(
933 RatingsStatsPersistence ratingsStatsPersistence) {
934 this.ratingsStatsPersistence = ratingsStatsPersistence;
935 }
936
937
942 public RatingsStatsFinder getRatingsStatsFinder() {
943 return ratingsStatsFinder;
944 }
945
946
951 public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
952 this.ratingsStatsFinder = ratingsStatsFinder;
953 }
954
955
960 public com.liferay.portal.service.LayoutFriendlyURLLocalService getLayoutFriendlyURLLocalService() {
961 return layoutFriendlyURLLocalService;
962 }
963
964
969 public void setLayoutFriendlyURLLocalService(
970 com.liferay.portal.service.LayoutFriendlyURLLocalService layoutFriendlyURLLocalService) {
971 this.layoutFriendlyURLLocalService = layoutFriendlyURLLocalService;
972 }
973
974
979 public LayoutFriendlyURLPersistence getLayoutFriendlyURLPersistence() {
980 return layoutFriendlyURLPersistence;
981 }
982
983
988 public void setLayoutFriendlyURLPersistence(
989 LayoutFriendlyURLPersistence layoutFriendlyURLPersistence) {
990 this.layoutFriendlyURLPersistence = layoutFriendlyURLPersistence;
991 }
992
993
998 public com.liferay.portal.service.LayoutPrototypeLocalService getLayoutPrototypeLocalService() {
999 return layoutPrototypeLocalService;
1000 }
1001
1002
1007 public void setLayoutPrototypeLocalService(
1008 com.liferay.portal.service.LayoutPrototypeLocalService layoutPrototypeLocalService) {
1009 this.layoutPrototypeLocalService = layoutPrototypeLocalService;
1010 }
1011
1012
1017 public LayoutPrototypePersistence getLayoutPrototypePersistence() {
1018 return layoutPrototypePersistence;
1019 }
1020
1021
1026 public void setLayoutPrototypePersistence(
1027 LayoutPrototypePersistence layoutPrototypePersistence) {
1028 this.layoutPrototypePersistence = layoutPrototypePersistence;
1029 }
1030
1031
1036 public com.liferay.portal.service.LayoutSetLocalService getLayoutSetLocalService() {
1037 return layoutSetLocalService;
1038 }
1039
1040
1045 public void setLayoutSetLocalService(
1046 com.liferay.portal.service.LayoutSetLocalService layoutSetLocalService) {
1047 this.layoutSetLocalService = layoutSetLocalService;
1048 }
1049
1050
1055 public LayoutSetPersistence getLayoutSetPersistence() {
1056 return layoutSetPersistence;
1057 }
1058
1059
1064 public void setLayoutSetPersistence(
1065 LayoutSetPersistence layoutSetPersistence) {
1066 this.layoutSetPersistence = layoutSetPersistence;
1067 }
1068
1069
1074 public com.liferay.portal.service.LayoutSetPrototypeLocalService getLayoutSetPrototypeLocalService() {
1075 return layoutSetPrototypeLocalService;
1076 }
1077
1078
1083 public void setLayoutSetPrototypeLocalService(
1084 com.liferay.portal.service.LayoutSetPrototypeLocalService layoutSetPrototypeLocalService) {
1085 this.layoutSetPrototypeLocalService = layoutSetPrototypeLocalService;
1086 }
1087
1088
1093 public LayoutSetPrototypePersistence getLayoutSetPrototypePersistence() {
1094 return layoutSetPrototypePersistence;
1095 }
1096
1097
1102 public void setLayoutSetPrototypePersistence(
1103 LayoutSetPrototypePersistence layoutSetPrototypePersistence) {
1104 this.layoutSetPrototypePersistence = layoutSetPrototypePersistence;
1105 }
1106
1107
1112 public com.liferay.portal.service.PluginSettingLocalService getPluginSettingLocalService() {
1113 return pluginSettingLocalService;
1114 }
1115
1116
1121 public void setPluginSettingLocalService(
1122 com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService) {
1123 this.pluginSettingLocalService = pluginSettingLocalService;
1124 }
1125
1126
1131 public PluginSettingPersistence getPluginSettingPersistence() {
1132 return pluginSettingPersistence;
1133 }
1134
1135
1140 public void setPluginSettingPersistence(
1141 PluginSettingPersistence pluginSettingPersistence) {
1142 this.pluginSettingPersistence = pluginSettingPersistence;
1143 }
1144
1145
1150 public com.liferay.portal.service.PortletPreferencesLocalService getPortletPreferencesLocalService() {
1151 return portletPreferencesLocalService;
1152 }
1153
1154
1159 public void setPortletPreferencesLocalService(
1160 com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService) {
1161 this.portletPreferencesLocalService = portletPreferencesLocalService;
1162 }
1163
1164
1169 public PortletPreferencesPersistence getPortletPreferencesPersistence() {
1170 return portletPreferencesPersistence;
1171 }
1172
1173
1178 public void setPortletPreferencesPersistence(
1179 PortletPreferencesPersistence portletPreferencesPersistence) {
1180 this.portletPreferencesPersistence = portletPreferencesPersistence;
1181 }
1182
1183
1188 public PortletPreferencesFinder getPortletPreferencesFinder() {
1189 return portletPreferencesFinder;
1190 }
1191
1192
1197 public void setPortletPreferencesFinder(
1198 PortletPreferencesFinder portletPreferencesFinder) {
1199 this.portletPreferencesFinder = portletPreferencesFinder;
1200 }
1201
1202
1207 public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
1208 return resourceLocalService;
1209 }
1210
1211
1216 public void setResourceLocalService(
1217 com.liferay.portal.service.ResourceLocalService resourceLocalService) {
1218 this.resourceLocalService = resourceLocalService;
1219 }
1220
1221
1226 public com.liferay.portal.service.ResourcePermissionLocalService getResourcePermissionLocalService() {
1227 return resourcePermissionLocalService;
1228 }
1229
1230
1235 public void setResourcePermissionLocalService(
1236 com.liferay.portal.service.ResourcePermissionLocalService resourcePermissionLocalService) {
1237 this.resourcePermissionLocalService = resourcePermissionLocalService;
1238 }
1239
1240
1245 public ResourcePermissionPersistence getResourcePermissionPersistence() {
1246 return resourcePermissionPersistence;
1247 }
1248
1249
1254 public void setResourcePermissionPersistence(
1255 ResourcePermissionPersistence resourcePermissionPersistence) {
1256 this.resourcePermissionPersistence = resourcePermissionPersistence;
1257 }
1258
1259
1264 public ResourcePermissionFinder getResourcePermissionFinder() {
1265 return resourcePermissionFinder;
1266 }
1267
1268
1273 public void setResourcePermissionFinder(
1274 ResourcePermissionFinder resourcePermissionFinder) {
1275 this.resourcePermissionFinder = resourcePermissionFinder;
1276 }
1277
1278
1283 public com.liferay.portal.service.SubscriptionLocalService getSubscriptionLocalService() {
1284 return subscriptionLocalService;
1285 }
1286
1287
1292 public void setSubscriptionLocalService(
1293 com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService) {
1294 this.subscriptionLocalService = subscriptionLocalService;
1295 }
1296
1297
1302 public SubscriptionPersistence getSubscriptionPersistence() {
1303 return subscriptionPersistence;
1304 }
1305
1306
1311 public void setSubscriptionPersistence(
1312 SubscriptionPersistence subscriptionPersistence) {
1313 this.subscriptionPersistence = subscriptionPersistence;
1314 }
1315
1316
1321 public com.liferay.portal.service.UserLocalService getUserLocalService() {
1322 return userLocalService;
1323 }
1324
1325
1330 public void setUserLocalService(
1331 com.liferay.portal.service.UserLocalService userLocalService) {
1332 this.userLocalService = userLocalService;
1333 }
1334
1335
1340 public UserPersistence getUserPersistence() {
1341 return userPersistence;
1342 }
1343
1344
1349 public void setUserPersistence(UserPersistence userPersistence) {
1350 this.userPersistence = userPersistence;
1351 }
1352
1353
1358 public UserFinder getUserFinder() {
1359 return userFinder;
1360 }
1361
1362
1367 public void setUserFinder(UserFinder userFinder) {
1368 this.userFinder = userFinder;
1369 }
1370
1371 public void afterPropertiesSet() {
1372 persistedModelLocalServiceRegistry.register("com.liferay.portal.model.Layout",
1373 layoutLocalService);
1374 }
1375
1376 public void destroy() {
1377 persistedModelLocalServiceRegistry.unregister(
1378 "com.liferay.portal.model.Layout");
1379 }
1380
1381
1386 @Override
1387 public String getOSGiServiceIdentifier() {
1388 return LayoutLocalService.class.getName();
1389 }
1390
1391 protected Class<?> getModelClass() {
1392 return Layout.class;
1393 }
1394
1395 protected String getModelClassName() {
1396 return Layout.class.getName();
1397 }
1398
1399
1404 protected void runSQL(String sql) {
1405 try {
1406 DataSource dataSource = layoutPersistence.getDataSource();
1407
1408 DB db = DBManagerUtil.getDB();
1409
1410 sql = db.buildSQL(sql);
1411 sql = PortalUtil.transformSQL(sql);
1412
1413 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1414 sql, new int[0]);
1415
1416 sqlUpdate.update();
1417 }
1418 catch (Exception e) {
1419 throw new SystemException(e);
1420 }
1421 }
1422
1423 @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class)
1424 protected LayoutLocalService layoutLocalService;
1425 @BeanReference(type = LayoutPersistence.class)
1426 protected LayoutPersistence layoutPersistence;
1427 @BeanReference(type = LayoutFinder.class)
1428 protected LayoutFinder layoutFinder;
1429 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1430 protected com.liferay.counter.service.CounterLocalService counterLocalService;
1431 @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
1432 protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
1433 @BeanReference(type = ClassNamePersistence.class)
1434 protected ClassNamePersistence classNamePersistence;
1435 @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
1436 protected com.liferay.portal.service.GroupLocalService groupLocalService;
1437 @BeanReference(type = GroupPersistence.class)
1438 protected GroupPersistence groupPersistence;
1439 @BeanReference(type = GroupFinder.class)
1440 protected GroupFinder groupFinder;
1441 @BeanReference(type = com.liferay.portal.service.ImageLocalService.class)
1442 protected com.liferay.portal.service.ImageLocalService imageLocalService;
1443 @BeanReference(type = ImagePersistence.class)
1444 protected ImagePersistence imagePersistence;
1445 @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryLocalService.class)
1446 protected com.liferay.portlet.asset.service.AssetCategoryLocalService assetCategoryLocalService;
1447 @BeanReference(type = AssetCategoryPersistence.class)
1448 protected AssetCategoryPersistence assetCategoryPersistence;
1449 @BeanReference(type = AssetCategoryFinder.class)
1450 protected AssetCategoryFinder assetCategoryFinder;
1451 @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
1452 protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
1453 @BeanReference(type = AssetEntryPersistence.class)
1454 protected AssetEntryPersistence assetEntryPersistence;
1455 @BeanReference(type = AssetEntryFinder.class)
1456 protected AssetEntryFinder assetEntryFinder;
1457 @BeanReference(type = com.liferay.portlet.asset.service.AssetTagLocalService.class)
1458 protected com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService;
1459 @BeanReference(type = AssetTagPersistence.class)
1460 protected AssetTagPersistence assetTagPersistence;
1461 @BeanReference(type = AssetTagFinder.class)
1462 protected AssetTagFinder assetTagFinder;
1463 @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class)
1464 protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService;
1465 @BeanReference(type = ExpandoRowPersistence.class)
1466 protected ExpandoRowPersistence expandoRowPersistence;
1467 @BeanReference(type = com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalService.class)
1468 protected com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalService exportImportConfigurationLocalService;
1469 @BeanReference(type = ExportImportConfigurationPersistence.class)
1470 protected ExportImportConfigurationPersistence exportImportConfigurationPersistence;
1471 @BeanReference(type = com.liferay.portlet.ratings.service.RatingsStatsLocalService.class)
1472 protected com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService;
1473 @BeanReference(type = RatingsStatsPersistence.class)
1474 protected RatingsStatsPersistence ratingsStatsPersistence;
1475 @BeanReference(type = RatingsStatsFinder.class)
1476 protected RatingsStatsFinder ratingsStatsFinder;
1477 @BeanReference(type = com.liferay.portal.service.LayoutFriendlyURLLocalService.class)
1478 protected com.liferay.portal.service.LayoutFriendlyURLLocalService layoutFriendlyURLLocalService;
1479 @BeanReference(type = LayoutFriendlyURLPersistence.class)
1480 protected LayoutFriendlyURLPersistence layoutFriendlyURLPersistence;
1481 @BeanReference(type = com.liferay.portal.service.LayoutPrototypeLocalService.class)
1482 protected com.liferay.portal.service.LayoutPrototypeLocalService layoutPrototypeLocalService;
1483 @BeanReference(type = LayoutPrototypePersistence.class)
1484 protected LayoutPrototypePersistence layoutPrototypePersistence;
1485 @BeanReference(type = com.liferay.portal.service.LayoutSetLocalService.class)
1486 protected com.liferay.portal.service.LayoutSetLocalService layoutSetLocalService;
1487 @BeanReference(type = LayoutSetPersistence.class)
1488 protected LayoutSetPersistence layoutSetPersistence;
1489 @BeanReference(type = com.liferay.portal.service.LayoutSetPrototypeLocalService.class)
1490 protected com.liferay.portal.service.LayoutSetPrototypeLocalService layoutSetPrototypeLocalService;
1491 @BeanReference(type = LayoutSetPrototypePersistence.class)
1492 protected LayoutSetPrototypePersistence layoutSetPrototypePersistence;
1493 @BeanReference(type = com.liferay.portal.service.PluginSettingLocalService.class)
1494 protected com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService;
1495 @BeanReference(type = PluginSettingPersistence.class)
1496 protected PluginSettingPersistence pluginSettingPersistence;
1497 @BeanReference(type = com.liferay.portal.service.PortletPreferencesLocalService.class)
1498 protected com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService;
1499 @BeanReference(type = PortletPreferencesPersistence.class)
1500 protected PortletPreferencesPersistence portletPreferencesPersistence;
1501 @BeanReference(type = PortletPreferencesFinder.class)
1502 protected PortletPreferencesFinder portletPreferencesFinder;
1503 @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1504 protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1505 @BeanReference(type = com.liferay.portal.service.ResourcePermissionLocalService.class)
1506 protected com.liferay.portal.service.ResourcePermissionLocalService resourcePermissionLocalService;
1507 @BeanReference(type = ResourcePermissionPersistence.class)
1508 protected ResourcePermissionPersistence resourcePermissionPersistence;
1509 @BeanReference(type = ResourcePermissionFinder.class)
1510 protected ResourcePermissionFinder resourcePermissionFinder;
1511 @BeanReference(type = com.liferay.portal.service.SubscriptionLocalService.class)
1512 protected com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService;
1513 @BeanReference(type = SubscriptionPersistence.class)
1514 protected SubscriptionPersistence subscriptionPersistence;
1515 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1516 protected com.liferay.portal.service.UserLocalService userLocalService;
1517 @BeanReference(type = UserPersistence.class)
1518 protected UserPersistence userPersistence;
1519 @BeanReference(type = UserFinder.class)
1520 protected UserFinder userFinder;
1521 @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1522 protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1523 }