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