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