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.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.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, IdentifiableOSGiService {
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 SocialRequestService getSocialRequestService() {
081 return socialRequestService;
082 }
083
084
089 public void setSocialRequestService(
090 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 getOSGiServiceIdentifier() {
295 return SocialRequestService.class.getName();
296 }
297
298 protected Class<?> getModelClass() {
299 return SocialRequest.class;
300 }
301
302 protected String getModelClassName() {
303 return SocialRequest.class.getName();
304 }
305
306
311 protected void runSQL(String sql) {
312 try {
313 DataSource dataSource = socialRequestPersistence.getDataSource();
314
315 DB db = DBManagerUtil.getDB();
316
317 sql = db.buildSQL(sql);
318 sql = PortalUtil.transformSQL(sql);
319
320 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
321 sql, new int[0]);
322
323 sqlUpdate.update();
324 }
325 catch (Exception e) {
326 throw new SystemException(e);
327 }
328 }
329
330 @BeanReference(type = com.liferay.portlet.social.service.SocialRequestLocalService.class)
331 protected com.liferay.portlet.social.service.SocialRequestLocalService socialRequestLocalService;
332 @BeanReference(type = com.liferay.portlet.social.service.SocialRequestService.class)
333 protected SocialRequestService socialRequestService;
334 @BeanReference(type = SocialRequestPersistence.class)
335 protected SocialRequestPersistence socialRequestPersistence;
336 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
337 protected com.liferay.counter.service.CounterLocalService counterLocalService;
338 @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
339 protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
340 @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
341 protected com.liferay.portal.service.ClassNameService classNameService;
342 @BeanReference(type = ClassNamePersistence.class)
343 protected ClassNamePersistence classNamePersistence;
344 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
345 protected com.liferay.portal.service.UserLocalService userLocalService;
346 @BeanReference(type = com.liferay.portal.service.UserService.class)
347 protected com.liferay.portal.service.UserService userService;
348 @BeanReference(type = UserPersistence.class)
349 protected UserPersistence userPersistence;
350 @BeanReference(type = UserFinder.class)
351 protected UserFinder userFinder;
352 @BeanReference(type = com.liferay.portlet.social.service.SocialRequestInterpreterLocalService.class)
353 protected com.liferay.portlet.social.service.SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
354 }