001    /**
002     * Copyright (c) 2000-2012 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.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.Session;
025    import com.liferay.portal.kernel.exception.PortalException;
026    import com.liferay.portal.kernel.exception.SystemException;
027    import com.liferay.portal.kernel.log.Log;
028    import com.liferay.portal.kernel.log.LogFactoryUtil;
029    import com.liferay.portal.kernel.search.Indexer;
030    import com.liferay.portal.kernel.search.IndexerRegistryUtil;
031    import com.liferay.portal.kernel.search.SearchException;
032    import com.liferay.portal.kernel.util.OrderByComparator;
033    import com.liferay.portal.model.PersistedModel;
034    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
035    import com.liferay.portal.service.ResourceLocalService;
036    import com.liferay.portal.service.ResourceService;
037    import com.liferay.portal.service.UserLocalService;
038    import com.liferay.portal.service.UserService;
039    import com.liferay.portal.service.persistence.ResourceFinder;
040    import com.liferay.portal.service.persistence.ResourcePersistence;
041    import com.liferay.portal.service.persistence.UserFinder;
042    import com.liferay.portal.service.persistence.UserPersistence;
043    
044    import com.liferay.portlet.documentlibrary.model.DLContent;
045    import com.liferay.portlet.documentlibrary.model.DLContentDataBlobModel;
046    import com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService;
047    import com.liferay.portlet.documentlibrary.service.DLAppLocalService;
048    import com.liferay.portlet.documentlibrary.service.DLAppService;
049    import com.liferay.portlet.documentlibrary.service.DLContentLocalService;
050    import com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService;
051    import com.liferay.portlet.documentlibrary.service.DLFileEntryMetadataLocalService;
052    import com.liferay.portlet.documentlibrary.service.DLFileEntryService;
053    import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService;
054    import com.liferay.portlet.documentlibrary.service.DLFileEntryTypeService;
055    import com.liferay.portlet.documentlibrary.service.DLFileRankLocalService;
056    import com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService;
057    import com.liferay.portlet.documentlibrary.service.DLFileShortcutService;
058    import com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService;
059    import com.liferay.portlet.documentlibrary.service.DLFileVersionService;
060    import com.liferay.portlet.documentlibrary.service.DLFolderLocalService;
061    import com.liferay.portlet.documentlibrary.service.DLFolderService;
062    import com.liferay.portlet.documentlibrary.service.DLSyncLocalService;
063    import com.liferay.portlet.documentlibrary.service.DLSyncService;
064    import com.liferay.portlet.documentlibrary.service.persistence.DLContentPersistence;
065    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinder;
066    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryMetadataPersistence;
067    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryPersistence;
068    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypeFinder;
069    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypePersistence;
070    import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankFinder;
071    import com.liferay.portlet.documentlibrary.service.persistence.DLFileRankPersistence;
072    import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutPersistence;
073    import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence;
074    import com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinder;
075    import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence;
076    import com.liferay.portlet.documentlibrary.service.persistence.DLSyncPersistence;
077    
078    import java.io.Serializable;
079    
080    import java.util.List;
081    
082    import javax.sql.DataSource;
083    
084    /**
085     * The base implementation of the document library content local service.
086     *
087     * <p>
088     * 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.DLContentLocalServiceImpl}.
089     * </p>
090     *
091     * @author Brian Wing Shun Chan
092     * @see com.liferay.portlet.documentlibrary.service.impl.DLContentLocalServiceImpl
093     * @see com.liferay.portlet.documentlibrary.service.DLContentLocalServiceUtil
094     * @generated
095     */
096    public abstract class DLContentLocalServiceBaseImpl
097            implements DLContentLocalService, IdentifiableBean {
098            /*
099             * NOTE FOR DEVELOPERS:
100             *
101             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.documentlibrary.service.DLContentLocalServiceUtil} to access the document library content local service.
102             */
103    
104            /**
105             * Adds the document library content to the database. Also notifies the appropriate model listeners.
106             *
107             * @param dlContent the document library content
108             * @return the document library content that was added
109             * @throws SystemException if a system exception occurred
110             */
111            public DLContent addDLContent(DLContent dlContent)
112                    throws SystemException {
113                    dlContent.setNew(true);
114    
115                    dlContent = dlContentPersistence.update(dlContent, false);
116    
117                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
118    
119                    if (indexer != null) {
120                            try {
121                                    indexer.reindex(dlContent);
122                            }
123                            catch (SearchException se) {
124                                    if (_log.isWarnEnabled()) {
125                                            _log.warn(se, se);
126                                    }
127                            }
128                    }
129    
130                    return dlContent;
131            }
132    
133            /**
134             * Creates a new document library content with the primary key. Does not add the document library content to the database.
135             *
136             * @param contentId the primary key for the new document library content
137             * @return the new document library content
138             */
139            public DLContent createDLContent(long contentId) {
140                    return dlContentPersistence.create(contentId);
141            }
142    
143            /**
144             * Deletes the document library content with the primary key from the database. Also notifies the appropriate model listeners.
145             *
146             * @param contentId the primary key of the document library content
147             * @throws PortalException if a document library content with the primary key could not be found
148             * @throws SystemException if a system exception occurred
149             */
150            public void deleteDLContent(long contentId)
151                    throws PortalException, SystemException {
152                    DLContent dlContent = dlContentPersistence.remove(contentId);
153    
154                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
155    
156                    if (indexer != null) {
157                            try {
158                                    indexer.delete(dlContent);
159                            }
160                            catch (SearchException se) {
161                                    if (_log.isWarnEnabled()) {
162                                            _log.warn(se, se);
163                                    }
164                            }
165                    }
166            }
167    
168            /**
169             * Deletes the document library content from the database. Also notifies the appropriate model listeners.
170             *
171             * @param dlContent the document library content
172             * @throws SystemException if a system exception occurred
173             */
174            public void deleteDLContent(DLContent dlContent) throws SystemException {
175                    dlContentPersistence.remove(dlContent);
176    
177                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
178    
179                    if (indexer != null) {
180                            try {
181                                    indexer.delete(dlContent);
182                            }
183                            catch (SearchException se) {
184                                    if (_log.isWarnEnabled()) {
185                                            _log.warn(se, se);
186                                    }
187                            }
188                    }
189            }
190    
191            /**
192             * Performs a dynamic query on the database and returns the matching rows.
193             *
194             * @param dynamicQuery the dynamic query
195             * @return the matching rows
196             * @throws SystemException if a system exception occurred
197             */
198            @SuppressWarnings("rawtypes")
199            public List dynamicQuery(DynamicQuery dynamicQuery)
200                    throws SystemException {
201                    return dlContentPersistence.findWithDynamicQuery(dynamicQuery);
202            }
203    
204            /**
205             * Performs a dynamic query on the database and returns a range of the matching rows.
206             *
207             * <p>
208             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
209             * </p>
210             *
211             * @param dynamicQuery the dynamic query
212             * @param start the lower bound of the range of model instances
213             * @param end the upper bound of the range of model instances (not inclusive)
214             * @return the range of matching rows
215             * @throws SystemException if a system exception occurred
216             */
217            @SuppressWarnings("rawtypes")
218            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
219                    throws SystemException {
220                    return dlContentPersistence.findWithDynamicQuery(dynamicQuery, start,
221                            end);
222            }
223    
224            /**
225             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
226             *
227             * <p>
228             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
229             * </p>
230             *
231             * @param dynamicQuery the dynamic query
232             * @param start the lower bound of the range of model instances
233             * @param end the upper bound of the range of model instances (not inclusive)
234             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
235             * @return the ordered range of matching rows
236             * @throws SystemException if a system exception occurred
237             */
238            @SuppressWarnings("rawtypes")
239            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
240                    OrderByComparator orderByComparator) throws SystemException {
241                    return dlContentPersistence.findWithDynamicQuery(dynamicQuery, start,
242                            end, orderByComparator);
243            }
244    
245            /**
246             * Returns the number of rows that match the dynamic query.
247             *
248             * @param dynamicQuery the dynamic query
249             * @return the number of rows that match the dynamic query
250             * @throws SystemException if a system exception occurred
251             */
252            public long dynamicQueryCount(DynamicQuery dynamicQuery)
253                    throws SystemException {
254                    return dlContentPersistence.countWithDynamicQuery(dynamicQuery);
255            }
256    
257            public DLContent fetchDLContent(long contentId) throws SystemException {
258                    return dlContentPersistence.fetchByPrimaryKey(contentId);
259            }
260    
261            /**
262             * Returns the document library content with the primary key.
263             *
264             * @param contentId the primary key of the document library content
265             * @return the document library content
266             * @throws PortalException if a document library content with the primary key could not be found
267             * @throws SystemException if a system exception occurred
268             */
269            public DLContent getDLContent(long contentId)
270                    throws PortalException, SystemException {
271                    return dlContentPersistence.findByPrimaryKey(contentId);
272            }
273    
274            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
275                    throws PortalException, SystemException {
276                    return dlContentPersistence.findByPrimaryKey(primaryKeyObj);
277            }
278    
279            /**
280             * Returns a range of all the document library contents.
281             *
282             * <p>
283             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
284             * </p>
285             *
286             * @param start the lower bound of the range of document library contents
287             * @param end the upper bound of the range of document library contents (not inclusive)
288             * @return the range of document library contents
289             * @throws SystemException if a system exception occurred
290             */
291            public List<DLContent> getDLContents(int start, int end)
292                    throws SystemException {
293                    return dlContentPersistence.findAll(start, end);
294            }
295    
296            /**
297             * Returns the number of document library contents.
298             *
299             * @return the number of document library contents
300             * @throws SystemException if a system exception occurred
301             */
302            public int getDLContentsCount() throws SystemException {
303                    return dlContentPersistence.countAll();
304            }
305    
306            /**
307             * Updates the document library content in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
308             *
309             * @param dlContent the document library content
310             * @return the document library content that was updated
311             * @throws SystemException if a system exception occurred
312             */
313            public DLContent updateDLContent(DLContent dlContent)
314                    throws SystemException {
315                    return updateDLContent(dlContent, true);
316            }
317    
318            /**
319             * Updates the document library content in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
320             *
321             * @param dlContent the document library content
322             * @param merge whether to merge the document library content with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
323             * @return the document library content that was updated
324             * @throws SystemException if a system exception occurred
325             */
326            public DLContent updateDLContent(DLContent dlContent, boolean merge)
327                    throws SystemException {
328                    dlContent.setNew(false);
329    
330                    dlContent = dlContentPersistence.update(dlContent, merge);
331    
332                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
333    
334                    if (indexer != null) {
335                            try {
336                                    indexer.reindex(dlContent);
337                            }
338                            catch (SearchException se) {
339                                    if (_log.isWarnEnabled()) {
340                                            _log.warn(se, se);
341                                    }
342                            }
343                    }
344    
345                    return dlContent;
346            }
347    
348            public DLContentDataBlobModel getDataBlobModel(Serializable primaryKey)
349                    throws SystemException {
350                    Session session = null;
351    
352                    try {
353                            session = dlContentPersistence.openSession();
354    
355                            return (com.liferay.portlet.documentlibrary.model.DLContentDataBlobModel)session.get(DLContentDataBlobModel.class,
356                                    primaryKey);
357                    }
358                    catch (Exception e) {
359                            throw dlContentPersistence.processException(e);
360                    }
361                    finally {
362                            dlContentPersistence.closeSession(session);
363                    }
364            }
365    
366            /**
367             * Returns the d l app local service.
368             *
369             * @return the d l app local service
370             */
371            public DLAppLocalService getDLAppLocalService() {
372                    return dlAppLocalService;
373            }
374    
375            /**
376             * Sets the d l app local service.
377             *
378             * @param dlAppLocalService the d l app local service
379             */
380            public void setDLAppLocalService(DLAppLocalService dlAppLocalService) {
381                    this.dlAppLocalService = dlAppLocalService;
382            }
383    
384            /**
385             * Returns the d l app remote service.
386             *
387             * @return the d l app remote service
388             */
389            public DLAppService getDLAppService() {
390                    return dlAppService;
391            }
392    
393            /**
394             * Sets the d l app remote service.
395             *
396             * @param dlAppService the d l app remote service
397             */
398            public void setDLAppService(DLAppService dlAppService) {
399                    this.dlAppService = dlAppService;
400            }
401    
402            /**
403             * Returns the d l app helper local service.
404             *
405             * @return the d l app helper local service
406             */
407            public DLAppHelperLocalService getDLAppHelperLocalService() {
408                    return dlAppHelperLocalService;
409            }
410    
411            /**
412             * Sets the d l app helper local service.
413             *
414             * @param dlAppHelperLocalService the d l app helper local service
415             */
416            public void setDLAppHelperLocalService(
417                    DLAppHelperLocalService dlAppHelperLocalService) {
418                    this.dlAppHelperLocalService = dlAppHelperLocalService;
419            }
420    
421            /**
422             * Returns the document library content local service.
423             *
424             * @return the document library content local service
425             */
426            public DLContentLocalService getDLContentLocalService() {
427                    return dlContentLocalService;
428            }
429    
430            /**
431             * Sets the document library content local service.
432             *
433             * @param dlContentLocalService the document library content local service
434             */
435            public void setDLContentLocalService(
436                    DLContentLocalService dlContentLocalService) {
437                    this.dlContentLocalService = dlContentLocalService;
438            }
439    
440            /**
441             * Returns the document library content persistence.
442             *
443             * @return the document library content persistence
444             */
445            public DLContentPersistence getDLContentPersistence() {
446                    return dlContentPersistence;
447            }
448    
449            /**
450             * Sets the document library content persistence.
451             *
452             * @param dlContentPersistence the document library content persistence
453             */
454            public void setDLContentPersistence(
455                    DLContentPersistence dlContentPersistence) {
456                    this.dlContentPersistence = dlContentPersistence;
457            }
458    
459            /**
460             * Returns the document library file entry local service.
461             *
462             * @return the document library file entry local service
463             */
464            public DLFileEntryLocalService getDLFileEntryLocalService() {
465                    return dlFileEntryLocalService;
466            }
467    
468            /**
469             * Sets the document library file entry local service.
470             *
471             * @param dlFileEntryLocalService the document library file entry local service
472             */
473            public void setDLFileEntryLocalService(
474                    DLFileEntryLocalService dlFileEntryLocalService) {
475                    this.dlFileEntryLocalService = dlFileEntryLocalService;
476            }
477    
478            /**
479             * Returns the document library file entry remote service.
480             *
481             * @return the document library file entry remote service
482             */
483            public DLFileEntryService getDLFileEntryService() {
484                    return dlFileEntryService;
485            }
486    
487            /**
488             * Sets the document library file entry remote service.
489             *
490             * @param dlFileEntryService the document library file entry remote service
491             */
492            public void setDLFileEntryService(DLFileEntryService dlFileEntryService) {
493                    this.dlFileEntryService = dlFileEntryService;
494            }
495    
496            /**
497             * Returns the document library file entry persistence.
498             *
499             * @return the document library file entry persistence
500             */
501            public DLFileEntryPersistence getDLFileEntryPersistence() {
502                    return dlFileEntryPersistence;
503            }
504    
505            /**
506             * Sets the document library file entry persistence.
507             *
508             * @param dlFileEntryPersistence the document library file entry persistence
509             */
510            public void setDLFileEntryPersistence(
511                    DLFileEntryPersistence dlFileEntryPersistence) {
512                    this.dlFileEntryPersistence = dlFileEntryPersistence;
513            }
514    
515            /**
516             * Returns the document library file entry finder.
517             *
518             * @return the document library file entry finder
519             */
520            public DLFileEntryFinder getDLFileEntryFinder() {
521                    return dlFileEntryFinder;
522            }
523    
524            /**
525             * Sets the document library file entry finder.
526             *
527             * @param dlFileEntryFinder the document library file entry finder
528             */
529            public void setDLFileEntryFinder(DLFileEntryFinder dlFileEntryFinder) {
530                    this.dlFileEntryFinder = dlFileEntryFinder;
531            }
532    
533            /**
534             * Returns the document library file entry metadata local service.
535             *
536             * @return the document library file entry metadata local service
537             */
538            public DLFileEntryMetadataLocalService getDLFileEntryMetadataLocalService() {
539                    return dlFileEntryMetadataLocalService;
540            }
541    
542            /**
543             * Sets the document library file entry metadata local service.
544             *
545             * @param dlFileEntryMetadataLocalService the document library file entry metadata local service
546             */
547            public void setDLFileEntryMetadataLocalService(
548                    DLFileEntryMetadataLocalService dlFileEntryMetadataLocalService) {
549                    this.dlFileEntryMetadataLocalService = dlFileEntryMetadataLocalService;
550            }
551    
552            /**
553             * Returns the document library file entry metadata persistence.
554             *
555             * @return the document library file entry metadata persistence
556             */
557            public DLFileEntryMetadataPersistence getDLFileEntryMetadataPersistence() {
558                    return dlFileEntryMetadataPersistence;
559            }
560    
561            /**
562             * Sets the document library file entry metadata persistence.
563             *
564             * @param dlFileEntryMetadataPersistence the document library file entry metadata persistence
565             */
566            public void setDLFileEntryMetadataPersistence(
567                    DLFileEntryMetadataPersistence dlFileEntryMetadataPersistence) {
568                    this.dlFileEntryMetadataPersistence = dlFileEntryMetadataPersistence;
569            }
570    
571            /**
572             * Returns the document library file entry type local service.
573             *
574             * @return the document library file entry type local service
575             */
576            public DLFileEntryTypeLocalService getDLFileEntryTypeLocalService() {
577                    return dlFileEntryTypeLocalService;
578            }
579    
580            /**
581             * Sets the document library file entry type local service.
582             *
583             * @param dlFileEntryTypeLocalService the document library file entry type local service
584             */
585            public void setDLFileEntryTypeLocalService(
586                    DLFileEntryTypeLocalService dlFileEntryTypeLocalService) {
587                    this.dlFileEntryTypeLocalService = dlFileEntryTypeLocalService;
588            }
589    
590            /**
591             * Returns the document library file entry type remote service.
592             *
593             * @return the document library file entry type remote service
594             */
595            public DLFileEntryTypeService getDLFileEntryTypeService() {
596                    return dlFileEntryTypeService;
597            }
598    
599            /**
600             * Sets the document library file entry type remote service.
601             *
602             * @param dlFileEntryTypeService the document library file entry type remote service
603             */
604            public void setDLFileEntryTypeService(
605                    DLFileEntryTypeService dlFileEntryTypeService) {
606                    this.dlFileEntryTypeService = dlFileEntryTypeService;
607            }
608    
609            /**
610             * Returns the document library file entry type persistence.
611             *
612             * @return the document library file entry type persistence
613             */
614            public DLFileEntryTypePersistence getDLFileEntryTypePersistence() {
615                    return dlFileEntryTypePersistence;
616            }
617    
618            /**
619             * Sets the document library file entry type persistence.
620             *
621             * @param dlFileEntryTypePersistence the document library file entry type persistence
622             */
623            public void setDLFileEntryTypePersistence(
624                    DLFileEntryTypePersistence dlFileEntryTypePersistence) {
625                    this.dlFileEntryTypePersistence = dlFileEntryTypePersistence;
626            }
627    
628            /**
629             * Returns the document library file entry type finder.
630             *
631             * @return the document library file entry type finder
632             */
633            public DLFileEntryTypeFinder getDLFileEntryTypeFinder() {
634                    return dlFileEntryTypeFinder;
635            }
636    
637            /**
638             * Sets the document library file entry type finder.
639             *
640             * @param dlFileEntryTypeFinder the document library file entry type finder
641             */
642            public void setDLFileEntryTypeFinder(
643                    DLFileEntryTypeFinder dlFileEntryTypeFinder) {
644                    this.dlFileEntryTypeFinder = dlFileEntryTypeFinder;
645            }
646    
647            /**
648             * Returns the document library file rank local service.
649             *
650             * @return the document library file rank local service
651             */
652            public DLFileRankLocalService getDLFileRankLocalService() {
653                    return dlFileRankLocalService;
654            }
655    
656            /**
657             * Sets the document library file rank local service.
658             *
659             * @param dlFileRankLocalService the document library file rank local service
660             */
661            public void setDLFileRankLocalService(
662                    DLFileRankLocalService dlFileRankLocalService) {
663                    this.dlFileRankLocalService = dlFileRankLocalService;
664            }
665    
666            /**
667             * Returns the document library file rank persistence.
668             *
669             * @return the document library file rank persistence
670             */
671            public DLFileRankPersistence getDLFileRankPersistence() {
672                    return dlFileRankPersistence;
673            }
674    
675            /**
676             * Sets the document library file rank persistence.
677             *
678             * @param dlFileRankPersistence the document library file rank persistence
679             */
680            public void setDLFileRankPersistence(
681                    DLFileRankPersistence dlFileRankPersistence) {
682                    this.dlFileRankPersistence = dlFileRankPersistence;
683            }
684    
685            /**
686             * Returns the document library file rank finder.
687             *
688             * @return the document library file rank finder
689             */
690            public DLFileRankFinder getDLFileRankFinder() {
691                    return dlFileRankFinder;
692            }
693    
694            /**
695             * Sets the document library file rank finder.
696             *
697             * @param dlFileRankFinder the document library file rank finder
698             */
699            public void setDLFileRankFinder(DLFileRankFinder dlFileRankFinder) {
700                    this.dlFileRankFinder = dlFileRankFinder;
701            }
702    
703            /**
704             * Returns the document library file shortcut local service.
705             *
706             * @return the document library file shortcut local service
707             */
708            public DLFileShortcutLocalService getDLFileShortcutLocalService() {
709                    return dlFileShortcutLocalService;
710            }
711    
712            /**
713             * Sets the document library file shortcut local service.
714             *
715             * @param dlFileShortcutLocalService the document library file shortcut local service
716             */
717            public void setDLFileShortcutLocalService(
718                    DLFileShortcutLocalService dlFileShortcutLocalService) {
719                    this.dlFileShortcutLocalService = dlFileShortcutLocalService;
720            }
721    
722            /**
723             * Returns the document library file shortcut remote service.
724             *
725             * @return the document library file shortcut remote service
726             */
727            public DLFileShortcutService getDLFileShortcutService() {
728                    return dlFileShortcutService;
729            }
730    
731            /**
732             * Sets the document library file shortcut remote service.
733             *
734             * @param dlFileShortcutService the document library file shortcut remote service
735             */
736            public void setDLFileShortcutService(
737                    DLFileShortcutService dlFileShortcutService) {
738                    this.dlFileShortcutService = dlFileShortcutService;
739            }
740    
741            /**
742             * Returns the document library file shortcut persistence.
743             *
744             * @return the document library file shortcut persistence
745             */
746            public DLFileShortcutPersistence getDLFileShortcutPersistence() {
747                    return dlFileShortcutPersistence;
748            }
749    
750            /**
751             * Sets the document library file shortcut persistence.
752             *
753             * @param dlFileShortcutPersistence the document library file shortcut persistence
754             */
755            public void setDLFileShortcutPersistence(
756                    DLFileShortcutPersistence dlFileShortcutPersistence) {
757                    this.dlFileShortcutPersistence = dlFileShortcutPersistence;
758            }
759    
760            /**
761             * Returns the document library file version local service.
762             *
763             * @return the document library file version local service
764             */
765            public DLFileVersionLocalService getDLFileVersionLocalService() {
766                    return dlFileVersionLocalService;
767            }
768    
769            /**
770             * Sets the document library file version local service.
771             *
772             * @param dlFileVersionLocalService the document library file version local service
773             */
774            public void setDLFileVersionLocalService(
775                    DLFileVersionLocalService dlFileVersionLocalService) {
776                    this.dlFileVersionLocalService = dlFileVersionLocalService;
777            }
778    
779            /**
780             * Returns the document library file version remote service.
781             *
782             * @return the document library file version remote service
783             */
784            public DLFileVersionService getDLFileVersionService() {
785                    return dlFileVersionService;
786            }
787    
788            /**
789             * Sets the document library file version remote service.
790             *
791             * @param dlFileVersionService the document library file version remote service
792             */
793            public void setDLFileVersionService(
794                    DLFileVersionService dlFileVersionService) {
795                    this.dlFileVersionService = dlFileVersionService;
796            }
797    
798            /**
799             * Returns the document library file version persistence.
800             *
801             * @return the document library file version persistence
802             */
803            public DLFileVersionPersistence getDLFileVersionPersistence() {
804                    return dlFileVersionPersistence;
805            }
806    
807            /**
808             * Sets the document library file version persistence.
809             *
810             * @param dlFileVersionPersistence the document library file version persistence
811             */
812            public void setDLFileVersionPersistence(
813                    DLFileVersionPersistence dlFileVersionPersistence) {
814                    this.dlFileVersionPersistence = dlFileVersionPersistence;
815            }
816    
817            /**
818             * Returns the document library folder local service.
819             *
820             * @return the document library folder local service
821             */
822            public DLFolderLocalService getDLFolderLocalService() {
823                    return dlFolderLocalService;
824            }
825    
826            /**
827             * Sets the document library folder local service.
828             *
829             * @param dlFolderLocalService the document library folder local service
830             */
831            public void setDLFolderLocalService(
832                    DLFolderLocalService dlFolderLocalService) {
833                    this.dlFolderLocalService = dlFolderLocalService;
834            }
835    
836            /**
837             * Returns the document library folder remote service.
838             *
839             * @return the document library folder remote service
840             */
841            public DLFolderService getDLFolderService() {
842                    return dlFolderService;
843            }
844    
845            /**
846             * Sets the document library folder remote service.
847             *
848             * @param dlFolderService the document library folder remote service
849             */
850            public void setDLFolderService(DLFolderService dlFolderService) {
851                    this.dlFolderService = dlFolderService;
852            }
853    
854            /**
855             * Returns the document library folder persistence.
856             *
857             * @return the document library folder persistence
858             */
859            public DLFolderPersistence getDLFolderPersistence() {
860                    return dlFolderPersistence;
861            }
862    
863            /**
864             * Sets the document library folder persistence.
865             *
866             * @param dlFolderPersistence the document library folder persistence
867             */
868            public void setDLFolderPersistence(DLFolderPersistence dlFolderPersistence) {
869                    this.dlFolderPersistence = dlFolderPersistence;
870            }
871    
872            /**
873             * Returns the document library folder finder.
874             *
875             * @return the document library folder finder
876             */
877            public DLFolderFinder getDLFolderFinder() {
878                    return dlFolderFinder;
879            }
880    
881            /**
882             * Sets the document library folder finder.
883             *
884             * @param dlFolderFinder the document library folder finder
885             */
886            public void setDLFolderFinder(DLFolderFinder dlFolderFinder) {
887                    this.dlFolderFinder = dlFolderFinder;
888            }
889    
890            /**
891             * Returns the d l sync local service.
892             *
893             * @return the d l sync local service
894             */
895            public DLSyncLocalService getDLSyncLocalService() {
896                    return dlSyncLocalService;
897            }
898    
899            /**
900             * Sets the d l sync local service.
901             *
902             * @param dlSyncLocalService the d l sync local service
903             */
904            public void setDLSyncLocalService(DLSyncLocalService dlSyncLocalService) {
905                    this.dlSyncLocalService = dlSyncLocalService;
906            }
907    
908            /**
909             * Returns the d l sync remote service.
910             *
911             * @return the d l sync remote service
912             */
913            public DLSyncService getDLSyncService() {
914                    return dlSyncService;
915            }
916    
917            /**
918             * Sets the d l sync remote service.
919             *
920             * @param dlSyncService the d l sync remote service
921             */
922            public void setDLSyncService(DLSyncService dlSyncService) {
923                    this.dlSyncService = dlSyncService;
924            }
925    
926            /**
927             * Returns the d l sync persistence.
928             *
929             * @return the d l sync persistence
930             */
931            public DLSyncPersistence getDLSyncPersistence() {
932                    return dlSyncPersistence;
933            }
934    
935            /**
936             * Sets the d l sync persistence.
937             *
938             * @param dlSyncPersistence the d l sync persistence
939             */
940            public void setDLSyncPersistence(DLSyncPersistence dlSyncPersistence) {
941                    this.dlSyncPersistence = dlSyncPersistence;
942            }
943    
944            /**
945             * Returns the counter local service.
946             *
947             * @return the counter local service
948             */
949            public CounterLocalService getCounterLocalService() {
950                    return counterLocalService;
951            }
952    
953            /**
954             * Sets the counter local service.
955             *
956             * @param counterLocalService the counter local service
957             */
958            public void setCounterLocalService(CounterLocalService counterLocalService) {
959                    this.counterLocalService = counterLocalService;
960            }
961    
962            /**
963             * Returns the resource local service.
964             *
965             * @return the resource local service
966             */
967            public ResourceLocalService getResourceLocalService() {
968                    return resourceLocalService;
969            }
970    
971            /**
972             * Sets the resource local service.
973             *
974             * @param resourceLocalService the resource local service
975             */
976            public void setResourceLocalService(
977                    ResourceLocalService resourceLocalService) {
978                    this.resourceLocalService = resourceLocalService;
979            }
980    
981            /**
982             * Returns the resource remote service.
983             *
984             * @return the resource remote service
985             */
986            public ResourceService getResourceService() {
987                    return resourceService;
988            }
989    
990            /**
991             * Sets the resource remote service.
992             *
993             * @param resourceService the resource remote service
994             */
995            public void setResourceService(ResourceService resourceService) {
996                    this.resourceService = resourceService;
997            }
998    
999            /**
1000             * Returns the resource persistence.
1001             *
1002             * @return the resource persistence
1003             */
1004            public ResourcePersistence getResourcePersistence() {
1005                    return resourcePersistence;
1006            }
1007    
1008            /**
1009             * Sets the resource persistence.
1010             *
1011             * @param resourcePersistence the resource persistence
1012             */
1013            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
1014                    this.resourcePersistence = resourcePersistence;
1015            }
1016    
1017            /**
1018             * Returns the resource finder.
1019             *
1020             * @return the resource finder
1021             */
1022            public ResourceFinder getResourceFinder() {
1023                    return resourceFinder;
1024            }
1025    
1026            /**
1027             * Sets the resource finder.
1028             *
1029             * @param resourceFinder the resource finder
1030             */
1031            public void setResourceFinder(ResourceFinder resourceFinder) {
1032                    this.resourceFinder = resourceFinder;
1033            }
1034    
1035            /**
1036             * Returns the user local service.
1037             *
1038             * @return the user local service
1039             */
1040            public UserLocalService getUserLocalService() {
1041                    return userLocalService;
1042            }
1043    
1044            /**
1045             * Sets the user local service.
1046             *
1047             * @param userLocalService the user local service
1048             */
1049            public void setUserLocalService(UserLocalService userLocalService) {
1050                    this.userLocalService = userLocalService;
1051            }
1052    
1053            /**
1054             * Returns the user remote service.
1055             *
1056             * @return the user remote service
1057             */
1058            public UserService getUserService() {
1059                    return userService;
1060            }
1061    
1062            /**
1063             * Sets the user remote service.
1064             *
1065             * @param userService the user remote service
1066             */
1067            public void setUserService(UserService userService) {
1068                    this.userService = userService;
1069            }
1070    
1071            /**
1072             * Returns the user persistence.
1073             *
1074             * @return the user persistence
1075             */
1076            public UserPersistence getUserPersistence() {
1077                    return userPersistence;
1078            }
1079    
1080            /**
1081             * Sets the user persistence.
1082             *
1083             * @param userPersistence the user persistence
1084             */
1085            public void setUserPersistence(UserPersistence userPersistence) {
1086                    this.userPersistence = userPersistence;
1087            }
1088    
1089            /**
1090             * Returns the user finder.
1091             *
1092             * @return the user finder
1093             */
1094            public UserFinder getUserFinder() {
1095                    return userFinder;
1096            }
1097    
1098            /**
1099             * Sets the user finder.
1100             *
1101             * @param userFinder the user finder
1102             */
1103            public void setUserFinder(UserFinder userFinder) {
1104                    this.userFinder = userFinder;
1105            }
1106    
1107            public void afterPropertiesSet() {
1108                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.documentlibrary.model.DLContent",
1109                            dlContentLocalService);
1110            }
1111    
1112            public void destroy() {
1113                    persistedModelLocalServiceRegistry.unregister(
1114                            "com.liferay.portlet.documentlibrary.model.DLContent");
1115            }
1116    
1117            /**
1118             * Returns the Spring bean ID for this bean.
1119             *
1120             * @return the Spring bean ID for this bean
1121             */
1122            public String getBeanIdentifier() {
1123                    return _beanIdentifier;
1124            }
1125    
1126            /**
1127             * Sets the Spring bean ID for this bean.
1128             *
1129             * @param beanIdentifier the Spring bean ID for this bean
1130             */
1131            public void setBeanIdentifier(String beanIdentifier) {
1132                    _beanIdentifier = beanIdentifier;
1133            }
1134    
1135            protected ClassLoader getClassLoader() {
1136                    Class<?> clazz = getClass();
1137    
1138                    return clazz.getClassLoader();
1139            }
1140    
1141            protected Class<?> getModelClass() {
1142                    return DLContent.class;
1143            }
1144    
1145            protected String getModelClassName() {
1146                    return DLContent.class.getName();
1147            }
1148    
1149            /**
1150             * Performs an SQL query.
1151             *
1152             * @param sql the sql query
1153             */
1154            protected void runSQL(String sql) throws SystemException {
1155                    try {
1156                            DataSource dataSource = dlContentPersistence.getDataSource();
1157    
1158                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1159                                            sql, new int[0]);
1160    
1161                            sqlUpdate.update();
1162                    }
1163                    catch (Exception e) {
1164                            throw new SystemException(e);
1165                    }
1166            }
1167    
1168            @BeanReference(type = DLAppLocalService.class)
1169            protected DLAppLocalService dlAppLocalService;
1170            @BeanReference(type = DLAppService.class)
1171            protected DLAppService dlAppService;
1172            @BeanReference(type = DLAppHelperLocalService.class)
1173            protected DLAppHelperLocalService dlAppHelperLocalService;
1174            @BeanReference(type = DLContentLocalService.class)
1175            protected DLContentLocalService dlContentLocalService;
1176            @BeanReference(type = DLContentPersistence.class)
1177            protected DLContentPersistence dlContentPersistence;
1178            @BeanReference(type = DLFileEntryLocalService.class)
1179            protected DLFileEntryLocalService dlFileEntryLocalService;
1180            @BeanReference(type = DLFileEntryService.class)
1181            protected DLFileEntryService dlFileEntryService;
1182            @BeanReference(type = DLFileEntryPersistence.class)
1183            protected DLFileEntryPersistence dlFileEntryPersistence;
1184            @BeanReference(type = DLFileEntryFinder.class)
1185            protected DLFileEntryFinder dlFileEntryFinder;
1186            @BeanReference(type = DLFileEntryMetadataLocalService.class)
1187            protected DLFileEntryMetadataLocalService dlFileEntryMetadataLocalService;
1188            @BeanReference(type = DLFileEntryMetadataPersistence.class)
1189            protected DLFileEntryMetadataPersistence dlFileEntryMetadataPersistence;
1190            @BeanReference(type = DLFileEntryTypeLocalService.class)
1191            protected DLFileEntryTypeLocalService dlFileEntryTypeLocalService;
1192            @BeanReference(type = DLFileEntryTypeService.class)
1193            protected DLFileEntryTypeService dlFileEntryTypeService;
1194            @BeanReference(type = DLFileEntryTypePersistence.class)
1195            protected DLFileEntryTypePersistence dlFileEntryTypePersistence;
1196            @BeanReference(type = DLFileEntryTypeFinder.class)
1197            protected DLFileEntryTypeFinder dlFileEntryTypeFinder;
1198            @BeanReference(type = DLFileRankLocalService.class)
1199            protected DLFileRankLocalService dlFileRankLocalService;
1200            @BeanReference(type = DLFileRankPersistence.class)
1201            protected DLFileRankPersistence dlFileRankPersistence;
1202            @BeanReference(type = DLFileRankFinder.class)
1203            protected DLFileRankFinder dlFileRankFinder;
1204            @BeanReference(type = DLFileShortcutLocalService.class)
1205            protected DLFileShortcutLocalService dlFileShortcutLocalService;
1206            @BeanReference(type = DLFileShortcutService.class)
1207            protected DLFileShortcutService dlFileShortcutService;
1208            @BeanReference(type = DLFileShortcutPersistence.class)
1209            protected DLFileShortcutPersistence dlFileShortcutPersistence;
1210            @BeanReference(type = DLFileVersionLocalService.class)
1211            protected DLFileVersionLocalService dlFileVersionLocalService;
1212            @BeanReference(type = DLFileVersionService.class)
1213            protected DLFileVersionService dlFileVersionService;
1214            @BeanReference(type = DLFileVersionPersistence.class)
1215            protected DLFileVersionPersistence dlFileVersionPersistence;
1216            @BeanReference(type = DLFolderLocalService.class)
1217            protected DLFolderLocalService dlFolderLocalService;
1218            @BeanReference(type = DLFolderService.class)
1219            protected DLFolderService dlFolderService;
1220            @BeanReference(type = DLFolderPersistence.class)
1221            protected DLFolderPersistence dlFolderPersistence;
1222            @BeanReference(type = DLFolderFinder.class)
1223            protected DLFolderFinder dlFolderFinder;
1224            @BeanReference(type = DLSyncLocalService.class)
1225            protected DLSyncLocalService dlSyncLocalService;
1226            @BeanReference(type = DLSyncService.class)
1227            protected DLSyncService dlSyncService;
1228            @BeanReference(type = DLSyncPersistence.class)
1229            protected DLSyncPersistence dlSyncPersistence;
1230            @BeanReference(type = CounterLocalService.class)
1231            protected CounterLocalService counterLocalService;
1232            @BeanReference(type = ResourceLocalService.class)
1233            protected ResourceLocalService resourceLocalService;
1234            @BeanReference(type = ResourceService.class)
1235            protected ResourceService resourceService;
1236            @BeanReference(type = ResourcePersistence.class)
1237            protected ResourcePersistence resourcePersistence;
1238            @BeanReference(type = ResourceFinder.class)
1239            protected ResourceFinder resourceFinder;
1240            @BeanReference(type = UserLocalService.class)
1241            protected UserLocalService userLocalService;
1242            @BeanReference(type = UserService.class)
1243            protected UserService userService;
1244            @BeanReference(type = UserPersistence.class)
1245            protected UserPersistence userPersistence;
1246            @BeanReference(type = UserFinder.class)
1247            protected UserFinder userFinder;
1248            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1249            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1250            private static Log _log = LogFactoryUtil.getLog(DLContentLocalServiceBaseImpl.class);
1251            private String _beanIdentifier;
1252    }