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