001    /**
002     * Copyright (c) 2000-2013 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.portlet.expando.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.jdbc.SqlUpdate;
020    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
021    import com.liferay.portal.kernel.exception.SystemException;
022    import com.liferay.portal.service.BaseServiceImpl;
023    import com.liferay.portal.service.persistence.UserFinder;
024    import com.liferay.portal.service.persistence.UserPersistence;
025    
026    import com.liferay.portlet.expando.model.ExpandoValue;
027    import com.liferay.portlet.expando.service.ExpandoValueService;
028    import com.liferay.portlet.expando.service.persistence.ExpandoColumnPersistence;
029    import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
030    import com.liferay.portlet.expando.service.persistence.ExpandoTablePersistence;
031    import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
032    
033    import javax.sql.DataSource;
034    
035    /**
036     * Provides the base implementation for the expando value remote service.
037     *
038     * <p>
039     * 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.portlet.expando.service.impl.ExpandoValueServiceImpl}.
040     * </p>
041     *
042     * @author Brian Wing Shun Chan
043     * @see com.liferay.portlet.expando.service.impl.ExpandoValueServiceImpl
044     * @see com.liferay.portlet.expando.service.ExpandoValueServiceUtil
045     * @generated
046     */
047    public abstract class ExpandoValueServiceBaseImpl extends BaseServiceImpl
048            implements ExpandoValueService, IdentifiableBean {
049            /*
050             * NOTE FOR DEVELOPERS:
051             *
052             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.expando.service.ExpandoValueServiceUtil} to access the expando value remote service.
053             */
054    
055            /**
056             * Returns the expando column local service.
057             *
058             * @return the expando column local service
059             */
060            public com.liferay.portlet.expando.service.ExpandoColumnLocalService getExpandoColumnLocalService() {
061                    return expandoColumnLocalService;
062            }
063    
064            /**
065             * Sets the expando column local service.
066             *
067             * @param expandoColumnLocalService the expando column local service
068             */
069            public void setExpandoColumnLocalService(
070                    com.liferay.portlet.expando.service.ExpandoColumnLocalService expandoColumnLocalService) {
071                    this.expandoColumnLocalService = expandoColumnLocalService;
072            }
073    
074            /**
075             * Returns the expando column remote service.
076             *
077             * @return the expando column remote service
078             */
079            public com.liferay.portlet.expando.service.ExpandoColumnService getExpandoColumnService() {
080                    return expandoColumnService;
081            }
082    
083            /**
084             * Sets the expando column remote service.
085             *
086             * @param expandoColumnService the expando column remote service
087             */
088            public void setExpandoColumnService(
089                    com.liferay.portlet.expando.service.ExpandoColumnService expandoColumnService) {
090                    this.expandoColumnService = expandoColumnService;
091            }
092    
093            /**
094             * Returns the expando column persistence.
095             *
096             * @return the expando column persistence
097             */
098            public ExpandoColumnPersistence getExpandoColumnPersistence() {
099                    return expandoColumnPersistence;
100            }
101    
102            /**
103             * Sets the expando column persistence.
104             *
105             * @param expandoColumnPersistence the expando column persistence
106             */
107            public void setExpandoColumnPersistence(
108                    ExpandoColumnPersistence expandoColumnPersistence) {
109                    this.expandoColumnPersistence = expandoColumnPersistence;
110            }
111    
112            /**
113             * Returns the expando row local service.
114             *
115             * @return the expando row local service
116             */
117            public com.liferay.portlet.expando.service.ExpandoRowLocalService getExpandoRowLocalService() {
118                    return expandoRowLocalService;
119            }
120    
121            /**
122             * Sets the expando row local service.
123             *
124             * @param expandoRowLocalService the expando row local service
125             */
126            public void setExpandoRowLocalService(
127                    com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService) {
128                    this.expandoRowLocalService = expandoRowLocalService;
129            }
130    
131            /**
132             * Returns the expando row persistence.
133             *
134             * @return the expando row persistence
135             */
136            public ExpandoRowPersistence getExpandoRowPersistence() {
137                    return expandoRowPersistence;
138            }
139    
140            /**
141             * Sets the expando row persistence.
142             *
143             * @param expandoRowPersistence the expando row persistence
144             */
145            public void setExpandoRowPersistence(
146                    ExpandoRowPersistence expandoRowPersistence) {
147                    this.expandoRowPersistence = expandoRowPersistence;
148            }
149    
150            /**
151             * Returns the expando table local service.
152             *
153             * @return the expando table local service
154             */
155            public com.liferay.portlet.expando.service.ExpandoTableLocalService getExpandoTableLocalService() {
156                    return expandoTableLocalService;
157            }
158    
159            /**
160             * Sets the expando table local service.
161             *
162             * @param expandoTableLocalService the expando table local service
163             */
164            public void setExpandoTableLocalService(
165                    com.liferay.portlet.expando.service.ExpandoTableLocalService expandoTableLocalService) {
166                    this.expandoTableLocalService = expandoTableLocalService;
167            }
168    
169            /**
170             * Returns the expando table persistence.
171             *
172             * @return the expando table persistence
173             */
174            public ExpandoTablePersistence getExpandoTablePersistence() {
175                    return expandoTablePersistence;
176            }
177    
178            /**
179             * Sets the expando table persistence.
180             *
181             * @param expandoTablePersistence the expando table persistence
182             */
183            public void setExpandoTablePersistence(
184                    ExpandoTablePersistence expandoTablePersistence) {
185                    this.expandoTablePersistence = expandoTablePersistence;
186            }
187    
188            /**
189             * Returns the expando value local service.
190             *
191             * @return the expando value local service
192             */
193            public com.liferay.portlet.expando.service.ExpandoValueLocalService getExpandoValueLocalService() {
194                    return expandoValueLocalService;
195            }
196    
197            /**
198             * Sets the expando value local service.
199             *
200             * @param expandoValueLocalService the expando value local service
201             */
202            public void setExpandoValueLocalService(
203                    com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService) {
204                    this.expandoValueLocalService = expandoValueLocalService;
205            }
206    
207            /**
208             * Returns the expando value remote service.
209             *
210             * @return the expando value remote service
211             */
212            public com.liferay.portlet.expando.service.ExpandoValueService getExpandoValueService() {
213                    return expandoValueService;
214            }
215    
216            /**
217             * Sets the expando value remote service.
218             *
219             * @param expandoValueService the expando value remote service
220             */
221            public void setExpandoValueService(
222                    com.liferay.portlet.expando.service.ExpandoValueService expandoValueService) {
223                    this.expandoValueService = expandoValueService;
224            }
225    
226            /**
227             * Returns the expando value persistence.
228             *
229             * @return the expando value persistence
230             */
231            public ExpandoValuePersistence getExpandoValuePersistence() {
232                    return expandoValuePersistence;
233            }
234    
235            /**
236             * Sets the expando value persistence.
237             *
238             * @param expandoValuePersistence the expando value persistence
239             */
240            public void setExpandoValuePersistence(
241                    ExpandoValuePersistence expandoValuePersistence) {
242                    this.expandoValuePersistence = expandoValuePersistence;
243            }
244    
245            /**
246             * Returns the counter local service.
247             *
248             * @return the counter local service
249             */
250            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
251                    return counterLocalService;
252            }
253    
254            /**
255             * Sets the counter local service.
256             *
257             * @param counterLocalService the counter local service
258             */
259            public void setCounterLocalService(
260                    com.liferay.counter.service.CounterLocalService counterLocalService) {
261                    this.counterLocalService = counterLocalService;
262            }
263    
264            /**
265             * Returns the resource local service.
266             *
267             * @return the resource local service
268             */
269            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
270                    return resourceLocalService;
271            }
272    
273            /**
274             * Sets the resource local service.
275             *
276             * @param resourceLocalService the resource local service
277             */
278            public void setResourceLocalService(
279                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
280                    this.resourceLocalService = resourceLocalService;
281            }
282    
283            /**
284             * Returns the user local service.
285             *
286             * @return the user local service
287             */
288            public com.liferay.portal.service.UserLocalService getUserLocalService() {
289                    return userLocalService;
290            }
291    
292            /**
293             * Sets the user local service.
294             *
295             * @param userLocalService the user local service
296             */
297            public void setUserLocalService(
298                    com.liferay.portal.service.UserLocalService userLocalService) {
299                    this.userLocalService = userLocalService;
300            }
301    
302            /**
303             * Returns the user remote service.
304             *
305             * @return the user remote service
306             */
307            public com.liferay.portal.service.UserService getUserService() {
308                    return userService;
309            }
310    
311            /**
312             * Sets the user remote service.
313             *
314             * @param userService the user remote service
315             */
316            public void setUserService(
317                    com.liferay.portal.service.UserService userService) {
318                    this.userService = userService;
319            }
320    
321            /**
322             * Returns the user persistence.
323             *
324             * @return the user persistence
325             */
326            public UserPersistence getUserPersistence() {
327                    return userPersistence;
328            }
329    
330            /**
331             * Sets the user persistence.
332             *
333             * @param userPersistence the user persistence
334             */
335            public void setUserPersistence(UserPersistence userPersistence) {
336                    this.userPersistence = userPersistence;
337            }
338    
339            /**
340             * Returns the user finder.
341             *
342             * @return the user finder
343             */
344            public UserFinder getUserFinder() {
345                    return userFinder;
346            }
347    
348            /**
349             * Sets the user finder.
350             *
351             * @param userFinder the user finder
352             */
353            public void setUserFinder(UserFinder userFinder) {
354                    this.userFinder = userFinder;
355            }
356    
357            public void afterPropertiesSet() {
358            }
359    
360            public void destroy() {
361            }
362    
363            /**
364             * Returns the Spring bean ID for this bean.
365             *
366             * @return the Spring bean ID for this bean
367             */
368            @Override
369            public String getBeanIdentifier() {
370                    return _beanIdentifier;
371            }
372    
373            /**
374             * Sets the Spring bean ID for this bean.
375             *
376             * @param beanIdentifier the Spring bean ID for this bean
377             */
378            @Override
379            public void setBeanIdentifier(String beanIdentifier) {
380                    _beanIdentifier = beanIdentifier;
381            }
382    
383            protected Class<?> getModelClass() {
384                    return ExpandoValue.class;
385            }
386    
387            protected String getModelClassName() {
388                    return ExpandoValue.class.getName();
389            }
390    
391            /**
392             * Performs an SQL query.
393             *
394             * @param sql the sql query
395             */
396            protected void runSQL(String sql) throws SystemException {
397                    try {
398                            DataSource dataSource = expandoValuePersistence.getDataSource();
399    
400                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
401                                            sql, new int[0]);
402    
403                            sqlUpdate.update();
404                    }
405                    catch (Exception e) {
406                            throw new SystemException(e);
407                    }
408            }
409    
410            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoColumnLocalService.class)
411            protected com.liferay.portlet.expando.service.ExpandoColumnLocalService expandoColumnLocalService;
412            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoColumnService.class)
413            protected com.liferay.portlet.expando.service.ExpandoColumnService expandoColumnService;
414            @BeanReference(type = ExpandoColumnPersistence.class)
415            protected ExpandoColumnPersistence expandoColumnPersistence;
416            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class)
417            protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService;
418            @BeanReference(type = ExpandoRowPersistence.class)
419            protected ExpandoRowPersistence expandoRowPersistence;
420            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoTableLocalService.class)
421            protected com.liferay.portlet.expando.service.ExpandoTableLocalService expandoTableLocalService;
422            @BeanReference(type = ExpandoTablePersistence.class)
423            protected ExpandoTablePersistence expandoTablePersistence;
424            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueLocalService.class)
425            protected com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService;
426            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueService.class)
427            protected com.liferay.portlet.expando.service.ExpandoValueService expandoValueService;
428            @BeanReference(type = ExpandoValuePersistence.class)
429            protected ExpandoValuePersistence expandoValuePersistence;
430            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
431            protected com.liferay.counter.service.CounterLocalService counterLocalService;
432            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
433            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
434            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
435            protected com.liferay.portal.service.UserLocalService userLocalService;
436            @BeanReference(type = com.liferay.portal.service.UserService.class)
437            protected com.liferay.portal.service.UserService userService;
438            @BeanReference(type = UserPersistence.class)
439            protected UserPersistence userPersistence;
440            @BeanReference(type = UserFinder.class)
441            protected UserFinder userFinder;
442            private String _beanIdentifier;
443    }