001
014
015 package com.liferay.portlet.social.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.ClassNamePersistence;
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.social.model.SocialRequest;
031 import com.liferay.portlet.social.service.SocialRequestService;
032 import com.liferay.portlet.social.service.persistence.SocialRequestPersistence;
033
034 import javax.sql.DataSource;
035
036
048 public abstract class SocialRequestServiceBaseImpl extends BaseServiceImpl
049 implements SocialRequestService, IdentifiableBean {
050
055
056
061 public com.liferay.portlet.social.service.SocialRequestLocalService getSocialRequestLocalService() {
062 return socialRequestLocalService;
063 }
064
065
070 public void setSocialRequestLocalService(
071 com.liferay.portlet.social.service.SocialRequestLocalService socialRequestLocalService) {
072 this.socialRequestLocalService = socialRequestLocalService;
073 }
074
075
080 public com.liferay.portlet.social.service.SocialRequestService getSocialRequestService() {
081 return socialRequestService;
082 }
083
084
089 public void setSocialRequestService(
090 com.liferay.portlet.social.service.SocialRequestService socialRequestService) {
091 this.socialRequestService = socialRequestService;
092 }
093
094
099 public SocialRequestPersistence getSocialRequestPersistence() {
100 return socialRequestPersistence;
101 }
102
103
108 public void setSocialRequestPersistence(
109 SocialRequestPersistence socialRequestPersistence) {
110 this.socialRequestPersistence = socialRequestPersistence;
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.ClassNameLocalService getClassNameLocalService() {
138 return classNameLocalService;
139 }
140
141
146 public void setClassNameLocalService(
147 com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
148 this.classNameLocalService = classNameLocalService;
149 }
150
151
156 public com.liferay.portal.service.ClassNameService getClassNameService() {
157 return classNameService;
158 }
159
160
165 public void setClassNameService(
166 com.liferay.portal.service.ClassNameService classNameService) {
167 this.classNameService = classNameService;
168 }
169
170
175 public ClassNamePersistence getClassNamePersistence() {
176 return classNamePersistence;
177 }
178
179
184 public void setClassNamePersistence(
185 ClassNamePersistence classNamePersistence) {
186 this.classNamePersistence = classNamePersistence;
187 }
188
189
194 public com.liferay.portal.service.UserLocalService getUserLocalService() {
195 return userLocalService;
196 }
197
198
203 public void setUserLocalService(
204 com.liferay.portal.service.UserLocalService userLocalService) {
205 this.userLocalService = userLocalService;
206 }
207
208
213 public com.liferay.portal.service.UserService getUserService() {
214 return userService;
215 }
216
217
222 public void setUserService(
223 com.liferay.portal.service.UserService userService) {
224 this.userService = userService;
225 }
226
227
232 public UserPersistence getUserPersistence() {
233 return userPersistence;
234 }
235
236
241 public void setUserPersistence(UserPersistence userPersistence) {
242 this.userPersistence = userPersistence;
243 }
244
245
250 public UserFinder getUserFinder() {
251 return userFinder;
252 }
253
254
259 public void setUserFinder(UserFinder userFinder) {
260 this.userFinder = userFinder;
261 }
262
263
268 public com.liferay.portlet.social.service.SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
269 return socialRequestInterpreterLocalService;
270 }
271
272
277 public void setSocialRequestInterpreterLocalService(
278 com.liferay.portlet.social.service.SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
279 this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
280 }
281
282 public void afterPropertiesSet() {
283 }
284
285 public void destroy() {
286 }
287
288
293 @Override
294 public String getBeanIdentifier() {
295 return _beanIdentifier;
296 }
297
298
303 @Override
304 public void setBeanIdentifier(String beanIdentifier) {
305 _beanIdentifier = beanIdentifier;
306 }
307
308 protected Class<?> getModelClass() {
309 return SocialRequest.class;
310 }
311
312 protected String getModelClassName() {
313 return SocialRequest.class.getName();
314 }
315
316
321 protected void runSQL(String sql) {
322 try {
323 DataSource dataSource = socialRequestPersistence.getDataSource();
324
325 DB db = DBFactoryUtil.getDB();
326
327 sql = db.buildSQL(sql);
328 sql = PortalUtil.transformSQL(sql);
329
330 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
331 sql, new int[0]);
332
333 sqlUpdate.update();
334 }
335 catch (Exception e) {
336 throw new SystemException(e);
337 }
338 }
339
340 @BeanReference(type = com.liferay.portlet.social.service.SocialRequestLocalService.class)
341 protected com.liferay.portlet.social.service.SocialRequestLocalService socialRequestLocalService;
342 @BeanReference(type = com.liferay.portlet.social.service.SocialRequestService.class)
343 protected com.liferay.portlet.social.service.SocialRequestService socialRequestService;
344 @BeanReference(type = SocialRequestPersistence.class)
345 protected SocialRequestPersistence socialRequestPersistence;
346 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
347 protected com.liferay.counter.service.CounterLocalService counterLocalService;
348 @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
349 protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
350 @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
351 protected com.liferay.portal.service.ClassNameService classNameService;
352 @BeanReference(type = ClassNamePersistence.class)
353 protected ClassNamePersistence classNamePersistence;
354 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
355 protected com.liferay.portal.service.UserLocalService userLocalService;
356 @BeanReference(type = com.liferay.portal.service.UserService.class)
357 protected com.liferay.portal.service.UserService userService;
358 @BeanReference(type = UserPersistence.class)
359 protected UserPersistence userPersistence;
360 @BeanReference(type = UserFinder.class)
361 protected UserFinder userFinder;
362 @BeanReference(type = com.liferay.portlet.social.service.SocialRequestInterpreterLocalService.class)
363 protected com.liferay.portlet.social.service.SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
364 private String _beanIdentifier;
365 }