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