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.bean.IdentifiableBean;
021 import com.liferay.portal.kernel.dao.db.DB;
022 import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025 import com.liferay.portal.kernel.exception.SystemException;
026 import com.liferay.portal.kernel.util.InfrastructureUtil;
027 import com.liferay.portal.service.BaseLocalServiceImpl;
028 import com.liferay.portal.service.ThemeLocalService;
029 import com.liferay.portal.service.persistence.PluginSettingPersistence;
030 import com.liferay.portal.util.PortalUtil;
031
032 import javax.sql.DataSource;
033
034
046 @ProviderType
047 public abstract class ThemeLocalServiceBaseImpl extends BaseLocalServiceImpl
048 implements ThemeLocalService, IdentifiableBean {
049
054
055
060 public com.liferay.portal.service.ThemeLocalService getThemeLocalService() {
061 return themeLocalService;
062 }
063
064
069 public void setThemeLocalService(
070 com.liferay.portal.service.ThemeLocalService themeLocalService) {
071 this.themeLocalService = themeLocalService;
072 }
073
074
079 public com.liferay.portal.service.ThemeService getThemeService() {
080 return themeService;
081 }
082
083
088 public void setThemeService(
089 com.liferay.portal.service.ThemeService themeService) {
090 this.themeService = themeService;
091 }
092
093
098 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
099 return counterLocalService;
100 }
101
102
107 public void setCounterLocalService(
108 com.liferay.counter.service.CounterLocalService counterLocalService) {
109 this.counterLocalService = counterLocalService;
110 }
111
112
117 public com.liferay.portal.service.LayoutTemplateLocalService getLayoutTemplateLocalService() {
118 return layoutTemplateLocalService;
119 }
120
121
126 public void setLayoutTemplateLocalService(
127 com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService) {
128 this.layoutTemplateLocalService = layoutTemplateLocalService;
129 }
130
131
136 public com.liferay.portal.service.PluginSettingLocalService getPluginSettingLocalService() {
137 return pluginSettingLocalService;
138 }
139
140
145 public void setPluginSettingLocalService(
146 com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService) {
147 this.pluginSettingLocalService = pluginSettingLocalService;
148 }
149
150
155 public com.liferay.portal.service.PluginSettingService getPluginSettingService() {
156 return pluginSettingService;
157 }
158
159
164 public void setPluginSettingService(
165 com.liferay.portal.service.PluginSettingService pluginSettingService) {
166 this.pluginSettingService = pluginSettingService;
167 }
168
169
174 public PluginSettingPersistence getPluginSettingPersistence() {
175 return pluginSettingPersistence;
176 }
177
178
183 public void setPluginSettingPersistence(
184 PluginSettingPersistence pluginSettingPersistence) {
185 this.pluginSettingPersistence = pluginSettingPersistence;
186 }
187
188 public void afterPropertiesSet() {
189 }
190
191 public void destroy() {
192 }
193
194
199 @Override
200 public String getBeanIdentifier() {
201 return _beanIdentifier;
202 }
203
204
209 @Override
210 public void setBeanIdentifier(String beanIdentifier) {
211 _beanIdentifier = beanIdentifier;
212 }
213
214
219 protected void runSQL(String sql) {
220 try {
221 DataSource dataSource = InfrastructureUtil.getDataSource();
222
223 DB db = DBFactoryUtil.getDB();
224
225 sql = db.buildSQL(sql);
226 sql = PortalUtil.transformSQL(sql);
227
228 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
229 sql, new int[0]);
230
231 sqlUpdate.update();
232 }
233 catch (Exception e) {
234 throw new SystemException(e);
235 }
236 }
237
238 @BeanReference(type = com.liferay.portal.service.ThemeLocalService.class)
239 protected com.liferay.portal.service.ThemeLocalService themeLocalService;
240 @BeanReference(type = com.liferay.portal.service.ThemeService.class)
241 protected com.liferay.portal.service.ThemeService themeService;
242 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
243 protected com.liferay.counter.service.CounterLocalService counterLocalService;
244 @BeanReference(type = com.liferay.portal.service.LayoutTemplateLocalService.class)
245 protected com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService;
246 @BeanReference(type = com.liferay.portal.service.PluginSettingLocalService.class)
247 protected com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService;
248 @BeanReference(type = com.liferay.portal.service.PluginSettingService.class)
249 protected com.liferay.portal.service.PluginSettingService pluginSettingService;
250 @BeanReference(type = PluginSettingPersistence.class)
251 protected PluginSettingPersistence pluginSettingPersistence;
252 private String _beanIdentifier;
253 }