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.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.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, IdentifiableOSGiService {
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 MBBanService getMBBanService() {
081 return mbBanService;
082 }
083
084
089 public void setMBBanService(MBBanService mbBanService) {
090 this.mbBanService = mbBanService;
091 }
092
093
098 public MBBanPersistence getMBBanPersistence() {
099 return mbBanPersistence;
100 }
101
102
107 public void setMBBanPersistence(MBBanPersistence mbBanPersistence) {
108 this.mbBanPersistence = mbBanPersistence;
109 }
110
111
116 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
117 return counterLocalService;
118 }
119
120
125 public void setCounterLocalService(
126 com.liferay.counter.service.CounterLocalService counterLocalService) {
127 this.counterLocalService = counterLocalService;
128 }
129
130
135 public com.liferay.portal.service.SystemEventLocalService getSystemEventLocalService() {
136 return systemEventLocalService;
137 }
138
139
144 public void setSystemEventLocalService(
145 com.liferay.portal.service.SystemEventLocalService systemEventLocalService) {
146 this.systemEventLocalService = systemEventLocalService;
147 }
148
149
154 public SystemEventPersistence getSystemEventPersistence() {
155 return systemEventPersistence;
156 }
157
158
163 public void setSystemEventPersistence(
164 SystemEventPersistence systemEventPersistence) {
165 this.systemEventPersistence = systemEventPersistence;
166 }
167
168
173 public com.liferay.portal.service.UserLocalService getUserLocalService() {
174 return userLocalService;
175 }
176
177
182 public void setUserLocalService(
183 com.liferay.portal.service.UserLocalService userLocalService) {
184 this.userLocalService = userLocalService;
185 }
186
187
192 public com.liferay.portal.service.UserService getUserService() {
193 return userService;
194 }
195
196
201 public void setUserService(
202 com.liferay.portal.service.UserService userService) {
203 this.userService = userService;
204 }
205
206
211 public UserPersistence getUserPersistence() {
212 return userPersistence;
213 }
214
215
220 public void setUserPersistence(UserPersistence userPersistence) {
221 this.userPersistence = userPersistence;
222 }
223
224
229 public UserFinder getUserFinder() {
230 return userFinder;
231 }
232
233
238 public void setUserFinder(UserFinder userFinder) {
239 this.userFinder = userFinder;
240 }
241
242 public void afterPropertiesSet() {
243 }
244
245 public void destroy() {
246 }
247
248
253 @Override
254 public String getOSGiServiceIdentifier() {
255 return MBBanService.class.getName();
256 }
257
258 protected Class<?> getModelClass() {
259 return MBBan.class;
260 }
261
262 protected String getModelClassName() {
263 return MBBan.class.getName();
264 }
265
266
271 protected void runSQL(String sql) {
272 try {
273 DataSource dataSource = mbBanPersistence.getDataSource();
274
275 DB db = DBManagerUtil.getDB();
276
277 sql = db.buildSQL(sql);
278 sql = PortalUtil.transformSQL(sql);
279
280 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
281 sql, new int[0]);
282
283 sqlUpdate.update();
284 }
285 catch (Exception e) {
286 throw new SystemException(e);
287 }
288 }
289
290 @BeanReference(type = com.liferay.portlet.messageboards.service.MBBanLocalService.class)
291 protected com.liferay.portlet.messageboards.service.MBBanLocalService mbBanLocalService;
292 @BeanReference(type = com.liferay.portlet.messageboards.service.MBBanService.class)
293 protected MBBanService mbBanService;
294 @BeanReference(type = MBBanPersistence.class)
295 protected MBBanPersistence mbBanPersistence;
296 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
297 protected com.liferay.counter.service.CounterLocalService counterLocalService;
298 @BeanReference(type = com.liferay.portal.service.SystemEventLocalService.class)
299 protected com.liferay.portal.service.SystemEventLocalService systemEventLocalService;
300 @BeanReference(type = SystemEventPersistence.class)
301 protected SystemEventPersistence systemEventPersistence;
302 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
303 protected com.liferay.portal.service.UserLocalService userLocalService;
304 @BeanReference(type = com.liferay.portal.service.UserService.class)
305 protected com.liferay.portal.service.UserService userService;
306 @BeanReference(type = UserPersistence.class)
307 protected UserPersistence userPersistence;
308 @BeanReference(type = UserFinder.class)
309 protected UserFinder userFinder;
310 }