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