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.dao.db.DB;
021    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024    import com.liferay.portal.kernel.exception.SystemException;
025    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
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, IdentifiableOSGiService {
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 counter local service.
075             *
076             * @return the counter local service
077             */
078            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
079                    return counterLocalService;
080            }
081    
082            /**
083             * Sets the counter local service.
084             *
085             * @param counterLocalService the counter local service
086             */
087            public void setCounterLocalService(
088                    com.liferay.counter.service.CounterLocalService counterLocalService) {
089                    this.counterLocalService = counterLocalService;
090            }
091    
092            /**
093             * Returns the layout template local service.
094             *
095             * @return the layout template local service
096             */
097            public com.liferay.portal.service.LayoutTemplateLocalService getLayoutTemplateLocalService() {
098                    return layoutTemplateLocalService;
099            }
100    
101            /**
102             * Sets the layout template local service.
103             *
104             * @param layoutTemplateLocalService the layout template local service
105             */
106            public void setLayoutTemplateLocalService(
107                    com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService) {
108                    this.layoutTemplateLocalService = layoutTemplateLocalService;
109            }
110    
111            /**
112             * Returns the plugin setting local service.
113             *
114             * @return the plugin setting local service
115             */
116            public com.liferay.portal.service.PluginSettingLocalService getPluginSettingLocalService() {
117                    return pluginSettingLocalService;
118            }
119    
120            /**
121             * Sets the plugin setting local service.
122             *
123             * @param pluginSettingLocalService the plugin setting local service
124             */
125            public void setPluginSettingLocalService(
126                    com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService) {
127                    this.pluginSettingLocalService = pluginSettingLocalService;
128            }
129    
130            /**
131             * Returns the plugin setting persistence.
132             *
133             * @return the plugin setting persistence
134             */
135            public PluginSettingPersistence getPluginSettingPersistence() {
136                    return pluginSettingPersistence;
137            }
138    
139            /**
140             * Sets the plugin setting persistence.
141             *
142             * @param pluginSettingPersistence the plugin setting persistence
143             */
144            public void setPluginSettingPersistence(
145                    PluginSettingPersistence pluginSettingPersistence) {
146                    this.pluginSettingPersistence = pluginSettingPersistence;
147            }
148    
149            public void afterPropertiesSet() {
150            }
151    
152            public void destroy() {
153            }
154    
155            /**
156             * Returns the OSGi service identifier.
157             *
158             * @return the OSGi service identifier
159             */
160            @Override
161            public String getOSGiServiceIdentifier() {
162                    return ThemeLocalService.class.getName();
163            }
164    
165            /**
166             * Performs a SQL query.
167             *
168             * @param sql the sql query
169             */
170            protected void runSQL(String sql) {
171                    try {
172                            DataSource dataSource = InfrastructureUtil.getDataSource();
173    
174                            DB db = DBManagerUtil.getDB();
175    
176                            sql = db.buildSQL(sql);
177                            sql = PortalUtil.transformSQL(sql);
178    
179                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
180                                            sql, new int[0]);
181    
182                            sqlUpdate.update();
183                    }
184                    catch (Exception e) {
185                            throw new SystemException(e);
186                    }
187            }
188    
189            @BeanReference(type = com.liferay.portal.service.ThemeLocalService.class)
190            protected ThemeLocalService themeLocalService;
191            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
192            protected com.liferay.counter.service.CounterLocalService counterLocalService;
193            @BeanReference(type = com.liferay.portal.service.LayoutTemplateLocalService.class)
194            protected com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService;
195            @BeanReference(type = com.liferay.portal.service.PluginSettingLocalService.class)
196            protected com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService;
197            @BeanReference(type = PluginSettingPersistence.class)
198            protected PluginSettingPersistence pluginSettingPersistence;
199    }