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.dynamic.data.mapping.kernel.DDMFormValues;
020    import com.liferay.dynamic.data.mapping.kernel.DDMStructure;
021    
022    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
025    import com.liferay.portal.kernel.dao.orm.Projection;
026    import com.liferay.portal.kernel.exception.PortalException;
027    import com.liferay.portal.kernel.exception.SystemException;
028    import com.liferay.portal.kernel.search.Indexable;
029    import com.liferay.portal.kernel.search.IndexableType;
030    import com.liferay.portal.kernel.transaction.Isolation;
031    import com.liferay.portal.kernel.transaction.Propagation;
032    import com.liferay.portal.kernel.transaction.Transactional;
033    import com.liferay.portal.kernel.util.OrderByComparator;
034    import com.liferay.portal.model.PersistedModel;
035    import com.liferay.portal.service.BaseLocalService;
036    import com.liferay.portal.service.PersistedModelLocalService;
037    import com.liferay.portal.service.ServiceContext;
038    
039    import com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata;
040    
041    import java.io.Serializable;
042    
043    import java.util.List;
044    import java.util.Map;
045    
046    /**
047     * Provides the local service interface for DLFileEntryMetadata. Methods of this
048     * service will not have security checks based on the propagated JAAS
049     * credentials because this service can only be accessed from within the same
050     * VM.
051     *
052     * @author Brian Wing Shun Chan
053     * @see DLFileEntryMetadataLocalServiceUtil
054     * @see com.liferay.portlet.documentlibrary.service.base.DLFileEntryMetadataLocalServiceBaseImpl
055     * @see com.liferay.portlet.documentlibrary.service.impl.DLFileEntryMetadataLocalServiceImpl
056     * @generated
057     */
058    @ProviderType
059    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
060            PortalException.class, SystemException.class})
061    public interface DLFileEntryMetadataLocalService extends BaseLocalService,
062            PersistedModelLocalService {
063            /*
064             * NOTE FOR DEVELOPERS:
065             *
066             * Never modify or reference this interface directly. Always use {@link DLFileEntryMetadataLocalServiceUtil} to access the document library file entry metadata local service. Add custom service methods to {@link com.liferay.portlet.documentlibrary.service.impl.DLFileEntryMetadataLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
067             */
068    
069            /**
070            * Adds the document library file entry metadata to the database. Also notifies the appropriate model listeners.
071            *
072            * @param dlFileEntryMetadata the document library file entry metadata
073            * @return the document library file entry metadata that was added
074            */
075            @Indexable(type = IndexableType.REINDEX)
076            public DLFileEntryMetadata addDLFileEntryMetadata(
077                    DLFileEntryMetadata dlFileEntryMetadata);
078    
079            /**
080            * Creates a new document library file entry metadata with the primary key. Does not add the document library file entry metadata to the database.
081            *
082            * @param fileEntryMetadataId the primary key for the new document library file entry metadata
083            * @return the new document library file entry metadata
084            */
085            public DLFileEntryMetadata createDLFileEntryMetadata(
086                    long fileEntryMetadataId);
087    
088            /**
089            * Deletes the document library file entry metadata from the database. Also notifies the appropriate model listeners.
090            *
091            * @param dlFileEntryMetadata the document library file entry metadata
092            * @return the document library file entry metadata that was removed
093            */
094            @Indexable(type = IndexableType.DELETE)
095            public DLFileEntryMetadata deleteDLFileEntryMetadata(
096                    DLFileEntryMetadata dlFileEntryMetadata);
097    
098            /**
099            * Deletes the document library file entry metadata with the primary key from the database. Also notifies the appropriate model listeners.
100            *
101            * @param fileEntryMetadataId the primary key of the document library file entry metadata
102            * @return the document library file entry metadata that was removed
103            * @throws PortalException if a document library file entry metadata with the primary key could not be found
104            */
105            @Indexable(type = IndexableType.DELETE)
106            public DLFileEntryMetadata deleteDLFileEntryMetadata(
107                    long fileEntryMetadataId) throws PortalException;
108    
109            public void deleteFileEntryMetadata(long fileEntryId)
110                    throws PortalException;
111    
112            public void deleteFileEntryMetadata(DLFileEntryMetadata fileEntryMetadata)
113                    throws PortalException;
114    
115            public void deleteFileVersionFileEntryMetadata(long fileVersionId)
116                    throws PortalException;
117    
118            /**
119            * @throws PortalException
120            */
121            @Override
122            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
123                    throws PortalException;
124    
125            public DynamicQuery dynamicQuery();
126    
127            /**
128            * Performs a dynamic query on the database and returns the matching rows.
129            *
130            * @param dynamicQuery the dynamic query
131            * @return the matching rows
132            */
133            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
134    
135            /**
136            * Performs a dynamic query on the database and returns a range of the matching rows.
137            *
138            * <p>
139            * 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.
140            * </p>
141            *
142            * @param dynamicQuery the dynamic query
143            * @param start the lower bound of the range of model instances
144            * @param end the upper bound of the range of model instances (not inclusive)
145            * @return the range of matching rows
146            */
147            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
148                    int end);
149    
150            /**
151            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
152            *
153            * <p>
154            * 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.
155            * </p>
156            *
157            * @param dynamicQuery the dynamic query
158            * @param start the lower bound of the range of model instances
159            * @param end the upper bound of the range of model instances (not inclusive)
160            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
161            * @return the ordered range of matching rows
162            */
163            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
164                    int end, OrderByComparator<T> orderByComparator);
165    
166            /**
167            * Returns the number of rows matching the dynamic query.
168            *
169            * @param dynamicQuery the dynamic query
170            * @return the number of rows matching the dynamic query
171            */
172            public long dynamicQueryCount(DynamicQuery dynamicQuery);
173    
174            /**
175            * Returns the number of rows matching the dynamic query.
176            *
177            * @param dynamicQuery the dynamic query
178            * @param projection the projection to apply to the query
179            * @return the number of rows matching the dynamic query
180            */
181            public long dynamicQueryCount(DynamicQuery dynamicQuery,
182                    Projection projection);
183    
184            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185            public DLFileEntryMetadata fetchDLFileEntryMetadata(
186                    long fileEntryMetadataId);
187    
188            /**
189            * Returns the document library file entry metadata with the matching UUID and company.
190            *
191            * @param uuid the document library file entry metadata's UUID
192            * @param companyId the primary key of the company
193            * @return the matching document library file entry metadata, or <code>null</code> if a matching document library file entry metadata could not be found
194            */
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public DLFileEntryMetadata fetchDLFileEntryMetadataByUuidAndCompanyId(
197                    java.lang.String uuid, long companyId);
198    
199            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200            public DLFileEntryMetadata fetchFileEntryMetadata(long ddmStructureId,
201                    long fileVersionId);
202    
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public DLFileEntryMetadata fetchFileEntryMetadata(long fileEntryMetadataId);
205    
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public ActionableDynamicQuery getActionableDynamicQuery();
208    
209            /**
210            * Returns the document library file entry metadata with the primary key.
211            *
212            * @param fileEntryMetadataId the primary key of the document library file entry metadata
213            * @return the document library file entry metadata
214            * @throws PortalException if a document library file entry metadata with the primary key could not be found
215            */
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public DLFileEntryMetadata getDLFileEntryMetadata(long fileEntryMetadataId)
218                    throws PortalException;
219    
220            /**
221            * Returns the document library file entry metadata with the matching UUID and company.
222            *
223            * @param uuid the document library file entry metadata's UUID
224            * @param companyId the primary key of the company
225            * @return the matching document library file entry metadata
226            * @throws PortalException if a matching document library file entry metadata could not be found
227            */
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public DLFileEntryMetadata getDLFileEntryMetadataByUuidAndCompanyId(
230                    java.lang.String uuid, long companyId) throws PortalException;
231    
232            /**
233            * Returns a range of all the document library file entry metadatas.
234            *
235            * <p>
236            * 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.
237            * </p>
238            *
239            * @param start the lower bound of the range of document library file entry metadatas
240            * @param end the upper bound of the range of document library file entry metadatas (not inclusive)
241            * @return the range of document library file entry metadatas
242            */
243            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244            public List<DLFileEntryMetadata> getDLFileEntryMetadatas(int start, int end);
245    
246            /**
247            * Returns the number of document library file entry metadatas.
248            *
249            * @return the number of document library file entry metadatas
250            */
251            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
252            public int getDLFileEntryMetadatasCount();
253    
254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255            public DLFileEntryMetadata getFileEntryMetadata(long ddmStructureId,
256                    long fileVersionId) throws PortalException;
257    
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public DLFileEntryMetadata getFileEntryMetadata(long fileEntryMetadataId)
260                    throws PortalException;
261    
262            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263            public List<DLFileEntryMetadata> getFileVersionFileEntryMetadatas(
264                    long fileVersionId);
265    
266            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267            public long getFileVersionFileEntryMetadatasCount(long fileVersionId);
268    
269            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
270            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
271    
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public List<DLFileEntryMetadata> getMismatchedCompanyIdFileEntryMetadatas();
274    
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public List<DLFileEntryMetadata> getNoStructuresFileEntryMetadatas();
277    
278            /**
279            * Returns the OSGi service identifier.
280            *
281            * @return the OSGi service identifier
282            */
283            public java.lang.String getOSGiServiceIdentifier();
284    
285            @Override
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
288                    throws PortalException;
289    
290            /**
291            * 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.
292            *
293            * @param dlFileEntryMetadata the document library file entry metadata
294            * @return the document library file entry metadata that was updated
295            */
296            @Indexable(type = IndexableType.REINDEX)
297            public DLFileEntryMetadata updateDLFileEntryMetadata(
298                    DLFileEntryMetadata dlFileEntryMetadata);
299    
300            public void updateFileEntryMetadata(long companyId,
301                    List<DDMStructure> ddmStructures, long fileEntryId, long fileVersionId,
302                    Map<java.lang.String, DDMFormValues> ddmFormValuesMap,
303                    ServiceContext serviceContext) throws PortalException;
304    
305            public void updateFileEntryMetadata(long fileEntryTypeId, long fileEntryId,
306                    long fileVersionId,
307                    Map<java.lang.String, DDMFormValues> ddmFormValuesMap,
308                    ServiceContext serviceContext) throws PortalException;
309    }