001
014
015 package com.liferay.portlet.mobiledevicerules.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.service.BaseServiceImpl;
025 import com.liferay.portal.service.persistence.SystemEventPersistence;
026 import com.liferay.portal.service.persistence.UserFinder;
027 import com.liferay.portal.service.persistence.UserPersistence;
028 import com.liferay.portal.util.PortalUtil;
029
030 import com.liferay.portlet.mobiledevicerules.model.MDRRule;
031 import com.liferay.portlet.mobiledevicerules.service.MDRRuleService;
032 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupFinder;
033 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupPersistence;
034 import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRulePersistence;
035
036 import javax.sql.DataSource;
037
038
050 public abstract class MDRRuleServiceBaseImpl extends BaseServiceImpl
051 implements MDRRuleService, IdentifiableBean {
052
057
058
063 public com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService getMDRRuleLocalService() {
064 return mdrRuleLocalService;
065 }
066
067
072 public void setMDRRuleLocalService(
073 com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService mdrRuleLocalService) {
074 this.mdrRuleLocalService = mdrRuleLocalService;
075 }
076
077
082 public com.liferay.portlet.mobiledevicerules.service.MDRRuleService getMDRRuleService() {
083 return mdrRuleService;
084 }
085
086
091 public void setMDRRuleService(
092 com.liferay.portlet.mobiledevicerules.service.MDRRuleService mdrRuleService) {
093 this.mdrRuleService = mdrRuleService;
094 }
095
096
101 public MDRRulePersistence getMDRRulePersistence() {
102 return mdrRulePersistence;
103 }
104
105
110 public void setMDRRulePersistence(MDRRulePersistence mdrRulePersistence) {
111 this.mdrRulePersistence = mdrRulePersistence;
112 }
113
114
119 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
120 return counterLocalService;
121 }
122
123
128 public void setCounterLocalService(
129 com.liferay.counter.service.CounterLocalService counterLocalService) {
130 this.counterLocalService = counterLocalService;
131 }
132
133
138 public com.liferay.portal.service.SystemEventLocalService getSystemEventLocalService() {
139 return systemEventLocalService;
140 }
141
142
147 public void setSystemEventLocalService(
148 com.liferay.portal.service.SystemEventLocalService systemEventLocalService) {
149 this.systemEventLocalService = systemEventLocalService;
150 }
151
152
157 public SystemEventPersistence getSystemEventPersistence() {
158 return systemEventPersistence;
159 }
160
161
166 public void setSystemEventPersistence(
167 SystemEventPersistence systemEventPersistence) {
168 this.systemEventPersistence = systemEventPersistence;
169 }
170
171
176 public com.liferay.portal.service.UserLocalService getUserLocalService() {
177 return userLocalService;
178 }
179
180
185 public void setUserLocalService(
186 com.liferay.portal.service.UserLocalService userLocalService) {
187 this.userLocalService = userLocalService;
188 }
189
190
195 public com.liferay.portal.service.UserService getUserService() {
196 return userService;
197 }
198
199
204 public void setUserService(
205 com.liferay.portal.service.UserService userService) {
206 this.userService = userService;
207 }
208
209
214 public UserPersistence getUserPersistence() {
215 return userPersistence;
216 }
217
218
223 public void setUserPersistence(UserPersistence userPersistence) {
224 this.userPersistence = userPersistence;
225 }
226
227
232 public UserFinder getUserFinder() {
233 return userFinder;
234 }
235
236
241 public void setUserFinder(UserFinder userFinder) {
242 this.userFinder = userFinder;
243 }
244
245
250 public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService getMDRRuleGroupLocalService() {
251 return mdrRuleGroupLocalService;
252 }
253
254
259 public void setMDRRuleGroupLocalService(
260 com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService mdrRuleGroupLocalService) {
261 this.mdrRuleGroupLocalService = mdrRuleGroupLocalService;
262 }
263
264
269 public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService getMDRRuleGroupService() {
270 return mdrRuleGroupService;
271 }
272
273
278 public void setMDRRuleGroupService(
279 com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService mdrRuleGroupService) {
280 this.mdrRuleGroupService = mdrRuleGroupService;
281 }
282
283
288 public MDRRuleGroupPersistence getMDRRuleGroupPersistence() {
289 return mdrRuleGroupPersistence;
290 }
291
292
297 public void setMDRRuleGroupPersistence(
298 MDRRuleGroupPersistence mdrRuleGroupPersistence) {
299 this.mdrRuleGroupPersistence = mdrRuleGroupPersistence;
300 }
301
302
307 public MDRRuleGroupFinder getMDRRuleGroupFinder() {
308 return mdrRuleGroupFinder;
309 }
310
311
316 public void setMDRRuleGroupFinder(MDRRuleGroupFinder mdrRuleGroupFinder) {
317 this.mdrRuleGroupFinder = mdrRuleGroupFinder;
318 }
319
320 public void afterPropertiesSet() {
321 }
322
323 public void destroy() {
324 }
325
326
331 @Override
332 public String getBeanIdentifier() {
333 return _beanIdentifier;
334 }
335
336
341 @Override
342 public void setBeanIdentifier(String beanIdentifier) {
343 _beanIdentifier = beanIdentifier;
344 }
345
346 protected Class<?> getModelClass() {
347 return MDRRule.class;
348 }
349
350 protected String getModelClassName() {
351 return MDRRule.class.getName();
352 }
353
354
359 protected void runSQL(String sql) {
360 try {
361 DataSource dataSource = mdrRulePersistence.getDataSource();
362
363 DB db = DBFactoryUtil.getDB();
364
365 sql = db.buildSQL(sql);
366 sql = PortalUtil.transformSQL(sql);
367
368 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
369 sql, new int[0]);
370
371 sqlUpdate.update();
372 }
373 catch (Exception e) {
374 throw new SystemException(e);
375 }
376 }
377
378 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService.class)
379 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService mdrRuleLocalService;
380 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleService.class)
381 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleService mdrRuleService;
382 @BeanReference(type = MDRRulePersistence.class)
383 protected MDRRulePersistence mdrRulePersistence;
384 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
385 protected com.liferay.counter.service.CounterLocalService counterLocalService;
386 @BeanReference(type = com.liferay.portal.service.SystemEventLocalService.class)
387 protected com.liferay.portal.service.SystemEventLocalService systemEventLocalService;
388 @BeanReference(type = SystemEventPersistence.class)
389 protected SystemEventPersistence systemEventPersistence;
390 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
391 protected com.liferay.portal.service.UserLocalService userLocalService;
392 @BeanReference(type = com.liferay.portal.service.UserService.class)
393 protected com.liferay.portal.service.UserService userService;
394 @BeanReference(type = UserPersistence.class)
395 protected UserPersistence userPersistence;
396 @BeanReference(type = UserFinder.class)
397 protected UserFinder userFinder;
398 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService.class)
399 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService mdrRuleGroupLocalService;
400 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService.class)
401 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService mdrRuleGroupService;
402 @BeanReference(type = MDRRuleGroupPersistence.class)
403 protected MDRRuleGroupPersistence mdrRuleGroupPersistence;
404 @BeanReference(type = MDRRuleGroupFinder.class)
405 protected MDRRuleGroupFinder mdrRuleGroupFinder;
406 private String _beanIdentifier;
407 }