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