001
014
015 package com.liferay.portal.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.model.OrgLabor;
025 import com.liferay.portal.service.BaseServiceImpl;
026 import com.liferay.portal.service.OrgLaborService;
027 import com.liferay.portal.service.persistence.ListTypePersistence;
028 import com.liferay.portal.service.persistence.OrgLaborPersistence;
029 import com.liferay.portal.util.PortalUtil;
030
031 import javax.sql.DataSource;
032
033
045 public abstract class OrgLaborServiceBaseImpl extends BaseServiceImpl
046 implements OrgLaborService, IdentifiableOSGiService {
047
052
053
058 public com.liferay.portal.service.OrgLaborLocalService getOrgLaborLocalService() {
059 return orgLaborLocalService;
060 }
061
062
067 public void setOrgLaborLocalService(
068 com.liferay.portal.service.OrgLaborLocalService orgLaborLocalService) {
069 this.orgLaborLocalService = orgLaborLocalService;
070 }
071
072
077 public OrgLaborService getOrgLaborService() {
078 return orgLaborService;
079 }
080
081
086 public void setOrgLaborService(OrgLaborService orgLaborService) {
087 this.orgLaborService = orgLaborService;
088 }
089
090
095 public OrgLaborPersistence getOrgLaborPersistence() {
096 return orgLaborPersistence;
097 }
098
099
104 public void setOrgLaborPersistence(OrgLaborPersistence orgLaborPersistence) {
105 this.orgLaborPersistence = orgLaborPersistence;
106 }
107
108
113 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
114 return counterLocalService;
115 }
116
117
122 public void setCounterLocalService(
123 com.liferay.counter.service.CounterLocalService counterLocalService) {
124 this.counterLocalService = counterLocalService;
125 }
126
127
132 public com.liferay.portal.service.ListTypeLocalService getListTypeLocalService() {
133 return listTypeLocalService;
134 }
135
136
141 public void setListTypeLocalService(
142 com.liferay.portal.service.ListTypeLocalService listTypeLocalService) {
143 this.listTypeLocalService = listTypeLocalService;
144 }
145
146
151 public com.liferay.portal.service.ListTypeService getListTypeService() {
152 return listTypeService;
153 }
154
155
160 public void setListTypeService(
161 com.liferay.portal.service.ListTypeService listTypeService) {
162 this.listTypeService = listTypeService;
163 }
164
165
170 public ListTypePersistence getListTypePersistence() {
171 return listTypePersistence;
172 }
173
174
179 public void setListTypePersistence(ListTypePersistence listTypePersistence) {
180 this.listTypePersistence = listTypePersistence;
181 }
182
183 public void afterPropertiesSet() {
184 }
185
186 public void destroy() {
187 }
188
189
194 @Override
195 public String getOSGiServiceIdentifier() {
196 return OrgLaborService.class.getName();
197 }
198
199 protected Class<?> getModelClass() {
200 return OrgLabor.class;
201 }
202
203 protected String getModelClassName() {
204 return OrgLabor.class.getName();
205 }
206
207
212 protected void runSQL(String sql) {
213 try {
214 DataSource dataSource = orgLaborPersistence.getDataSource();
215
216 DB db = DBManagerUtil.getDB();
217
218 sql = db.buildSQL(sql);
219 sql = PortalUtil.transformSQL(sql);
220
221 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
222 sql, new int[0]);
223
224 sqlUpdate.update();
225 }
226 catch (Exception e) {
227 throw new SystemException(e);
228 }
229 }
230
231 @BeanReference(type = com.liferay.portal.service.OrgLaborLocalService.class)
232 protected com.liferay.portal.service.OrgLaborLocalService orgLaborLocalService;
233 @BeanReference(type = com.liferay.portal.service.OrgLaborService.class)
234 protected OrgLaborService orgLaborService;
235 @BeanReference(type = OrgLaborPersistence.class)
236 protected OrgLaborPersistence orgLaborPersistence;
237 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
238 protected com.liferay.counter.service.CounterLocalService counterLocalService;
239 @BeanReference(type = com.liferay.portal.service.ListTypeLocalService.class)
240 protected com.liferay.portal.service.ListTypeLocalService listTypeLocalService;
241 @BeanReference(type = com.liferay.portal.service.ListTypeService.class)
242 protected com.liferay.portal.service.ListTypeService listTypeService;
243 @BeanReference(type = ListTypePersistence.class)
244 protected ListTypePersistence listTypePersistence;
245 }