001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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    /**
037     * Provides the base implementation for the email address remote service.
038     *
039     * <p>
040     * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.portal.service.impl.EmailAddressServiceImpl}.
041     * </p>
042     *
043     * @author Brian Wing Shun Chan
044     * @see com.liferay.portal.service.impl.EmailAddressServiceImpl
045     * @see com.liferay.portal.service.EmailAddressServiceUtil
046     * @generated
047     */
048    public abstract class EmailAddressServiceBaseImpl extends BaseServiceImpl
049            implements EmailAddressService, IdentifiableBean {
050            /*
051             * NOTE FOR DEVELOPERS:
052             *
053             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.EmailAddressServiceUtil} to access the email address remote service.
054             */
055    
056            /**
057             * Returns the email address local service.
058             *
059             * @return the email address local service
060             */
061            public com.liferay.portal.service.EmailAddressLocalService getEmailAddressLocalService() {
062                    return emailAddressLocalService;
063            }
064    
065            /**
066             * Sets the email address local service.
067             *
068             * @param emailAddressLocalService the email address local service
069             */
070            public void setEmailAddressLocalService(
071                    com.liferay.portal.service.EmailAddressLocalService emailAddressLocalService) {
072                    this.emailAddressLocalService = emailAddressLocalService;
073            }
074    
075            /**
076             * Returns the email address remote service.
077             *
078             * @return the email address remote service
079             */
080            public com.liferay.portal.service.EmailAddressService getEmailAddressService() {
081                    return emailAddressService;
082            }
083    
084            /**
085             * Sets the email address remote service.
086             *
087             * @param emailAddressService the email address remote service
088             */
089            public void setEmailAddressService(
090                    com.liferay.portal.service.EmailAddressService emailAddressService) {
091                    this.emailAddressService = emailAddressService;
092            }
093    
094            /**
095             * Returns the email address persistence.
096             *
097             * @return the email address persistence
098             */
099            public EmailAddressPersistence getEmailAddressPersistence() {
100                    return emailAddressPersistence;
101            }
102    
103            /**
104             * Sets the email address persistence.
105             *
106             * @param emailAddressPersistence the email address persistence
107             */
108            public void setEmailAddressPersistence(
109                    EmailAddressPersistence emailAddressPersistence) {
110                    this.emailAddressPersistence = emailAddressPersistence;
111            }
112    
113            /**
114             * Returns the counter local service.
115             *
116             * @return the counter local service
117             */
118            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
119                    return counterLocalService;
120            }
121    
122            /**
123             * Sets the counter local service.
124             *
125             * @param counterLocalService the counter local service
126             */
127            public void setCounterLocalService(
128                    com.liferay.counter.service.CounterLocalService counterLocalService) {
129                    this.counterLocalService = counterLocalService;
130            }
131    
132            /**
133             * Returns the class name local service.
134             *
135             * @return the class name local service
136             */
137            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
138                    return classNameLocalService;
139            }
140    
141            /**
142             * Sets the class name local service.
143             *
144             * @param classNameLocalService the class name local service
145             */
146            public void setClassNameLocalService(
147                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
148                    this.classNameLocalService = classNameLocalService;
149            }
150    
151            /**
152             * Returns the class name remote service.
153             *
154             * @return the class name remote service
155             */
156            public com.liferay.portal.service.ClassNameService getClassNameService() {
157                    return classNameService;
158            }
159    
160            /**
161             * Sets the class name remote service.
162             *
163             * @param classNameService the class name remote service
164             */
165            public void setClassNameService(
166                    com.liferay.portal.service.ClassNameService classNameService) {
167                    this.classNameService = classNameService;
168            }
169    
170            /**
171             * Returns the class name persistence.
172             *
173             * @return the class name persistence
174             */
175            public ClassNamePersistence getClassNamePersistence() {
176                    return classNamePersistence;
177            }
178    
179            /**
180             * Sets the class name persistence.
181             *
182             * @param classNamePersistence the class name persistence
183             */
184            public void setClassNamePersistence(
185                    ClassNamePersistence classNamePersistence) {
186                    this.classNamePersistence = classNamePersistence;
187            }
188    
189            /**
190             * Returns the list type remote service.
191             *
192             * @return the list type remote service
193             */
194            public com.liferay.portal.service.ListTypeService getListTypeService() {
195                    return listTypeService;
196            }
197    
198            /**
199             * Sets the list type remote service.
200             *
201             * @param listTypeService the list type remote service
202             */
203            public void setListTypeService(
204                    com.liferay.portal.service.ListTypeService listTypeService) {
205                    this.listTypeService = listTypeService;
206            }
207    
208            /**
209             * Returns the list type persistence.
210             *
211             * @return the list type persistence
212             */
213            public ListTypePersistence getListTypePersistence() {
214                    return listTypePersistence;
215            }
216    
217            /**
218             * Sets the list type persistence.
219             *
220             * @param listTypePersistence the list type persistence
221             */
222            public void setListTypePersistence(ListTypePersistence listTypePersistence) {
223                    this.listTypePersistence = listTypePersistence;
224            }
225    
226            /**
227             * Returns the user local service.
228             *
229             * @return the user local service
230             */
231            public com.liferay.portal.service.UserLocalService getUserLocalService() {
232                    return userLocalService;
233            }
234    
235            /**
236             * Sets the user local service.
237             *
238             * @param userLocalService the user local service
239             */
240            public void setUserLocalService(
241                    com.liferay.portal.service.UserLocalService userLocalService) {
242                    this.userLocalService = userLocalService;
243            }
244    
245            /**
246             * Returns the user remote service.
247             *
248             * @return the user remote service
249             */
250            public com.liferay.portal.service.UserService getUserService() {
251                    return userService;
252            }
253    
254            /**
255             * Sets the user remote service.
256             *
257             * @param userService the user remote service
258             */
259            public void setUserService(
260                    com.liferay.portal.service.UserService userService) {
261                    this.userService = userService;
262            }
263    
264            /**
265             * Returns the user persistence.
266             *
267             * @return the user persistence
268             */
269            public UserPersistence getUserPersistence() {
270                    return userPersistence;
271            }
272    
273            /**
274             * Sets the user persistence.
275             *
276             * @param userPersistence the user persistence
277             */
278            public void setUserPersistence(UserPersistence userPersistence) {
279                    this.userPersistence = userPersistence;
280            }
281    
282            /**
283             * Returns the user finder.
284             *
285             * @return the user finder
286             */
287            public UserFinder getUserFinder() {
288                    return userFinder;
289            }
290    
291            /**
292             * Sets the user finder.
293             *
294             * @param userFinder the user finder
295             */
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            /**
307             * Returns the Spring bean ID for this bean.
308             *
309             * @return the Spring bean ID for this bean
310             */
311            @Override
312            public String getBeanIdentifier() {
313                    return _beanIdentifier;
314            }
315    
316            /**
317             * Sets the Spring bean ID for this bean.
318             *
319             * @param beanIdentifier the Spring bean ID for this bean
320             */
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            /**
335             * Performs a SQL query.
336             *
337             * @param sql the sql query
338             */
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    }