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