001
014
015 package com.liferay.portlet.social.service.base;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.bean.BeanReference;
020 import com.liferay.portal.kernel.dao.db.DB;
021 import com.liferay.portal.kernel.dao.db.DBManagerUtil;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024 import com.liferay.portal.kernel.exception.SystemException;
025 import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
026 import com.liferay.portal.kernel.util.InfrastructureUtil;
027 import com.liferay.portal.service.BaseLocalServiceImpl;
028 import com.liferay.portal.util.PortalUtil;
029
030 import com.liferay.portlet.social.service.SocialRequestInterpreterLocalService;
031
032 import javax.sql.DataSource;
033
034
046 @ProviderType
047 public abstract class SocialRequestInterpreterLocalServiceBaseImpl
048 extends BaseLocalServiceImpl implements SocialRequestInterpreterLocalService,
049 IdentifiableOSGiService {
050
055
056
061 public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
062 return socialRequestInterpreterLocalService;
063 }
064
065
070 public void setSocialRequestInterpreterLocalService(
071 SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
072 this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
073 }
074
075
080 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
081 return counterLocalService;
082 }
083
084
089 public void setCounterLocalService(
090 com.liferay.counter.service.CounterLocalService counterLocalService) {
091 this.counterLocalService = counterLocalService;
092 }
093
094 public void afterPropertiesSet() {
095 }
096
097 public void destroy() {
098 }
099
100
105 @Override
106 public String getOSGiServiceIdentifier() {
107 return SocialRequestInterpreterLocalService.class.getName();
108 }
109
110
115 protected void runSQL(String sql) {
116 try {
117 DataSource dataSource = InfrastructureUtil.getDataSource();
118
119 DB db = DBManagerUtil.getDB();
120
121 sql = db.buildSQL(sql);
122 sql = PortalUtil.transformSQL(sql);
123
124 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
125 sql, new int[0]);
126
127 sqlUpdate.update();
128 }
129 catch (Exception e) {
130 throw new SystemException(e);
131 }
132 }
133
134 @BeanReference(type = com.liferay.portlet.social.service.SocialRequestInterpreterLocalService.class)
135 protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
136 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
137 protected com.liferay.counter.service.CounterLocalService counterLocalService;
138 }