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 MDRRuleService getMDRRuleService() {
083 return mdrRuleService;
084 }
085
086
091 public void setMDRRuleService(MDRRuleService mdrRuleService) {
092 this.mdrRuleService = mdrRuleService;
093 }
094
095
100 public MDRRulePersistence getMDRRulePersistence() {
101 return mdrRulePersistence;
102 }
103
104
109 public void setMDRRulePersistence(MDRRulePersistence mdrRulePersistence) {
110 this.mdrRulePersistence = mdrRulePersistence;
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.SystemEventLocalService getSystemEventLocalService() {
138 return systemEventLocalService;
139 }
140
141
146 public void setSystemEventLocalService(
147 com.liferay.portal.service.SystemEventLocalService systemEventLocalService) {
148 this.systemEventLocalService = systemEventLocalService;
149 }
150
151
156 public SystemEventPersistence getSystemEventPersistence() {
157 return systemEventPersistence;
158 }
159
160
165 public void setSystemEventPersistence(
166 SystemEventPersistence systemEventPersistence) {
167 this.systemEventPersistence = systemEventPersistence;
168 }
169
170
175 public com.liferay.portal.service.UserLocalService getUserLocalService() {
176 return userLocalService;
177 }
178
179
184 public void setUserLocalService(
185 com.liferay.portal.service.UserLocalService userLocalService) {
186 this.userLocalService = userLocalService;
187 }
188
189
194 public com.liferay.portal.service.UserService getUserService() {
195 return userService;
196 }
197
198
203 public void setUserService(
204 com.liferay.portal.service.UserService userService) {
205 this.userService = userService;
206 }
207
208
213 public UserPersistence getUserPersistence() {
214 return userPersistence;
215 }
216
217
222 public void setUserPersistence(UserPersistence userPersistence) {
223 this.userPersistence = userPersistence;
224 }
225
226
231 public UserFinder getUserFinder() {
232 return userFinder;
233 }
234
235
240 public void setUserFinder(UserFinder userFinder) {
241 this.userFinder = userFinder;
242 }
243
244
249 public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService getMDRRuleGroupLocalService() {
250 return mdrRuleGroupLocalService;
251 }
252
253
258 public void setMDRRuleGroupLocalService(
259 com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService mdrRuleGroupLocalService) {
260 this.mdrRuleGroupLocalService = mdrRuleGroupLocalService;
261 }
262
263
268 public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService getMDRRuleGroupService() {
269 return mdrRuleGroupService;
270 }
271
272
277 public void setMDRRuleGroupService(
278 com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService mdrRuleGroupService) {
279 this.mdrRuleGroupService = mdrRuleGroupService;
280 }
281
282
287 public MDRRuleGroupPersistence getMDRRuleGroupPersistence() {
288 return mdrRuleGroupPersistence;
289 }
290
291
296 public void setMDRRuleGroupPersistence(
297 MDRRuleGroupPersistence mdrRuleGroupPersistence) {
298 this.mdrRuleGroupPersistence = mdrRuleGroupPersistence;
299 }
300
301
306 public MDRRuleGroupFinder getMDRRuleGroupFinder() {
307 return mdrRuleGroupFinder;
308 }
309
310
315 public void setMDRRuleGroupFinder(MDRRuleGroupFinder mdrRuleGroupFinder) {
316 this.mdrRuleGroupFinder = mdrRuleGroupFinder;
317 }
318
319 public void afterPropertiesSet() {
320 }
321
322 public void destroy() {
323 }
324
325
330 @Override
331 public String getBeanIdentifier() {
332 return _beanIdentifier;
333 }
334
335
340 @Override
341 public void setBeanIdentifier(String beanIdentifier) {
342 _beanIdentifier = beanIdentifier;
343 }
344
345 protected Class<?> getModelClass() {
346 return MDRRule.class;
347 }
348
349 protected String getModelClassName() {
350 return MDRRule.class.getName();
351 }
352
353
358 protected void runSQL(String sql) {
359 try {
360 DataSource dataSource = mdrRulePersistence.getDataSource();
361
362 DB db = DBFactoryUtil.getDB();
363
364 sql = db.buildSQL(sql);
365 sql = PortalUtil.transformSQL(sql);
366
367 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
368 sql, new int[0]);
369
370 sqlUpdate.update();
371 }
372 catch (Exception e) {
373 throw new SystemException(e);
374 }
375 }
376
377 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService.class)
378 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService mdrRuleLocalService;
379 @BeanReference(type = MDRRuleService.class)
380 protected MDRRuleService mdrRuleService;
381 @BeanReference(type = MDRRulePersistence.class)
382 protected MDRRulePersistence mdrRulePersistence;
383 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
384 protected com.liferay.counter.service.CounterLocalService counterLocalService;
385 @BeanReference(type = com.liferay.portal.service.SystemEventLocalService.class)
386 protected com.liferay.portal.service.SystemEventLocalService systemEventLocalService;
387 @BeanReference(type = SystemEventPersistence.class)
388 protected SystemEventPersistence systemEventPersistence;
389 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
390 protected com.liferay.portal.service.UserLocalService userLocalService;
391 @BeanReference(type = com.liferay.portal.service.UserService.class)
392 protected com.liferay.portal.service.UserService userService;
393 @BeanReference(type = UserPersistence.class)
394 protected UserPersistence userPersistence;
395 @BeanReference(type = UserFinder.class)
396 protected UserFinder userFinder;
397 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService.class)
398 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService mdrRuleGroupLocalService;
399 @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService.class)
400 protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService mdrRuleGroupService;
401 @BeanReference(type = MDRRuleGroupPersistence.class)
402 protected MDRRuleGroupPersistence mdrRuleGroupPersistence;
403 @BeanReference(type = MDRRuleGroupFinder.class)
404 protected MDRRuleGroupFinder mdrRuleGroupFinder;
405 private String _beanIdentifier;
406 }