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