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.bean.IdentifiableBean;
019    import com.liferay.portal.kernel.dao.db.DB;
020    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.exception.SystemException;
024    import com.liferay.portal.kernel.util.InfrastructureUtil;
025    import com.liferay.portal.service.BaseServiceImpl;
026    import com.liferay.portal.service.persistence.RepositoryEntryPersistence;
027    import com.liferay.portal.service.persistence.RepositoryPersistence;
028    import com.liferay.portal.service.persistence.SubscriptionPersistence;
029    import com.liferay.portal.util.PortalUtil;
030    
031    import com.liferay.portlet.documentlibrary.service.DLAppService;
032    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryMetadataFinder;
033    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryMetadataPersistence;
034    import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankFinder;
035    import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankPersistence;
036    import com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinder;
037    import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence;
038    
039    import javax.sql.DataSource;
040    
041    /**
042     * Provides the base implementation for the d l app remote 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.documentlibrary.service.impl.DLAppServiceImpl}.
046     * </p>
047     *
048     * @author Brian Wing Shun Chan
049     * @see com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl
050     * @see com.liferay.portlet.documentlibrary.service.DLAppServiceUtil
051     * @generated
052     */
053    public abstract class DLAppServiceBaseImpl extends BaseServiceImpl
054            implements DLAppService, IdentifiableBean {
055            /*
056             * NOTE FOR DEVELOPERS:
057             *
058             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.documentlibrary.service.DLAppServiceUtil} to access the d l app remote service.
059             */
060    
061            /**
062             * Returns the d l app local service.
063             *
064             * @return the d l app local service
065             */
066            public com.liferay.portlet.documentlibrary.service.DLAppLocalService getDLAppLocalService() {
067                    return dlAppLocalService;
068            }
069    
070            /**
071             * Sets the d l app local service.
072             *
073             * @param dlAppLocalService the d l app local service
074             */
075            public void setDLAppLocalService(
076                    com.liferay.portlet.documentlibrary.service.DLAppLocalService dlAppLocalService) {
077                    this.dlAppLocalService = dlAppLocalService;
078            }
079    
080            /**
081             * Returns the d l app remote service.
082             *
083             * @return the d l app remote service
084             */
085            public DLAppService getDLAppService() {
086                    return dlAppService;
087            }
088    
089            /**
090             * Sets the d l app remote service.
091             *
092             * @param dlAppService the d l app remote service
093             */
094            public void setDLAppService(DLAppService dlAppService) {
095                    this.dlAppService = dlAppService;
096            }
097    
098            /**
099             * Returns the counter local service.
100             *
101             * @return the counter local service
102             */
103            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
104                    return counterLocalService;
105            }
106    
107            /**
108             * Sets the counter local service.
109             *
110             * @param counterLocalService the counter local service
111             */
112            public void setCounterLocalService(
113                    com.liferay.counter.service.CounterLocalService counterLocalService) {
114                    this.counterLocalService = counterLocalService;
115            }
116    
117            /**
118             * Returns the repository local service.
119             *
120             * @return the repository local service
121             */
122            public com.liferay.portal.service.RepositoryLocalService getRepositoryLocalService() {
123                    return repositoryLocalService;
124            }
125    
126            /**
127             * Sets the repository local service.
128             *
129             * @param repositoryLocalService the repository local service
130             */
131            public void setRepositoryLocalService(
132                    com.liferay.portal.service.RepositoryLocalService repositoryLocalService) {
133                    this.repositoryLocalService = repositoryLocalService;
134            }
135    
136            /**
137             * Returns the repository remote service.
138             *
139             * @return the repository remote service
140             */
141            public com.liferay.portal.service.RepositoryService getRepositoryService() {
142                    return repositoryService;
143            }
144    
145            /**
146             * Sets the repository remote service.
147             *
148             * @param repositoryService the repository remote service
149             */
150            public void setRepositoryService(
151                    com.liferay.portal.service.RepositoryService repositoryService) {
152                    this.repositoryService = repositoryService;
153            }
154    
155            /**
156             * Returns the repository persistence.
157             *
158             * @return the repository persistence
159             */
160            public RepositoryPersistence getRepositoryPersistence() {
161                    return repositoryPersistence;
162            }
163    
164            /**
165             * Sets the repository persistence.
166             *
167             * @param repositoryPersistence the repository persistence
168             */
169            public void setRepositoryPersistence(
170                    RepositoryPersistence repositoryPersistence) {
171                    this.repositoryPersistence = repositoryPersistence;
172            }
173    
174            /**
175             * Returns the repository entry local service.
176             *
177             * @return the repository entry local service
178             */
179            public com.liferay.portal.service.RepositoryEntryLocalService getRepositoryEntryLocalService() {
180                    return repositoryEntryLocalService;
181            }
182    
183            /**
184             * Sets the repository entry local service.
185             *
186             * @param repositoryEntryLocalService the repository entry local service
187             */
188            public void setRepositoryEntryLocalService(
189                    com.liferay.portal.service.RepositoryEntryLocalService repositoryEntryLocalService) {
190                    this.repositoryEntryLocalService = repositoryEntryLocalService;
191            }
192    
193            /**
194             * Returns the repository entry persistence.
195             *
196             * @return the repository entry persistence
197             */
198            public RepositoryEntryPersistence getRepositoryEntryPersistence() {
199                    return repositoryEntryPersistence;
200            }
201    
202            /**
203             * Sets the repository entry persistence.
204             *
205             * @param repositoryEntryPersistence the repository entry persistence
206             */
207            public void setRepositoryEntryPersistence(
208                    RepositoryEntryPersistence repositoryEntryPersistence) {
209                    this.repositoryEntryPersistence = repositoryEntryPersistence;
210            }
211    
212            /**
213             * Returns the subscription local service.
214             *
215             * @return the subscription local service
216             */
217            public com.liferay.portal.service.SubscriptionLocalService getSubscriptionLocalService() {
218                    return subscriptionLocalService;
219            }
220    
221            /**
222             * Sets the subscription local service.
223             *
224             * @param subscriptionLocalService the subscription local service
225             */
226            public void setSubscriptionLocalService(
227                    com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService) {
228                    this.subscriptionLocalService = subscriptionLocalService;
229            }
230    
231            /**
232             * Returns the subscription persistence.
233             *
234             * @return the subscription persistence
235             */
236            public SubscriptionPersistence getSubscriptionPersistence() {
237                    return subscriptionPersistence;
238            }
239    
240            /**
241             * Sets the subscription persistence.
242             *
243             * @param subscriptionPersistence the subscription persistence
244             */
245            public void setSubscriptionPersistence(
246                    SubscriptionPersistence subscriptionPersistence) {
247                    this.subscriptionPersistence = subscriptionPersistence;
248            }
249    
250            /**
251             * Returns the d l app helper local service.
252             *
253             * @return the d l app helper local service
254             */
255            public com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService getDLAppHelperLocalService() {
256                    return dlAppHelperLocalService;
257            }
258    
259            /**
260             * Sets the d l app helper local service.
261             *
262             * @param dlAppHelperLocalService the d l app helper local service
263             */
264            public void setDLAppHelperLocalService(
265                    com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService dlAppHelperLocalService) {
266                    this.dlAppHelperLocalService = dlAppHelperLocalService;
267            }
268    
269            /**
270             * Returns the document library file entry metadata local service.
271             *
272             * @return the document library file entry metadata local service
273             */
274            public com.liferay.portlet.documentlibrary.service.DLFileEntryMetadataLocalService getDLFileEntryMetadataLocalService() {
275                    return dlFileEntryMetadataLocalService;
276            }
277    
278            /**
279             * Sets the document library file entry metadata local service.
280             *
281             * @param dlFileEntryMetadataLocalService the document library file entry metadata local service
282             */
283            public void setDLFileEntryMetadataLocalService(
284                    com.liferay.portlet.documentlibrary.service.DLFileEntryMetadataLocalService dlFileEntryMetadataLocalService) {
285                    this.dlFileEntryMetadataLocalService = dlFileEntryMetadataLocalService;
286            }
287    
288            /**
289             * Returns the document library file entry metadata persistence.
290             *
291             * @return the document library file entry metadata persistence
292             */
293            public DLFileEntryMetadataPersistence getDLFileEntryMetadataPersistence() {
294                    return dlFileEntryMetadataPersistence;
295            }
296    
297            /**
298             * Sets the document library file entry metadata persistence.
299             *
300             * @param dlFileEntryMetadataPersistence the document library file entry metadata persistence
301             */
302            public void setDLFileEntryMetadataPersistence(
303                    DLFileEntryMetadataPersistence dlFileEntryMetadataPersistence) {
304                    this.dlFileEntryMetadataPersistence = dlFileEntryMetadataPersistence;
305            }
306    
307            /**
308             * Returns the document library file entry metadata finder.
309             *
310             * @return the document library file entry metadata finder
311             */
312            public DLFileEntryMetadataFinder getDLFileEntryMetadataFinder() {
313                    return dlFileEntryMetadataFinder;
314            }
315    
316            /**
317             * Sets the document library file entry metadata finder.
318             *
319             * @param dlFileEntryMetadataFinder the document library file entry metadata finder
320             */
321            public void setDLFileEntryMetadataFinder(
322                    DLFileEntryMetadataFinder dlFileEntryMetadataFinder) {
323                    this.dlFileEntryMetadataFinder = dlFileEntryMetadataFinder;
324            }
325    
326            /**
327             * Returns the document library file rank local service.
328             *
329             * @return the document library file rank local service
330             */
331            public com.liferay.portlet.documentlibrary.service.DLFileRankLocalService getDLFileRankLocalService() {
332                    return dlFileRankLocalService;
333            }
334    
335            /**
336             * Sets the document library file rank local service.
337             *
338             * @param dlFileRankLocalService the document library file rank local service
339             */
340            public void setDLFileRankLocalService(
341                    com.liferay.portlet.documentlibrary.service.DLFileRankLocalService dlFileRankLocalService) {
342                    this.dlFileRankLocalService = dlFileRankLocalService;
343            }
344    
345            /**
346             * Returns the document library file rank persistence.
347             *
348             * @return the document library file rank persistence
349             */
350            public DLFileRankPersistence getDLFileRankPersistence() {
351                    return dlFileRankPersistence;
352            }
353    
354            /**
355             * Sets the document library file rank persistence.
356             *
357             * @param dlFileRankPersistence the document library file rank persistence
358             */
359            public void setDLFileRankPersistence(
360                    DLFileRankPersistence dlFileRankPersistence) {
361                    this.dlFileRankPersistence = dlFileRankPersistence;
362            }
363    
364            /**
365             * Returns the document library file rank finder.
366             *
367             * @return the document library file rank finder
368             */
369            public DLFileRankFinder getDLFileRankFinder() {
370                    return dlFileRankFinder;
371            }
372    
373            /**
374             * Sets the document library file rank finder.
375             *
376             * @param dlFileRankFinder the document library file rank finder
377             */
378            public void setDLFileRankFinder(DLFileRankFinder dlFileRankFinder) {
379                    this.dlFileRankFinder = dlFileRankFinder;
380            }
381    
382            /**
383             * Returns the document library folder local service.
384             *
385             * @return the document library folder local service
386             */
387            public com.liferay.portlet.documentlibrary.service.DLFolderLocalService getDLFolderLocalService() {
388                    return dlFolderLocalService;
389            }
390    
391            /**
392             * Sets the document library folder local service.
393             *
394             * @param dlFolderLocalService the document library folder local service
395             */
396            public void setDLFolderLocalService(
397                    com.liferay.portlet.documentlibrary.service.DLFolderLocalService dlFolderLocalService) {
398                    this.dlFolderLocalService = dlFolderLocalService;
399            }
400    
401            /**
402             * Returns the document library folder remote service.
403             *
404             * @return the document library folder remote service
405             */
406            public com.liferay.portlet.documentlibrary.service.DLFolderService getDLFolderService() {
407                    return dlFolderService;
408            }
409    
410            /**
411             * Sets the document library folder remote service.
412             *
413             * @param dlFolderService the document library folder remote service
414             */
415            public void setDLFolderService(
416                    com.liferay.portlet.documentlibrary.service.DLFolderService dlFolderService) {
417                    this.dlFolderService = dlFolderService;
418            }
419    
420            /**
421             * Returns the document library folder persistence.
422             *
423             * @return the document library folder persistence
424             */
425            public DLFolderPersistence getDLFolderPersistence() {
426                    return dlFolderPersistence;
427            }
428    
429            /**
430             * Sets the document library folder persistence.
431             *
432             * @param dlFolderPersistence the document library folder persistence
433             */
434            public void setDLFolderPersistence(DLFolderPersistence dlFolderPersistence) {
435                    this.dlFolderPersistence = dlFolderPersistence;
436            }
437    
438            /**
439             * Returns the document library folder finder.
440             *
441             * @return the document library folder finder
442             */
443            public DLFolderFinder getDLFolderFinder() {
444                    return dlFolderFinder;
445            }
446    
447            /**
448             * Sets the document library folder finder.
449             *
450             * @param dlFolderFinder the document library folder finder
451             */
452            public void setDLFolderFinder(DLFolderFinder dlFolderFinder) {
453                    this.dlFolderFinder = dlFolderFinder;
454            }
455    
456            public void afterPropertiesSet() {
457            }
458    
459            public void destroy() {
460            }
461    
462            /**
463             * Returns the Spring bean ID for this bean.
464             *
465             * @return the Spring bean ID for this bean
466             */
467            @Override
468            public String getBeanIdentifier() {
469                    return _beanIdentifier;
470            }
471    
472            /**
473             * Sets the Spring bean ID for this bean.
474             *
475             * @param beanIdentifier the Spring bean ID for this bean
476             */
477            @Override
478            public void setBeanIdentifier(String beanIdentifier) {
479                    _beanIdentifier = beanIdentifier;
480            }
481    
482            /**
483             * Performs a SQL query.
484             *
485             * @param sql the sql query
486             */
487            protected void runSQL(String sql) {
488                    try {
489                            DataSource dataSource = InfrastructureUtil.getDataSource();
490    
491                            DB db = DBFactoryUtil.getDB();
492    
493                            sql = db.buildSQL(sql);
494                            sql = PortalUtil.transformSQL(sql);
495    
496                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
497                                            sql, new int[0]);
498    
499                            sqlUpdate.update();
500                    }
501                    catch (Exception e) {
502                            throw new SystemException(e);
503                    }
504            }
505    
506            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLAppLocalService.class)
507            protected com.liferay.portlet.documentlibrary.service.DLAppLocalService dlAppLocalService;
508            @BeanReference(type = DLAppService.class)
509            protected DLAppService dlAppService;
510            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
511            protected com.liferay.counter.service.CounterLocalService counterLocalService;
512            @BeanReference(type = com.liferay.portal.service.RepositoryLocalService.class)
513            protected com.liferay.portal.service.RepositoryLocalService repositoryLocalService;
514            @BeanReference(type = com.liferay.portal.service.RepositoryService.class)
515            protected com.liferay.portal.service.RepositoryService repositoryService;
516            @BeanReference(type = RepositoryPersistence.class)
517            protected RepositoryPersistence repositoryPersistence;
518            @BeanReference(type = com.liferay.portal.service.RepositoryEntryLocalService.class)
519            protected com.liferay.portal.service.RepositoryEntryLocalService repositoryEntryLocalService;
520            @BeanReference(type = RepositoryEntryPersistence.class)
521            protected RepositoryEntryPersistence repositoryEntryPersistence;
522            @BeanReference(type = com.liferay.portal.service.SubscriptionLocalService.class)
523            protected com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService;
524            @BeanReference(type = SubscriptionPersistence.class)
525            protected SubscriptionPersistence subscriptionPersistence;
526            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService.class)
527            protected com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService dlAppHelperLocalService;
528            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryMetadataLocalService.class)
529            protected com.liferay.portlet.documentlibrary.service.DLFileEntryMetadataLocalService dlFileEntryMetadataLocalService;
530            @BeanReference(type = DLFileEntryMetadataPersistence.class)
531            protected DLFileEntryMetadataPersistence dlFileEntryMetadataPersistence;
532            @BeanReference(type = DLFileEntryMetadataFinder.class)
533            protected DLFileEntryMetadataFinder dlFileEntryMetadataFinder;
534            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileRankLocalService.class)
535            protected com.liferay.portlet.documentlibrary.service.DLFileRankLocalService dlFileRankLocalService;
536            @BeanReference(type = DLFileRankPersistence.class)
537            protected DLFileRankPersistence dlFileRankPersistence;
538            @BeanReference(type = DLFileRankFinder.class)
539            protected DLFileRankFinder dlFileRankFinder;
540            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFolderLocalService.class)
541            protected com.liferay.portlet.documentlibrary.service.DLFolderLocalService dlFolderLocalService;
542            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFolderService.class)
543            protected com.liferay.portlet.documentlibrary.service.DLFolderService dlFolderService;
544            @BeanReference(type = DLFolderPersistence.class)
545            protected DLFolderPersistence dlFolderPersistence;
546            @BeanReference(type = DLFolderFinder.class)
547            protected DLFolderFinder dlFolderFinder;
548            private String _beanIdentifier;
549    }