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.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 the document library file version with the UUID in the group.
281             *
282             * @param uuid the UUID of document library file version
283             * @param groupId the group id of the document library file version
284             * @return the document library file version
285             * @throws PortalException if a document library file version with the UUID in the group could not be found
286             * @throws SystemException if a system exception occurred
287             */
288            public DLFileVersion getDLFileVersionByUuidAndGroupId(String uuid,
289                    long groupId) throws PortalException, SystemException {
290                    return dlFileVersionPersistence.findByUUID_G(uuid, groupId);
291            }
292    
293            /**
294             * Returns a range of all the document library file versions.
295             *
296             * <p>
297             * 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.
298             * </p>
299             *
300             * @param start the lower bound of the range of document library file versions
301             * @param end the upper bound of the range of document library file versions (not inclusive)
302             * @return the range of document library file versions
303             * @throws SystemException if a system exception occurred
304             */
305            public List<DLFileVersion> getDLFileVersions(int start, int end)
306                    throws SystemException {
307                    return dlFileVersionPersistence.findAll(start, end);
308            }
309    
310            /**
311             * Returns the number of document library file versions.
312             *
313             * @return the number of document library file versions
314             * @throws SystemException if a system exception occurred
315             */
316            public int getDLFileVersionsCount() throws SystemException {
317                    return dlFileVersionPersistence.countAll();
318            }
319    
320            /**
321             * Updates the document library file version in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
322             *
323             * @param dlFileVersion the document library file version
324             * @return the document library file version that was updated
325             * @throws SystemException if a system exception occurred
326             */
327            public DLFileVersion updateDLFileVersion(DLFileVersion dlFileVersion)
328                    throws SystemException {
329                    return updateDLFileVersion(dlFileVersion, true);
330            }
331    
332            /**
333             * Updates the document library file version in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
334             *
335             * @param dlFileVersion the document library file version
336             * @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.
337             * @return the document library file version that was updated
338             * @throws SystemException if a system exception occurred
339             */
340            public DLFileVersion updateDLFileVersion(DLFileVersion dlFileVersion,
341                    boolean merge) throws SystemException {
342                    dlFileVersion.setNew(false);
343    
344                    dlFileVersion = dlFileVersionPersistence.update(dlFileVersion, merge);
345    
346                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
347    
348                    if (indexer != null) {
349                            try {
350                                    indexer.reindex(dlFileVersion);
351                            }
352                            catch (SearchException se) {
353                                    if (_log.isWarnEnabled()) {
354                                            _log.warn(se, se);
355                                    }
356                            }
357                    }
358    
359                    return dlFileVersion;
360            }
361    
362            /**
363             * Returns the d l app local service.
364             *
365             * @return the d l app local service
366             */
367            public DLAppLocalService getDLAppLocalService() {
368                    return dlAppLocalService;
369            }
370    
371            /**
372             * Sets the d l app local service.
373             *
374             * @param dlAppLocalService the d l app local service
375             */
376            public void setDLAppLocalService(DLAppLocalService dlAppLocalService) {
377                    this.dlAppLocalService = dlAppLocalService;
378            }
379    
380            /**
381             * Returns the d l app remote service.
382             *
383             * @return the d l app remote service
384             */
385            public DLAppService getDLAppService() {
386                    return dlAppService;
387            }
388    
389            /**
390             * Sets the d l app remote service.
391             *
392             * @param dlAppService the d l app remote service
393             */
394            public void setDLAppService(DLAppService dlAppService) {
395                    this.dlAppService = dlAppService;
396            }
397    
398            /**
399             * Returns the d l app helper local service.
400             *
401             * @return the d l app helper local service
402             */
403            public DLAppHelperLocalService getDLAppHelperLocalService() {
404                    return dlAppHelperLocalService;
405            }
406    
407            /**
408             * Sets the d l app helper local service.
409             *
410             * @param dlAppHelperLocalService the d l app helper local service
411             */
412            public void setDLAppHelperLocalService(
413                    DLAppHelperLocalService dlAppHelperLocalService) {
414                    this.dlAppHelperLocalService = dlAppHelperLocalService;
415            }
416    
417            /**
418             * Returns the document library content local service.
419             *
420             * @return the document library content local service
421             */
422            public DLContentLocalService getDLContentLocalService() {
423                    return dlContentLocalService;
424            }
425    
426            /**
427             * Sets the document library content local service.
428             *
429             * @param dlContentLocalService the document library content local service
430             */
431            public void setDLContentLocalService(
432                    DLContentLocalService dlContentLocalService) {
433                    this.dlContentLocalService = dlContentLocalService;
434            }
435    
436            /**
437             * Returns the document library content persistence.
438             *
439             * @return the document library content persistence
440             */
441            public DLContentPersistence getDLContentPersistence() {
442                    return dlContentPersistence;
443            }
444    
445            /**
446             * Sets the document library content persistence.
447             *
448             * @param dlContentPersistence the document library content persistence
449             */
450            public void setDLContentPersistence(
451                    DLContentPersistence dlContentPersistence) {
452                    this.dlContentPersistence = dlContentPersistence;
453            }
454    
455            /**
456             * Returns the document library file entry local service.
457             *
458             * @return the document library file entry local service
459             */
460            public DLFileEntryLocalService getDLFileEntryLocalService() {
461                    return dlFileEntryLocalService;
462            }
463    
464            /**
465             * Sets the document library file entry local service.
466             *
467             * @param dlFileEntryLocalService the document library file entry local service
468             */
469            public void setDLFileEntryLocalService(
470                    DLFileEntryLocalService dlFileEntryLocalService) {
471                    this.dlFileEntryLocalService = dlFileEntryLocalService;
472            }
473    
474            /**
475             * Returns the document library file entry remote service.
476             *
477             * @return the document library file entry remote service
478             */
479            public DLFileEntryService getDLFileEntryService() {
480                    return dlFileEntryService;
481            }
482    
483            /**
484             * Sets the document library file entry remote service.
485             *
486             * @param dlFileEntryService the document library file entry remote service
487             */
488            public void setDLFileEntryService(DLFileEntryService dlFileEntryService) {
489                    this.dlFileEntryService = dlFileEntryService;
490            }
491    
492            /**
493             * Returns the document library file entry persistence.
494             *
495             * @return the document library file entry persistence
496             */
497            public DLFileEntryPersistence getDLFileEntryPersistence() {
498                    return dlFileEntryPersistence;
499            }
500    
501            /**
502             * Sets the document library file entry persistence.
503             *
504             * @param dlFileEntryPersistence the document library file entry persistence
505             */
506            public void setDLFileEntryPersistence(
507                    DLFileEntryPersistence dlFileEntryPersistence) {
508                    this.dlFileEntryPersistence = dlFileEntryPersistence;
509            }
510    
511            /**
512             * Returns the document library file entry finder.
513             *
514             * @return the document library file entry finder
515             */
516            public DLFileEntryFinder getDLFileEntryFinder() {
517                    return dlFileEntryFinder;
518            }
519    
520            /**
521             * Sets the document library file entry finder.
522             *
523             * @param dlFileEntryFinder the document library file entry finder
524             */
525            public void setDLFileEntryFinder(DLFileEntryFinder dlFileEntryFinder) {
526                    this.dlFileEntryFinder = dlFileEntryFinder;
527            }
528    
529            /**
530             * Returns the document library file entry metadata local service.
531             *
532             * @return the document library file entry metadata local service
533             */
534            public DLFileEntryMetadataLocalService getDLFileEntryMetadataLocalService() {
535                    return dlFileEntryMetadataLocalService;
536            }
537    
538            /**
539             * Sets the document library file entry metadata local service.
540             *
541             * @param dlFileEntryMetadataLocalService the document library file entry metadata local service
542             */
543            public void setDLFileEntryMetadataLocalService(
544                    DLFileEntryMetadataLocalService dlFileEntryMetadataLocalService) {
545                    this.dlFileEntryMetadataLocalService = dlFileEntryMetadataLocalService;
546            }
547    
548            /**
549             * Returns the document library file entry metadata persistence.
550             *
551             * @return the document library file entry metadata persistence
552             */
553            public DLFileEntryMetadataPersistence getDLFileEntryMetadataPersistence() {
554                    return dlFileEntryMetadataPersistence;
555            }
556    
557            /**
558             * Sets the document library file entry metadata persistence.
559             *
560             * @param dlFileEntryMetadataPersistence the document library file entry metadata persistence
561             */
562            public void setDLFileEntryMetadataPersistence(
563                    DLFileEntryMetadataPersistence dlFileEntryMetadataPersistence) {
564                    this.dlFileEntryMetadataPersistence = dlFileEntryMetadataPersistence;
565            }
566    
567            /**
568             * Returns the document library file entry type local service.
569             *
570             * @return the document library file entry type local service
571             */
572            public DLFileEntryTypeLocalService getDLFileEntryTypeLocalService() {
573                    return dlFileEntryTypeLocalService;
574            }
575    
576            /**
577             * Sets the document library file entry type local service.
578             *
579             * @param dlFileEntryTypeLocalService the document library file entry type local service
580             */
581            public void setDLFileEntryTypeLocalService(
582                    DLFileEntryTypeLocalService dlFileEntryTypeLocalService) {
583                    this.dlFileEntryTypeLocalService = dlFileEntryTypeLocalService;
584            }
585    
586            /**
587             * Returns the document library file entry type remote service.
588             *
589             * @return the document library file entry type remote service
590             */
591            public DLFileEntryTypeService getDLFileEntryTypeService() {
592                    return dlFileEntryTypeService;
593            }
594    
595            /**
596             * Sets the document library file entry type remote service.
597             *
598             * @param dlFileEntryTypeService the document library file entry type remote service
599             */
600            public void setDLFileEntryTypeService(
601                    DLFileEntryTypeService dlFileEntryTypeService) {
602                    this.dlFileEntryTypeService = dlFileEntryTypeService;
603            }
604    
605            /**
606             * Returns the document library file entry type persistence.
607             *
608             * @return the document library file entry type persistence
609             */
610            public DLFileEntryTypePersistence getDLFileEntryTypePersistence() {
611                    return dlFileEntryTypePersistence;
612            }
613    
614            /**
615             * Sets the document library file entry type persistence.
616             *
617             * @param dlFileEntryTypePersistence the document library file entry type persistence
618             */
619            public void setDLFileEntryTypePersistence(
620                    DLFileEntryTypePersistence dlFileEntryTypePersistence) {
621                    this.dlFileEntryTypePersistence = dlFileEntryTypePersistence;
622            }
623    
624            /**
625             * Returns the document library file entry type finder.
626             *
627             * @return the document library file entry type finder
628             */
629            public DLFileEntryTypeFinder getDLFileEntryTypeFinder() {
630                    return dlFileEntryTypeFinder;
631            }
632    
633            /**
634             * Sets the document library file entry type finder.
635             *
636             * @param dlFileEntryTypeFinder the document library file entry type finder
637             */
638            public void setDLFileEntryTypeFinder(
639                    DLFileEntryTypeFinder dlFileEntryTypeFinder) {
640                    this.dlFileEntryTypeFinder = dlFileEntryTypeFinder;
641            }
642    
643            /**
644             * Returns the document library file rank local service.
645             *
646             * @return the document library file rank local service
647             */
648            public DLFileRankLocalService getDLFileRankLocalService() {
649                    return dlFileRankLocalService;
650            }
651    
652            /**
653             * Sets the document library file rank local service.
654             *
655             * @param dlFileRankLocalService the document library file rank local service
656             */
657            public void setDLFileRankLocalService(
658                    DLFileRankLocalService dlFileRankLocalService) {
659                    this.dlFileRankLocalService = dlFileRankLocalService;
660            }
661    
662            /**
663             * Returns the document library file rank persistence.
664             *
665             * @return the document library file rank persistence
666             */
667            public DLFileRankPersistence getDLFileRankPersistence() {
668                    return dlFileRankPersistence;
669            }
670    
671            /**
672             * Sets the document library file rank persistence.
673             *
674             * @param dlFileRankPersistence the document library file rank persistence
675             */
676            public void setDLFileRankPersistence(
677                    DLFileRankPersistence dlFileRankPersistence) {
678                    this.dlFileRankPersistence = dlFileRankPersistence;
679            }
680    
681            /**
682             * Returns the document library file rank finder.
683             *
684             * @return the document library file rank finder
685             */
686            public DLFileRankFinder getDLFileRankFinder() {
687                    return dlFileRankFinder;
688            }
689    
690            /**
691             * Sets the document library file rank finder.
692             *
693             * @param dlFileRankFinder the document library file rank finder
694             */
695            public void setDLFileRankFinder(DLFileRankFinder dlFileRankFinder) {
696                    this.dlFileRankFinder = dlFileRankFinder;
697            }
698    
699            /**
700             * Returns the document library file shortcut local service.
701             *
702             * @return the document library file shortcut local service
703             */
704            public DLFileShortcutLocalService getDLFileShortcutLocalService() {
705                    return dlFileShortcutLocalService;
706            }
707    
708            /**
709             * Sets the document library file shortcut local service.
710             *
711             * @param dlFileShortcutLocalService the document library file shortcut local service
712             */
713            public void setDLFileShortcutLocalService(
714                    DLFileShortcutLocalService dlFileShortcutLocalService) {
715                    this.dlFileShortcutLocalService = dlFileShortcutLocalService;
716            }
717    
718            /**
719             * Returns the document library file shortcut remote service.
720             *
721             * @return the document library file shortcut remote service
722             */
723            public DLFileShortcutService getDLFileShortcutService() {
724                    return dlFileShortcutService;
725            }
726    
727            /**
728             * Sets the document library file shortcut remote service.
729             *
730             * @param dlFileShortcutService the document library file shortcut remote service
731             */
732            public void setDLFileShortcutService(
733                    DLFileShortcutService dlFileShortcutService) {
734                    this.dlFileShortcutService = dlFileShortcutService;
735            }
736    
737            /**
738             * Returns the document library file shortcut persistence.
739             *
740             * @return the document library file shortcut persistence
741             */
742            public DLFileShortcutPersistence getDLFileShortcutPersistence() {
743                    return dlFileShortcutPersistence;
744            }
745    
746            /**
747             * Sets the document library file shortcut persistence.
748             *
749             * @param dlFileShortcutPersistence the document library file shortcut persistence
750             */
751            public void setDLFileShortcutPersistence(
752                    DLFileShortcutPersistence dlFileShortcutPersistence) {
753                    this.dlFileShortcutPersistence = dlFileShortcutPersistence;
754            }
755    
756            /**
757             * Returns the document library file version local service.
758             *
759             * @return the document library file version local service
760             */
761            public DLFileVersionLocalService getDLFileVersionLocalService() {
762                    return dlFileVersionLocalService;
763            }
764    
765            /**
766             * Sets the document library file version local service.
767             *
768             * @param dlFileVersionLocalService the document library file version local service
769             */
770            public void setDLFileVersionLocalService(
771                    DLFileVersionLocalService dlFileVersionLocalService) {
772                    this.dlFileVersionLocalService = dlFileVersionLocalService;
773            }
774    
775            /**
776             * Returns the document library file version remote service.
777             *
778             * @return the document library file version remote service
779             */
780            public DLFileVersionService getDLFileVersionService() {
781                    return dlFileVersionService;
782            }
783    
784            /**
785             * Sets the document library file version remote service.
786             *
787             * @param dlFileVersionService the document library file version remote service
788             */
789            public void setDLFileVersionService(
790                    DLFileVersionService dlFileVersionService) {
791                    this.dlFileVersionService = dlFileVersionService;
792            }
793    
794            /**
795             * Returns the document library file version persistence.
796             *
797             * @return the document library file version persistence
798             */
799            public DLFileVersionPersistence getDLFileVersionPersistence() {
800                    return dlFileVersionPersistence;
801            }
802    
803            /**
804             * Sets the document library file version persistence.
805             *
806             * @param dlFileVersionPersistence the document library file version persistence
807             */
808            public void setDLFileVersionPersistence(
809                    DLFileVersionPersistence dlFileVersionPersistence) {
810                    this.dlFileVersionPersistence = dlFileVersionPersistence;
811            }
812    
813            /**
814             * Returns the document library folder local service.
815             *
816             * @return the document library folder local service
817             */
818            public DLFolderLocalService getDLFolderLocalService() {
819                    return dlFolderLocalService;
820            }
821    
822            /**
823             * Sets the document library folder local service.
824             *
825             * @param dlFolderLocalService the document library folder local service
826             */
827            public void setDLFolderLocalService(
828                    DLFolderLocalService dlFolderLocalService) {
829                    this.dlFolderLocalService = dlFolderLocalService;
830            }
831    
832            /**
833             * Returns the document library folder remote service.
834             *
835             * @return the document library folder remote service
836             */
837            public DLFolderService getDLFolderService() {
838                    return dlFolderService;
839            }
840    
841            /**
842             * Sets the document library folder remote service.
843             *
844             * @param dlFolderService the document library folder remote service
845             */
846            public void setDLFolderService(DLFolderService dlFolderService) {
847                    this.dlFolderService = dlFolderService;
848            }
849    
850            /**
851             * Returns the document library folder persistence.
852             *
853             * @return the document library folder persistence
854             */
855            public DLFolderPersistence getDLFolderPersistence() {
856                    return dlFolderPersistence;
857            }
858    
859            /**
860             * Sets the document library folder persistence.
861             *
862             * @param dlFolderPersistence the document library folder persistence
863             */
864            public void setDLFolderPersistence(DLFolderPersistence dlFolderPersistence) {
865                    this.dlFolderPersistence = dlFolderPersistence;
866            }
867    
868            /**
869             * Returns the document library folder finder.
870             *
871             * @return the document library folder finder
872             */
873            public DLFolderFinder getDLFolderFinder() {
874                    return dlFolderFinder;
875            }
876    
877            /**
878             * Sets the document library folder finder.
879             *
880             * @param dlFolderFinder the document library folder finder
881             */
882            public void setDLFolderFinder(DLFolderFinder dlFolderFinder) {
883                    this.dlFolderFinder = dlFolderFinder;
884            }
885    
886            /**
887             * Returns the d l sync local service.
888             *
889             * @return the d l sync local service
890             */
891            public DLSyncLocalService getDLSyncLocalService() {
892                    return dlSyncLocalService;
893            }
894    
895            /**
896             * Sets the d l sync local service.
897             *
898             * @param dlSyncLocalService the d l sync local service
899             */
900            public void setDLSyncLocalService(DLSyncLocalService dlSyncLocalService) {
901                    this.dlSyncLocalService = dlSyncLocalService;
902            }
903    
904            /**
905             * Returns the d l sync remote service.
906             *
907             * @return the d l sync remote service
908             */
909            public DLSyncService getDLSyncService() {
910                    return dlSyncService;
911            }
912    
913            /**
914             * Sets the d l sync remote service.
915             *
916             * @param dlSyncService the d l sync remote service
917             */
918            public void setDLSyncService(DLSyncService dlSyncService) {
919                    this.dlSyncService = dlSyncService;
920            }
921    
922            /**
923             * Returns the d l sync persistence.
924             *
925             * @return the d l sync persistence
926             */
927            public DLSyncPersistence getDLSyncPersistence() {
928                    return dlSyncPersistence;
929            }
930    
931            /**
932             * Sets the d l sync persistence.
933             *
934             * @param dlSyncPersistence the d l sync persistence
935             */
936            public void setDLSyncPersistence(DLSyncPersistence dlSyncPersistence) {
937                    this.dlSyncPersistence = dlSyncPersistence;
938            }
939    
940            /**
941             * Returns the counter local service.
942             *
943             * @return the counter local service
944             */
945            public CounterLocalService getCounterLocalService() {
946                    return counterLocalService;
947            }
948    
949            /**
950             * Sets the counter local service.
951             *
952             * @param counterLocalService the counter local service
953             */
954            public void setCounterLocalService(CounterLocalService counterLocalService) {
955                    this.counterLocalService = counterLocalService;
956            }
957    
958            /**
959             * Returns the resource local service.
960             *
961             * @return the resource local service
962             */
963            public ResourceLocalService getResourceLocalService() {
964                    return resourceLocalService;
965            }
966    
967            /**
968             * Sets the resource local service.
969             *
970             * @param resourceLocalService the resource local service
971             */
972            public void setResourceLocalService(
973                    ResourceLocalService resourceLocalService) {
974                    this.resourceLocalService = resourceLocalService;
975            }
976    
977            /**
978             * Returns the resource remote service.
979             *
980             * @return the resource remote service
981             */
982            public ResourceService getResourceService() {
983                    return resourceService;
984            }
985    
986            /**
987             * Sets the resource remote service.
988             *
989             * @param resourceService the resource remote service
990             */
991            public void setResourceService(ResourceService resourceService) {
992                    this.resourceService = resourceService;
993            }
994    
995            /**
996             * Returns the resource persistence.
997             *
998             * @return the resource persistence
999             */
1000            public ResourcePersistence getResourcePersistence() {
1001                    return resourcePersistence;
1002            }
1003    
1004            /**
1005             * Sets the resource persistence.
1006             *
1007             * @param resourcePersistence the resource persistence
1008             */
1009            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
1010                    this.resourcePersistence = resourcePersistence;
1011            }
1012    
1013            /**
1014             * Returns the resource finder.
1015             *
1016             * @return the resource finder
1017             */
1018            public ResourceFinder getResourceFinder() {
1019                    return resourceFinder;
1020            }
1021    
1022            /**
1023             * Sets the resource finder.
1024             *
1025             * @param resourceFinder the resource finder
1026             */
1027            public void setResourceFinder(ResourceFinder resourceFinder) {
1028                    this.resourceFinder = resourceFinder;
1029            }
1030    
1031            /**
1032             * Returns the user local service.
1033             *
1034             * @return the user local service
1035             */
1036            public UserLocalService getUserLocalService() {
1037                    return userLocalService;
1038            }
1039    
1040            /**
1041             * Sets the user local service.
1042             *
1043             * @param userLocalService the user local service
1044             */
1045            public void setUserLocalService(UserLocalService userLocalService) {
1046                    this.userLocalService = userLocalService;
1047            }
1048    
1049            /**
1050             * Returns the user remote service.
1051             *
1052             * @return the user remote service
1053             */
1054            public UserService getUserService() {
1055                    return userService;
1056            }
1057    
1058            /**
1059             * Sets the user remote service.
1060             *
1061             * @param userService the user remote service
1062             */
1063            public void setUserService(UserService userService) {
1064                    this.userService = userService;
1065            }
1066    
1067            /**
1068             * Returns the user persistence.
1069             *
1070             * @return the user persistence
1071             */
1072            public UserPersistence getUserPersistence() {
1073                    return userPersistence;
1074            }
1075    
1076            /**
1077             * Sets the user persistence.
1078             *
1079             * @param userPersistence the user persistence
1080             */
1081            public void setUserPersistence(UserPersistence userPersistence) {
1082                    this.userPersistence = userPersistence;
1083            }
1084    
1085            /**
1086             * Returns the user finder.
1087             *
1088             * @return the user finder
1089             */
1090            public UserFinder getUserFinder() {
1091                    return userFinder;
1092            }
1093    
1094            /**
1095             * Sets the user finder.
1096             *
1097             * @param userFinder the user finder
1098             */
1099            public void setUserFinder(UserFinder userFinder) {
1100                    this.userFinder = userFinder;
1101            }
1102    
1103            public void afterPropertiesSet() {
1104                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.documentlibrary.model.DLFileVersion",
1105                            dlFileVersionLocalService);
1106            }
1107    
1108            public void destroy() {
1109                    persistedModelLocalServiceRegistry.unregister(
1110                            "com.liferay.portlet.documentlibrary.model.DLFileVersion");
1111            }
1112    
1113            /**
1114             * Returns the Spring bean ID for this bean.
1115             *
1116             * @return the Spring bean ID for this bean
1117             */
1118            public String getBeanIdentifier() {
1119                    return _beanIdentifier;
1120            }
1121    
1122            /**
1123             * Sets the Spring bean ID for this bean.
1124             *
1125             * @param beanIdentifier the Spring bean ID for this bean
1126             */
1127            public void setBeanIdentifier(String beanIdentifier) {
1128                    _beanIdentifier = beanIdentifier;
1129            }
1130    
1131            protected ClassLoader getClassLoader() {
1132                    Class<?> clazz = getClass();
1133    
1134                    return clazz.getClassLoader();
1135            }
1136    
1137            protected Class<?> getModelClass() {
1138                    return DLFileVersion.class;
1139            }
1140    
1141            protected String getModelClassName() {
1142                    return DLFileVersion.class.getName();
1143            }
1144    
1145            /**
1146             * Performs an SQL query.
1147             *
1148             * @param sql the sql query
1149             */
1150            protected void runSQL(String sql) throws SystemException {
1151                    try {
1152                            DataSource dataSource = dlFileVersionPersistence.getDataSource();
1153    
1154                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1155                                            sql, new int[0]);
1156    
1157                            sqlUpdate.update();
1158                    }
1159                    catch (Exception e) {
1160                            throw new SystemException(e);
1161                    }
1162            }
1163    
1164            @BeanReference(type = DLAppLocalService.class)
1165            protected DLAppLocalService dlAppLocalService;
1166            @BeanReference(type = DLAppService.class)
1167            protected DLAppService dlAppService;
1168            @BeanReference(type = DLAppHelperLocalService.class)
1169            protected DLAppHelperLocalService dlAppHelperLocalService;
1170            @BeanReference(type = DLContentLocalService.class)
1171            protected DLContentLocalService dlContentLocalService;
1172            @BeanReference(type = DLContentPersistence.class)
1173            protected DLContentPersistence dlContentPersistence;
1174            @BeanReference(type = DLFileEntryLocalService.class)
1175            protected DLFileEntryLocalService dlFileEntryLocalService;
1176            @BeanReference(type = DLFileEntryService.class)
1177            protected DLFileEntryService dlFileEntryService;
1178            @BeanReference(type = DLFileEntryPersistence.class)
1179            protected DLFileEntryPersistence dlFileEntryPersistence;
1180            @BeanReference(type = DLFileEntryFinder.class)
1181            protected DLFileEntryFinder dlFileEntryFinder;
1182            @BeanReference(type = DLFileEntryMetadataLocalService.class)
1183            protected DLFileEntryMetadataLocalService dlFileEntryMetadataLocalService;
1184            @BeanReference(type = DLFileEntryMetadataPersistence.class)
1185            protected DLFileEntryMetadataPersistence dlFileEntryMetadataPersistence;
1186            @BeanReference(type = DLFileEntryTypeLocalService.class)
1187            protected DLFileEntryTypeLocalService dlFileEntryTypeLocalService;
1188            @BeanReference(type = DLFileEntryTypeService.class)
1189            protected DLFileEntryTypeService dlFileEntryTypeService;
1190            @BeanReference(type = DLFileEntryTypePersistence.class)
1191            protected DLFileEntryTypePersistence dlFileEntryTypePersistence;
1192            @BeanReference(type = DLFileEntryTypeFinder.class)
1193            protected DLFileEntryTypeFinder dlFileEntryTypeFinder;
1194            @BeanReference(type = DLFileRankLocalService.class)
1195            protected DLFileRankLocalService dlFileRankLocalService;
1196            @BeanReference(type = DLFileRankPersistence.class)
1197            protected DLFileRankPersistence dlFileRankPersistence;
1198            @BeanReference(type = DLFileRankFinder.class)
1199            protected DLFileRankFinder dlFileRankFinder;
1200            @BeanReference(type = DLFileShortcutLocalService.class)
1201            protected DLFileShortcutLocalService dlFileShortcutLocalService;
1202            @BeanReference(type = DLFileShortcutService.class)
1203            protected DLFileShortcutService dlFileShortcutService;
1204            @BeanReference(type = DLFileShortcutPersistence.class)
1205            protected DLFileShortcutPersistence dlFileShortcutPersistence;
1206            @BeanReference(type = DLFileVersionLocalService.class)
1207            protected DLFileVersionLocalService dlFileVersionLocalService;
1208            @BeanReference(type = DLFileVersionService.class)
1209            protected DLFileVersionService dlFileVersionService;
1210            @BeanReference(type = DLFileVersionPersistence.class)
1211            protected DLFileVersionPersistence dlFileVersionPersistence;
1212            @BeanReference(type = DLFolderLocalService.class)
1213            protected DLFolderLocalService dlFolderLocalService;
1214            @BeanReference(type = DLFolderService.class)
1215            protected DLFolderService dlFolderService;
1216            @BeanReference(type = DLFolderPersistence.class)
1217            protected DLFolderPersistence dlFolderPersistence;
1218            @BeanReference(type = DLFolderFinder.class)
1219            protected DLFolderFinder dlFolderFinder;
1220            @BeanReference(type = DLSyncLocalService.class)
1221            protected DLSyncLocalService dlSyncLocalService;
1222            @BeanReference(type = DLSyncService.class)
1223            protected DLSyncService dlSyncService;
1224            @BeanReference(type = DLSyncPersistence.class)
1225            protected DLSyncPersistence dlSyncPersistence;
1226            @BeanReference(type = CounterLocalService.class)
1227            protected CounterLocalService counterLocalService;
1228            @BeanReference(type = ResourceLocalService.class)
1229            protected ResourceLocalService resourceLocalService;
1230            @BeanReference(type = ResourceService.class)
1231            protected ResourceService resourceService;
1232            @BeanReference(type = ResourcePersistence.class)
1233            protected ResourcePersistence resourcePersistence;
1234            @BeanReference(type = ResourceFinder.class)
1235            protected ResourceFinder resourceFinder;
1236            @BeanReference(type = UserLocalService.class)
1237            protected UserLocalService userLocalService;
1238            @BeanReference(type = UserService.class)
1239            protected UserService userService;
1240            @BeanReference(type = UserPersistence.class)
1241            protected UserPersistence userPersistence;
1242            @BeanReference(type = UserFinder.class)
1243            protected UserFinder userFinder;
1244            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1245            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1246            private static Log _log = LogFactoryUtil.getLog(DLFileVersionLocalServiceBaseImpl.class);
1247            private String _beanIdentifier;
1248    }