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