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.portlet.exportimport.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.persistence.ClassNamePersistence;
029    import com.liferay.portal.service.persistence.LayoutFinder;
030    import com.liferay.portal.service.persistence.LayoutPersistence;
031    import com.liferay.portal.service.persistence.UserFinder;
032    import com.liferay.portal.service.persistence.UserPersistence;
033    import com.liferay.portal.util.PortalUtil;
034    
035    import com.liferay.portlet.exportimport.service.ExportImportLocalService;
036    import com.liferay.portlet.exportimport.service.persistence.ExportImportConfigurationFinder;
037    import com.liferay.portlet.exportimport.service.persistence.ExportImportConfigurationPersistence;
038    
039    import javax.sql.DataSource;
040    
041    /**
042     * Provides the base implementation for the export import local service.
043     *
044     * <p>
045     * 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.portlet.exportimport.service.impl.ExportImportLocalServiceImpl}.
046     * </p>
047     *
048     * @author Brian Wing Shun Chan
049     * @see com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl
050     * @see com.liferay.portlet.exportimport.service.ExportImportLocalServiceUtil
051     * @generated
052     */
053    @ProviderType
054    public abstract class ExportImportLocalServiceBaseImpl
055            extends BaseLocalServiceImpl implements ExportImportLocalService,
056                    IdentifiableOSGiService {
057            /*
058             * NOTE FOR DEVELOPERS:
059             *
060             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.exportimport.service.ExportImportLocalServiceUtil} to access the export import local service.
061             */
062    
063            /**
064             * Returns the export import local service.
065             *
066             * @return the export import local service
067             */
068            public ExportImportLocalService getExportImportLocalService() {
069                    return exportImportLocalService;
070            }
071    
072            /**
073             * Sets the export import local service.
074             *
075             * @param exportImportLocalService the export import local service
076             */
077            public void setExportImportLocalService(
078                    ExportImportLocalService exportImportLocalService) {
079                    this.exportImportLocalService = exportImportLocalService;
080            }
081    
082            /**
083             * Returns the export import configuration local service.
084             *
085             * @return the export import configuration local service
086             */
087            public com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalService getExportImportConfigurationLocalService() {
088                    return exportImportConfigurationLocalService;
089            }
090    
091            /**
092             * Sets the export import configuration local service.
093             *
094             * @param exportImportConfigurationLocalService the export import configuration local service
095             */
096            public void setExportImportConfigurationLocalService(
097                    com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalService exportImportConfigurationLocalService) {
098                    this.exportImportConfigurationLocalService = exportImportConfigurationLocalService;
099            }
100    
101            /**
102             * Returns the export import configuration persistence.
103             *
104             * @return the export import configuration persistence
105             */
106            public ExportImportConfigurationPersistence getExportImportConfigurationPersistence() {
107                    return exportImportConfigurationPersistence;
108            }
109    
110            /**
111             * Sets the export import configuration persistence.
112             *
113             * @param exportImportConfigurationPersistence the export import configuration persistence
114             */
115            public void setExportImportConfigurationPersistence(
116                    ExportImportConfigurationPersistence exportImportConfigurationPersistence) {
117                    this.exportImportConfigurationPersistence = exportImportConfigurationPersistence;
118            }
119    
120            /**
121             * Returns the export import configuration finder.
122             *
123             * @return the export import configuration finder
124             */
125            public ExportImportConfigurationFinder getExportImportConfigurationFinder() {
126                    return exportImportConfigurationFinder;
127            }
128    
129            /**
130             * Sets the export import configuration finder.
131             *
132             * @param exportImportConfigurationFinder the export import configuration finder
133             */
134            public void setExportImportConfigurationFinder(
135                    ExportImportConfigurationFinder exportImportConfigurationFinder) {
136                    this.exportImportConfigurationFinder = exportImportConfigurationFinder;
137            }
138    
139            /**
140             * Returns the staging local service.
141             *
142             * @return the staging local service
143             */
144            public com.liferay.portlet.exportimport.service.StagingLocalService getStagingLocalService() {
145                    return stagingLocalService;
146            }
147    
148            /**
149             * Sets the staging local service.
150             *
151             * @param stagingLocalService the staging local service
152             */
153            public void setStagingLocalService(
154                    com.liferay.portlet.exportimport.service.StagingLocalService stagingLocalService) {
155                    this.stagingLocalService = stagingLocalService;
156            }
157    
158            /**
159             * Returns the counter local service.
160             *
161             * @return the counter local service
162             */
163            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
164                    return counterLocalService;
165            }
166    
167            /**
168             * Sets the counter local service.
169             *
170             * @param counterLocalService the counter local service
171             */
172            public void setCounterLocalService(
173                    com.liferay.counter.service.CounterLocalService counterLocalService) {
174                    this.counterLocalService = counterLocalService;
175            }
176    
177            /**
178             * Returns the class name local service.
179             *
180             * @return the class name local service
181             */
182            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
183                    return classNameLocalService;
184            }
185    
186            /**
187             * Sets the class name local service.
188             *
189             * @param classNameLocalService the class name local service
190             */
191            public void setClassNameLocalService(
192                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
193                    this.classNameLocalService = classNameLocalService;
194            }
195    
196            /**
197             * Returns the class name persistence.
198             *
199             * @return the class name persistence
200             */
201            public ClassNamePersistence getClassNamePersistence() {
202                    return classNamePersistence;
203            }
204    
205            /**
206             * Sets the class name persistence.
207             *
208             * @param classNamePersistence the class name persistence
209             */
210            public void setClassNamePersistence(
211                    ClassNamePersistence classNamePersistence) {
212                    this.classNamePersistence = classNamePersistence;
213            }
214    
215            /**
216             * Returns the layout local service.
217             *
218             * @return the layout local service
219             */
220            public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() {
221                    return layoutLocalService;
222            }
223    
224            /**
225             * Sets the layout local service.
226             *
227             * @param layoutLocalService the layout local service
228             */
229            public void setLayoutLocalService(
230                    com.liferay.portal.service.LayoutLocalService layoutLocalService) {
231                    this.layoutLocalService = layoutLocalService;
232            }
233    
234            /**
235             * Returns the layout persistence.
236             *
237             * @return the layout persistence
238             */
239            public LayoutPersistence getLayoutPersistence() {
240                    return layoutPersistence;
241            }
242    
243            /**
244             * Sets the layout persistence.
245             *
246             * @param layoutPersistence the layout persistence
247             */
248            public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
249                    this.layoutPersistence = layoutPersistence;
250            }
251    
252            /**
253             * Returns the layout finder.
254             *
255             * @return the layout finder
256             */
257            public LayoutFinder getLayoutFinder() {
258                    return layoutFinder;
259            }
260    
261            /**
262             * Sets the layout finder.
263             *
264             * @param layoutFinder the layout finder
265             */
266            public void setLayoutFinder(LayoutFinder layoutFinder) {
267                    this.layoutFinder = layoutFinder;
268            }
269    
270            /**
271             * Returns the resource local service.
272             *
273             * @return the resource local service
274             */
275            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
276                    return resourceLocalService;
277            }
278    
279            /**
280             * Sets the resource local service.
281             *
282             * @param resourceLocalService the resource local service
283             */
284            public void setResourceLocalService(
285                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
286                    this.resourceLocalService = resourceLocalService;
287            }
288    
289            /**
290             * Returns the user local service.
291             *
292             * @return the user local service
293             */
294            public com.liferay.portal.service.UserLocalService getUserLocalService() {
295                    return userLocalService;
296            }
297    
298            /**
299             * Sets the user local service.
300             *
301             * @param userLocalService the user local service
302             */
303            public void setUserLocalService(
304                    com.liferay.portal.service.UserLocalService userLocalService) {
305                    this.userLocalService = userLocalService;
306            }
307    
308            /**
309             * Returns the user persistence.
310             *
311             * @return the user persistence
312             */
313            public UserPersistence getUserPersistence() {
314                    return userPersistence;
315            }
316    
317            /**
318             * Sets the user persistence.
319             *
320             * @param userPersistence the user persistence
321             */
322            public void setUserPersistence(UserPersistence userPersistence) {
323                    this.userPersistence = userPersistence;
324            }
325    
326            /**
327             * Returns the user finder.
328             *
329             * @return the user finder
330             */
331            public UserFinder getUserFinder() {
332                    return userFinder;
333            }
334    
335            /**
336             * Sets the user finder.
337             *
338             * @param userFinder the user finder
339             */
340            public void setUserFinder(UserFinder userFinder) {
341                    this.userFinder = userFinder;
342            }
343    
344            public void afterPropertiesSet() {
345            }
346    
347            public void destroy() {
348            }
349    
350            /**
351             * Returns the OSGi service identifier.
352             *
353             * @return the OSGi service identifier
354             */
355            @Override
356            public String getOSGiServiceIdentifier() {
357                    return ExportImportLocalService.class.getName();
358            }
359    
360            /**
361             * Performs a SQL query.
362             *
363             * @param sql the sql query
364             */
365            protected void runSQL(String sql) {
366                    try {
367                            DataSource dataSource = InfrastructureUtil.getDataSource();
368    
369                            DB db = DBManagerUtil.getDB();
370    
371                            sql = db.buildSQL(sql);
372                            sql = PortalUtil.transformSQL(sql);
373    
374                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
375                                            sql, new int[0]);
376    
377                            sqlUpdate.update();
378                    }
379                    catch (Exception e) {
380                            throw new SystemException(e);
381                    }
382            }
383    
384            @BeanReference(type = com.liferay.portlet.exportimport.service.ExportImportLocalService.class)
385            protected ExportImportLocalService exportImportLocalService;
386            @BeanReference(type = com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalService.class)
387            protected com.liferay.portlet.exportimport.service.ExportImportConfigurationLocalService exportImportConfigurationLocalService;
388            @BeanReference(type = ExportImportConfigurationPersistence.class)
389            protected ExportImportConfigurationPersistence exportImportConfigurationPersistence;
390            @BeanReference(type = ExportImportConfigurationFinder.class)
391            protected ExportImportConfigurationFinder exportImportConfigurationFinder;
392            @BeanReference(type = com.liferay.portlet.exportimport.service.StagingLocalService.class)
393            protected com.liferay.portlet.exportimport.service.StagingLocalService stagingLocalService;
394            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
395            protected com.liferay.counter.service.CounterLocalService counterLocalService;
396            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
397            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
398            @BeanReference(type = ClassNamePersistence.class)
399            protected ClassNamePersistence classNamePersistence;
400            @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class)
401            protected com.liferay.portal.service.LayoutLocalService layoutLocalService;
402            @BeanReference(type = LayoutPersistence.class)
403            protected LayoutPersistence layoutPersistence;
404            @BeanReference(type = LayoutFinder.class)
405            protected LayoutFinder layoutFinder;
406            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
407            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
408            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
409            protected com.liferay.portal.service.UserLocalService userLocalService;
410            @BeanReference(type = UserPersistence.class)
411            protected UserPersistence userPersistence;
412            @BeanReference(type = UserFinder.class)
413            protected UserFinder userFinder;
414    }