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.kernel.util.InfrastructureUtil;
025    import com.liferay.portal.service.BaseServiceImpl;
026    import com.liferay.portal.service.ThemeService;
027    import com.liferay.portal.service.persistence.PluginSettingPersistence;
028    import com.liferay.portal.util.PortalUtil;
029    
030    import javax.sql.DataSource;
031    
032    /**
033     * Provides the base implementation for the theme remote service.
034     *
035     * <p>
036     * 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.ThemeServiceImpl}.
037     * </p>
038     *
039     * @author Brian Wing Shun Chan
040     * @see com.liferay.portal.service.impl.ThemeServiceImpl
041     * @see com.liferay.portal.service.ThemeServiceUtil
042     * @generated
043     */
044    public abstract class ThemeServiceBaseImpl extends BaseServiceImpl
045            implements ThemeService, IdentifiableBean {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.ThemeServiceUtil} to access the theme remote service.
050             */
051    
052            /**
053             * Returns the theme local service.
054             *
055             * @return the theme local service
056             */
057            public com.liferay.portal.service.ThemeLocalService getThemeLocalService() {
058                    return themeLocalService;
059            }
060    
061            /**
062             * Sets the theme local service.
063             *
064             * @param themeLocalService the theme local service
065             */
066            public void setThemeLocalService(
067                    com.liferay.portal.service.ThemeLocalService themeLocalService) {
068                    this.themeLocalService = themeLocalService;
069            }
070    
071            /**
072             * Returns the theme remote service.
073             *
074             * @return the theme remote service
075             */
076            public com.liferay.portal.service.ThemeService getThemeService() {
077                    return themeService;
078            }
079    
080            /**
081             * Sets the theme remote service.
082             *
083             * @param themeService the theme remote service
084             */
085            public void setThemeService(
086                    com.liferay.portal.service.ThemeService themeService) {
087                    this.themeService = themeService;
088            }
089    
090            /**
091             * Returns the counter local service.
092             *
093             * @return the counter local service
094             */
095            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
096                    return counterLocalService;
097            }
098    
099            /**
100             * Sets the counter local service.
101             *
102             * @param counterLocalService the counter local service
103             */
104            public void setCounterLocalService(
105                    com.liferay.counter.service.CounterLocalService counterLocalService) {
106                    this.counterLocalService = counterLocalService;
107            }
108    
109            /**
110             * Returns the layout template local service.
111             *
112             * @return the layout template local service
113             */
114            public com.liferay.portal.service.LayoutTemplateLocalService getLayoutTemplateLocalService() {
115                    return layoutTemplateLocalService;
116            }
117    
118            /**
119             * Sets the layout template local service.
120             *
121             * @param layoutTemplateLocalService the layout template local service
122             */
123            public void setLayoutTemplateLocalService(
124                    com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService) {
125                    this.layoutTemplateLocalService = layoutTemplateLocalService;
126            }
127    
128            /**
129             * Returns the plugin setting local service.
130             *
131             * @return the plugin setting local service
132             */
133            public com.liferay.portal.service.PluginSettingLocalService getPluginSettingLocalService() {
134                    return pluginSettingLocalService;
135            }
136    
137            /**
138             * Sets the plugin setting local service.
139             *
140             * @param pluginSettingLocalService the plugin setting local service
141             */
142            public void setPluginSettingLocalService(
143                    com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService) {
144                    this.pluginSettingLocalService = pluginSettingLocalService;
145            }
146    
147            /**
148             * Returns the plugin setting remote service.
149             *
150             * @return the plugin setting remote service
151             */
152            public com.liferay.portal.service.PluginSettingService getPluginSettingService() {
153                    return pluginSettingService;
154            }
155    
156            /**
157             * Sets the plugin setting remote service.
158             *
159             * @param pluginSettingService the plugin setting remote service
160             */
161            public void setPluginSettingService(
162                    com.liferay.portal.service.PluginSettingService pluginSettingService) {
163                    this.pluginSettingService = pluginSettingService;
164            }
165    
166            /**
167             * Returns the plugin setting persistence.
168             *
169             * @return the plugin setting persistence
170             */
171            public PluginSettingPersistence getPluginSettingPersistence() {
172                    return pluginSettingPersistence;
173            }
174    
175            /**
176             * Sets the plugin setting persistence.
177             *
178             * @param pluginSettingPersistence the plugin setting persistence
179             */
180            public void setPluginSettingPersistence(
181                    PluginSettingPersistence pluginSettingPersistence) {
182                    this.pluginSettingPersistence = pluginSettingPersistence;
183            }
184    
185            public void afterPropertiesSet() {
186            }
187    
188            public void destroy() {
189            }
190    
191            /**
192             * Returns the Spring bean ID for this bean.
193             *
194             * @return the Spring bean ID for this bean
195             */
196            @Override
197            public String getBeanIdentifier() {
198                    return _beanIdentifier;
199            }
200    
201            /**
202             * Sets the Spring bean ID for this bean.
203             *
204             * @param beanIdentifier the Spring bean ID for this bean
205             */
206            @Override
207            public void setBeanIdentifier(String beanIdentifier) {
208                    _beanIdentifier = beanIdentifier;
209            }
210    
211            /**
212             * Performs a SQL query.
213             *
214             * @param sql the sql query
215             */
216            protected void runSQL(String sql) {
217                    try {
218                            DataSource dataSource = InfrastructureUtil.getDataSource();
219    
220                            DB db = DBFactoryUtil.getDB();
221    
222                            sql = db.buildSQL(sql);
223                            sql = PortalUtil.transformSQL(sql);
224    
225                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
226                                            sql, new int[0]);
227    
228                            sqlUpdate.update();
229                    }
230                    catch (Exception e) {
231                            throw new SystemException(e);
232                    }
233            }
234    
235            @BeanReference(type = com.liferay.portal.service.ThemeLocalService.class)
236            protected com.liferay.portal.service.ThemeLocalService themeLocalService;
237            @BeanReference(type = com.liferay.portal.service.ThemeService.class)
238            protected com.liferay.portal.service.ThemeService themeService;
239            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
240            protected com.liferay.counter.service.CounterLocalService counterLocalService;
241            @BeanReference(type = com.liferay.portal.service.LayoutTemplateLocalService.class)
242            protected com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService;
243            @BeanReference(type = com.liferay.portal.service.PluginSettingLocalService.class)
244            protected com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService;
245            @BeanReference(type = com.liferay.portal.service.PluginSettingService.class)
246            protected com.liferay.portal.service.PluginSettingService pluginSettingService;
247            @BeanReference(type = PluginSettingPersistence.class)
248            protected PluginSettingPersistence pluginSettingPersistence;
249            private String _beanIdentifier;
250    }