001
014
015 package com.liferay.portal.service.base;
016
017 import com.liferay.portal.kernel.bean.BeanReference;
018 import com.liferay.portal.kernel.bean.IdentifiableBean;
019 import com.liferay.portal.kernel.dao.db.DB;
020 import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023 import com.liferay.portal.kernel.exception.SystemException;
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, IdentifiableBean {
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 com.liferay.portal.service.AddressService getAddressService() {
082 return addressService;
083 }
084
085
090 public void setAddressService(
091 com.liferay.portal.service.AddressService addressService) {
092 this.addressService = addressService;
093 }
094
095
100 public AddressPersistence getAddressPersistence() {
101 return addressPersistence;
102 }
103
104
109 public void setAddressPersistence(AddressPersistence addressPersistence) {
110 this.addressPersistence = addressPersistence;
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.CountryService getCountryService() {
195 return countryService;
196 }
197
198
203 public void setCountryService(
204 com.liferay.portal.service.CountryService countryService) {
205 this.countryService = countryService;
206 }
207
208
213 public CountryPersistence getCountryPersistence() {
214 return countryPersistence;
215 }
216
217
222 public void setCountryPersistence(CountryPersistence countryPersistence) {
223 this.countryPersistence = countryPersistence;
224 }
225
226
231 public com.liferay.portal.service.ListTypeService getListTypeService() {
232 return listTypeService;
233 }
234
235
240 public void setListTypeService(
241 com.liferay.portal.service.ListTypeService listTypeService) {
242 this.listTypeService = listTypeService;
243 }
244
245
250 public ListTypePersistence getListTypePersistence() {
251 return listTypePersistence;
252 }
253
254
259 public void setListTypePersistence(ListTypePersistence listTypePersistence) {
260 this.listTypePersistence = listTypePersistence;
261 }
262
263
268 public com.liferay.portal.service.UserLocalService getUserLocalService() {
269 return userLocalService;
270 }
271
272
277 public void setUserLocalService(
278 com.liferay.portal.service.UserLocalService userLocalService) {
279 this.userLocalService = userLocalService;
280 }
281
282
287 public com.liferay.portal.service.UserService getUserService() {
288 return userService;
289 }
290
291
296 public void setUserService(
297 com.liferay.portal.service.UserService userService) {
298 this.userService = userService;
299 }
300
301
306 public UserPersistence getUserPersistence() {
307 return userPersistence;
308 }
309
310
315 public void setUserPersistence(UserPersistence userPersistence) {
316 this.userPersistence = userPersistence;
317 }
318
319
324 public UserFinder getUserFinder() {
325 return userFinder;
326 }
327
328
333 public void setUserFinder(UserFinder userFinder) {
334 this.userFinder = userFinder;
335 }
336
337 public void afterPropertiesSet() {
338 }
339
340 public void destroy() {
341 }
342
343
348 @Override
349 public String getBeanIdentifier() {
350 return _beanIdentifier;
351 }
352
353
358 @Override
359 public void setBeanIdentifier(String beanIdentifier) {
360 _beanIdentifier = beanIdentifier;
361 }
362
363 protected Class<?> getModelClass() {
364 return Address.class;
365 }
366
367 protected String getModelClassName() {
368 return Address.class.getName();
369 }
370
371
376 protected void runSQL(String sql) {
377 try {
378 DataSource dataSource = addressPersistence.getDataSource();
379
380 DB db = DBFactoryUtil.getDB();
381
382 sql = db.buildSQL(sql);
383 sql = PortalUtil.transformSQL(sql);
384
385 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
386 sql, new int[0]);
387
388 sqlUpdate.update();
389 }
390 catch (Exception e) {
391 throw new SystemException(e);
392 }
393 }
394
395 @BeanReference(type = com.liferay.portal.service.AddressLocalService.class)
396 protected com.liferay.portal.service.AddressLocalService addressLocalService;
397 @BeanReference(type = com.liferay.portal.service.AddressService.class)
398 protected com.liferay.portal.service.AddressService addressService;
399 @BeanReference(type = AddressPersistence.class)
400 protected AddressPersistence addressPersistence;
401 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
402 protected com.liferay.counter.service.CounterLocalService counterLocalService;
403 @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
404 protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
405 @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
406 protected com.liferay.portal.service.ClassNameService classNameService;
407 @BeanReference(type = ClassNamePersistence.class)
408 protected ClassNamePersistence classNamePersistence;
409 @BeanReference(type = com.liferay.portal.service.CountryService.class)
410 protected com.liferay.portal.service.CountryService countryService;
411 @BeanReference(type = CountryPersistence.class)
412 protected CountryPersistence countryPersistence;
413 @BeanReference(type = com.liferay.portal.service.ListTypeService.class)
414 protected com.liferay.portal.service.ListTypeService listTypeService;
415 @BeanReference(type = ListTypePersistence.class)
416 protected ListTypePersistence listTypePersistence;
417 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
418 protected com.liferay.portal.service.UserLocalService userLocalService;
419 @BeanReference(type = com.liferay.portal.service.UserService.class)
420 protected com.liferay.portal.service.UserService userService;
421 @BeanReference(type = UserPersistence.class)
422 protected UserPersistence userPersistence;
423 @BeanReference(type = UserFinder.class)
424 protected UserFinder userFinder;
425 private String _beanIdentifier;
426 }