001
014
015 package com.liferay.portal.service.base;
016
017 import com.liferay.portal.kernel.bean.BeanReference;
018 import com.liferay.portal.kernel.dao.db.DB;
019 import com.liferay.portal.kernel.dao.db.DBManagerUtil;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022 import com.liferay.portal.kernel.exception.SystemException;
023 import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
024 import com.liferay.portal.model.PluginSetting;
025 import com.liferay.portal.service.BaseServiceImpl;
026 import com.liferay.portal.service.PluginSettingService;
027 import com.liferay.portal.service.persistence.PluginSettingPersistence;
028 import com.liferay.portal.service.persistence.RoleFinder;
029 import com.liferay.portal.service.persistence.RolePersistence;
030 import com.liferay.portal.service.persistence.UserFinder;
031 import com.liferay.portal.service.persistence.UserPersistence;
032 import com.liferay.portal.util.PortalUtil;
033
034 import javax.sql.DataSource;
035
036
048 public abstract class PluginSettingServiceBaseImpl extends BaseServiceImpl
049 implements PluginSettingService, IdentifiableOSGiService {
050
055
056
061 public com.liferay.portal.service.PluginSettingLocalService getPluginSettingLocalService() {
062 return pluginSettingLocalService;
063 }
064
065
070 public void setPluginSettingLocalService(
071 com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService) {
072 this.pluginSettingLocalService = pluginSettingLocalService;
073 }
074
075
080 public PluginSettingService getPluginSettingService() {
081 return pluginSettingService;
082 }
083
084
089 public void setPluginSettingService(
090 PluginSettingService pluginSettingService) {
091 this.pluginSettingService = pluginSettingService;
092 }
093
094
099 public PluginSettingPersistence getPluginSettingPersistence() {
100 return pluginSettingPersistence;
101 }
102
103
108 public void setPluginSettingPersistence(
109 PluginSettingPersistence pluginSettingPersistence) {
110 this.pluginSettingPersistence = pluginSettingPersistence;
111 }
112
113
118 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
119 return counterLocalService;
120 }
121
122
127 public void setCounterLocalService(
128 com.liferay.counter.service.CounterLocalService counterLocalService) {
129 this.counterLocalService = counterLocalService;
130 }
131
132
137 public com.liferay.portal.service.LayoutTemplateLocalService getLayoutTemplateLocalService() {
138 return layoutTemplateLocalService;
139 }
140
141
146 public void setLayoutTemplateLocalService(
147 com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService) {
148 this.layoutTemplateLocalService = layoutTemplateLocalService;
149 }
150
151
156 public com.liferay.portal.service.RoleLocalService getRoleLocalService() {
157 return roleLocalService;
158 }
159
160
165 public void setRoleLocalService(
166 com.liferay.portal.service.RoleLocalService roleLocalService) {
167 this.roleLocalService = roleLocalService;
168 }
169
170
175 public com.liferay.portal.service.RoleService getRoleService() {
176 return roleService;
177 }
178
179
184 public void setRoleService(
185 com.liferay.portal.service.RoleService roleService) {
186 this.roleService = roleService;
187 }
188
189
194 public RolePersistence getRolePersistence() {
195 return rolePersistence;
196 }
197
198
203 public void setRolePersistence(RolePersistence rolePersistence) {
204 this.rolePersistence = rolePersistence;
205 }
206
207
212 public RoleFinder getRoleFinder() {
213 return roleFinder;
214 }
215
216
221 public void setRoleFinder(RoleFinder roleFinder) {
222 this.roleFinder = roleFinder;
223 }
224
225
230 public com.liferay.portal.service.ThemeLocalService getThemeLocalService() {
231 return themeLocalService;
232 }
233
234
239 public void setThemeLocalService(
240 com.liferay.portal.service.ThemeLocalService themeLocalService) {
241 this.themeLocalService = themeLocalService;
242 }
243
244
249 public com.liferay.portal.service.ThemeService getThemeService() {
250 return themeService;
251 }
252
253
258 public void setThemeService(
259 com.liferay.portal.service.ThemeService themeService) {
260 this.themeService = themeService;
261 }
262
263
268 public com.liferay.portal.service.UserLocalService getUserLocalService() {
269 return userLocalService;
270 }
271
272
277 public void setUserLocalService(
278 com.liferay.portal.service.UserLocalService userLocalService) {
279 this.userLocalService = userLocalService;
280 }
281
282
287 public com.liferay.portal.service.UserService getUserService() {
288 return userService;
289 }
290
291
296 public void setUserService(
297 com.liferay.portal.service.UserService userService) {
298 this.userService = userService;
299 }
300
301
306 public UserPersistence getUserPersistence() {
307 return userPersistence;
308 }
309
310
315 public void setUserPersistence(UserPersistence userPersistence) {
316 this.userPersistence = userPersistence;
317 }
318
319
324 public UserFinder getUserFinder() {
325 return userFinder;
326 }
327
328
333 public void setUserFinder(UserFinder userFinder) {
334 this.userFinder = userFinder;
335 }
336
337 public void afterPropertiesSet() {
338 }
339
340 public void destroy() {
341 }
342
343
348 @Override
349 public String getOSGiServiceIdentifier() {
350 return PluginSettingService.class.getName();
351 }
352
353 protected Class<?> getModelClass() {
354 return PluginSetting.class;
355 }
356
357 protected String getModelClassName() {
358 return PluginSetting.class.getName();
359 }
360
361
366 protected void runSQL(String sql) {
367 try {
368 DataSource dataSource = pluginSettingPersistence.getDataSource();
369
370 DB db = DBManagerUtil.getDB();
371
372 sql = db.buildSQL(sql);
373 sql = PortalUtil.transformSQL(sql);
374
375 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
376 sql, new int[0]);
377
378 sqlUpdate.update();
379 }
380 catch (Exception e) {
381 throw new SystemException(e);
382 }
383 }
384
385 @BeanReference(type = com.liferay.portal.service.PluginSettingLocalService.class)
386 protected com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService;
387 @BeanReference(type = com.liferay.portal.service.PluginSettingService.class)
388 protected PluginSettingService pluginSettingService;
389 @BeanReference(type = PluginSettingPersistence.class)
390 protected PluginSettingPersistence pluginSettingPersistence;
391 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
392 protected com.liferay.counter.service.CounterLocalService counterLocalService;
393 @BeanReference(type = com.liferay.portal.service.LayoutTemplateLocalService.class)
394 protected com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService;
395 @BeanReference(type = com.liferay.portal.service.RoleLocalService.class)
396 protected com.liferay.portal.service.RoleLocalService roleLocalService;
397 @BeanReference(type = com.liferay.portal.service.RoleService.class)
398 protected com.liferay.portal.service.RoleService roleService;
399 @BeanReference(type = RolePersistence.class)
400 protected RolePersistence rolePersistence;
401 @BeanReference(type = RoleFinder.class)
402 protected RoleFinder roleFinder;
403 @BeanReference(type = com.liferay.portal.service.ThemeLocalService.class)
404 protected com.liferay.portal.service.ThemeLocalService themeLocalService;
405 @BeanReference(type = com.liferay.portal.service.ThemeService.class)
406 protected com.liferay.portal.service.ThemeService themeService;
407 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
408 protected com.liferay.portal.service.UserLocalService userLocalService;
409 @BeanReference(type = com.liferay.portal.service.UserService.class)
410 protected com.liferay.portal.service.UserService userService;
411 @BeanReference(type = UserPersistence.class)
412 protected UserPersistence userPersistence;
413 @BeanReference(type = UserFinder.class)
414 protected UserFinder userFinder;
415 }