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