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