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.toString(),
296                                                    modelAdditionCount);
297    
298                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
299                                                            stagedModelType);
300    
301                                            manifestSummary.addModelDeletionCount(stagedModelType.toString(),
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() {
349                                    @Override
350                                    public void performAction(Object object)
351                                            throws PortalException {
352                                            DLFileShortcut stagedModel = (DLFileShortcut)object;
353    
354                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
355                                                    stagedModel);
356                                    }
357                            });
358                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
359                                    PortalUtil.getClassNameId(DLFileShortcut.class.getName())));
360    
361                    return exportActionableDynamicQuery;
362            }
363    
364            /**
365             * @throws PortalException
366             */
367            @Override
368            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
369                    throws PortalException {
370                    return dlFileShortcutLocalService.deleteDLFileShortcut((DLFileShortcut)persistedModel);
371            }
372    
373            @Override
374            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
375                    throws PortalException {
376                    return dlFileShortcutPersistence.findByPrimaryKey(primaryKeyObj);
377            }
378    
379            /**
380             * Returns all the document library file shortcuts matching the UUID and company.
381             *
382             * @param uuid the UUID of the document library file shortcuts
383             * @param companyId the primary key of the company
384             * @return the matching document library file shortcuts, or an empty list if no matches were found
385             */
386            @Override
387            public List<DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId(
388                    String uuid, long companyId) {
389                    return dlFileShortcutPersistence.findByUuid_C(uuid, companyId);
390            }
391    
392            /**
393             * Returns a range of document library file shortcuts matching the UUID and company.
394             *
395             * @param uuid the UUID of the document library file shortcuts
396             * @param companyId the primary key of the company
397             * @param start the lower bound of the range of document library file shortcuts
398             * @param end the upper bound of the range of document library file shortcuts (not inclusive)
399             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
400             * @return the range of matching document library file shortcuts, or an empty list if no matches were found
401             */
402            @Override
403            public List<DLFileShortcut> getDLFileShortcutsByUuidAndCompanyId(
404                    String uuid, long companyId, int start, int end,
405                    OrderByComparator<DLFileShortcut> orderByComparator) {
406                    return dlFileShortcutPersistence.findByUuid_C(uuid, companyId, start,
407                            end, orderByComparator);
408            }
409    
410            /**
411             * Returns the document library file shortcut matching the UUID and group.
412             *
413             * @param uuid the document library file shortcut's UUID
414             * @param groupId the primary key of the group
415             * @return the matching document library file shortcut
416             * @throws PortalException if a matching document library file shortcut could not be found
417             */
418            @Override
419            public DLFileShortcut getDLFileShortcutByUuidAndGroupId(String uuid,
420                    long groupId) throws PortalException {
421                    return dlFileShortcutPersistence.findByUUID_G(uuid, groupId);
422            }
423    
424            /**
425             * Returns a range of all the document library file shortcuts.
426             *
427             * <p>
428             * 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.
429             * </p>
430             *
431             * @param start the lower bound of the range of document library file shortcuts
432             * @param end the upper bound of the range of document library file shortcuts (not inclusive)
433             * @return the range of document library file shortcuts
434             */
435            @Override
436            public List<DLFileShortcut> getDLFileShortcuts(int start, int end) {
437                    return dlFileShortcutPersistence.findAll(start, end);
438            }
439    
440            /**
441             * Returns the number of document library file shortcuts.
442             *
443             * @return the number of document library file shortcuts
444             */
445            @Override
446            public int getDLFileShortcutsCount() {
447                    return dlFileShortcutPersistence.countAll();
448            }
449    
450            /**
451             * Updates the document library file shortcut in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
452             *
453             * @param dlFileShortcut the document library file shortcut
454             * @return the document library file shortcut that was updated
455             */
456            @Indexable(type = IndexableType.REINDEX)
457            @Override
458            public DLFileShortcut updateDLFileShortcut(DLFileShortcut dlFileShortcut) {
459                    return dlFileShortcutPersistence.update(dlFileShortcut);
460            }
461    
462            /**
463             * Returns the document library file shortcut local service.
464             *
465             * @return the document library file shortcut local service
466             */
467            public DLFileShortcutLocalService getDLFileShortcutLocalService() {
468                    return dlFileShortcutLocalService;
469            }
470    
471            /**
472             * Sets the document library file shortcut local service.
473             *
474             * @param dlFileShortcutLocalService the document library file shortcut local service
475             */
476            public void setDLFileShortcutLocalService(
477                    DLFileShortcutLocalService dlFileShortcutLocalService) {
478                    this.dlFileShortcutLocalService = dlFileShortcutLocalService;
479            }
480    
481            /**
482             * Returns the document library file shortcut remote service.
483             *
484             * @return the document library file shortcut remote service
485             */
486            public com.liferay.portlet.documentlibrary.service.DLFileShortcutService getDLFileShortcutService() {
487                    return dlFileShortcutService;
488            }
489    
490            /**
491             * Sets the document library file shortcut remote service.
492             *
493             * @param dlFileShortcutService the document library file shortcut remote service
494             */
495            public void setDLFileShortcutService(
496                    com.liferay.portlet.documentlibrary.service.DLFileShortcutService dlFileShortcutService) {
497                    this.dlFileShortcutService = dlFileShortcutService;
498            }
499    
500            /**
501             * Returns the document library file shortcut persistence.
502             *
503             * @return the document library file shortcut persistence
504             */
505            public DLFileShortcutPersistence getDLFileShortcutPersistence() {
506                    return dlFileShortcutPersistence;
507            }
508    
509            /**
510             * Sets the document library file shortcut persistence.
511             *
512             * @param dlFileShortcutPersistence the document library file shortcut persistence
513             */
514            public void setDLFileShortcutPersistence(
515                    DLFileShortcutPersistence dlFileShortcutPersistence) {
516                    this.dlFileShortcutPersistence = dlFileShortcutPersistence;
517            }
518    
519            /**
520             * Returns the counter local service.
521             *
522             * @return the counter local service
523             */
524            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
525                    return counterLocalService;
526            }
527    
528            /**
529             * Sets the counter local service.
530             *
531             * @param counterLocalService the counter local service
532             */
533            public void setCounterLocalService(
534                    com.liferay.counter.service.CounterLocalService counterLocalService) {
535                    this.counterLocalService = counterLocalService;
536            }
537    
538            /**
539             * Returns the resource local service.
540             *
541             * @return the resource local service
542             */
543            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
544                    return resourceLocalService;
545            }
546    
547            /**
548             * Sets the resource local service.
549             *
550             * @param resourceLocalService the resource local service
551             */
552            public void setResourceLocalService(
553                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
554                    this.resourceLocalService = resourceLocalService;
555            }
556    
557            /**
558             * Returns the user local service.
559             *
560             * @return the user local service
561             */
562            public com.liferay.portal.service.UserLocalService getUserLocalService() {
563                    return userLocalService;
564            }
565    
566            /**
567             * Sets the user local service.
568             *
569             * @param userLocalService the user local service
570             */
571            public void setUserLocalService(
572                    com.liferay.portal.service.UserLocalService userLocalService) {
573                    this.userLocalService = userLocalService;
574            }
575    
576            /**
577             * Returns the user remote service.
578             *
579             * @return the user remote service
580             */
581            public com.liferay.portal.service.UserService getUserService() {
582                    return userService;
583            }
584    
585            /**
586             * Sets the user remote service.
587             *
588             * @param userService the user remote service
589             */
590            public void setUserService(
591                    com.liferay.portal.service.UserService userService) {
592                    this.userService = userService;
593            }
594    
595            /**
596             * Returns the user persistence.
597             *
598             * @return the user persistence
599             */
600            public UserPersistence getUserPersistence() {
601                    return userPersistence;
602            }
603    
604            /**
605             * Sets the user persistence.
606             *
607             * @param userPersistence the user persistence
608             */
609            public void setUserPersistence(UserPersistence userPersistence) {
610                    this.userPersistence = userPersistence;
611            }
612    
613            /**
614             * Returns the user finder.
615             *
616             * @return the user finder
617             */
618            public UserFinder getUserFinder() {
619                    return userFinder;
620            }
621    
622            /**
623             * Sets the user finder.
624             *
625             * @param userFinder the user finder
626             */
627            public void setUserFinder(UserFinder userFinder) {
628                    this.userFinder = userFinder;
629            }
630    
631            /**
632             * Returns the asset entry local service.
633             *
634             * @return the asset entry local service
635             */
636            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
637                    return assetEntryLocalService;
638            }
639    
640            /**
641             * Sets the asset entry local service.
642             *
643             * @param assetEntryLocalService the asset entry local service
644             */
645            public void setAssetEntryLocalService(
646                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
647                    this.assetEntryLocalService = assetEntryLocalService;
648            }
649    
650            /**
651             * Returns the asset entry remote service.
652             *
653             * @return the asset entry remote service
654             */
655            public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
656                    return assetEntryService;
657            }
658    
659            /**
660             * Sets the asset entry remote service.
661             *
662             * @param assetEntryService the asset entry remote service
663             */
664            public void setAssetEntryService(
665                    com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
666                    this.assetEntryService = assetEntryService;
667            }
668    
669            /**
670             * Returns the asset entry persistence.
671             *
672             * @return the asset entry persistence
673             */
674            public AssetEntryPersistence getAssetEntryPersistence() {
675                    return assetEntryPersistence;
676            }
677    
678            /**
679             * Sets the asset entry persistence.
680             *
681             * @param assetEntryPersistence the asset entry persistence
682             */
683            public void setAssetEntryPersistence(
684                    AssetEntryPersistence assetEntryPersistence) {
685                    this.assetEntryPersistence = assetEntryPersistence;
686            }
687    
688            /**
689             * Returns the asset entry finder.
690             *
691             * @return the asset entry finder
692             */
693            public AssetEntryFinder getAssetEntryFinder() {
694                    return assetEntryFinder;
695            }
696    
697            /**
698             * Sets the asset entry finder.
699             *
700             * @param assetEntryFinder the asset entry finder
701             */
702            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
703                    this.assetEntryFinder = assetEntryFinder;
704            }
705    
706            /**
707             * Returns the asset tag local service.
708             *
709             * @return the asset tag local service
710             */
711            public com.liferay.portlet.asset.service.AssetTagLocalService getAssetTagLocalService() {
712                    return assetTagLocalService;
713            }
714    
715            /**
716             * Sets the asset tag local service.
717             *
718             * @param assetTagLocalService the asset tag local service
719             */
720            public void setAssetTagLocalService(
721                    com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService) {
722                    this.assetTagLocalService = assetTagLocalService;
723            }
724    
725            /**
726             * Returns the asset tag remote service.
727             *
728             * @return the asset tag remote service
729             */
730            public com.liferay.portlet.asset.service.AssetTagService getAssetTagService() {
731                    return assetTagService;
732            }
733    
734            /**
735             * Sets the asset tag remote service.
736             *
737             * @param assetTagService the asset tag remote service
738             */
739            public void setAssetTagService(
740                    com.liferay.portlet.asset.service.AssetTagService assetTagService) {
741                    this.assetTagService = assetTagService;
742            }
743    
744            /**
745             * Returns the asset tag persistence.
746             *
747             * @return the asset tag persistence
748             */
749            public AssetTagPersistence getAssetTagPersistence() {
750                    return assetTagPersistence;
751            }
752    
753            /**
754             * Sets the asset tag persistence.
755             *
756             * @param assetTagPersistence the asset tag persistence
757             */
758            public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
759                    this.assetTagPersistence = assetTagPersistence;
760            }
761    
762            /**
763             * Returns the asset tag finder.
764             *
765             * @return the asset tag finder
766             */
767            public AssetTagFinder getAssetTagFinder() {
768                    return assetTagFinder;
769            }
770    
771            /**
772             * Sets the asset tag finder.
773             *
774             * @param assetTagFinder the asset tag finder
775             */
776            public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
777                    this.assetTagFinder = assetTagFinder;
778            }
779    
780            /**
781             * Returns the d l app local service.
782             *
783             * @return the d l app local service
784             */
785            public com.liferay.portlet.documentlibrary.service.DLAppLocalService getDLAppLocalService() {
786                    return dlAppLocalService;
787            }
788    
789            /**
790             * Sets the d l app local service.
791             *
792             * @param dlAppLocalService the d l app local service
793             */
794            public void setDLAppLocalService(
795                    com.liferay.portlet.documentlibrary.service.DLAppLocalService dlAppLocalService) {
796                    this.dlAppLocalService = dlAppLocalService;
797            }
798    
799            /**
800             * Returns the d l app remote service.
801             *
802             * @return the d l app remote service
803             */
804            public com.liferay.portlet.documentlibrary.service.DLAppService getDLAppService() {
805                    return dlAppService;
806            }
807    
808            /**
809             * Sets the d l app remote service.
810             *
811             * @param dlAppService the d l app remote service
812             */
813            public void setDLAppService(
814                    com.liferay.portlet.documentlibrary.service.DLAppService dlAppService) {
815                    this.dlAppService = dlAppService;
816            }
817    
818            /**
819             * Returns the trash entry local service.
820             *
821             * @return the trash entry local service
822             */
823            public com.liferay.portlet.trash.service.TrashEntryLocalService getTrashEntryLocalService() {
824                    return trashEntryLocalService;
825            }
826    
827            /**
828             * Sets the trash entry local service.
829             *
830             * @param trashEntryLocalService the trash entry local service
831             */
832            public void setTrashEntryLocalService(
833                    com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService) {
834                    this.trashEntryLocalService = trashEntryLocalService;
835            }
836    
837            /**
838             * Returns the trash entry remote service.
839             *
840             * @return the trash entry remote service
841             */
842            public com.liferay.portlet.trash.service.TrashEntryService getTrashEntryService() {
843                    return trashEntryService;
844            }
845    
846            /**
847             * Sets the trash entry remote service.
848             *
849             * @param trashEntryService the trash entry remote service
850             */
851            public void setTrashEntryService(
852                    com.liferay.portlet.trash.service.TrashEntryService trashEntryService) {
853                    this.trashEntryService = trashEntryService;
854            }
855    
856            /**
857             * Returns the trash entry persistence.
858             *
859             * @return the trash entry persistence
860             */
861            public TrashEntryPersistence getTrashEntryPersistence() {
862                    return trashEntryPersistence;
863            }
864    
865            /**
866             * Sets the trash entry persistence.
867             *
868             * @param trashEntryPersistence the trash entry persistence
869             */
870            public void setTrashEntryPersistence(
871                    TrashEntryPersistence trashEntryPersistence) {
872                    this.trashEntryPersistence = trashEntryPersistence;
873            }
874    
875            /**
876             * Returns the trash version local service.
877             *
878             * @return the trash version local service
879             */
880            public com.liferay.portlet.trash.service.TrashVersionLocalService getTrashVersionLocalService() {
881                    return trashVersionLocalService;
882            }
883    
884            /**
885             * Sets the trash version local service.
886             *
887             * @param trashVersionLocalService the trash version local service
888             */
889            public void setTrashVersionLocalService(
890                    com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService) {
891                    this.trashVersionLocalService = trashVersionLocalService;
892            }
893    
894            /**
895             * Returns the trash version persistence.
896             *
897             * @return the trash version persistence
898             */
899            public TrashVersionPersistence getTrashVersionPersistence() {
900                    return trashVersionPersistence;
901            }
902    
903            /**
904             * Sets the trash version persistence.
905             *
906             * @param trashVersionPersistence the trash version persistence
907             */
908            public void setTrashVersionPersistence(
909                    TrashVersionPersistence trashVersionPersistence) {
910                    this.trashVersionPersistence = trashVersionPersistence;
911            }
912    
913            /**
914             * Returns the document library folder local service.
915             *
916             * @return the document library folder local service
917             */
918            public com.liferay.portlet.documentlibrary.service.DLFolderLocalService getDLFolderLocalService() {
919                    return dlFolderLocalService;
920            }
921    
922            /**
923             * Sets the document library folder local service.
924             *
925             * @param dlFolderLocalService the document library folder local service
926             */
927            public void setDLFolderLocalService(
928                    com.liferay.portlet.documentlibrary.service.DLFolderLocalService dlFolderLocalService) {
929                    this.dlFolderLocalService = dlFolderLocalService;
930            }
931    
932            /**
933             * Returns the document library folder remote service.
934             *
935             * @return the document library folder remote service
936             */
937            public com.liferay.portlet.documentlibrary.service.DLFolderService getDLFolderService() {
938                    return dlFolderService;
939            }
940    
941            /**
942             * Sets the document library folder remote service.
943             *
944             * @param dlFolderService the document library folder remote service
945             */
946            public void setDLFolderService(
947                    com.liferay.portlet.documentlibrary.service.DLFolderService dlFolderService) {
948                    this.dlFolderService = dlFolderService;
949            }
950    
951            /**
952             * Returns the document library folder persistence.
953             *
954             * @return the document library folder persistence
955             */
956            public DLFolderPersistence getDLFolderPersistence() {
957                    return dlFolderPersistence;
958            }
959    
960            /**
961             * Sets the document library folder persistence.
962             *
963             * @param dlFolderPersistence the document library folder persistence
964             */
965            public void setDLFolderPersistence(DLFolderPersistence dlFolderPersistence) {
966                    this.dlFolderPersistence = dlFolderPersistence;
967            }
968    
969            /**
970             * Returns the document library folder finder.
971             *
972             * @return the document library folder finder
973             */
974            public DLFolderFinder getDLFolderFinder() {
975                    return dlFolderFinder;
976            }
977    
978            /**
979             * Sets the document library folder finder.
980             *
981             * @param dlFolderFinder the document library folder finder
982             */
983            public void setDLFolderFinder(DLFolderFinder dlFolderFinder) {
984                    this.dlFolderFinder = dlFolderFinder;
985            }
986    
987            public void afterPropertiesSet() {
988                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.documentlibrary.model.DLFileShortcut",
989                            dlFileShortcutLocalService);
990            }
991    
992            public void destroy() {
993                    persistedModelLocalServiceRegistry.unregister(
994                            "com.liferay.portlet.documentlibrary.model.DLFileShortcut");
995            }
996    
997            /**
998             * Returns the Spring bean ID for this bean.
999             *
1000             * @return the Spring bean ID for this bean
1001             */
1002            @Override
1003            public String getBeanIdentifier() {
1004                    return _beanIdentifier;
1005            }
1006    
1007            /**
1008             * Sets the Spring bean ID for this bean.
1009             *
1010             * @param beanIdentifier the Spring bean ID for this bean
1011             */
1012            @Override
1013            public void setBeanIdentifier(String beanIdentifier) {
1014                    _beanIdentifier = beanIdentifier;
1015            }
1016    
1017            protected Class<?> getModelClass() {
1018                    return DLFileShortcut.class;
1019            }
1020    
1021            protected String getModelClassName() {
1022                    return DLFileShortcut.class.getName();
1023            }
1024    
1025            /**
1026             * Performs a SQL query.
1027             *
1028             * @param sql the sql query
1029             */
1030            protected void runSQL(String sql) {
1031                    try {
1032                            DataSource dataSource = dlFileShortcutPersistence.getDataSource();
1033    
1034                            DB db = DBFactoryUtil.getDB();
1035    
1036                            sql = db.buildSQL(sql);
1037                            sql = PortalUtil.transformSQL(sql);
1038    
1039                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1040                                            sql, new int[0]);
1041    
1042                            sqlUpdate.update();
1043                    }
1044                    catch (Exception e) {
1045                            throw new SystemException(e);
1046                    }
1047            }
1048    
1049            @BeanReference(type = DLFileShortcutLocalService.class)
1050            protected DLFileShortcutLocalService dlFileShortcutLocalService;
1051            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFileShortcutService.class)
1052            protected com.liferay.portlet.documentlibrary.service.DLFileShortcutService dlFileShortcutService;
1053            @BeanReference(type = DLFileShortcutPersistence.class)
1054            protected DLFileShortcutPersistence dlFileShortcutPersistence;
1055            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1056            protected com.liferay.counter.service.CounterLocalService counterLocalService;
1057            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1058            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1059            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1060            protected com.liferay.portal.service.UserLocalService userLocalService;
1061            @BeanReference(type = com.liferay.portal.service.UserService.class)
1062            protected com.liferay.portal.service.UserService userService;
1063            @BeanReference(type = UserPersistence.class)
1064            protected UserPersistence userPersistence;
1065            @BeanReference(type = UserFinder.class)
1066            protected UserFinder userFinder;
1067            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
1068            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
1069            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
1070            protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
1071            @BeanReference(type = AssetEntryPersistence.class)
1072            protected AssetEntryPersistence assetEntryPersistence;
1073            @BeanReference(type = AssetEntryFinder.class)
1074            protected AssetEntryFinder assetEntryFinder;
1075            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagLocalService.class)
1076            protected com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService;
1077            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagService.class)
1078            protected com.liferay.portlet.asset.service.AssetTagService assetTagService;
1079            @BeanReference(type = AssetTagPersistence.class)
1080            protected AssetTagPersistence assetTagPersistence;
1081            @BeanReference(type = AssetTagFinder.class)
1082            protected AssetTagFinder assetTagFinder;
1083            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLAppLocalService.class)
1084            protected com.liferay.portlet.documentlibrary.service.DLAppLocalService dlAppLocalService;
1085            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLAppService.class)
1086            protected com.liferay.portlet.documentlibrary.service.DLAppService dlAppService;
1087            @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryLocalService.class)
1088            protected com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService;
1089            @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryService.class)
1090            protected com.liferay.portlet.trash.service.TrashEntryService trashEntryService;
1091            @BeanReference(type = TrashEntryPersistence.class)
1092            protected TrashEntryPersistence trashEntryPersistence;
1093            @BeanReference(type = com.liferay.portlet.trash.service.TrashVersionLocalService.class)
1094            protected com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService;
1095            @BeanReference(type = TrashVersionPersistence.class)
1096            protected TrashVersionPersistence trashVersionPersistence;
1097            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFolderLocalService.class)
1098            protected com.liferay.portlet.documentlibrary.service.DLFolderLocalService dlFolderLocalService;
1099            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLFolderService.class)
1100            protected com.liferay.portlet.documentlibrary.service.DLFolderService dlFolderService;
1101            @BeanReference(type = DLFolderPersistence.class)
1102            protected DLFolderPersistence dlFolderPersistence;
1103            @BeanReference(type = DLFolderFinder.class)
1104            protected DLFolderFinder dlFolderFinder;
1105            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1106            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1107            private String _beanIdentifier;
1108    }