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