001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.dao.db.DB;
021    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
025    import com.liferay.portal.kernel.dao.orm.Criterion;
026    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.Disjunction;
028    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
029    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
030    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
031    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
032    import com.liferay.portal.kernel.dao.orm.Projection;
033    import com.liferay.portal.kernel.dao.orm.Property;
034    import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil;
035    import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil;
036    import com.liferay.portal.kernel.exception.PortalException;
037    import com.liferay.portal.kernel.exception.SystemException;
038    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
039    import com.liferay.portal.kernel.search.Indexable;
040    import com.liferay.portal.kernel.search.IndexableType;
041    import com.liferay.portal.kernel.util.OrderByComparator;
042    import com.liferay.portal.kernel.workflow.WorkflowConstants;
043    import com.liferay.portal.model.PersistedModel;
044    import com.liferay.portal.service.BaseLocalServiceImpl;
045    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
046    import com.liferay.portal.service.persistence.GroupFinder;
047    import com.liferay.portal.service.persistence.GroupPersistence;
048    import com.liferay.portal.service.persistence.RepositoryPersistence;
049    import com.liferay.portal.service.persistence.UserFinder;
050    import com.liferay.portal.service.persistence.UserPersistence;
051    import com.liferay.portal.service.persistence.WebDAVPropsPersistence;
052    import com.liferay.portal.service.persistence.WorkflowDefinitionLinkPersistence;
053    import com.liferay.portal.service.persistence.WorkflowInstanceLinkPersistence;
054    import com.liferay.portal.util.PortalUtil;
055    
056    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
057    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
058    import com.liferay.portlet.documentlibrary.model.DLFolder;
059    import com.liferay.portlet.documentlibrary.service.DLFolderLocalService;
060    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinder;
061    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryPersistence;
062    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypeFinder;
063    import com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryTypePersistence;
064    import com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutPersistence;
065    import com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence;
066    import com.liferay.portlet.documentlibrary.service.persistence.DLFolderFinder;
067    import com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence;
068    import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
069    import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil;
070    import com.liferay.portlet.exportimport.lar.ManifestSummary;
071    import com.liferay.portlet.exportimport.lar.PortletDataContext;
072    import com.liferay.portlet.exportimport.lar.StagedModelDataHandler;
073    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerRegistryUtil;
074    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
075    import com.liferay.portlet.exportimport.lar.StagedModelType;
076    import com.liferay.portlet.ratings.service.persistence.RatingsStatsFinder;
077    import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
078    import com.liferay.portlet.trash.service.persistence.TrashEntryPersistence;
079    
080    import java.io.Serializable;
081    
082    import java.util.List;
083    
084    import javax.sql.DataSource;
085    
086    /**
087     * Provides the base implementation for the document library folder local service.
088     *
089     * <p>
090     * 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.DLFolderLocalServiceImpl}.
091     * </p>
092     *
093     * @author Brian Wing Shun Chan
094     * @see com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl
095     * @see com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil
096     * @generated
097     */
098    @ProviderType
099    public abstract class DLFolderLocalServiceBaseImpl extends BaseLocalServiceImpl
100            implements DLFolderLocalService, IdentifiableOSGiService {
101            /*
102             * NOTE FOR DEVELOPERS:
103             *
104             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil} to access the document library folder local service.
105             */
106    
107            /**
108             * Adds the document library folder to the database. Also notifies the appropriate model listeners.
109             *
110             * @param dlFolder the document library folder
111             * @return the document library folder that was added
112             */
113            @Indexable(type = IndexableType.REINDEX)
114            @Override
115            public DLFolder addDLFolder(DLFolder dlFolder) {
116                    dlFolder.setNew(true);
117    
118                    return dlFolderPersistence.update(dlFolder);
119            }
120    
121            /**
122             * Creates a new document library folder with the primary key. Does not add the document library folder to the database.
123             *
124             * @param folderId the primary key for the new document library folder
125             * @return the new document library folder
126             */
127            @Override
128            public DLFolder createDLFolder(long folderId) {
129                    return dlFolderPersistence.create(folderId);
130            }
131    
132            /**
133             * Deletes the document library folder with the primary key from the database. Also notifies the appropriate model listeners.
134             *
135             * @param folderId the primary key of the document library folder
136             * @return the document library folder that was removed
137             * @throws PortalException if a document library folder with the primary key could not be found
138             */
139            @Indexable(type = IndexableType.DELETE)
140            @Override
141            public DLFolder deleteDLFolder(long folderId) throws PortalException {
142                    return dlFolderPersistence.remove(folderId);
143            }
144    
145            /**
146             * Deletes the document library folder from the database. Also notifies the appropriate model listeners.
147             *
148             * @param dlFolder the document library folder
149             * @return the document library folder that was removed
150             */
151            @Indexable(type = IndexableType.DELETE)
152            @Override
153            public DLFolder deleteDLFolder(DLFolder dlFolder) {
154                    return dlFolderPersistence.remove(dlFolder);
155            }
156    
157            @Override
158            public DynamicQuery dynamicQuery() {
159                    Class<?> clazz = getClass();
160    
161                    return DynamicQueryFactoryUtil.forClass(DLFolder.class,
162                            clazz.getClassLoader());
163            }
164    
165            /**
166             * Performs a dynamic query on the database and returns the matching rows.
167             *
168             * @param dynamicQuery the dynamic query
169             * @return the matching rows
170             */
171            @Override
172            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
173                    return dlFolderPersistence.findWithDynamicQuery(dynamicQuery);
174            }
175    
176            /**
177             * Performs a dynamic query on the database and returns a range of the matching rows.
178             *
179             * <p>
180             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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.DLFolderModelImpl}. 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.
181             * </p>
182             *
183             * @param dynamicQuery the dynamic query
184             * @param start the lower bound of the range of model instances
185             * @param end the upper bound of the range of model instances (not inclusive)
186             * @return the range of matching rows
187             */
188            @Override
189            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
190                    int end) {
191                    return dlFolderPersistence.findWithDynamicQuery(dynamicQuery, start, end);
192            }
193    
194            /**
195             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
196             *
197             * <p>
198             * 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.DLFolderModelImpl}. 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.
199             * </p>
200             *
201             * @param dynamicQuery the dynamic query
202             * @param start the lower bound of the range of model instances
203             * @param end the upper bound of the range of model instances (not inclusive)
204             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
205             * @return the ordered range of matching rows
206             */
207            @Override
208            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
209                    int end, OrderByComparator<T> orderByComparator) {
210                    return dlFolderPersistence.findWithDynamicQuery(dynamicQuery, start,
211                            end, orderByComparator);
212            }
213    
214            /**
215             * Returns the number of rows matching the dynamic query.
216             *
217             * @param dynamicQuery the dynamic query
218             * @return the number of rows matching the dynamic query
219             */
220            @Override
221            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
222                    return dlFolderPersistence.countWithDynamicQuery(dynamicQuery);
223            }
224    
225            /**
226             * Returns the number of rows matching the dynamic query.
227             *
228             * @param dynamicQuery the dynamic query
229             * @param projection the projection to apply to the query
230             * @return the number of rows matching the dynamic query
231             */
232            @Override
233            public long dynamicQueryCount(DynamicQuery dynamicQuery,
234                    Projection projection) {
235                    return dlFolderPersistence.countWithDynamicQuery(dynamicQuery,
236                            projection);
237            }
238    
239            @Override
240            public DLFolder fetchDLFolder(long folderId) {
241                    return dlFolderPersistence.fetchByPrimaryKey(folderId);
242            }
243    
244            /**
245             * Returns the document library folder matching the UUID and group.
246             *
247             * @param uuid the document library folder's UUID
248             * @param groupId the primary key of the group
249             * @return the matching document library folder, or <code>null</code> if a matching document library folder could not be found
250             */
251            @Override
252            public DLFolder fetchDLFolderByUuidAndGroupId(String uuid, long groupId) {
253                    return dlFolderPersistence.fetchByUUID_G(uuid, groupId);
254            }
255    
256            /**
257             * Returns the document library folder with the primary key.
258             *
259             * @param folderId the primary key of the document library folder
260             * @return the document library folder
261             * @throws PortalException if a document library folder with the primary key could not be found
262             */
263            @Override
264            public DLFolder getDLFolder(long folderId) throws PortalException {
265                    return dlFolderPersistence.findByPrimaryKey(folderId);
266            }
267    
268            @Override
269            public ActionableDynamicQuery getActionableDynamicQuery() {
270                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
271    
272                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil.getService());
273                    actionableDynamicQuery.setClassLoader(getClassLoader());
274                    actionableDynamicQuery.setModelClass(DLFolder.class);
275    
276                    actionableDynamicQuery.setPrimaryKeyPropertyName("folderId");
277    
278                    return actionableDynamicQuery;
279            }
280    
281            @Override
282            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
283                    IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
284    
285                    indexableActionableDynamicQuery.setBaseLocalService(com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil.getService());
286                    indexableActionableDynamicQuery.setClassLoader(getClassLoader());
287                    indexableActionableDynamicQuery.setModelClass(DLFolder.class);
288    
289                    indexableActionableDynamicQuery.setPrimaryKeyPropertyName("folderId");
290    
291                    return indexableActionableDynamicQuery;
292            }
293    
294            protected void initActionableDynamicQuery(
295                    ActionableDynamicQuery actionableDynamicQuery) {
296                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil.getService());
297                    actionableDynamicQuery.setClassLoader(getClassLoader());
298                    actionableDynamicQuery.setModelClass(DLFolder.class);
299    
300                    actionableDynamicQuery.setPrimaryKeyPropertyName("folderId");
301            }
302    
303            @Override
304            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
305                    final PortletDataContext portletDataContext) {
306                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
307                                    @Override
308                                    public long performCount() throws PortalException {
309                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
310    
311                                            StagedModelType stagedModelType = getStagedModelType();
312    
313                                            long modelAdditionCount = super.performCount();
314    
315                                            manifestSummary.addModelAdditionCount(stagedModelType,
316                                                    modelAdditionCount);
317    
318                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
319                                                            stagedModelType);
320    
321                                            manifestSummary.addModelDeletionCount(stagedModelType,
322                                                    modelDeletionCount);
323    
324                                            return modelAdditionCount;
325                                    }
326                            };
327    
328                    initActionableDynamicQuery(exportActionableDynamicQuery);
329    
330                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
331                                    @Override
332                                    public void addCriteria(DynamicQuery dynamicQuery) {
333                                            Criterion modifiedDateCriterion = portletDataContext.getDateRangeCriteria(
334                                                            "modifiedDate");
335                                            Criterion statusDateCriterion = portletDataContext.getDateRangeCriteria(
336                                                            "statusDate");
337    
338                                            if ((modifiedDateCriterion != null) &&
339                                                            (statusDateCriterion != null)) {
340                                                    Disjunction disjunction = RestrictionsFactoryUtil.disjunction();
341    
342                                                    disjunction.add(modifiedDateCriterion);
343                                                    disjunction.add(statusDateCriterion);
344    
345                                                    dynamicQuery.add(disjunction);
346                                            }
347    
348                                            Property workflowStatusProperty = PropertyFactoryUtil.forName(
349                                                            "status");
350    
351                                            if (portletDataContext.isInitialPublication()) {
352                                                    dynamicQuery.add(workflowStatusProperty.ne(
353                                                                    WorkflowConstants.STATUS_IN_TRASH));
354                                            }
355                                            else {
356                                                    StagedModelDataHandler<?> stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(DLFolder.class.getName());
357    
358                                                    dynamicQuery.add(workflowStatusProperty.in(
359                                                                    stagedModelDataHandler.getExportableStatuses()));
360                                            }
361                                    }
362                            });
363    
364                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
365    
366                    exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
367    
368                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<DLFolder>() {
369                                    @Override
370                                    public void performAction(DLFolder dlFolder)
371                                            throws PortalException {
372                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
373                                                    dlFolder);
374                                    }
375                            });
376                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
377                                    PortalUtil.getClassNameId(DLFolder.class.getName())));
378    
379                    return exportActionableDynamicQuery;
380            }
381    
382            /**
383             * @throws PortalException
384             */
385            @Override
386            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
387                    throws PortalException {
388                    return dlFolderLocalService.deleteDLFolder((DLFolder)persistedModel);
389            }
390    
391            @Override
392            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
393                    throws PortalException {
394                    return dlFolderPersistence.findByPrimaryKey(primaryKeyObj);
395            }
396    
397            /**
398             * Returns all the document library folders matching the UUID and company.
399             *
400             * @param uuid the UUID of the document library folders
401             * @param companyId the primary key of the company
402             * @return the matching document library folders, or an empty list if no matches were found
403             */
404            @Override
405            public List<DLFolder> getDLFoldersByUuidAndCompanyId(String uuid,
406                    long companyId) {
407                    return dlFolderPersistence.findByUuid_C(uuid, companyId);
408            }
409    
410            /**
411             * Returns a range of document library folders matching the UUID and company.
412             *
413             * @param uuid the UUID of the document library folders
414             * @param companyId the primary key of the company
415             * @param start the lower bound of the range of document library folders
416             * @param end the upper bound of the range of document library folders (not inclusive)
417             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
418             * @return the range of matching document library folders, or an empty list if no matches were found
419             */
420            @Override
421            public List<DLFolder> getDLFoldersByUuidAndCompanyId(String uuid,
422                    long companyId, int start, int end,
423                    OrderByComparator<DLFolder> orderByComparator) {
424                    return dlFolderPersistence.findByUuid_C(uuid, companyId, start, end,
425                            orderByComparator);
426            }
427    
428            /**
429             * Returns the document library folder matching the UUID and group.
430             *
431             * @param uuid the document library folder's UUID
432             * @param groupId the primary key of the group
433             * @return the matching document library folder
434             * @throws PortalException if a matching document library folder could not be found
435             */
436            @Override
437            public DLFolder getDLFolderByUuidAndGroupId(String uuid, long groupId)
438                    throws PortalException {
439                    return dlFolderPersistence.findByUUID_G(uuid, groupId);
440            }
441    
442            /**
443             * Returns a range of all the document library folders.
444             *
445             * <p>
446             * 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.DLFolderModelImpl}. 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.
447             * </p>
448             *
449             * @param start the lower bound of the range of document library folders
450             * @param end the upper bound of the range of document library folders (not inclusive)
451             * @return the range of document library folders
452             */
453            @Override
454            public List<DLFolder> getDLFolders(int start, int end) {
455                    return dlFolderPersistence.findAll(start, end);
456            }
457    
458            /**
459             * Returns the number of document library folders.
460             *
461             * @return the number of document library folders
462             */
463            @Override
464            public int getDLFoldersCount() {
465                    return dlFolderPersistence.countAll();
466            }
467    
468            /**
469             * Updates the document library folder in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
470             *
471             * @param dlFolder the document library folder
472             * @return the document library folder that was updated
473             */
474            @Indexable(type = IndexableType.REINDEX)
475            @Override
476            public DLFolder updateDLFolder(DLFolder dlFolder) {
477                    return dlFolderPersistence.update(dlFolder);
478            }
479    
480            /**
481             */
482            @Override
483            public void addDLFileEntryTypeDLFolder(long fileEntryTypeId, long folderId) {
484                    dlFileEntryTypePersistence.addDLFolder(fileEntryTypeId, folderId);
485            }
486    
487            /**
488             */
489            @Override
490            public void addDLFileEntryTypeDLFolder(long fileEntryTypeId,
491                    DLFolder dlFolder) {
492                    dlFileEntryTypePersistence.addDLFolder(fileEntryTypeId, dlFolder);
493            }
494    
495            /**
496             */
497            @Override
498            public void addDLFileEntryTypeDLFolders(long fileEntryTypeId,
499                    long[] folderIds) {
500                    dlFileEntryTypePersistence.addDLFolders(fileEntryTypeId, folderIds);
501            }
502    
503            /**
504             */
505            @Override
506            public void addDLFileEntryTypeDLFolders(long fileEntryTypeId,
507                    List<DLFolder> DLFolders) {
508                    dlFileEntryTypePersistence.addDLFolders(fileEntryTypeId, DLFolders);
509            }
510    
511            /**
512             */
513            @Override
514            public void clearDLFileEntryTypeDLFolders(long fileEntryTypeId) {
515                    dlFileEntryTypePersistence.clearDLFolders(fileEntryTypeId);
516            }
517    
518            /**
519             */
520            @Override
521            public void deleteDLFileEntryTypeDLFolder(long fileEntryTypeId,
522                    long folderId) {
523                    dlFileEntryTypePersistence.removeDLFolder(fileEntryTypeId, folderId);
524            }
525    
526            /**
527             */
528            @Override
529            public void deleteDLFileEntryTypeDLFolder(long fileEntryTypeId,
530                    DLFolder dlFolder) {
531                    dlFileEntryTypePersistence.removeDLFolder(fileEntryTypeId, dlFolder);
532            }
533    
534            /**
535             */
536            @Override
537            public void deleteDLFileEntryTypeDLFolders(long fileEntryTypeId,
538                    long[] folderIds) {
539                    dlFileEntryTypePersistence.removeDLFolders(fileEntryTypeId, folderIds);
540            }
541    
542            /**
543             */
544            @Override
545            public void deleteDLFileEntryTypeDLFolders(long fileEntryTypeId,
546                    List<DLFolder> DLFolders) {
547                    dlFileEntryTypePersistence.removeDLFolders(fileEntryTypeId, DLFolders);
548            }
549    
550            /**
551             * Returns the fileEntryTypeIds of the document library file entry types associated with the document library folder.
552             *
553             * @param folderId the folderId of the document library folder
554             * @return long[] the fileEntryTypeIds of document library file entry types associated with the document library folder
555             */
556            @Override
557            public long[] getDLFileEntryTypePrimaryKeys(long folderId) {
558                    return dlFolderPersistence.getDLFileEntryTypePrimaryKeys(folderId);
559            }
560    
561            /**
562             */
563            @Override
564            public List<DLFolder> getDLFileEntryTypeDLFolders(long fileEntryTypeId) {
565                    return dlFileEntryTypePersistence.getDLFolders(fileEntryTypeId);
566            }
567    
568            /**
569             */
570            @Override
571            public List<DLFolder> getDLFileEntryTypeDLFolders(long fileEntryTypeId,
572                    int start, int end) {
573                    return dlFileEntryTypePersistence.getDLFolders(fileEntryTypeId, start,
574                            end);
575            }
576    
577            /**
578             */
579            @Override
580            public List<DLFolder> getDLFileEntryTypeDLFolders(long fileEntryTypeId,
581                    int start, int end, OrderByComparator<DLFolder> orderByComparator) {
582                    return dlFileEntryTypePersistence.getDLFolders(fileEntryTypeId, start,
583                            end, orderByComparator);
584            }
585    
586            /**
587             */
588            @Override
589            public int getDLFileEntryTypeDLFoldersCount(long fileEntryTypeId) {
590                    return dlFileEntryTypePersistence.getDLFoldersSize(fileEntryTypeId);
591            }
592    
593            /**
594             */
595            @Override
596            public boolean hasDLFileEntryTypeDLFolder(long fileEntryTypeId,
597                    long folderId) {
598                    return dlFileEntryTypePersistence.containsDLFolder(fileEntryTypeId,
599                            folderId);
600            }
601    
602            /**
603             */
604            @Override
605            public boolean hasDLFileEntryTypeDLFolders(long fileEntryTypeId) {
606                    return dlFileEntryTypePersistence.containsDLFolders(fileEntryTypeId);
607            }
608    
609            /**
610             */
611            @Override
612            public void setDLFileEntryTypeDLFolders(long fileEntryTypeId,
613                    long[] folderIds) {
614                    dlFileEntryTypePersistence.setDLFolders(fileEntryTypeId, folderIds);
615            }
616    
617            /**
618             * Returns the document library folder local service.
619             *
620             * @return the document library folder local service
621             */
622            public DLFolderLocalService getDLFolderLocalService() {
623                    return dlFolderLocalService;
624            }
625    
626            /**
627             * Sets the document library folder local service.
628             *
629             * @param dlFolderLocalService the document library folder local service
630             */
631            public void setDLFolderLocalService(
632                    DLFolderLocalService dlFolderLocalService) {
633                    this.dlFolderLocalService = dlFolderLocalService;
634            }
635    
636            /**
637             * Returns the document library folder persistence.
638             *
639             * @return the document library folder persistence
640             */
641            public DLFolderPersistence getDLFolderPersistence() {
642                    return dlFolderPersistence;
643            }
644    
645            /**
646             * Sets the document library folder persistence.
647             *
648             * @param dlFolderPersistence the document library folder persistence
649             */
650            public void setDLFolderPersistence(DLFolderPersistence dlFolderPersistence) {
651                    this.dlFolderPersistence = dlFolderPersistence;
652            }
653    
654            /**
655             * Returns the document library folder finder.
656             *
657             * @return the document library folder finder
658             */
659            public DLFolderFinder getDLFolderFinder() {
660                    return dlFolderFinder;
661            }
662    
663            /**
664             * Sets the document library folder finder.
665             *
666             * @param dlFolderFinder the document library folder finder
667             */
668            public void setDLFolderFinder(DLFolderFinder dlFolderFinder) {
669                    this.dlFolderFinder = dlFolderFinder;
670            }
671    
672            /**
673             * Returns the counter local service.
674             *
675             * @return the counter local service
676             */
677            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
678                    return counterLocalService;
679            }
680    
681            /**
682             * Sets the counter local service.
683             *
684             * @param counterLocalService the counter local service
685             */
686            public void setCounterLocalService(
687                    com.liferay.counter.service.CounterLocalService counterLocalService) {
688                    this.counterLocalService = counterLocalService;
689            }
690    
691            /**
692             * Returns the group local service.
693             *
694             * @return the group local service
695             */
696            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
697                    return groupLocalService;
698            }
699    
700            /**
701             * Sets the group local service.
702             *
703             * @param groupLocalService the group local service
704             */
705            public void setGroupLocalService(
706                    com.liferay.portal.service.GroupLocalService groupLocalService) {
707                    this.groupLocalService = groupLocalService;
708            }
709    
710            /**
711             * Returns the group persistence.
712             *
713             * @return the group persistence
714             */
715            public GroupPersistence getGroupPersistence() {
716                    return groupPersistence;
717            }
718    
719            /**
720             * Sets the group persistence.
721             *
722             * @param groupPersistence the group persistence
723             */
724            public void setGroupPersistence(GroupPersistence groupPersistence) {
725                    this.groupPersistence = groupPersistence;
726            }
727    
728            /**
729             * Returns the group finder.
730             *
731             * @return the group finder
732             */
733            public GroupFinder getGroupFinder() {
734                    return groupFinder;
735            }
736    
737            /**
738             * Sets the group finder.
739             *
740             * @param groupFinder the group finder
741             */
742            public void setGroupFinder(GroupFinder groupFinder) {
743                    this.groupFinder = groupFinder;
744            }
745    
746            /**
747             * Returns the repository local service.
748             *
749             * @return the repository local service
750             */
751            public com.liferay.portal.service.RepositoryLocalService getRepositoryLocalService() {
752                    return repositoryLocalService;
753            }
754    
755            /**
756             * Sets the repository local service.
757             *
758             * @param repositoryLocalService the repository local service
759             */
760            public void setRepositoryLocalService(
761                    com.liferay.portal.service.RepositoryLocalService repositoryLocalService) {
762                    this.repositoryLocalService = repositoryLocalService;
763            }
764    
765            /**
766             * Returns the repository persistence.
767             *
768             * @return the repository persistence
769             */
770            public RepositoryPersistence getRepositoryPersistence() {
771                    return repositoryPersistence;
772            }
773    
774            /**
775             * Sets the repository persistence.
776             *
777             * @param repositoryPersistence the repository persistence
778             */
779            public void setRepositoryPersistence(
780                    RepositoryPersistence repositoryPersistence) {
781                    this.repositoryPersistence = repositoryPersistence;
782            }
783    
784            /**
785             * Returns the resource local service.
786             *
787             * @return the resource local service
788             */
789            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
790                    return resourceLocalService;
791            }
792    
793            /**
794             * Sets the resource local service.
795             *
796             * @param resourceLocalService the resource local service
797             */
798            public void setResourceLocalService(
799                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
800                    this.resourceLocalService = resourceLocalService;
801            }
802    
803            /**
804             * Returns the user local service.
805             *
806             * @return the user local service
807             */
808            public com.liferay.portal.service.UserLocalService getUserLocalService() {
809                    return userLocalService;
810            }
811    
812            /**
813             * Sets the user local service.
814             *
815             * @param userLocalService the user local service
816             */
817            public void setUserLocalService(
818                    com.liferay.portal.service.UserLocalService userLocalService) {
819                    this.userLocalService = userLocalService;
820            }
821    
822            /**
823             * Returns the user persistence.
824             *
825             * @return the user persistence
826             */
827            public UserPersistence getUserPersistence() {
828                    return userPersistence;
829            }
830    
831            /**
832             * Sets the user persistence.
833             *
834             * @param userPersistence the user persistence
835             */
836            public void setUserPersistence(UserPersistence userPersistence) {
837                    this.userPersistence = userPersistence;
838            }
839    
840            /**
841             * Returns the user finder.
842             *
843             * @return the user finder
844             */
845            public UserFinder getUserFinder() {
846                    return userFinder;
847            }
848    
849            /**
850             * Sets the user finder.
851             *
852             * @param userFinder the user finder
853             */
854            public void setUserFinder(UserFinder userFinder) {
855                    this.userFinder = userFinder;
856            }
857    
858            /**
859             * Returns the web d a v props local service.
860             *
861             * @return the web d a v props local service
862             */
863            public com.liferay.portal.service.WebDAVPropsLocalService getWebDAVPropsLocalService() {
864                    return webDAVPropsLocalService;
865            }
866    
867            /**
868             * Sets the web d a v props local service.
869             *
870             * @param webDAVPropsLocalService the web d a v props local service
871             */
872            public void setWebDAVPropsLocalService(
873                    com.liferay.portal.service.WebDAVPropsLocalService webDAVPropsLocalService) {
874                    this.webDAVPropsLocalService = webDAVPropsLocalService;
875            }
876    
877            /**
878             * Returns the web d a v props persistence.
879             *
880             * @return the web d a v props persistence
881             */
882            public WebDAVPropsPersistence getWebDAVPropsPersistence() {
883                    return webDAVPropsPersistence;
884            }
885    
886            /**
887             * Sets the web d a v props persistence.
888             *
889             * @param webDAVPropsPersistence the web d a v props persistence
890             */
891            public void setWebDAVPropsPersistence(
892                    WebDAVPropsPersistence webDAVPropsPersistence) {
893                    this.webDAVPropsPersistence = webDAVPropsPersistence;
894            }
895    
896            /**
897             * Returns the workflow definition link local service.
898             *
899             * @return the workflow definition link local service
900             */
901            public com.liferay.portal.service.WorkflowDefinitionLinkLocalService getWorkflowDefinitionLinkLocalService() {
902                    return workflowDefinitionLinkLocalService;
903            }
904    
905            /**
906             * Sets the workflow definition link local service.
907             *
908             * @param workflowDefinitionLinkLocalService the workflow definition link local service
909             */
910            public void setWorkflowDefinitionLinkLocalService(
911                    com.liferay.portal.service.WorkflowDefinitionLinkLocalService workflowDefinitionLinkLocalService) {
912                    this.workflowDefinitionLinkLocalService = workflowDefinitionLinkLocalService;
913            }
914    
915            /**
916             * Returns the workflow definition link persistence.
917             *
918             * @return the workflow definition link persistence
919             */
920            public WorkflowDefinitionLinkPersistence getWorkflowDefinitionLinkPersistence() {
921                    return workflowDefinitionLinkPersistence;
922            }
923    
924            /**
925             * Sets the workflow definition link persistence.
926             *
927             * @param workflowDefinitionLinkPersistence the workflow definition link persistence
928             */
929            public void setWorkflowDefinitionLinkPersistence(
930                    WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence) {
931                    this.workflowDefinitionLinkPersistence = workflowDefinitionLinkPersistence;
932            }
933    
934            /**
935             * Returns the workflow instance link local service.
936             *
937             * @return the workflow instance link local service
938             */
939            public com.liferay.portal.service.WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() {
940                    return workflowInstanceLinkLocalService;
941            }
942    
943            /**
944             * Sets the workflow instance link local service.
945             *
946             * @param workflowInstanceLinkLocalService the workflow instance link local service
947             */
948            public void setWorkflowInstanceLinkLocalService(
949                    com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) {
950                    this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService;
951            }
952    
953            /**
954             * Returns the workflow instance link persistence.
955             *
956             * @return the workflow instance link persistence
957             */
958            public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() {
959                    return workflowInstanceLinkPersistence;
960            }
961    
962            /**
963             * Sets the workflow instance link persistence.
964             *
965             * @param workflowInstanceLinkPersistence the workflow instance link persistence
966             */
967            public void setWorkflowInstanceLinkPersistence(
968                    WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) {
969                    this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence;
970            }
971    
972            /**
973             * Returns the asset entry local service.
974             *
975             * @return the asset entry local service
976             */
977            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
978                    return assetEntryLocalService;
979            }
980    
981            /**
982             * Sets the asset entry local service.
983             *
984             * @param assetEntryLocalService the asset entry local service
985             */
986            public void setAssetEntryLocalService(
987                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
988                    this.assetEntryLocalService = assetEntryLocalService;
989            }
990    
991            /**
992             * Returns the asset entry persistence.
993             *
994             * @return the asset entry persistence
995             */
996            public AssetEntryPersistence getAssetEntryPersistence() {
997                    return assetEntryPersistence;
998            }
999    
1000            /**
1001             * Sets the asset entry persistence.
1002             *
1003             * @param assetEntryPersistence the asset entry persistence
1004             */
1005            public void setAssetEntryPersistence(
1006                    AssetEntryPersistence assetEntryPersistence) {
1007                    this.assetEntryPersistence = assetEntryPersistence;
1008            }
1009    
1010            /**
1011             * Returns the asset entry finder.
1012             *
1013             * @return the asset entry finder
1014             */
1015            public AssetEntryFinder getAssetEntryFinder() {
1016                    return assetEntryFinder;
1017            }
1018    
1019            /**
1020             * Sets the asset entry finder.
1021             *
1022             * @param assetEntryFinder the asset entry finder
1023             */
1024            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
1025                    this.assetEntryFinder = assetEntryFinder;
1026            }
1027    
1028            /**
1029             * Returns the d l app helper local service.
1030             *
1031             * @return the d l app helper local service
1032             */
1033            public com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService getDLAppHelperLocalService() {
1034                    return dlAppHelperLocalService;
1035            }
1036    
1037            /**
1038             * Sets the d l app helper local service.
1039             *
1040             * @param dlAppHelperLocalService the d l app helper local service
1041             */
1042            public void setDLAppHelperLocalService(
1043                    com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService dlAppHelperLocalService) {
1044                    this.dlAppHelperLocalService = dlAppHelperLocalService;
1045            }
1046    
1047            /**
1048             * Returns the document library file entry local service.
1049             *
1050             * @return the document library file entry local service
1051             */
1052            public com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService getDLFileEntryLocalService() {
1053                    return dlFileEntryLocalService;
1054            }
1055    
1056            /**
1057             * Sets the document library file entry local service.
1058             *
1059             * @param dlFileEntryLocalService the document library file entry local service
1060             */
1061            public void setDLFileEntryLocalService(
1062                    com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService dlFileEntryLocalService) {
1063                    this.dlFileEntryLocalService = dlFileEntryLocalService;
1064            }
1065    
1066            /**
1067             * Returns the document library file entry persistence.
1068             *
1069             * @return the document library file entry persistence
1070             */
1071            public DLFileEntryPersistence getDLFileEntryPersistence() {
1072                    return dlFileEntryPersistence;
1073            }
1074    
1075            /**
1076             * Sets the document library file entry persistence.
1077             *
1078             * @param dlFileEntryPersistence the document library file entry persistence
1079             */
1080            public void setDLFileEntryPersistence(
1081                    DLFileEntryPersistence dlFileEntryPersistence) {
1082                    this.dlFileEntryPersistence = dlFileEntryPersistence;
1083            }
1084    
1085            /**
1086             * Returns the document library file entry finder.
1087             *
1088             * @return the document library file entry finder
1089             */
1090            public DLFileEntryFinder getDLFileEntryFinder() {
1091                    return dlFileEntryFinder;
1092            }
1093    
1094            /**
1095             * Sets the document library file entry finder.
1096             *
1097             * @param dlFileEntryFinder the document library file entry finder
1098             */
1099            public void setDLFileEntryFinder(DLFileEntryFinder dlFileEntryFinder) {
1100                    this.dlFileEntryFinder = dlFileEntryFinder;
1101            }
1102    
1103            /**
1104             * Returns the document library file entry type local service.
1105             *
1106             * @return the document library file entry type local service
1107             */
1108            public com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService getDLFileEntryTypeLocalService() {
1109                    return dlFileEntryTypeLocalService;
1110            }
1111    
1112            /**
1113             * Sets the document library file entry type local service.
1114             *
1115             * @param dlFileEntryTypeLocalService the document library file entry type local service
1116             */
1117            public void setDLFileEntryTypeLocalService(
1118                    com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService dlFileEntryTypeLocalService) {
1119                    this.dlFileEntryTypeLocalService = dlFileEntryTypeLocalService;
1120            }
1121    
1122            /**
1123             * Returns the document library file entry type persistence.
1124             *
1125             * @return the document library file entry type persistence
1126             */
1127            public DLFileEntryTypePersistence getDLFileEntryTypePersistence() {
1128                    return dlFileEntryTypePersistence;
1129            }
1130    
1131            /**
1132             * Sets the document library file entry type persistence.
1133             *
1134             * @param dlFileEntryTypePersistence the document library file entry type persistence
1135             */
1136            public void setDLFileEntryTypePersistence(
1137                    DLFileEntryTypePersistence dlFileEntryTypePersistence) {
1138                    this.dlFileEntryTypePersistence = dlFileEntryTypePersistence;
1139            }
1140    
1141            /**
1142             * Returns the document library file entry type finder.
1143             *
1144             * @return the document library file entry type finder
1145             */
1146            public DLFileEntryTypeFinder getDLFileEntryTypeFinder() {
1147                    return dlFileEntryTypeFinder;
1148            }
1149    
1150            /**
1151             * Sets the document library file entry type finder.
1152             *
1153             * @param dlFileEntryTypeFinder the document library file entry type finder
1154             */
1155            public void setDLFileEntryTypeFinder(
1156                    DLFileEntryTypeFinder dlFileEntryTypeFinder) {
1157                    this.dlFileEntryTypeFinder = dlFileEntryTypeFinder;
1158            }
1159    
1160            /**
1161             * Returns the document library file shortcut local service.
1162             *
1163             * @return the document library file shortcut local service
1164             */
1165            public com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService getDLFileShortcutLocalService() {
1166                    return dlFileShortcutLocalService;
1167            }
1168    
1169            /**
1170             * Sets the document library file shortcut local service.
1171             *
1172             * @param dlFileShortcutLocalService the document library file shortcut local service
1173             */
1174            public void setDLFileShortcutLocalService(
1175                    com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService dlFileShortcutLocalService) {
1176                    this.dlFileShortcutLocalService = dlFileShortcutLocalService;
1177            }
1178    
1179            /**
1180             * Returns the document library file shortcut persistence.
1181             *
1182             * @return the document library file shortcut persistence
1183             */
1184            public DLFileShortcutPersistence getDLFileShortcutPersistence() {
1185                    return dlFileShortcutPersistence;
1186            }
1187    
1188            /**
1189             * Sets the document library file shortcut persistence.
1190             *
1191             * @param dlFileShortcutPersistence the document library file shortcut persistence
1192             */
1193            public void setDLFileShortcutPersistence(
1194                    DLFileShortcutPersistence dlFileShortcutPersistence) {
1195                    this.dlFileShortcutPersistence = dlFileShortcutPersistence;
1196            }
1197    
1198            /**
1199             * Returns the document library file version local service.
1200             *
1201             * @return the document library file version local service
1202             */
1203            public com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService getDLFileVersionLocalService() {
1204                    return dlFileVersionLocalService;
1205            }
1206    
1207            /**
1208             * Sets the document library file version local service.
1209             *
1210             * @param dlFileVersionLocalService the document library file version local service
1211             */
1212            public void setDLFileVersionLocalService(
1213                    com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService dlFileVersionLocalService) {
1214                    this.dlFileVersionLocalService = dlFileVersionLocalService;
1215            }
1216    
1217            /**
1218             * Returns the document library file version persistence.
1219             *
1220             * @return the document library file version persistence
1221             */
1222            public DLFileVersionPersistence getDLFileVersionPersistence() {
1223                    return dlFileVersionPersistence;
1224            }
1225    
1226            /**
1227             * Sets the document library file version persistence.
1228             *
1229             * @param dlFileVersionPersistence the document library file version persistence
1230             */
1231            public void setDLFileVersionPersistence(
1232                    DLFileVersionPersistence dlFileVersionPersistence) {
1233                    this.dlFileVersionPersistence = dlFileVersionPersistence;
1234            }
1235    
1236            /**
1237             * Returns the expando row local service.
1238             *
1239             * @return the expando row local service
1240             */
1241            public com.liferay.portlet.expando.service.ExpandoRowLocalService getExpandoRowLocalService() {
1242                    return expandoRowLocalService;
1243            }
1244    
1245            /**
1246             * Sets the expando row local service.
1247             *
1248             * @param expandoRowLocalService the expando row local service
1249             */
1250            public void setExpandoRowLocalService(
1251                    com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService) {
1252                    this.expandoRowLocalService = expandoRowLocalService;
1253            }
1254    
1255            /**
1256             * Returns the expando row persistence.
1257             *
1258             * @return the expando row persistence
1259             */
1260            public ExpandoRowPersistence getExpandoRowPersistence() {
1261                    return expandoRowPersistence;
1262            }
1263    
1264            /**
1265             * Sets the expando row persistence.
1266             *
1267             * @param expandoRowPersistence the expando row persistence
1268             */
1269            public void setExpandoRowPersistence(
1270                    ExpandoRowPersistence expandoRowPersistence) {
1271                    this.expandoRowPersistence = expandoRowPersistence;
1272            }
1273    
1274            /**
1275             * Returns the ratings stats local service.
1276             *
1277             * @return the ratings stats local service
1278             */
1279            public com.liferay.portlet.ratings.service.RatingsStatsLocalService getRatingsStatsLocalService() {
1280                    return ratingsStatsLocalService;
1281            }
1282    
1283            /**
1284             * Sets the ratings stats local service.
1285             *
1286             * @param ratingsStatsLocalService the ratings stats local service
1287             */
1288            public void setRatingsStatsLocalService(
1289                    com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService) {
1290                    this.ratingsStatsLocalService = ratingsStatsLocalService;
1291            }
1292    
1293            /**
1294             * Returns the ratings stats persistence.
1295             *
1296             * @return the ratings stats persistence
1297             */
1298            public RatingsStatsPersistence getRatingsStatsPersistence() {
1299                    return ratingsStatsPersistence;
1300            }
1301    
1302            /**
1303             * Sets the ratings stats persistence.
1304             *
1305             * @param ratingsStatsPersistence the ratings stats persistence
1306             */
1307            public void setRatingsStatsPersistence(
1308                    RatingsStatsPersistence ratingsStatsPersistence) {
1309                    this.ratingsStatsPersistence = ratingsStatsPersistence;
1310            }
1311    
1312            /**
1313             * Returns the ratings stats finder.
1314             *
1315             * @return the ratings stats finder
1316             */
1317            public RatingsStatsFinder getRatingsStatsFinder() {
1318                    return ratingsStatsFinder;
1319            }
1320    
1321            /**
1322             * Sets the ratings stats finder.
1323             *
1324             * @param ratingsStatsFinder the ratings stats finder
1325             */
1326            public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
1327                    this.ratingsStatsFinder = ratingsStatsFinder;
1328            }
1329    
1330            /**
1331             * Returns the trash entry local service.
1332             *
1333             * @return the trash entry local service
1334             */
1335            public com.liferay.portlet.trash.service.TrashEntryLocalService getTrashEntryLocalService() {
1336                    return trashEntryLocalService;
1337            }
1338    
1339            /**
1340             * Sets the trash entry local service.
1341             *
1342             * @param trashEntryLocalService the trash entry local service
1343             */
1344            public void setTrashEntryLocalService(
1345                    com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService) {
1346                    this.trashEntryLocalService = trashEntryLocalService;
1347            }
1348    
1349            /**
1350             * Returns the trash entry persistence.
1351             *
1352             * @return the trash entry persistence
1353             */
1354            public TrashEntryPersistence getTrashEntryPersistence() {
1355                    return trashEntryPersistence;
1356            }
1357    
1358            /**
1359             * Sets the trash entry persistence.
1360             *
1361             * @param trashEntryPersistence the trash entry persistence
1362             */
1363            public void setTrashEntryPersistence(
1364                    TrashEntryPersistence trashEntryPersistence) {
1365                    this.trashEntryPersistence = trashEntryPersistence;
1366            }
1367    
1368            public void afterPropertiesSet() {
1369                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.documentlibrary.model.DLFolder",
1370                            dlFolderLocalService);
1371            }
1372    
1373            public void destroy() {
1374                    persistedModelLocalServiceRegistry.unregister(
1375                            "com.liferay.portlet.documentlibrary.model.DLFolder");
1376            }
1377    
1378            /**
1379             * Returns the OSGi service identifier.
1380             *
1381             * @return the OSGi service identifier
1382             */
1383            @Override
1384            public String getOSGiServiceIdentifier() {
1385                    return DLFolderLocalService.class.getName();
1386            }
1387    
1388            protected Class<?> getModelClass() {
1389                    return DLFolder.class;
1390            }
1391    
1392            protected String getModelClassName() {
1393                    return DLFolder.class.getName();
1394            }
1395    
1396            /**
1397             * Performs a SQL query.
1398             *
1399             * @param sql the sql query
1400             */
1401            protected void runSQL(String sql) {
1402                    try {
1403                            DataSource dataSource = dlFolderPersistence.getDataSource();
1404    
1405                            DB db = DBManagerUtil.getDB();
1406    
1407                            sql = db.buildSQL(sql);
1408                            sql = PortalUtil.transformSQL(sql);
1409    
1410                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1411                                            sql, new int[0]);
1412    
1413                            sqlUpdate.update();
1414                    }
1415                    catch (Exception e) {
1416                            throw new SystemException(e);
1417                    }
1418            }
1419    
1420            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFolderLocalService.class)
1421            protected DLFolderLocalService dlFolderLocalService;
1422            @BeanReference(type = DLFolderPersistence.class)
1423            protected DLFolderPersistence dlFolderPersistence;
1424            @BeanReference(type = DLFolderFinder.class)
1425            protected DLFolderFinder dlFolderFinder;
1426            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1427            protected com.liferay.counter.service.CounterLocalService counterLocalService;
1428            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
1429            protected com.liferay.portal.service.GroupLocalService groupLocalService;
1430            @BeanReference(type = GroupPersistence.class)
1431            protected GroupPersistence groupPersistence;
1432            @BeanReference(type = GroupFinder.class)
1433            protected GroupFinder groupFinder;
1434            @BeanReference(type = com.liferay.portal.service.RepositoryLocalService.class)
1435            protected com.liferay.portal.service.RepositoryLocalService repositoryLocalService;
1436            @BeanReference(type = RepositoryPersistence.class)
1437            protected RepositoryPersistence repositoryPersistence;
1438            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1439            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1440            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1441            protected com.liferay.portal.service.UserLocalService userLocalService;
1442            @BeanReference(type = UserPersistence.class)
1443            protected UserPersistence userPersistence;
1444            @BeanReference(type = UserFinder.class)
1445            protected UserFinder userFinder;
1446            @BeanReference(type = com.liferay.portal.service.WebDAVPropsLocalService.class)
1447            protected com.liferay.portal.service.WebDAVPropsLocalService webDAVPropsLocalService;
1448            @BeanReference(type = WebDAVPropsPersistence.class)
1449            protected WebDAVPropsPersistence webDAVPropsPersistence;
1450            @BeanReference(type = com.liferay.portal.service.WorkflowDefinitionLinkLocalService.class)
1451            protected com.liferay.portal.service.WorkflowDefinitionLinkLocalService workflowDefinitionLinkLocalService;
1452            @BeanReference(type = WorkflowDefinitionLinkPersistence.class)
1453            protected WorkflowDefinitionLinkPersistence workflowDefinitionLinkPersistence;
1454            @BeanReference(type = com.liferay.portal.service.WorkflowInstanceLinkLocalService.class)
1455            protected com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService;
1456            @BeanReference(type = WorkflowInstanceLinkPersistence.class)
1457            protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
1458            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
1459            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
1460            @BeanReference(type = AssetEntryPersistence.class)
1461            protected AssetEntryPersistence assetEntryPersistence;
1462            @BeanReference(type = AssetEntryFinder.class)
1463            protected AssetEntryFinder assetEntryFinder;
1464            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService.class)
1465            protected com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService dlAppHelperLocalService;
1466            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService.class)
1467            protected com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService dlFileEntryLocalService;
1468            @BeanReference(type = DLFileEntryPersistence.class)
1469            protected DLFileEntryPersistence dlFileEntryPersistence;
1470            @BeanReference(type = DLFileEntryFinder.class)
1471            protected DLFileEntryFinder dlFileEntryFinder;
1472            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService.class)
1473            protected com.liferay.portlet.documentlibrary.service.DLFileEntryTypeLocalService dlFileEntryTypeLocalService;
1474            @BeanReference(type = DLFileEntryTypePersistence.class)
1475            protected DLFileEntryTypePersistence dlFileEntryTypePersistence;
1476            @BeanReference(type = DLFileEntryTypeFinder.class)
1477            protected DLFileEntryTypeFinder dlFileEntryTypeFinder;
1478            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService.class)
1479            protected com.liferay.portlet.documentlibrary.service.DLFileShortcutLocalService dlFileShortcutLocalService;
1480            @BeanReference(type = DLFileShortcutPersistence.class)
1481            protected DLFileShortcutPersistence dlFileShortcutPersistence;
1482            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService.class)
1483            protected com.liferay.portlet.documentlibrary.service.DLFileVersionLocalService dlFileVersionLocalService;
1484            @BeanReference(type = DLFileVersionPersistence.class)
1485            protected DLFileVersionPersistence dlFileVersionPersistence;
1486            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class)
1487            protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService;
1488            @BeanReference(type = ExpandoRowPersistence.class)
1489            protected ExpandoRowPersistence expandoRowPersistence;
1490            @BeanReference(type = com.liferay.portlet.ratings.service.RatingsStatsLocalService.class)
1491            protected com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService;
1492            @BeanReference(type = RatingsStatsPersistence.class)
1493            protected RatingsStatsPersistence ratingsStatsPersistence;
1494            @BeanReference(type = RatingsStatsFinder.class)
1495            protected RatingsStatsFinder ratingsStatsFinder;
1496            @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryLocalService.class)
1497            protected com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService;
1498            @BeanReference(type = TrashEntryPersistence.class)
1499            protected TrashEntryPersistence trashEntryPersistence;
1500            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1501            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1502    }