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