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.Phone;
025    import com.liferay.portal.service.BaseServiceImpl;
026    import com.liferay.portal.service.PhoneService;
027    import com.liferay.portal.service.persistence.ClassNamePersistence;
028    import com.liferay.portal.service.persistence.ListTypePersistence;
029    import com.liferay.portal.service.persistence.PhonePersistence;
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 phone 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.PhoneServiceImpl}.
041     * </p>
042     *
043     * @author Brian Wing Shun Chan
044     * @see com.liferay.portal.service.impl.PhoneServiceImpl
045     * @see com.liferay.portal.service.PhoneServiceUtil
046     * @generated
047     */
048    public abstract class PhoneServiceBaseImpl extends BaseServiceImpl
049            implements PhoneService, IdentifiableBean {
050            /*
051             * NOTE FOR DEVELOPERS:
052             *
053             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.PhoneServiceUtil} to access the phone remote service.
054             */
055    
056            /**
057             * Returns the phone local service.
058             *
059             * @return the phone local service
060             */
061            public com.liferay.portal.service.PhoneLocalService getPhoneLocalService() {
062                    return phoneLocalService;
063            }
064    
065            /**
066             * Sets the phone local service.
067             *
068             * @param phoneLocalService the phone local service
069             */
070            public void setPhoneLocalService(
071                    com.liferay.portal.service.PhoneLocalService phoneLocalService) {
072                    this.phoneLocalService = phoneLocalService;
073            }
074    
075            /**
076             * Returns the phone remote service.
077             *
078             * @return the phone remote service
079             */
080            public com.liferay.portal.service.PhoneService getPhoneService() {
081                    return phoneService;
082            }
083    
084            /**
085             * Sets the phone remote service.
086             *
087             * @param phoneService the phone remote service
088             */
089            public void setPhoneService(
090                    com.liferay.portal.service.PhoneService phoneService) {
091                    this.phoneService = phoneService;
092            }
093    
094            /**
095             * Returns the phone persistence.
096             *
097             * @return the phone persistence
098             */
099            public PhonePersistence getPhonePersistence() {
100                    return phonePersistence;
101            }
102    
103            /**
104             * Sets the phone persistence.
105             *
106             * @param phonePersistence the phone persistence
107             */
108            public void setPhonePersistence(PhonePersistence phonePersistence) {
109                    this.phonePersistence = phonePersistence;
110            }
111    
112            /**
113             * Returns the counter local service.
114             *
115             * @return the counter local service
116             */
117            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
118                    return counterLocalService;
119            }
120    
121            /**
122             * Sets the counter local service.
123             *
124             * @param counterLocalService the counter local service
125             */
126            public void setCounterLocalService(
127                    com.liferay.counter.service.CounterLocalService counterLocalService) {
128                    this.counterLocalService = counterLocalService;
129            }
130    
131            /**
132             * Returns the class name local service.
133             *
134             * @return the class name local service
135             */
136            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
137                    return classNameLocalService;
138            }
139    
140            /**
141             * Sets the class name local service.
142             *
143             * @param classNameLocalService the class name local service
144             */
145            public void setClassNameLocalService(
146                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
147                    this.classNameLocalService = classNameLocalService;
148            }
149    
150            /**
151             * Returns the class name remote service.
152             *
153             * @return the class name remote service
154             */
155            public com.liferay.portal.service.ClassNameService getClassNameService() {
156                    return classNameService;
157            }
158    
159            /**
160             * Sets the class name remote service.
161             *
162             * @param classNameService the class name remote service
163             */
164            public void setClassNameService(
165                    com.liferay.portal.service.ClassNameService classNameService) {
166                    this.classNameService = classNameService;
167            }
168    
169            /**
170             * Returns the class name persistence.
171             *
172             * @return the class name persistence
173             */
174            public ClassNamePersistence getClassNamePersistence() {
175                    return classNamePersistence;
176            }
177    
178            /**
179             * Sets the class name persistence.
180             *
181             * @param classNamePersistence the class name persistence
182             */
183            public void setClassNamePersistence(
184                    ClassNamePersistence classNamePersistence) {
185                    this.classNamePersistence = classNamePersistence;
186            }
187    
188            /**
189             * Returns the list type remote service.
190             *
191             * @return the list type remote service
192             */
193            public com.liferay.portal.service.ListTypeService getListTypeService() {
194                    return listTypeService;
195            }
196    
197            /**
198             * Sets the list type remote service.
199             *
200             * @param listTypeService the list type remote service
201             */
202            public void setListTypeService(
203                    com.liferay.portal.service.ListTypeService listTypeService) {
204                    this.listTypeService = listTypeService;
205            }
206    
207            /**
208             * Returns the list type persistence.
209             *
210             * @return the list type persistence
211             */
212            public ListTypePersistence getListTypePersistence() {
213                    return listTypePersistence;
214            }
215    
216            /**
217             * Sets the list type persistence.
218             *
219             * @param listTypePersistence the list type persistence
220             */
221            public void setListTypePersistence(ListTypePersistence listTypePersistence) {
222                    this.listTypePersistence = listTypePersistence;
223            }
224    
225            /**
226             * Returns the user local service.
227             *
228             * @return the user local service
229             */
230            public com.liferay.portal.service.UserLocalService getUserLocalService() {
231                    return userLocalService;
232            }
233    
234            /**
235             * Sets the user local service.
236             *
237             * @param userLocalService the user local service
238             */
239            public void setUserLocalService(
240                    com.liferay.portal.service.UserLocalService userLocalService) {
241                    this.userLocalService = userLocalService;
242            }
243    
244            /**
245             * Returns the user remote service.
246             *
247             * @return the user remote service
248             */
249            public com.liferay.portal.service.UserService getUserService() {
250                    return userService;
251            }
252    
253            /**
254             * Sets the user remote service.
255             *
256             * @param userService the user remote service
257             */
258            public void setUserService(
259                    com.liferay.portal.service.UserService userService) {
260                    this.userService = userService;
261            }
262    
263            /**
264             * Returns the user persistence.
265             *
266             * @return the user persistence
267             */
268            public UserPersistence getUserPersistence() {
269                    return userPersistence;
270            }
271    
272            /**
273             * Sets the user persistence.
274             *
275             * @param userPersistence the user persistence
276             */
277            public void setUserPersistence(UserPersistence userPersistence) {
278                    this.userPersistence = userPersistence;
279            }
280    
281            /**
282             * Returns the user finder.
283             *
284             * @return the user finder
285             */
286            public UserFinder getUserFinder() {
287                    return userFinder;
288            }
289    
290            /**
291             * Sets the user finder.
292             *
293             * @param userFinder the user finder
294             */
295            public void setUserFinder(UserFinder userFinder) {
296                    this.userFinder = userFinder;
297            }
298    
299            public void afterPropertiesSet() {
300            }
301    
302            public void destroy() {
303            }
304    
305            /**
306             * Returns the Spring bean ID for this bean.
307             *
308             * @return the Spring bean ID for this bean
309             */
310            @Override
311            public String getBeanIdentifier() {
312                    return _beanIdentifier;
313            }
314    
315            /**
316             * Sets the Spring bean ID for this bean.
317             *
318             * @param beanIdentifier the Spring bean ID for this bean
319             */
320            @Override
321            public void setBeanIdentifier(String beanIdentifier) {
322                    _beanIdentifier = beanIdentifier;
323            }
324    
325            protected Class<?> getModelClass() {
326                    return Phone.class;
327            }
328    
329            protected String getModelClassName() {
330                    return Phone.class.getName();
331            }
332    
333            /**
334             * Performs a SQL query.
335             *
336             * @param sql the sql query
337             */
338            protected void runSQL(String sql) {
339                    try {
340                            DataSource dataSource = phonePersistence.getDataSource();
341    
342                            DB db = DBFactoryUtil.getDB();
343    
344                            sql = db.buildSQL(sql);
345                            sql = PortalUtil.transformSQL(sql);
346    
347                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
348                                            sql, new int[0]);
349    
350                            sqlUpdate.update();
351                    }
352                    catch (Exception e) {
353                            throw new SystemException(e);
354                    }
355            }
356    
357            @BeanReference(type = com.liferay.portal.service.PhoneLocalService.class)
358            protected com.liferay.portal.service.PhoneLocalService phoneLocalService;
359            @BeanReference(type = com.liferay.portal.service.PhoneService.class)
360            protected com.liferay.portal.service.PhoneService phoneService;
361            @BeanReference(type = PhonePersistence.class)
362            protected PhonePersistence phonePersistence;
363            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
364            protected com.liferay.counter.service.CounterLocalService counterLocalService;
365            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
366            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
367            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
368            protected com.liferay.portal.service.ClassNameService classNameService;
369            @BeanReference(type = ClassNamePersistence.class)
370            protected ClassNamePersistence classNamePersistence;
371            @BeanReference(type = com.liferay.portal.service.ListTypeService.class)
372            protected com.liferay.portal.service.ListTypeService listTypeService;
373            @BeanReference(type = ListTypePersistence.class)
374            protected ListTypePersistence listTypePersistence;
375            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
376            protected com.liferay.portal.service.UserLocalService userLocalService;
377            @BeanReference(type = com.liferay.portal.service.UserService.class)
378            protected com.liferay.portal.service.UserService userService;
379            @BeanReference(type = UserPersistence.class)
380            protected UserPersistence userPersistence;
381            @BeanReference(type = UserFinder.class)
382            protected UserFinder userFinder;
383            private String _beanIdentifier;
384    }