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