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            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata fetchFileEntryMetadata(
199                    long ddmStructureId, long fileVersionId) {
200                    return getService().fetchFileEntryMetadata(ddmStructureId, fileVersionId);
201            }
202    
203            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata fetchFileEntryMetadata(
204                    long fileEntryMetadataId) {
205                    return getService().fetchFileEntryMetadata(fileEntryMetadataId);
206            }
207    
208            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
209                    return getService().getActionableDynamicQuery();
210            }
211    
212            /**
213            * Returns the Spring bean ID for this bean.
214            *
215            * @return the Spring bean ID for this bean
216            */
217            public static java.lang.String getBeanIdentifier() {
218                    return getService().getBeanIdentifier();
219            }
220    
221            /**
222            * Returns the document library file entry metadata with the primary key.
223            *
224            * @param fileEntryMetadataId the primary key of the document library file entry metadata
225            * @return the document library file entry metadata
226            * @throws PortalException if a document library file entry metadata with the primary key could not be found
227            */
228            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata getDLFileEntryMetadata(
229                    long fileEntryMetadataId)
230                    throws com.liferay.portal.kernel.exception.PortalException {
231                    return getService().getDLFileEntryMetadata(fileEntryMetadataId);
232            }
233    
234            /**
235            * Returns a range of all the document library file entry metadatas.
236            *
237            * <p>
238            * 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.
239            * </p>
240            *
241            * @param start the lower bound of the range of document library file entry metadatas
242            * @param end the upper bound of the range of document library file entry metadatas (not inclusive)
243            * @return the range of document library file entry metadatas
244            */
245            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata> getDLFileEntryMetadatas(
246                    int start, int end) {
247                    return getService().getDLFileEntryMetadatas(start, end);
248            }
249    
250            /**
251            * Returns the number of document library file entry metadatas.
252            *
253            * @return the number of document library file entry metadatas
254            */
255            public static int getDLFileEntryMetadatasCount() {
256                    return getService().getDLFileEntryMetadatasCount();
257            }
258    
259            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata getFileEntryMetadata(
260                    long ddmStructureId, long fileVersionId)
261                    throws com.liferay.portal.kernel.exception.PortalException {
262                    return getService().getFileEntryMetadata(ddmStructureId, fileVersionId);
263            }
264    
265            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata getFileEntryMetadata(
266                    long fileEntryMetadataId)
267                    throws com.liferay.portal.kernel.exception.PortalException {
268                    return getService().getFileEntryMetadata(fileEntryMetadataId);
269            }
270    
271            /**
272            * @deprecated As of 6.2.0, replaced by {@link
273            #getFileVersionFileEntryMetadatasCount(long)}
274            */
275            @Deprecated
276            public static long getFileEntryMetadataCount(long fileEntryId,
277                    long fileVersionId) {
278                    return getService().getFileEntryMetadataCount(fileEntryId, fileVersionId);
279            }
280    
281            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata> getFileVersionFileEntryMetadatas(
282                    long fileVersionId) {
283                    return getService().getFileVersionFileEntryMetadatas(fileVersionId);
284            }
285    
286            public static long getFileVersionFileEntryMetadatasCount(long fileVersionId) {
287                    return getService().getFileVersionFileEntryMetadatasCount(fileVersionId);
288            }
289    
290            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata> getMismatchedCompanyIdFileEntryMetadatas() {
291                    return getService().getMismatchedCompanyIdFileEntryMetadatas();
292            }
293    
294            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata> getNoStructuresFileEntryMetadatas() {
295                    return getService().getNoStructuresFileEntryMetadatas();
296            }
297    
298            public static com.liferay.portal.model.PersistedModel getPersistedModel(
299                    java.io.Serializable primaryKeyObj)
300                    throws com.liferay.portal.kernel.exception.PortalException {
301                    return getService().getPersistedModel(primaryKeyObj);
302            }
303    
304            /**
305            * Sets the Spring bean ID for this bean.
306            *
307            * @param beanIdentifier the Spring bean ID for this bean
308            */
309            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
310                    getService().setBeanIdentifier(beanIdentifier);
311            }
312    
313            /**
314            * 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.
315            *
316            * @param dlFileEntryMetadata the document library file entry metadata
317            * @return the document library file entry metadata that was updated
318            */
319            public static com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata updateDLFileEntryMetadata(
320                    com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata dlFileEntryMetadata) {
321                    return getService().updateDLFileEntryMetadata(dlFileEntryMetadata);
322            }
323    
324            public static void updateFileEntryMetadata(long companyId,
325                    java.util.List<com.liferay.portlet.dynamicdatamapping.DDMStructure> ddmStructures,
326                    long fileEntryId, long fileVersionId,
327                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.DDMFormValues> ddmFormValuesMap,
328                    com.liferay.portal.service.ServiceContext serviceContext)
329                    throws com.liferay.portal.kernel.exception.PortalException {
330                    getService()
331                            .updateFileEntryMetadata(companyId, ddmStructures, fileEntryId,
332                            fileVersionId, ddmFormValuesMap, serviceContext);
333            }
334    
335            public static void updateFileEntryMetadata(long fileEntryTypeId,
336                    long fileEntryId, long fileVersionId,
337                    java.util.Map<java.lang.String, com.liferay.portlet.dynamicdatamapping.DDMFormValues> ddmFormValuesMap,
338                    com.liferay.portal.service.ServiceContext serviceContext)
339                    throws com.liferay.portal.kernel.exception.PortalException {
340                    getService()
341                            .updateFileEntryMetadata(fileEntryTypeId, fileEntryId,
342                            fileVersionId, ddmFormValuesMap, serviceContext);
343            }
344    
345            public static DLFileEntryMetadataLocalService getService() {
346                    if (_service == null) {
347                            _service = (DLFileEntryMetadataLocalService)PortalBeanLocatorUtil.locate(DLFileEntryMetadataLocalService.class.getName());
348    
349                            ReferenceRegistry.registerReference(DLFileEntryMetadataLocalServiceUtil.class,
350                                    "_service");
351                    }
352    
353                    return _service;
354            }
355    
356            /**
357             * @deprecated As of 6.2.0
358             */
359            @Deprecated
360            public void setService(DLFileEntryMetadataLocalService service) {
361            }
362    
363            private static DLFileEntryMetadataLocalService _service;
364    }