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.EmailAddress;
025 import com.liferay.portal.service.BaseServiceImpl;
026 import com.liferay.portal.service.EmailAddressService;
027 import com.liferay.portal.service.persistence.ClassNamePersistence;
028 import com.liferay.portal.service.persistence.EmailAddressPersistence;
029 import com.liferay.portal.service.persistence.ListTypePersistence;
030 import com.liferay.portal.service.persistence.UserFinder;
031 import com.liferay.portal.service.persistence.UserPersistence;
032 import com.liferay.portal.util.PortalUtil;
033
034 import javax.sql.DataSource;
035
036
048 public abstract class EmailAddressServiceBaseImpl extends BaseServiceImpl
049 implements EmailAddressService, IdentifiableBean {
050
055
056
061 public com.liferay.portal.service.EmailAddressLocalService getEmailAddressLocalService() {
062 return emailAddressLocalService;
063 }
064
065
070 public void setEmailAddressLocalService(
071 com.liferay.portal.service.EmailAddressLocalService emailAddressLocalService) {
072 this.emailAddressLocalService = emailAddressLocalService;
073 }
074
075
080 public EmailAddressService getEmailAddressService() {
081 return emailAddressService;
082 }
083
084
089 public void setEmailAddressService(EmailAddressService emailAddressService) {
090 this.emailAddressService = emailAddressService;
091 }
092
093
098 public EmailAddressPersistence getEmailAddressPersistence() {
099 return emailAddressPersistence;
100 }
101
102
107 public void setEmailAddressPersistence(
108 EmailAddressPersistence emailAddressPersistence) {
109 this.emailAddressPersistence = emailAddressPersistence;
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.ListTypeLocalService getListTypeLocalService() {
194 return listTypeLocalService;
195 }
196
197
202 public void setListTypeLocalService(
203 com.liferay.portal.service.ListTypeLocalService listTypeLocalService) {
204 this.listTypeLocalService = listTypeLocalService;
205 }
206
207
212 public com.liferay.portal.service.ListTypeService getListTypeService() {
213 return listTypeService;
214 }
215
216
221 public void setListTypeService(
222 com.liferay.portal.service.ListTypeService listTypeService) {
223 this.listTypeService = listTypeService;
224 }
225
226
231 public ListTypePersistence getListTypePersistence() {
232 return listTypePersistence;
233 }
234
235
240 public void setListTypePersistence(ListTypePersistence listTypePersistence) {
241 this.listTypePersistence = listTypePersistence;
242 }
243
244
249 public com.liferay.portal.service.UserLocalService getUserLocalService() {
250 return userLocalService;
251 }
252
253
258 public void setUserLocalService(
259 com.liferay.portal.service.UserLocalService userLocalService) {
260 this.userLocalService = userLocalService;
261 }
262
263
268 public com.liferay.portal.service.UserService getUserService() {
269 return userService;
270 }
271
272
277 public void setUserService(
278 com.liferay.portal.service.UserService userService) {
279 this.userService = userService;
280 }
281
282
287 public UserPersistence getUserPersistence() {
288 return userPersistence;
289 }
290
291
296 public void setUserPersistence(UserPersistence userPersistence) {
297 this.userPersistence = userPersistence;
298 }
299
300
305 public UserFinder getUserFinder() {
306 return userFinder;
307 }
308
309
314 public void setUserFinder(UserFinder userFinder) {
315 this.userFinder = userFinder;
316 }
317
318 public void afterPropertiesSet() {
319 }
320
321 public void destroy() {
322 }
323
324
329 @Override
330 public String getBeanIdentifier() {
331 return _beanIdentifier;
332 }
333
334
339 @Override
340 public void setBeanIdentifier(String beanIdentifier) {
341 _beanIdentifier = beanIdentifier;
342 }
343
344 protected Class<?> getModelClass() {
345 return EmailAddress.class;
346 }
347
348 protected String getModelClassName() {
349 return EmailAddress.class.getName();
350 }
351
352
357 protected void runSQL(String sql) {
358 try {
359 DataSource dataSource = emailAddressPersistence.getDataSource();
360
361 DB db = DBFactoryUtil.getDB();
362
363 sql = db.buildSQL(sql);
364 sql = PortalUtil.transformSQL(sql);
365
366 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
367 sql, new int[0]);
368
369 sqlUpdate.update();
370 }
371 catch (Exception e) {
372 throw new SystemException(e);
373 }
374 }
375
376 @BeanReference(type = com.liferay.portal.service.EmailAddressLocalService.class)
377 protected com.liferay.portal.service.EmailAddressLocalService emailAddressLocalService;
378 @BeanReference(type = EmailAddressService.class)
379 protected EmailAddressService emailAddressService;
380 @BeanReference(type = EmailAddressPersistence.class)
381 protected EmailAddressPersistence emailAddressPersistence;
382 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
383 protected com.liferay.counter.service.CounterLocalService counterLocalService;
384 @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
385 protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
386 @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
387 protected com.liferay.portal.service.ClassNameService classNameService;
388 @BeanReference(type = ClassNamePersistence.class)
389 protected ClassNamePersistence classNamePersistence;
390 @BeanReference(type = com.liferay.portal.service.ListTypeLocalService.class)
391 protected com.liferay.portal.service.ListTypeLocalService listTypeLocalService;
392 @BeanReference(type = com.liferay.portal.service.ListTypeService.class)
393 protected com.liferay.portal.service.ListTypeService listTypeService;
394 @BeanReference(type = ListTypePersistence.class)
395 protected ListTypePersistence listTypePersistence;
396 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
397 protected com.liferay.portal.service.UserLocalService userLocalService;
398 @BeanReference(type = com.liferay.portal.service.UserService.class)
399 protected com.liferay.portal.service.UserService userService;
400 @BeanReference(type = UserPersistence.class)
401 protected UserPersistence userPersistence;
402 @BeanReference(type = UserFinder.class)
403 protected UserFinder userFinder;
404 private String _beanIdentifier;
405 }