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.dao.db.DB;
019    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
020    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022    import com.liferay.portal.kernel.exception.SystemException;
023    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
024    import com.liferay.portal.model.PluginSetting;
025    import com.liferay.portal.service.BaseServiceImpl;
026    import com.liferay.portal.service.PluginSettingService;
027    import com.liferay.portal.service.persistence.PluginSettingPersistence;
028    import com.liferay.portal.service.persistence.RoleFinder;
029    import com.liferay.portal.service.persistence.RolePersistence;
030    import com.liferay.portal.service.persistence.UserFinder;
031    import com.liferay.portal.service.persistence.UserPersistence;
032    import com.liferay.portal.util.PortalUtil;
033    
034    import javax.sql.DataSource;
035    
036    /**
037     * Provides the base implementation for the plugin setting remote service.
038     *
039     * <p>
040     * 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.PluginSettingServiceImpl}.
041     * </p>
042     *
043     * @author Brian Wing Shun Chan
044     * @see com.liferay.portal.service.impl.PluginSettingServiceImpl
045     * @see com.liferay.portal.service.PluginSettingServiceUtil
046     * @generated
047     */
048    public abstract class PluginSettingServiceBaseImpl extends BaseServiceImpl
049            implements PluginSettingService, IdentifiableOSGiService {
050            /*
051             * NOTE FOR DEVELOPERS:
052             *
053             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.PluginSettingServiceUtil} to access the plugin setting remote service.
054             */
055    
056            /**
057             * Returns the plugin setting local service.
058             *
059             * @return the plugin setting local service
060             */
061            public com.liferay.portal.service.PluginSettingLocalService getPluginSettingLocalService() {
062                    return pluginSettingLocalService;
063            }
064    
065            /**
066             * Sets the plugin setting local service.
067             *
068             * @param pluginSettingLocalService the plugin setting local service
069             */
070            public void setPluginSettingLocalService(
071                    com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService) {
072                    this.pluginSettingLocalService = pluginSettingLocalService;
073            }
074    
075            /**
076             * Returns the plugin setting remote service.
077             *
078             * @return the plugin setting remote service
079             */
080            public PluginSettingService getPluginSettingService() {
081                    return pluginSettingService;
082            }
083    
084            /**
085             * Sets the plugin setting remote service.
086             *
087             * @param pluginSettingService the plugin setting remote service
088             */
089            public void setPluginSettingService(
090                    PluginSettingService pluginSettingService) {
091                    this.pluginSettingService = pluginSettingService;
092            }
093    
094            /**
095             * Returns the plugin setting persistence.
096             *
097             * @return the plugin setting persistence
098             */
099            public PluginSettingPersistence getPluginSettingPersistence() {
100                    return pluginSettingPersistence;
101            }
102    
103            /**
104             * Sets the plugin setting persistence.
105             *
106             * @param pluginSettingPersistence the plugin setting persistence
107             */
108            public void setPluginSettingPersistence(
109                    PluginSettingPersistence pluginSettingPersistence) {
110                    this.pluginSettingPersistence = pluginSettingPersistence;
111            }
112    
113            /**
114             * Returns the counter local service.
115             *
116             * @return the counter local service
117             */
118            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
119                    return counterLocalService;
120            }
121    
122            /**
123             * Sets the counter local service.
124             *
125             * @param counterLocalService the counter local service
126             */
127            public void setCounterLocalService(
128                    com.liferay.counter.service.CounterLocalService counterLocalService) {
129                    this.counterLocalService = counterLocalService;
130            }
131    
132            /**
133             * Returns the layout template local service.
134             *
135             * @return the layout template local service
136             */
137            public com.liferay.portal.service.LayoutTemplateLocalService getLayoutTemplateLocalService() {
138                    return layoutTemplateLocalService;
139            }
140    
141            /**
142             * Sets the layout template local service.
143             *
144             * @param layoutTemplateLocalService the layout template local service
145             */
146            public void setLayoutTemplateLocalService(
147                    com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService) {
148                    this.layoutTemplateLocalService = layoutTemplateLocalService;
149            }
150    
151            /**
152             * Returns the role local service.
153             *
154             * @return the role local service
155             */
156            public com.liferay.portal.service.RoleLocalService getRoleLocalService() {
157                    return roleLocalService;
158            }
159    
160            /**
161             * Sets the role local service.
162             *
163             * @param roleLocalService the role local service
164             */
165            public void setRoleLocalService(
166                    com.liferay.portal.service.RoleLocalService roleLocalService) {
167                    this.roleLocalService = roleLocalService;
168            }
169    
170            /**
171             * Returns the role remote service.
172             *
173             * @return the role remote service
174             */
175            public com.liferay.portal.service.RoleService getRoleService() {
176                    return roleService;
177            }
178    
179            /**
180             * Sets the role remote service.
181             *
182             * @param roleService the role remote service
183             */
184            public void setRoleService(
185                    com.liferay.portal.service.RoleService roleService) {
186                    this.roleService = roleService;
187            }
188    
189            /**
190             * Returns the role persistence.
191             *
192             * @return the role persistence
193             */
194            public RolePersistence getRolePersistence() {
195                    return rolePersistence;
196            }
197    
198            /**
199             * Sets the role persistence.
200             *
201             * @param rolePersistence the role persistence
202             */
203            public void setRolePersistence(RolePersistence rolePersistence) {
204                    this.rolePersistence = rolePersistence;
205            }
206    
207            /**
208             * Returns the role finder.
209             *
210             * @return the role finder
211             */
212            public RoleFinder getRoleFinder() {
213                    return roleFinder;
214            }
215    
216            /**
217             * Sets the role finder.
218             *
219             * @param roleFinder the role finder
220             */
221            public void setRoleFinder(RoleFinder roleFinder) {
222                    this.roleFinder = roleFinder;
223            }
224    
225            /**
226             * Returns the theme local service.
227             *
228             * @return the theme local service
229             */
230            public com.liferay.portal.service.ThemeLocalService getThemeLocalService() {
231                    return themeLocalService;
232            }
233    
234            /**
235             * Sets the theme local service.
236             *
237             * @param themeLocalService the theme local service
238             */
239            public void setThemeLocalService(
240                    com.liferay.portal.service.ThemeLocalService themeLocalService) {
241                    this.themeLocalService = themeLocalService;
242            }
243    
244            /**
245             * Returns the theme remote service.
246             *
247             * @return the theme remote service
248             */
249            public com.liferay.portal.service.ThemeService getThemeService() {
250                    return themeService;
251            }
252    
253            /**
254             * Sets the theme remote service.
255             *
256             * @param themeService the theme remote service
257             */
258            public void setThemeService(
259                    com.liferay.portal.service.ThemeService themeService) {
260                    this.themeService = themeService;
261            }
262    
263            /**
264             * Returns the user local service.
265             *
266             * @return the user local service
267             */
268            public com.liferay.portal.service.UserLocalService getUserLocalService() {
269                    return userLocalService;
270            }
271    
272            /**
273             * Sets the user local service.
274             *
275             * @param userLocalService the user local service
276             */
277            public void setUserLocalService(
278                    com.liferay.portal.service.UserLocalService userLocalService) {
279                    this.userLocalService = userLocalService;
280            }
281    
282            /**
283             * Returns the user remote service.
284             *
285             * @return the user remote service
286             */
287            public com.liferay.portal.service.UserService getUserService() {
288                    return userService;
289            }
290    
291            /**
292             * Sets the user remote service.
293             *
294             * @param userService the user remote service
295             */
296            public void setUserService(
297                    com.liferay.portal.service.UserService userService) {
298                    this.userService = userService;
299            }
300    
301            /**
302             * Returns the user persistence.
303             *
304             * @return the user persistence
305             */
306            public UserPersistence getUserPersistence() {
307                    return userPersistence;
308            }
309    
310            /**
311             * Sets the user persistence.
312             *
313             * @param userPersistence the user persistence
314             */
315            public void setUserPersistence(UserPersistence userPersistence) {
316                    this.userPersistence = userPersistence;
317            }
318    
319            /**
320             * Returns the user finder.
321             *
322             * @return the user finder
323             */
324            public UserFinder getUserFinder() {
325                    return userFinder;
326            }
327    
328            /**
329             * Sets the user finder.
330             *
331             * @param userFinder the user finder
332             */
333            public void setUserFinder(UserFinder userFinder) {
334                    this.userFinder = userFinder;
335            }
336    
337            public void afterPropertiesSet() {
338            }
339    
340            public void destroy() {
341            }
342    
343            /**
344             * Returns the OSGi service identifier.
345             *
346             * @return the OSGi service identifier
347             */
348            @Override
349            public String getOSGiServiceIdentifier() {
350                    return PluginSettingService.class.getName();
351            }
352    
353            protected Class<?> getModelClass() {
354                    return PluginSetting.class;
355            }
356    
357            protected String getModelClassName() {
358                    return PluginSetting.class.getName();
359            }
360    
361            /**
362             * Performs a SQL query.
363             *
364             * @param sql the sql query
365             */
366            protected void runSQL(String sql) {
367                    try {
368                            DataSource dataSource = pluginSettingPersistence.getDataSource();
369    
370                            DB db = DBManagerUtil.getDB();
371    
372                            sql = db.buildSQL(sql);
373                            sql = PortalUtil.transformSQL(sql);
374    
375                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
376                                            sql, new int[0]);
377    
378                            sqlUpdate.update();
379                    }
380                    catch (Exception e) {
381                            throw new SystemException(e);
382                    }
383            }
384    
385            @BeanReference(type = com.liferay.portal.service.PluginSettingLocalService.class)
386            protected com.liferay.portal.service.PluginSettingLocalService pluginSettingLocalService;
387            @BeanReference(type = com.liferay.portal.service.PluginSettingService.class)
388            protected PluginSettingService pluginSettingService;
389            @BeanReference(type = PluginSettingPersistence.class)
390            protected PluginSettingPersistence pluginSettingPersistence;
391            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
392            protected com.liferay.counter.service.CounterLocalService counterLocalService;
393            @BeanReference(type = com.liferay.portal.service.LayoutTemplateLocalService.class)
394            protected com.liferay.portal.service.LayoutTemplateLocalService layoutTemplateLocalService;
395            @BeanReference(type = com.liferay.portal.service.RoleLocalService.class)
396            protected com.liferay.portal.service.RoleLocalService roleLocalService;
397            @BeanReference(type = com.liferay.portal.service.RoleService.class)
398            protected com.liferay.portal.service.RoleService roleService;
399            @BeanReference(type = RolePersistence.class)
400            protected RolePersistence rolePersistence;
401            @BeanReference(type = RoleFinder.class)
402            protected RoleFinder roleFinder;
403            @BeanReference(type = com.liferay.portal.service.ThemeLocalService.class)
404            protected com.liferay.portal.service.ThemeLocalService themeLocalService;
405            @BeanReference(type = com.liferay.portal.service.ThemeService.class)
406            protected com.liferay.portal.service.ThemeService themeService;
407            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
408            protected com.liferay.portal.service.UserLocalService userLocalService;
409            @BeanReference(type = com.liferay.portal.service.UserService.class)
410            protected com.liferay.portal.service.UserService userService;
411            @BeanReference(type = UserPersistence.class)
412            protected UserPersistence userPersistence;
413            @BeanReference(type = UserFinder.class)
414            protected UserFinder userFinder;
415    }