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 com.liferay.portal.service.EmailAddressService getEmailAddressService() {
081 return emailAddressService;
082 }
083
084
089 public void setEmailAddressService(
090 com.liferay.portal.service.EmailAddressService emailAddressService) {
091 this.emailAddressService = emailAddressService;
092 }
093
094
099 public EmailAddressPersistence getEmailAddressPersistence() {
100 return emailAddressPersistence;
101 }
102
103
108 public void setEmailAddressPersistence(
109 EmailAddressPersistence emailAddressPersistence) {
110 this.emailAddressPersistence = emailAddressPersistence;
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.ListTypeService getListTypeService() {
195 return listTypeService;
196 }
197
198
203 public void setListTypeService(
204 com.liferay.portal.service.ListTypeService listTypeService) {
205 this.listTypeService = listTypeService;
206 }
207
208
213 public ListTypePersistence getListTypePersistence() {
214 return listTypePersistence;
215 }
216
217
222 public void setListTypePersistence(ListTypePersistence listTypePersistence) {
223 this.listTypePersistence = listTypePersistence;
224 }
225
226
231 public com.liferay.portal.service.UserLocalService getUserLocalService() {
232 return userLocalService;
233 }
234
235
240 public void setUserLocalService(
241 com.liferay.portal.service.UserLocalService userLocalService) {
242 this.userLocalService = userLocalService;
243 }
244
245
250 public com.liferay.portal.service.UserService getUserService() {
251 return userService;
252 }
253
254
259 public void setUserService(
260 com.liferay.portal.service.UserService userService) {
261 this.userService = userService;
262 }
263
264
269 public UserPersistence getUserPersistence() {
270 return userPersistence;
271 }
272
273
278 public void setUserPersistence(UserPersistence userPersistence) {
279 this.userPersistence = userPersistence;
280 }
281
282
287 public UserFinder getUserFinder() {
288 return userFinder;
289 }
290
291
296 public void setUserFinder(UserFinder userFinder) {
297 this.userFinder = userFinder;
298 }
299
300 public void afterPropertiesSet() {
301 }
302
303 public void destroy() {
304 }
305
306
311 @Override
312 public String getBeanIdentifier() {
313 return _beanIdentifier;
314 }
315
316
321 @Override
322 public void setBeanIdentifier(String beanIdentifier) {
323 _beanIdentifier = beanIdentifier;
324 }
325
326 protected Class<?> getModelClass() {
327 return EmailAddress.class;
328 }
329
330 protected String getModelClassName() {
331 return EmailAddress.class.getName();
332 }
333
334
339 protected void runSQL(String sql) {
340 try {
341 DataSource dataSource = emailAddressPersistence.getDataSource();
342
343 DB db = DBFactoryUtil.getDB();
344
345 sql = db.buildSQL(sql);
346 sql = PortalUtil.transformSQL(sql);
347
348 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
349 sql, new int[0]);
350
351 sqlUpdate.update();
352 }
353 catch (Exception e) {
354 throw new SystemException(e);
355 }
356 }
357
358 @BeanReference(type = com.liferay.portal.service.EmailAddressLocalService.class)
359 protected com.liferay.portal.service.EmailAddressLocalService emailAddressLocalService;
360 @BeanReference(type = com.liferay.portal.service.EmailAddressService.class)
361 protected com.liferay.portal.service.EmailAddressService emailAddressService;
362 @BeanReference(type = EmailAddressPersistence.class)
363 protected EmailAddressPersistence emailAddressPersistence;
364 @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
365 protected com.liferay.counter.service.CounterLocalService counterLocalService;
366 @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
367 protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
368 @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
369 protected com.liferay.portal.service.ClassNameService classNameService;
370 @BeanReference(type = ClassNamePersistence.class)
371 protected ClassNamePersistence classNamePersistence;
372 @BeanReference(type = com.liferay.portal.service.ListTypeService.class)
373 protected com.liferay.portal.service.ListTypeService listTypeService;
374 @BeanReference(type = ListTypePersistence.class)
375 protected ListTypePersistence listTypePersistence;
376 @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
377 protected com.liferay.portal.service.UserLocalService userLocalService;
378 @BeanReference(type = com.liferay.portal.service.UserService.class)
379 protected com.liferay.portal.service.UserService userService;
380 @BeanReference(type = UserPersistence.class)
381 protected UserPersistence userPersistence;
382 @BeanReference(type = UserFinder.class)
383 protected UserFinder userFinder;
384 private String _beanIdentifier;
385 }