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