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.Address;
025 import com.liferay.portal.service.AddressService;
026 import com.liferay.portal.service.BaseServiceImpl;
027 import com.liferay.portal.service.persistence.AddressPersistence;
028 import com.liferay.portal.service.persistence.ClassNamePersistence;
029 import com.liferay.portal.service.persistence.CountryPersistence;
030 import com.liferay.portal.service.persistence.ListTypePersistence;
031 import com.liferay.portal.service.persistence.UserFinder;
032 import com.liferay.portal.service.persistence.UserPersistence;
033 import com.liferay.portal.util.PortalUtil;
034
035 import javax.sql.DataSource;
036
037
049 public abstract class AddressServiceBaseImpl extends BaseServiceImpl
050 implements AddressService, IdentifiableOSGiService {
051
056
057
062 public com.liferay.portal.service.AddressLocalService getAddressLocalService() {
063 return addressLocalService;
064 }
065
066
071 public void setAddressLocalService(
072 com.liferay.portal.service.AddressLocalService addressLocalService) {
073 this.addressLocalService = addressLocalService;
074 }
075
076
081 public AddressService getAddressService() {
082 return addressService;
083 }
084
085
090 public void setAddressService(AddressService addressService) {
091 this.addressService = addressService;
092 }
093
094
099 public AddressPersistence getAddressPersistence() {
100 return addressPersistence;
101 }
102
103
108 public void setAddressPersistence(AddressPersistence addressPersistence) {
109 this.addressPersistence = addressPersistence;
110 }
111
112
117 public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
118 return counterLocalService;
119 }
120
121
126 public void setCounterLocalService(
127 com.liferay.counter.service.CounterLocalService counterLocalService) {
128 this.counterLocalService = counterLocalService;
129 }
130
131
136 public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
137 return classNameLocalService;
138 }
139
140
145 public void setClassNameLocalService(
146 com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
147 this.classNameLocalService = classNameLocalService;
148 }
149
150
155 public com.liferay.portal.service.ClassNameService getClassNameService() {
156 return classNameService;
157 }
158
159
164 public void setClassNameService(
165 com.liferay.portal.service.ClassNameService classNameService) {
166 this.classNameService = classNameService;
167 }
168
169
174 public ClassNamePersistence getClassNamePersistence() {
175 return classNamePersistence;
176 }
177
178
183 public void setClassNamePersistence(
184 ClassNamePersistence classNamePersistence) {
185 this.classNamePersistence = classNamePersistence;
186 }
187
188
193 public com.liferay.portal.service.CountryService getCountryService() {
194 return countryService;
195 }
196
197
202 public void setCountryService(
203 com.liferay.portal.service.CountryService countryService) {
204 this.countryService = countryService;
205 }
206
207
212 public CountryPersistence getCountryPersistence() {
213 return countryPersistence;
214 }
215
216
221 public void setCountryPersistence(CountryPersistence countryPersistence) {
222 this.countryPersistence = countryPersistence;
223 }
224
225
230 public com.liferay.portal.service.ListTypeLocalService getListTypeLocalService() {
231 return listTypeLocalService;
232 }
233
234
239 public void setListTypeLocalService(
240 com.liferay.portal.service.ListTypeLocalService listTypeLocalService) {
241 this.listTypeLocalService = listTypeLocalService;
242 }
243
244
249 public com.liferay.portal.service.ListTypeService getListTypeService() {
250 return listTypeService;
251 }
252
253
258 public void setListTypeService(
259 com.liferay.portal.service.ListTypeService listTypeService) {
260 this.listTypeService = listTypeService;
261 }
262
263
268 public ListTypePersistence getListTypePersistence() {
269 return listTypePersistence;
270 }
271
272
277 public void setListTypePersistence(ListTypePersistence listTypePersistence) {
278 this.listTypePersistence = listTypePersistence;
279 }
280
281
286 public com.liferay.portal.service.UserLocalService getUserLocalService() {
287 return userLocalService;
288 }
289
290
295 public void setUserLocalService(
296 com.liferay.portal.service.UserLocalService userLocalService) {
297 this.userLocalService = userLocalService;
298 }
299
300
305 public com.liferay.portal.service.UserService getUserService() {
306 return userService;
307 }
308
309
314 public void setUserService(
315 com.liferay.portal.service.UserService userService) {
316 this.userService = userService;
317 }
318
319
324 public UserPersistence getUserPersistence() {
325 return userPersistence;
326 }
327
328
333 public void setUserPersistence(UserPersistence userPersistence) {
334 this.userPersistence = userPersistence;
335 }
336
337
342 public UserFinder getUserFinder() {
343 return userFinder;
344 }
345
346
351 public void setUserFinder(UserFinder userFinder) {
352 this.userFinder = userFinder;
353 }
354
355 public void afterPropertiesSet() {
356 }
357
358 public void destroy() {
359 }
360
361
366 @Override
367 public String getOSGiServiceIdentifier() {
368 return AddressService.class.getName();
369 }
370
371 protected Class<?> getModelClass() {
372 return Address.class;
373 }
374
375 protected String getModelClassName() {
376 return Address.class.getName();
377 }
378
379
384 protected void runSQL(String sql) {
385 try {
386 DataSource dataSource = addressPersistence.getDataSource();
387
388 DB db = DBManagerUtil.getDB();
389
390 sql = db.buildSQL(sql);
391 sql = PortalUtil.transformSQL(sql);
392
393 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
394 sql, new int[0]);
395
396 sqlUpdate.update();
397 }
398 catch (Exception e) {
399 throw new SystemException(e);
400 }
401 }
402
403 @BeanReference(type = com.liferay.portal.service.AddressLocalService.class)
404 protected com.liferay.portal.service.AddressLocalService addressLocalService;
405 @BeanReference(type = com.liferay.portal.service.AddressService.class)
406 protected AddressService addressService;
407 @BeanReference(type = AddressPersistence.class)
408 protected AddressPersistence addressPersistence;
409 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
410 protected com.liferay.counter.service.CounterLocalService counterLocalService;
411 @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
412 protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
413 @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
414 protected com.liferay.portal.service.ClassNameService classNameService;
415 @BeanReference(type = ClassNamePersistence.class)
416 protected ClassNamePersistence classNamePersistence;
417 @BeanReference(type = com.liferay.portal.service.CountryService.class)
418 protected com.liferay.portal.service.CountryService countryService;
419 @BeanReference(type = CountryPersistence.class)
420 protected CountryPersistence countryPersistence;
421 @BeanReference(type = com.liferay.portal.service.ListTypeLocalService.class)
422 protected com.liferay.portal.service.ListTypeLocalService listTypeLocalService;
423 @BeanReference(type = com.liferay.portal.service.ListTypeService.class)
424 protected com.liferay.portal.service.ListTypeService listTypeService;
425 @BeanReference(type = ListTypePersistence.class)
426 protected ListTypePersistence listTypePersistence;
427 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
428 protected com.liferay.portal.service.UserLocalService userLocalService;
429 @BeanReference(type = com.liferay.portal.service.UserService.class)
430 protected com.liferay.portal.service.UserService userService;
431 @BeanReference(type = UserPersistence.class)
432 protected UserPersistence userPersistence;
433 @BeanReference(type = UserFinder.class)
434 protected UserFinder userFinder;
435 }