001
014
015 package com.liferay.portlet.messageboards.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.messageboards.model.MBBan;
031 import com.liferay.portlet.messageboards.service.MBBanService;
032 import com.liferay.portlet.messageboards.service.persistence.MBBanPersistence;
033
034 import javax.sql.DataSource;
035
036
048 public abstract class MBBanServiceBaseImpl extends BaseServiceImpl
049 implements MBBanService, IdentifiableBean {
050
055
056
061 public com.liferay.portlet.messageboards.service.MBBanLocalService getMBBanLocalService() {
062 return mbBanLocalService;
063 }
064
065
070 public void setMBBanLocalService(
071 com.liferay.portlet.messageboards.service.MBBanLocalService mbBanLocalService) {
072 this.mbBanLocalService = mbBanLocalService;
073 }
074
075
080 public com.liferay.portlet.messageboards.service.MBBanService getMBBanService() {
081 return mbBanService;
082 }
083
084
089 public void setMBBanService(
090 com.liferay.portlet.messageboards.service.MBBanService mbBanService) {
091 this.mbBanService = mbBanService;
092 }
093
094
099 public MBBanPersistence getMBBanPersistence() {
100 return mbBanPersistence;
101 }
102
103
108 public void setMBBanPersistence(MBBanPersistence mbBanPersistence) {
109 this.mbBanPersistence = mbBanPersistence;
110 }
111
112
117 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
118 return counterLocalService;
119 }
120
121
126 public void setCounterLocalService(
127 com.liferay.counter.service.CounterLocalService counterLocalService) {
128 this.counterLocalService = counterLocalService;
129 }
130
131
136 public com.liferay.portal.service.SystemEventLocalService getSystemEventLocalService() {
137 return systemEventLocalService;
138 }
139
140
145 public void setSystemEventLocalService(
146 com.liferay.portal.service.SystemEventLocalService systemEventLocalService) {
147 this.systemEventLocalService = systemEventLocalService;
148 }
149
150
155 public SystemEventPersistence getSystemEventPersistence() {
156 return systemEventPersistence;
157 }
158
159
164 public void setSystemEventPersistence(
165 SystemEventPersistence systemEventPersistence) {
166 this.systemEventPersistence = systemEventPersistence;
167 }
168
169
174 public com.liferay.portal.service.UserLocalService getUserLocalService() {
175 return userLocalService;
176 }
177
178
183 public void setUserLocalService(
184 com.liferay.portal.service.UserLocalService userLocalService) {
185 this.userLocalService = userLocalService;
186 }
187
188
193 public com.liferay.portal.service.UserService getUserService() {
194 return userService;
195 }
196
197
202 public void setUserService(
203 com.liferay.portal.service.UserService userService) {
204 this.userService = userService;
205 }
206
207
212 public UserPersistence getUserPersistence() {
213 return userPersistence;
214 }
215
216
221 public void setUserPersistence(UserPersistence userPersistence) {
222 this.userPersistence = userPersistence;
223 }
224
225
230 public UserFinder getUserFinder() {
231 return userFinder;
232 }
233
234
239 public void setUserFinder(UserFinder userFinder) {
240 this.userFinder = userFinder;
241 }
242
243 public void afterPropertiesSet() {
244 }
245
246 public void destroy() {
247 }
248
249
254 @Override
255 public String getBeanIdentifier() {
256 return _beanIdentifier;
257 }
258
259
264 @Override
265 public void setBeanIdentifier(String beanIdentifier) {
266 _beanIdentifier = beanIdentifier;
267 }
268
269 protected Class<?> getModelClass() {
270 return MBBan.class;
271 }
272
273 protected String getModelClassName() {
274 return MBBan.class.getName();
275 }
276
277
282 protected void runSQL(String sql) {
283 try {
284 DataSource dataSource = mbBanPersistence.getDataSource();
285
286 DB db = DBFactoryUtil.getDB();
287
288 sql = db.buildSQL(sql);
289 sql = PortalUtil.transformSQL(sql);
290
291 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
292 sql, new int[0]);
293
294 sqlUpdate.update();
295 }
296 catch (Exception e) {
297 throw new SystemException(e);
298 }
299 }
300
301 @BeanReference(type = com.liferay.portlet.messageboards.service.MBBanLocalService.class)
302 protected com.liferay.portlet.messageboards.service.MBBanLocalService mbBanLocalService;
303 @BeanReference(type = com.liferay.portlet.messageboards.service.MBBanService.class)
304 protected com.liferay.portlet.messageboards.service.MBBanService mbBanService;
305 @BeanReference(type = MBBanPersistence.class)
306 protected MBBanPersistence mbBanPersistence;
307 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
308 protected com.liferay.counter.service.CounterLocalService counterLocalService;
309 @BeanReference(type = com.liferay.portal.service.SystemEventLocalService.class)
310 protected com.liferay.portal.service.SystemEventLocalService systemEventLocalService;
311 @BeanReference(type = SystemEventPersistence.class)
312 protected SystemEventPersistence systemEventPersistence;
313 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
314 protected com.liferay.portal.service.UserLocalService userLocalService;
315 @BeanReference(type = com.liferay.portal.service.UserService.class)
316 protected com.liferay.portal.service.UserService userService;
317 @BeanReference(type = UserPersistence.class)
318 protected UserPersistence userPersistence;
319 @BeanReference(type = UserFinder.class)
320 protected UserFinder userFinder;
321 private String _beanIdentifier;
322 }