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 DLFileEntryMetadata. This utility wraps
024     * {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryMetadataLocalServiceImpl} 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 DLFileEntryMetadataLocalService
032     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryMetadataLocalServiceBaseImpl
033     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryMetadataLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class DLFileEntryMetadataLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryMetadataLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the document library file entry metadata to the database. Also notifies the appropriate model listeners.
046            *
047            * @param dlFileEntryMetadata the document library file entry metadata
048            * @return the document library file entry metadata that was added
049            */
050            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata addDLFileEntryMetadata(
051                    com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata dlFileEntryMetadata) {
052                    return getService().addDLFileEntryMetadata(dlFileEntryMetadata);
053            }
054    
055            /**
056            * Creates a new document library file entry metadata with the primary key. Does not add the document library file entry metadata to the database.
057            *
058            * @param fileEntryMetadataId the primary key for the new document library file entry metadata
059            * @return the new document library file entry metadata
060            */
061            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata createDLFileEntryMetadata(
062                    long fileEntryMetadataId) {
063                    return getService().createDLFileEntryMetadata(fileEntryMetadataId);
064            }
065    
066            /**
067            * Deletes the document library file entry metadata from the database. Also notifies the appropriate model listeners.
068            *
069            * @param dlFileEntryMetadata the document library file entry metadata
070            * @return the document library file entry metadata that was removed
071            */
072            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata deleteDLFileEntryMetadata(
073                    com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata dlFileEntryMetadata) {
074                    return getService().deleteDLFileEntryMetadata(dlFileEntryMetadata);
075            }
076    
077            /**
078            * Deletes the document library file entry metadata with the primary key from the database. Also notifies the appropriate model listeners.
079            *
080            * @param fileEntryMetadataId the primary key of the document library file entry metadata
081            * @return the document library file entry metadata that was removed
082            * @throws PortalException if a document library file entry metadata with the primary key could not be found
083            */
084            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata deleteDLFileEntryMetadata(
085                    long fileEntryMetadataId)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    return getService().deleteDLFileEntryMetadata(fileEntryMetadataId);
088            }
089    
090            public static void deleteFileEntryMetadata(long fileEntryId)
091                    throws com.liferay.portal.kernel.exception.PortalException {
092                    getService().deleteFileEntryMetadata(fileEntryId);
093            }
094    
095            public static void deleteFileEntryMetadata(
096                    com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata fileEntryMetadata)
097                    throws com.liferay.portal.kernel.exception.PortalException {
098                    getService().deleteFileEntryMetadata(fileEntryMetadata);
099            }
100    
101            public static void deleteFileVersionFileEntryMetadata(long fileVersionId)
102                    throws com.liferay.portal.kernel.exception.PortalException {
103                    getService().deleteFileVersionFileEntryMetadata(fileVersionId);
104            }
105    
106            /**
107            * @throws PortalException
108            */
109            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
110                    com.liferay.portal.model.PersistedModel persistedModel)
111                    throws com.liferay.portal.kernel.exception.PortalException {
112                    return getService().deletePersistedModel(persistedModel);
113            }
114    
115            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
116                    return getService().dynamicQuery();
117            }
118    
119            /**
120            * Performs a dynamic query on the database and returns the matching rows.
121            *
122            * @param dynamicQuery the dynamic query
123            * @return the matching rows
124            */
125            public static <T> java.util.List<T> dynamicQuery(
126                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
127                    return getService().dynamicQuery(dynamicQuery);
128            }
129    
130            /**
131            * Performs a dynamic query on the database and returns a range of the matching rows.
132            *
133            * <p>
134            * 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.DLFileEntryMetadataModelImpl}. 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.
135            * </p>
136            *
137            * @param dynamicQuery the dynamic query
138            * @param start the lower bound of the range of model instances
139            * @param end the upper bound of the range of model instances (not inclusive)
140            * @return the range of matching rows
141            */
142            public static <T> java.util.List<T> dynamicQuery(
143                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
144                    int end) {
145                    return getService().dynamicQuery(dynamicQuery, start, end);
146            }
147    
148            /**
149            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
150            *
151            * <p>
152            * 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.DLFileEntryMetadataModelImpl}. 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.
153            * </p>
154            *
155            * @param dynamicQuery the dynamic query
156            * @param start the lower bound of the range of model instances
157            * @param end the upper bound of the range of model instances (not inclusive)
158            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
159            * @return the ordered range of matching rows
160            */
161            public static <T> java.util.List<T> dynamicQuery(
162                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
163                    int end,
164                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
165                    return getService()
166                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
167            }
168    
169            /**
170            * Returns the number of rows matching the dynamic query.
171            *
172            * @param dynamicQuery the dynamic query
173            * @return the number of rows matching the dynamic query
174            */
175            public static long dynamicQueryCount(
176                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
177                    return getService().dynamicQueryCount(dynamicQuery);
178            }
179    
180            /**
181            * Returns the number of rows matching the dynamic query.
182            *
183            * @param dynamicQuery the dynamic query
184            * @param projection the projection to apply to the query
185            * @return the number of rows matching the dynamic query
186            */
187            public static long dynamicQueryCount(
188                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
189                    com.liferay.portal.kernel.dao.orm.Projection projection) {
190                    return getService().dynamicQueryCount(dynamicQuery, projection);
191            }
192    
193            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata fetchDLFileEntryMetadata(
194                    long fileEntryMetadataId) {
195                    return getService().fetchDLFileEntryMetadata(fileEntryMetadataId);
196            }
197    
198            /**
199            * Returns the document library file entry metadata with the matching UUID and company.
200            *
201            * @param uuid the document library file entry metadata's UUID
202            * @param companyId the primary key of the company
203            * @return the matching document library file entry metadata, or <code>null</code> if a matching document library file entry metadata could not be found
204            */
205            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata fetchDLFileEntryMetadataByUuidAndCompanyId(
206                    java.lang.String uuid, long companyId) {
207                    return getService()
208                                       .fetchDLFileEntryMetadataByUuidAndCompanyId(uuid, companyId);
209            }
210    
211            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata fetchFileEntryMetadata(
212                    long ddmStructureId, long fileVersionId) {
213                    return getService().fetchFileEntryMetadata(ddmStructureId, fileVersionId);
214            }
215    
216            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata fetchFileEntryMetadata(
217                    long fileEntryMetadataId) {
218                    return getService().fetchFileEntryMetadata(fileEntryMetadataId);
219            }
220    
221            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
222                    return getService().getActionableDynamicQuery();
223            }
224    
225            /**
226            * Returns the document library file entry metadata with the primary key.
227            *
228            * @param fileEntryMetadataId the primary key of the document library file entry metadata
229            * @return the document library file entry metadata
230            * @throws PortalException if a document library file entry metadata with the primary key could not be found
231            */
232            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata getDLFileEntryMetadata(
233                    long fileEntryMetadataId)
234                    throws com.liferay.portal.kernel.exception.PortalException {
235                    return getService().getDLFileEntryMetadata(fileEntryMetadataId);
236            }
237    
238            /**
239            * Returns the document library file entry metadata with the matching UUID and company.
240            *
241            * @param uuid the document library file entry metadata's UUID
242            * @param companyId the primary key of the company
243            * @return the matching document library file entry metadata
244            * @throws PortalException if a matching document library file entry metadata could not be found
245            */
246            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata getDLFileEntryMetadataByUuidAndCompanyId(
247                    java.lang.String uuid, long companyId)
248                    throws com.liferay.portal.kernel.exception.PortalException {
249                    return getService()
250                                       .getDLFileEntryMetadataByUuidAndCompanyId(uuid, companyId);
251            }
252    
253            /**
254            * Returns a range of all the document library file entry metadatas.
255            *
256            * <p>
257            * 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.DLFileEntryMetadataModelImpl}. 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.
258            * </p>
259            *
260            * @param start the lower bound of the range of document library file entry metadatas
261            * @param end the upper bound of the range of document library file entry metadatas (not inclusive)
262            * @return the range of document library file entry metadatas
263            */
264            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata> getDLFileEntryMetadatas(
265                    int start, int end) {
266                    return getService().getDLFileEntryMetadatas(start, end);
267            }
268    
269            /**
270            * Returns the number of document library file entry metadatas.
271            *
272            * @return the number of document library file entry metadatas
273            */
274            public static int getDLFileEntryMetadatasCount() {
275                    return getService().getDLFileEntryMetadatasCount();
276            }
277    
278            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata getFileEntryMetadata(
279                    long ddmStructureId, long fileVersionId)
280                    throws com.liferay.portal.kernel.exception.PortalException {
281                    return getService().getFileEntryMetadata(ddmStructureId, fileVersionId);
282            }
283    
284            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata getFileEntryMetadata(
285                    long fileEntryMetadataId)
286                    throws com.liferay.portal.kernel.exception.PortalException {
287                    return getService().getFileEntryMetadata(fileEntryMetadataId);
288            }
289    
290            /**
291            * @deprecated As of 6.2.0, replaced by {@link
292            #getFileVersionFileEntryMetadatasCount(long)}
293            */
294            @Deprecated
295            public static long getFileEntryMetadataCount(long fileEntryId,
296                    long fileVersionId) {
297                    return getService().getFileEntryMetadataCount(fileEntryId, fileVersionId);
298            }
299    
300            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata> getFileVersionFileEntryMetadatas(
301                    long fileVersionId) {
302                    return getService().getFileVersionFileEntryMetadatas(fileVersionId);
303            }
304    
305            public static long getFileVersionFileEntryMetadatasCount(long fileVersionId) {
306                    return getService().getFileVersionFileEntryMetadatasCount(fileVersionId);
307            }
308    
309            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata> getMismatchedCompanyIdFileEntryMetadatas() {
310                    return getService().getMismatchedCompanyIdFileEntryMetadatas();
311            }
312    
313            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata> getNoStructuresFileEntryMetadatas() {
314                    return getService().getNoStructuresFileEntryMetadatas();
315            }
316    
317            /**
318            * Returns the OSGi service identifier.
319            *
320            * @return the OSGi service identifier
321            */
322            public static java.lang.String getOSGiServiceIdentifier() {
323                    return getService().getOSGiServiceIdentifier();
324            }
325    
326            public static com.liferay.portal.model.PersistedModel getPersistedModel(
327                    java.io.Serializable primaryKeyObj)
328                    throws com.liferay.portal.kernel.exception.PortalException {
329                    return getService().getPersistedModel(primaryKeyObj);
330            }
331    
332            /**
333            * Updates the document library file entry metadata in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
334            *
335            * @param dlFileEntryMetadata the document library file entry metadata
336            * @return the document library file entry metadata that was updated
337            */
338            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata updateDLFileEntryMetadata(
339                    com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata dlFileEntryMetadata) {
340                    return getService().updateDLFileEntryMetadata(dlFileEntryMetadata);
341            }
342    
343            public static void updateFileEntryMetadata(long companyId,
344                    java.util.List<com.liferay.portlet.dynamicdatamapping.DDMStructure> ddmStructures,
345                    long fileEntryId, long fileVersionId,
346                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.DDMFormValues> ddmFormValuesMap,
347                    com.liferay.portal.service.ServiceContext serviceContext)
348                    throws com.liferay.portal.kernel.exception.PortalException {
349                    getService()
350                            .updateFileEntryMetadata(companyId, ddmStructures, fileEntryId,
351                            fileVersionId, ddmFormValuesMap, serviceContext);
352            }
353    
354            public static void updateFileEntryMetadata(long fileEntryTypeId,
355                    long fileEntryId, long fileVersionId,
356                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.DDMFormValues> ddmFormValuesMap,
357                    com.liferay.portal.service.ServiceContext serviceContext)
358                    throws com.liferay.portal.kernel.exception.PortalException {
359                    getService()
360                            .updateFileEntryMetadata(fileEntryTypeId, fileEntryId,
361                            fileVersionId, ddmFormValuesMap, serviceContext);
362            }
363    
364            public static DLFileEntryMetadataLocalService getService() {
365                    if (_service == null) {
366                            _service = (DLFileEntryMetadataLocalService)PortalBeanLocatorUtil.locate(DLFileEntryMetadataLocalService.class.getName());
367    
368                            ReferenceRegistry.registerReference(DLFileEntryMetadataLocalServiceUtil.class,
369                                    "_service");
370                    }
371    
372                    return _service;
373            }
374    
375            /**
376             * @deprecated As of 6.2.0
377             */
378            @Deprecated
379            public void setService(DLFileEntryMetadataLocalService service) {
380            }
381    
382            private static DLFileEntryMetadataLocalService _service;
383    }