001
014
015 package com.liferay.portal.service.base;
016
017 import com.liferay.portal.kernel.bean.BeanReference;
018 import com.liferay.portal.kernel.bean.IdentifiableBean;
019 import com.liferay.portal.kernel.dao.db.DB;
020 import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023 import com.liferay.portal.kernel.exception.SystemException;
024 import com.liferay.portal.kernel.util.InfrastructureUtil;
025 import com.liferay.portal.service.BaseServiceImpl;
026 import com.liferay.portal.service.ThemeService;
027 import com.liferay.portal.service.persistence.PluginSettingPersistence;
028 import com.liferay.portal.util.PortalUtil;
029
030 import javax.sql.DataSource;
031
032
044 public abstract class ThemeServiceBaseImpl extends BaseServiceImpl
045 implements ThemeService, IdentifiableBean {
046
051
052
057 public com.liferay.portal.service.ThemeLocalService getThemeLocalService() {
058 return themeLocalService;
059 }
060
061
066 public void setThemeLocalService(
067 com.liferay.portal.service.ThemeLocalService themeLocalService) {
068 this.themeLocalService = themeLocalService;
069 }
070
071
076 public com.liferay.portal.service.ThemeService getThemeService() {
077 return themeService;
078 }
079
080
085 public void setThemeService(
086 com.liferay.portal.service.ThemeService themeService) {
087 this.themeService = themeService;
088 }
089
090
095 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
096 return counterLocalService;
097 }
098
099
104 public void setCounterLocalService(
105 com.liferay.counter.service.CounterLocalService counterLocalService) {
106 this.counterLocalService = counterLocalService;
107 }
108
109
114 public com.liferay.portal.service.LayoutTemplateLocalService getLayoutTemplateLocalService() {
115 return layoutTemplateLocalService;
116 }
117
118
123 public void setLayoutTemplateLocalService(
124 com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService) {
125 this.layoutTemplateLocalService = layoutTemplateLocalService;
126 }
127
128
133 public com.liferay.portal.service.PluginSettingLocalService getPluginSettingLocalService() {
134 return pluginSettingLocalService;
135 }
136
137
142 public void setPluginSettingLocalService(
143 com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService) {
144 this.pluginSettingLocalService = pluginSettingLocalService;
145 }
146
147
152 public com.liferay.portal.service.PluginSettingService getPluginSettingService() {
153 return pluginSettingService;
154 }
155
156
161 public void setPluginSettingService(
162 com.liferay.portal.service.PluginSettingService pluginSettingService) {
163 this.pluginSettingService = pluginSettingService;
164 }
165
166
171 public PluginSettingPersistence getPluginSettingPersistence() {
172 return pluginSettingPersistence;
173 }
174
175
180 public void setPluginSettingPersistence(
181 PluginSettingPersistence pluginSettingPersistence) {
182 this.pluginSettingPersistence = pluginSettingPersistence;
183 }
184
185 public void afterPropertiesSet() {
186 }
187
188 public void destroy() {
189 }
190
191
196 @Override
197 public String getBeanIdentifier() {
198 return _beanIdentifier;
199 }
200
201
206 @Override
207 public void setBeanIdentifier(String beanIdentifier) {
208 _beanIdentifier = beanIdentifier;
209 }
210
211
216 protected void runSQL(String sql) {
217 try {
218 DataSource dataSource = InfrastructureUtil.getDataSource();
219
220 DB db = DBFactoryUtil.getDB();
221
222 sql = db.buildSQL(sql);
223 sql = PortalUtil.transformSQL(sql);
224
225 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
226 sql, new int[0]);
227
228 sqlUpdate.update();
229 }
230 catch (Exception e) {
231 throw new SystemException(e);
232 }
233 }
234
235 @BeanReference(type = com.liferay.portal.service.ThemeLocalService.class)
236 protected com.liferay.portal.service.ThemeLocalService themeLocalService;
237 @BeanReference(type = com.liferay.portal.service.ThemeService.class)
238 protected com.liferay.portal.service.ThemeService themeService;
239 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
240 protected com.liferay.counter.service.CounterLocalService counterLocalService;
241 @BeanReference(type = com.liferay.portal.service.LayoutTemplateLocalService.class)
242 protected com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService;
243 @BeanReference(type = com.liferay.portal.service.PluginSettingLocalService.class)
244 protected com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService;
245 @BeanReference(type = com.liferay.portal.service.PluginSettingService.class)
246 protected com.liferay.portal.service.PluginSettingService pluginSettingService;
247 @BeanReference(type = PluginSettingPersistence.class)
248 protected PluginSettingPersistence pluginSettingPersistence;
249 private String _beanIdentifier;
250 }