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.bean.IdentifiableBean;
021 import com.liferay.portal.kernel.dao.db.DB;
022 import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025 import com.liferay.portal.kernel.exception.SystemException;
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 IdentifiableBean {
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 getBeanIdentifier() {
107 return _beanIdentifier;
108 }
109
110
115 @Override
116 public void setBeanIdentifier(String beanIdentifier) {
117 _beanIdentifier = beanIdentifier;
118 }
119
120
125 protected void runSQL(String sql) {
126 try {
127 DataSource dataSource = InfrastructureUtil.getDataSource();
128
129 DB db = DBFactoryUtil.getDB();
130
131 sql = db.buildSQL(sql);
132 sql = PortalUtil.transformSQL(sql);
133
134 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
135 sql, new int[0]);
136
137 sqlUpdate.update();
138 }
139 catch (Exception e) {
140 throw new SystemException(e);
141 }
142 }
143
144 @BeanReference(type = SocialRequestInterpreterLocalService.class)
145 protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
146 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
147 protected com.liferay.counter.service.CounterLocalService counterLocalService;
148 private String _beanIdentifier;
149 }