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;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for DLFileVersion. This utility wraps
024     * {@link com.liferay.portlet.documentlibrary.service.impl.DLFileVersionLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see DLFileVersionLocalService
032     * @see com.liferay.portlet.documentlibrary.service.base.DLFileVersionLocalServiceBaseImpl
033     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileVersionLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DLFileVersionLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileVersionLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the document library file version to the database. Also notifies the appropriate model listeners.
046            *
047            * @param dlFileVersion the document library file version
048            * @return the document library file version that was added
049            */
050            public static com.liferay.portlet.documentlibrary.model.DLFileVersion addDLFileVersion(
051                    com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion) {
052                    return getService().addDLFileVersion(dlFileVersion);
053            }
054    
055            /**
056            * Creates a new document library file version with the primary key. Does not add the document library file version to the database.
057            *
058            * @param fileVersionId the primary key for the new document library file version
059            * @return the new document library file version
060            */
061            public static com.liferay.portlet.documentlibrary.model.DLFileVersion createDLFileVersion(
062                    long fileVersionId) {
063                    return getService().createDLFileVersion(fileVersionId);
064            }
065    
066            /**
067            * Deletes the document library file version from the database. Also notifies the appropriate model listeners.
068            *
069            * @param dlFileVersion the document library file version
070            * @return the document library file version that was removed
071            */
072            public static com.liferay.portlet.documentlibrary.model.DLFileVersion deleteDLFileVersion(
073                    com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion) {
074                    return getService().deleteDLFileVersion(dlFileVersion);
075            }
076    
077            /**
078            * Deletes the document library file version with the primary key from the database. Also notifies the appropriate model listeners.
079            *
080            * @param fileVersionId the primary key of the document library file version
081            * @return the document library file version that was removed
082            * @throws PortalException if a document library file version with the primary key could not be found
083            */
084            public static com.liferay.portlet.documentlibrary.model.DLFileVersion deleteDLFileVersion(
085                    long fileVersionId)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    return getService().deleteDLFileVersion(fileVersionId);
088            }
089    
090            /**
091            * @throws PortalException
092            */
093            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
094                    com.liferay.portal.model.PersistedModel persistedModel)
095                    throws com.liferay.portal.kernel.exception.PortalException {
096                    return getService().deletePersistedModel(persistedModel);
097            }
098    
099            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
100                    return getService().dynamicQuery();
101            }
102    
103            /**
104            * Performs a dynamic query on the database and returns the matching rows.
105            *
106            * @param dynamicQuery the dynamic query
107            * @return the matching rows
108            */
109            public static <T> java.util.List<T> dynamicQuery(
110                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
111                    return getService().dynamicQuery(dynamicQuery);
112            }
113    
114            /**
115            * Performs a dynamic query on the database and returns a range of the matching rows.
116            *
117            * <p>
118            * 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.DLFileVersionModelImpl}. 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.
119            * </p>
120            *
121            * @param dynamicQuery the dynamic query
122            * @param start the lower bound of the range of model instances
123            * @param end the upper bound of the range of model instances (not inclusive)
124            * @return the range of matching rows
125            */
126            public static <T> java.util.List<T> dynamicQuery(
127                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
128                    int end) {
129                    return getService().dynamicQuery(dynamicQuery, start, end);
130            }
131    
132            /**
133            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
134            *
135            * <p>
136            * 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.DLFileVersionModelImpl}. 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.
137            * </p>
138            *
139            * @param dynamicQuery the dynamic query
140            * @param start the lower bound of the range of model instances
141            * @param end the upper bound of the range of model instances (not inclusive)
142            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
143            * @return the ordered range of matching rows
144            */
145            public static <T> java.util.List<T> dynamicQuery(
146                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
147                    int end,
148                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
149                    return getService()
150                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
151            }
152    
153            /**
154            * Returns the number of rows matching the dynamic query.
155            *
156            * @param dynamicQuery the dynamic query
157            * @return the number of rows matching the dynamic query
158            */
159            public static long dynamicQueryCount(
160                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
161                    return getService().dynamicQueryCount(dynamicQuery);
162            }
163    
164            /**
165            * Returns the number of rows matching the dynamic query.
166            *
167            * @param dynamicQuery the dynamic query
168            * @param projection the projection to apply to the query
169            * @return the number of rows matching the dynamic query
170            */
171            public static long dynamicQueryCount(
172                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
173                    com.liferay.portal.kernel.dao.orm.Projection projection) {
174                    return getService().dynamicQueryCount(dynamicQuery, projection);
175            }
176    
177            public static com.liferay.portlet.documentlibrary.model.DLFileVersion fetchDLFileVersion(
178                    long fileVersionId) {
179                    return getService().fetchDLFileVersion(fileVersionId);
180            }
181    
182            /**
183            * Returns the document library file version matching the UUID and group.
184            *
185            * @param uuid the document library file version's UUID
186            * @param groupId the primary key of the group
187            * @return the matching document library file version, or <code>null</code> if a matching document library file version could not be found
188            */
189            public static com.liferay.portlet.documentlibrary.model.DLFileVersion fetchDLFileVersionByUuidAndGroupId(
190                    java.lang.String uuid, long groupId) {
191                    return getService().fetchDLFileVersionByUuidAndGroupId(uuid, groupId);
192            }
193    
194            public static com.liferay.portlet.documentlibrary.model.DLFileVersion fetchLatestFileVersion(
195                    long fileEntryId, boolean excludeWorkingCopy) {
196                    return getService()
197                                       .fetchLatestFileVersion(fileEntryId, excludeWorkingCopy);
198            }
199    
200            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
201                    return getService().getActionableDynamicQuery();
202            }
203    
204            /**
205            * Returns the document library file version with the primary key.
206            *
207            * @param fileVersionId the primary key of the document library file version
208            * @return the document library file version
209            * @throws PortalException if a document library file version with the primary key could not be found
210            */
211            public static com.liferay.portlet.documentlibrary.model.DLFileVersion getDLFileVersion(
212                    long fileVersionId)
213                    throws com.liferay.portal.kernel.exception.PortalException {
214                    return getService().getDLFileVersion(fileVersionId);
215            }
216    
217            /**
218            * Returns the document library file version matching the UUID and group.
219            *
220            * @param uuid the document library file version's UUID
221            * @param groupId the primary key of the group
222            * @return the matching document library file version
223            * @throws PortalException if a matching document library file version could not be found
224            */
225            public static com.liferay.portlet.documentlibrary.model.DLFileVersion getDLFileVersionByUuidAndGroupId(
226                    java.lang.String uuid, long groupId)
227                    throws com.liferay.portal.kernel.exception.PortalException {
228                    return getService().getDLFileVersionByUuidAndGroupId(uuid, groupId);
229            }
230    
231            /**
232            * Returns a range of all the document library file versions.
233            *
234            * <p>
235            * 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.DLFileVersionModelImpl}. 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.
236            * </p>
237            *
238            * @param start the lower bound of the range of document library file versions
239            * @param end the upper bound of the range of document library file versions (not inclusive)
240            * @return the range of document library file versions
241            */
242            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> getDLFileVersions(
243                    int start, int end) {
244                    return getService().getDLFileVersions(start, end);
245            }
246    
247            /**
248            * Returns all the document library file versions matching the UUID and company.
249            *
250            * @param uuid the UUID of the document library file versions
251            * @param companyId the primary key of the company
252            * @return the matching document library file versions, or an empty list if no matches were found
253            */
254            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> getDLFileVersionsByUuidAndCompanyId(
255                    java.lang.String uuid, long companyId) {
256                    return getService().getDLFileVersionsByUuidAndCompanyId(uuid, companyId);
257            }
258    
259            /**
260            * Returns a range of document library file versions matching the UUID and company.
261            *
262            * @param uuid the UUID of the document library file versions
263            * @param companyId the primary key of the company
264            * @param start the lower bound of the range of document library file versions
265            * @param end the upper bound of the range of document library file versions (not inclusive)
266            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
267            * @return the range of matching document library file versions, or an empty list if no matches were found
268            */
269            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> getDLFileVersionsByUuidAndCompanyId(
270                    java.lang.String uuid, long companyId, int start, int end,
271                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.documentlibrary.model.DLFileVersion> orderByComparator) {
272                    return getService()
273                                       .getDLFileVersionsByUuidAndCompanyId(uuid, companyId, start,
274                            end, orderByComparator);
275            }
276    
277            /**
278            * Returns the number of document library file versions.
279            *
280            * @return the number of document library file versions
281            */
282            public static int getDLFileVersionsCount() {
283                    return getService().getDLFileVersionsCount();
284            }
285    
286            public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
287                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) {
288                    return getService().getExportActionableDynamicQuery(portletDataContext);
289            }
290    
291            public static com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersion(
292                    long fileEntryId, java.lang.String version)
293                    throws com.liferay.portal.kernel.exception.PortalException {
294                    return getService().getFileVersion(fileEntryId, version);
295            }
296    
297            public static com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersion(
298                    long fileVersionId)
299                    throws com.liferay.portal.kernel.exception.PortalException {
300                    return getService().getFileVersion(fileVersionId);
301            }
302    
303            public static com.liferay.portlet.documentlibrary.model.DLFileVersion getFileVersionByUuidAndGroupId(
304                    java.lang.String uuid, long groupId) {
305                    return getService().getFileVersionByUuidAndGroupId(uuid, groupId);
306            }
307    
308            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> getFileVersions(
309                    long fileEntryId, int status) {
310                    return getService().getFileVersions(fileEntryId, status);
311            }
312    
313            public static int getFileVersionsCount(long fileEntryId, int status) {
314                    return getService().getFileVersionsCount(fileEntryId, status);
315            }
316    
317            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
318                    return getService().getIndexableActionableDynamicQuery();
319            }
320    
321            public static com.liferay.portlet.documentlibrary.model.DLFileVersion getLatestFileVersion(
322                    long fileEntryId, boolean excludeWorkingCopy)
323                    throws com.liferay.portal.kernel.exception.PortalException {
324                    return getService().getLatestFileVersion(fileEntryId, excludeWorkingCopy);
325            }
326    
327            public static com.liferay.portlet.documentlibrary.model.DLFileVersion getLatestFileVersion(
328                    long userId, long fileEntryId)
329                    throws com.liferay.portal.kernel.exception.PortalException {
330                    return getService().getLatestFileVersion(userId, fileEntryId);
331            }
332    
333            /**
334            * Returns the OSGi service identifier.
335            *
336            * @return the OSGi service identifier
337            */
338            public static java.lang.String getOSGiServiceIdentifier() {
339                    return getService().getOSGiServiceIdentifier();
340            }
341    
342            public static com.liferay.portal.model.PersistedModel getPersistedModel(
343                    java.io.Serializable primaryKeyObj)
344                    throws com.liferay.portal.kernel.exception.PortalException {
345                    return getService().getPersistedModel(primaryKeyObj);
346            }
347    
348            public static void rebuildTree(long companyId)
349                    throws com.liferay.portal.kernel.exception.PortalException {
350                    getService().rebuildTree(companyId);
351            }
352    
353            public static void setTreePaths(long folderId, java.lang.String treePath)
354                    throws com.liferay.portal.kernel.exception.PortalException {
355                    getService().setTreePaths(folderId, treePath);
356            }
357    
358            /**
359            * Updates the document library file version in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
360            *
361            * @param dlFileVersion the document library file version
362            * @return the document library file version that was updated
363            */
364            public static com.liferay.portlet.documentlibrary.model.DLFileVersion updateDLFileVersion(
365                    com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion) {
366                    return getService().updateDLFileVersion(dlFileVersion);
367            }
368    
369            public static DLFileVersionLocalService getService() {
370                    if (_service == null) {
371                            _service = (DLFileVersionLocalService)PortalBeanLocatorUtil.locate(DLFileVersionLocalService.class.getName());
372    
373                            ReferenceRegistry.registerReference(DLFileVersionLocalServiceUtil.class,
374                                    "_service");
375                    }
376    
377                    return _service;
378            }
379    
380            private static DLFileVersionLocalService _service;
381    }