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.documentlibrary.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.service.BaseServiceImpl;
025    import com.liferay.portal.util.PortalUtil;
026    
027    import com.liferay.portlet.documentlibrary.model.DLFileVersion;
028    import com.liferay.portlet.documentlibrary.service.DLFileVersionService;
029    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinder;
030    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryPersistence;
031    import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence;
032    import com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinder;
033    import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence;
034    
035    import javax.sql.DataSource;
036    
037    /**
038     * Provides the base implementation for the document library file version remote service.
039     *
040     * <p>
041     * 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.documentlibrary.service.impl.DLFileVersionServiceImpl}.
042     * </p>
043     *
044     * @author Brian Wing Shun Chan
045     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileVersionServiceImpl
046     * @see com.liferay.portlet.documentlibrary.service.DLFileVersionServiceUtil
047     * @generated
048     */
049    public abstract class DLFileVersionServiceBaseImpl extends BaseServiceImpl
050            implements DLFileVersionService, IdentifiableOSGiService {
051            /*
052             * NOTE FOR DEVELOPERS:
053             *
054             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.documentlibrary.service.DLFileVersionServiceUtil} to access the document library file version remote service.
055             */
056    
057            /**
058             * Returns the document library file version local service.
059             *
060             * @return the document library file version local service
061             */
062            public com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService getDLFileVersionLocalService() {
063                    return dlFileVersionLocalService;
064            }
065    
066            /**
067             * Sets the document library file version local service.
068             *
069             * @param dlFileVersionLocalService the document library file version local service
070             */
071            public void setDLFileVersionLocalService(
072                    com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService dlFileVersionLocalService) {
073                    this.dlFileVersionLocalService = dlFileVersionLocalService;
074            }
075    
076            /**
077             * Returns the document library file version remote service.
078             *
079             * @return the document library file version remote service
080             */
081            public DLFileVersionService getDLFileVersionService() {
082                    return dlFileVersionService;
083            }
084    
085            /**
086             * Sets the document library file version remote service.
087             *
088             * @param dlFileVersionService the document library file version remote service
089             */
090            public void setDLFileVersionService(
091                    DLFileVersionService dlFileVersionService) {
092                    this.dlFileVersionService = dlFileVersionService;
093            }
094    
095            /**
096             * Returns the document library file version persistence.
097             *
098             * @return the document library file version persistence
099             */
100            public DLFileVersionPersistence getDLFileVersionPersistence() {
101                    return dlFileVersionPersistence;
102            }
103    
104            /**
105             * Sets the document library file version persistence.
106             *
107             * @param dlFileVersionPersistence the document library file version persistence
108             */
109            public void setDLFileVersionPersistence(
110                    DLFileVersionPersistence dlFileVersionPersistence) {
111                    this.dlFileVersionPersistence = dlFileVersionPersistence;
112            }
113    
114            /**
115             * Returns the counter local service.
116             *
117             * @return the counter local service
118             */
119            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
120                    return counterLocalService;
121            }
122    
123            /**
124             * Sets the counter local service.
125             *
126             * @param counterLocalService the counter local service
127             */
128            public void setCounterLocalService(
129                    com.liferay.counter.service.CounterLocalService counterLocalService) {
130                    this.counterLocalService = counterLocalService;
131            }
132    
133            /**
134             * Returns the document library file entry local service.
135             *
136             * @return the document library file entry local service
137             */
138            public com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService getDLFileEntryLocalService() {
139                    return dlFileEntryLocalService;
140            }
141    
142            /**
143             * Sets the document library file entry local service.
144             *
145             * @param dlFileEntryLocalService the document library file entry local service
146             */
147            public void setDLFileEntryLocalService(
148                    com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService dlFileEntryLocalService) {
149                    this.dlFileEntryLocalService = dlFileEntryLocalService;
150            }
151    
152            /**
153             * Returns the document library file entry remote service.
154             *
155             * @return the document library file entry remote service
156             */
157            public com.liferay.portlet.documentlibrary.service.DLFileEntryService getDLFileEntryService() {
158                    return dlFileEntryService;
159            }
160    
161            /**
162             * Sets the document library file entry remote service.
163             *
164             * @param dlFileEntryService the document library file entry remote service
165             */
166            public void setDLFileEntryService(
167                    com.liferay.portlet.documentlibrary.service.DLFileEntryService dlFileEntryService) {
168                    this.dlFileEntryService = dlFileEntryService;
169            }
170    
171            /**
172             * Returns the document library file entry persistence.
173             *
174             * @return the document library file entry persistence
175             */
176            public DLFileEntryPersistence getDLFileEntryPersistence() {
177                    return dlFileEntryPersistence;
178            }
179    
180            /**
181             * Sets the document library file entry persistence.
182             *
183             * @param dlFileEntryPersistence the document library file entry persistence
184             */
185            public void setDLFileEntryPersistence(
186                    DLFileEntryPersistence dlFileEntryPersistence) {
187                    this.dlFileEntryPersistence = dlFileEntryPersistence;
188            }
189    
190            /**
191             * Returns the document library file entry finder.
192             *
193             * @return the document library file entry finder
194             */
195            public DLFileEntryFinder getDLFileEntryFinder() {
196                    return dlFileEntryFinder;
197            }
198    
199            /**
200             * Sets the document library file entry finder.
201             *
202             * @param dlFileEntryFinder the document library file entry finder
203             */
204            public void setDLFileEntryFinder(DLFileEntryFinder dlFileEntryFinder) {
205                    this.dlFileEntryFinder = dlFileEntryFinder;
206            }
207    
208            /**
209             * Returns the document library folder local service.
210             *
211             * @return the document library folder local service
212             */
213            public com.liferay.portlet.documentlibrary.service.DLFolderLocalService getDLFolderLocalService() {
214                    return dlFolderLocalService;
215            }
216    
217            /**
218             * Sets the document library folder local service.
219             *
220             * @param dlFolderLocalService the document library folder local service
221             */
222            public void setDLFolderLocalService(
223                    com.liferay.portlet.documentlibrary.service.DLFolderLocalService dlFolderLocalService) {
224                    this.dlFolderLocalService = dlFolderLocalService;
225            }
226    
227            /**
228             * Returns the document library folder remote service.
229             *
230             * @return the document library folder remote service
231             */
232            public com.liferay.portlet.documentlibrary.service.DLFolderService getDLFolderService() {
233                    return dlFolderService;
234            }
235    
236            /**
237             * Sets the document library folder remote service.
238             *
239             * @param dlFolderService the document library folder remote service
240             */
241            public void setDLFolderService(
242                    com.liferay.portlet.documentlibrary.service.DLFolderService dlFolderService) {
243                    this.dlFolderService = dlFolderService;
244            }
245    
246            /**
247             * Returns the document library folder persistence.
248             *
249             * @return the document library folder persistence
250             */
251            public DLFolderPersistence getDLFolderPersistence() {
252                    return dlFolderPersistence;
253            }
254    
255            /**
256             * Sets the document library folder persistence.
257             *
258             * @param dlFolderPersistence the document library folder persistence
259             */
260            public void setDLFolderPersistence(DLFolderPersistence dlFolderPersistence) {
261                    this.dlFolderPersistence = dlFolderPersistence;
262            }
263    
264            /**
265             * Returns the document library folder finder.
266             *
267             * @return the document library folder finder
268             */
269            public DLFolderFinder getDLFolderFinder() {
270                    return dlFolderFinder;
271            }
272    
273            /**
274             * Sets the document library folder finder.
275             *
276             * @param dlFolderFinder the document library folder finder
277             */
278            public void setDLFolderFinder(DLFolderFinder dlFolderFinder) {
279                    this.dlFolderFinder = dlFolderFinder;
280            }
281    
282            public void afterPropertiesSet() {
283            }
284    
285            public void destroy() {
286            }
287    
288            /**
289             * Returns the OSGi service identifier.
290             *
291             * @return the OSGi service identifier
292             */
293            @Override
294            public String getOSGiServiceIdentifier() {
295                    return DLFileVersionService.class.getName();
296            }
297    
298            protected Class<?> getModelClass() {
299                    return DLFileVersion.class;
300            }
301    
302            protected String getModelClassName() {
303                    return DLFileVersion.class.getName();
304            }
305    
306            /**
307             * Performs a SQL query.
308             *
309             * @param sql the sql query
310             */
311            protected void runSQL(String sql) {
312                    try {
313                            DataSource dataSource = dlFileVersionPersistence.getDataSource();
314    
315                            DB db = DBManagerUtil.getDB();
316    
317                            sql = db.buildSQL(sql);
318                            sql = PortalUtil.transformSQL(sql);
319    
320                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
321                                            sql, new int[0]);
322    
323                            sqlUpdate.update();
324                    }
325                    catch (Exception e) {
326                            throw new SystemException(e);
327                    }
328            }
329    
330            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService.class)
331            protected com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService dlFileVersionLocalService;
332            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileVersionService.class)
333            protected DLFileVersionService dlFileVersionService;
334            @BeanReference(type = DLFileVersionPersistence.class)
335            protected DLFileVersionPersistence dlFileVersionPersistence;
336            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
337            protected com.liferay.counter.service.CounterLocalService counterLocalService;
338            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService.class)
339            protected com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService dlFileEntryLocalService;
340            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryService.class)
341            protected com.liferay.portlet.documentlibrary.service.DLFileEntryService dlFileEntryService;
342            @BeanReference(type = DLFileEntryPersistence.class)
343            protected DLFileEntryPersistence dlFileEntryPersistence;
344            @BeanReference(type = DLFileEntryFinder.class)
345            protected DLFileEntryFinder dlFileEntryFinder;
346            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFolderLocalService.class)
347            protected com.liferay.portlet.documentlibrary.service.DLFolderLocalService dlFolderLocalService;
348            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFolderService.class)
349            protected com.liferay.portlet.documentlibrary.service.DLFolderService dlFolderService;
350            @BeanReference(type = DLFolderPersistence.class)
351            protected DLFolderPersistence dlFolderPersistence;
352            @BeanReference(type = DLFolderFinder.class)
353            protected DLFolderFinder dlFolderFinder;
354    }