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 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(ThemeLocalService themeLocalService) {
070                    this.themeLocalService = themeLocalService;
071            }
072    
073            /**
074             * Returns the theme remote service.
075             *
076             * @return the theme remote service
077             */
078            public com.liferay.portal.service.ThemeService getThemeService() {
079                    return themeService;
080            }
081    
082            /**
083             * Sets the theme remote service.
084             *
085             * @param themeService the theme remote service
086             */
087            public void setThemeService(
088                    com.liferay.portal.service.ThemeService themeService) {
089                    this.themeService = themeService;
090            }
091    
092            /**
093             * Returns the counter local service.
094             *
095             * @return the counter local service
096             */
097            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
098                    return counterLocalService;
099            }
100    
101            /**
102             * Sets the counter local service.
103             *
104             * @param counterLocalService the counter local service
105             */
106            public void setCounterLocalService(
107                    com.liferay.counter.service.CounterLocalService counterLocalService) {
108                    this.counterLocalService = counterLocalService;
109            }
110    
111            /**
112             * Returns the layout template local service.
113             *
114             * @return the layout template local service
115             */
116            public com.liferay.portal.service.LayoutTemplateLocalService getLayoutTemplateLocalService() {
117                    return layoutTemplateLocalService;
118            }
119    
120            /**
121             * Sets the layout template local service.
122             *
123             * @param layoutTemplateLocalService the layout template local service
124             */
125            public void setLayoutTemplateLocalService(
126                    com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService) {
127                    this.layoutTemplateLocalService = layoutTemplateLocalService;
128            }
129    
130            /**
131             * Returns the plugin setting local service.
132             *
133             * @return the plugin setting local service
134             */
135            public com.liferay.portal.service.PluginSettingLocalService getPluginSettingLocalService() {
136                    return pluginSettingLocalService;
137            }
138    
139            /**
140             * Sets the plugin setting local service.
141             *
142             * @param pluginSettingLocalService the plugin setting local service
143             */
144            public void setPluginSettingLocalService(
145                    com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService) {
146                    this.pluginSettingLocalService = pluginSettingLocalService;
147            }
148    
149            /**
150             * Returns the plugin setting remote service.
151             *
152             * @return the plugin setting remote service
153             */
154            public com.liferay.portal.service.PluginSettingService getPluginSettingService() {
155                    return pluginSettingService;
156            }
157    
158            /**
159             * Sets the plugin setting remote service.
160             *
161             * @param pluginSettingService the plugin setting remote service
162             */
163            public void setPluginSettingService(
164                    com.liferay.portal.service.PluginSettingService pluginSettingService) {
165                    this.pluginSettingService = pluginSettingService;
166            }
167    
168            /**
169             * Returns the plugin setting persistence.
170             *
171             * @return the plugin setting persistence
172             */
173            public PluginSettingPersistence getPluginSettingPersistence() {
174                    return pluginSettingPersistence;
175            }
176    
177            /**
178             * Sets the plugin setting persistence.
179             *
180             * @param pluginSettingPersistence the plugin setting persistence
181             */
182            public void setPluginSettingPersistence(
183                    PluginSettingPersistence pluginSettingPersistence) {
184                    this.pluginSettingPersistence = pluginSettingPersistence;
185            }
186    
187            public void afterPropertiesSet() {
188            }
189    
190            public void destroy() {
191            }
192    
193            /**
194             * Returns the Spring bean ID for this bean.
195             *
196             * @return the Spring bean ID for this bean
197             */
198            @Override
199            public String getBeanIdentifier() {
200                    return _beanIdentifier;
201            }
202    
203            /**
204             * Sets the Spring bean ID for this bean.
205             *
206             * @param beanIdentifier the Spring bean ID for this bean
207             */
208            @Override
209            public void setBeanIdentifier(String beanIdentifier) {
210                    _beanIdentifier = beanIdentifier;
211            }
212    
213            /**
214             * Performs a SQL query.
215             *
216             * @param sql the sql query
217             */
218            protected void runSQL(String sql) {
219                    try {
220                            DataSource dataSource = InfrastructureUtil.getDataSource();
221    
222                            DB db = DBFactoryUtil.getDB();
223    
224                            sql = db.buildSQL(sql);
225                            sql = PortalUtil.transformSQL(sql);
226    
227                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
228                                            sql, new int[0]);
229    
230                            sqlUpdate.update();
231                    }
232                    catch (Exception e) {
233                            throw new SystemException(e);
234                    }
235            }
236    
237            @BeanReference(type = ThemeLocalService.class)
238            protected ThemeLocalService themeLocalService;
239            @BeanReference(type = com.liferay.portal.service.ThemeService.class)
240            protected com.liferay.portal.service.ThemeService themeService;
241            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
242            protected com.liferay.counter.service.CounterLocalService counterLocalService;
243            @BeanReference(type = com.liferay.portal.service.LayoutTemplateLocalService.class)
244            protected com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService;
245            @BeanReference(type = com.liferay.portal.service.PluginSettingLocalService.class)
246            protected com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService;
247            @BeanReference(type = com.liferay.portal.service.PluginSettingService.class)
248            protected com.liferay.portal.service.PluginSettingService pluginSettingService;
249            @BeanReference(type = PluginSettingPersistence.class)
250            protected PluginSettingPersistence pluginSettingPersistence;
251            private String _beanIdentifier;
252    }