001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.documentlibrary.service.persistence;
016    
017    import com.liferay.portal.kernel.exception.SystemException;
018    import com.liferay.portal.service.persistence.BasePersistence;
019    
020    import com.liferay.portlet.documentlibrary.model.DLFileVersion;
021    
022    /**
023     * The persistence interface for the d l file version service.
024     *
025     * <p>
026     * Caching information and settings can be found in <code>portal.properties</code>
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see DLFileVersionPersistenceImpl
031     * @see DLFileVersionUtil
032     * @generated
033     */
034    public interface DLFileVersionPersistence extends BasePersistence<DLFileVersion> {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify or reference this interface directly. Always use {@link DLFileVersionUtil} to access the d l file version persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
039             */
040    
041            /**
042            * Caches the d l file version in the entity cache if it is enabled.
043            *
044            * @param dlFileVersion the d l file version to cache
045            */
046            public void cacheResult(
047                    com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion);
048    
049            /**
050            * Caches the d l file versions in the entity cache if it is enabled.
051            *
052            * @param dlFileVersions the d l file versions to cache
053            */
054            public void cacheResult(
055                    java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> dlFileVersions);
056    
057            /**
058            * Creates a new d l file version with the primary key. Does not add the d l file version to the database.
059            *
060            * @param fileVersionId the primary key for the new d l file version
061            * @return the new d l file version
062            */
063            public com.liferay.portlet.documentlibrary.model.DLFileVersion create(
064                    long fileVersionId);
065    
066            /**
067            * Removes the d l file version with the primary key from the database. Also notifies the appropriate model listeners.
068            *
069            * @param fileVersionId the primary key of the d l file version to remove
070            * @return the d l file version that was removed
071            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a d l file version with the primary key could not be found
072            * @throws SystemException if a system exception occurred
073            */
074            public com.liferay.portlet.documentlibrary.model.DLFileVersion remove(
075                    long fileVersionId)
076                    throws com.liferay.portal.kernel.exception.SystemException,
077                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
078    
079            public com.liferay.portlet.documentlibrary.model.DLFileVersion updateImpl(
080                    com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion,
081                    boolean merge)
082                    throws com.liferay.portal.kernel.exception.SystemException;
083    
084            /**
085            * Finds the d l file version with the primary key or throws a {@link com.liferay.portlet.documentlibrary.NoSuchFileVersionException} if it could not be found.
086            *
087            * @param fileVersionId the primary key of the d l file version to find
088            * @return the d l file version
089            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a d l file version with the primary key could not be found
090            * @throws SystemException if a system exception occurred
091            */
092            public com.liferay.portlet.documentlibrary.model.DLFileVersion findByPrimaryKey(
093                    long fileVersionId)
094                    throws com.liferay.portal.kernel.exception.SystemException,
095                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
096    
097            /**
098            * Finds the d l file version with the primary key or returns <code>null</code> if it could not be found.
099            *
100            * @param fileVersionId the primary key of the d l file version to find
101            * @return the d l file version, or <code>null</code> if a d l file version with the primary key could not be found
102            * @throws SystemException if a system exception occurred
103            */
104            public com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByPrimaryKey(
105                    long fileVersionId)
106                    throws com.liferay.portal.kernel.exception.SystemException;
107    
108            /**
109            * Finds all the d l file versions where fileEntryId = &#63;.
110            *
111            * @param fileEntryId the file entry ID to search with
112            * @return the matching d l file versions
113            * @throws SystemException if a system exception occurred
114            */
115            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId(
116                    long fileEntryId)
117                    throws com.liferay.portal.kernel.exception.SystemException;
118    
119            /**
120            * Finds a range of all the d l file versions where fileEntryId = &#63;.
121            *
122            * <p>
123            * 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.
124            * </p>
125            *
126            * @param fileEntryId the file entry ID to search with
127            * @param start the lower bound of the range of d l file versions to return
128            * @param end the upper bound of the range of d l file versions to return (not inclusive)
129            * @return the range of matching d l file versions
130            * @throws SystemException if a system exception occurred
131            */
132            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId(
133                    long fileEntryId, int start, int end)
134                    throws com.liferay.portal.kernel.exception.SystemException;
135    
136            /**
137            * Finds an ordered range of all the d l file versions where fileEntryId = &#63;.
138            *
139            * <p>
140            * 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.
141            * </p>
142            *
143            * @param fileEntryId the file entry ID to search with
144            * @param start the lower bound of the range of d l file versions to return
145            * @param end the upper bound of the range of d l file versions to return (not inclusive)
146            * @param orderByComparator the comparator to order the results by
147            * @return the ordered range of matching d l file versions
148            * @throws SystemException if a system exception occurred
149            */
150            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId(
151                    long fileEntryId, int start, int end,
152                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
153                    throws com.liferay.portal.kernel.exception.SystemException;
154    
155            /**
156            * Finds the first d l file version in the ordered set where fileEntryId = &#63;.
157            *
158            * <p>
159            * 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.
160            * </p>
161            *
162            * @param fileEntryId the file entry ID to search with
163            * @param orderByComparator the comparator to order the set by
164            * @return the first matching d l file version
165            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching d l file version could not be found
166            * @throws SystemException if a system exception occurred
167            */
168            public com.liferay.portlet.documentlibrary.model.DLFileVersion findByFileEntryId_First(
169                    long fileEntryId,
170                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
171                    throws com.liferay.portal.kernel.exception.SystemException,
172                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
173    
174            /**
175            * Finds the last d l file version in the ordered set where fileEntryId = &#63;.
176            *
177            * <p>
178            * 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.
179            * </p>
180            *
181            * @param fileEntryId the file entry ID to search with
182            * @param orderByComparator the comparator to order the set by
183            * @return the last matching d l file version
184            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching d l file version could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public com.liferay.portlet.documentlibrary.model.DLFileVersion findByFileEntryId_Last(
188                    long fileEntryId,
189                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
190                    throws com.liferay.portal.kernel.exception.SystemException,
191                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
192    
193            /**
194            * Finds the d l file versions before and after the current d l file version in the ordered set where fileEntryId = &#63;.
195            *
196            * <p>
197            * 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.
198            * </p>
199            *
200            * @param fileVersionId the primary key of the current d l file version
201            * @param fileEntryId the file entry ID to search with
202            * @param orderByComparator the comparator to order the set by
203            * @return the previous, current, and next d l file version
204            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a d l file version with the primary key could not be found
205            * @throws SystemException if a system exception occurred
206            */
207            public com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByFileEntryId_PrevAndNext(
208                    long fileVersionId, long fileEntryId,
209                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210                    throws com.liferay.portal.kernel.exception.SystemException,
211                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
212    
213            /**
214            * Finds the d l file version where fileEntryId = &#63; and version = &#63; or throws a {@link com.liferay.portlet.documentlibrary.NoSuchFileVersionException} if it could not be found.
215            *
216            * @param fileEntryId the file entry ID to search with
217            * @param version the version to search with
218            * @return the matching d l file version
219            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching d l file version could not be found
220            * @throws SystemException if a system exception occurred
221            */
222            public com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_V(
223                    long fileEntryId, java.lang.String version)
224                    throws com.liferay.portal.kernel.exception.SystemException,
225                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
226    
227            /**
228            * Finds the d l file version where fileEntryId = &#63; and version = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
229            *
230            * @param fileEntryId the file entry ID to search with
231            * @param version the version to search with
232            * @return the matching d l file version, or <code>null</code> if a matching d l file version could not be found
233            * @throws SystemException if a system exception occurred
234            */
235            public com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByF_V(
236                    long fileEntryId, java.lang.String version)
237                    throws com.liferay.portal.kernel.exception.SystemException;
238    
239            /**
240            * Finds the d l file version where fileEntryId = &#63; and version = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
241            *
242            * @param fileEntryId the file entry ID to search with
243            * @param version the version to search with
244            * @return the matching d l file version, or <code>null</code> if a matching d l file version could not be found
245            * @throws SystemException if a system exception occurred
246            */
247            public com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByF_V(
248                    long fileEntryId, java.lang.String version, boolean retrieveFromCache)
249                    throws com.liferay.portal.kernel.exception.SystemException;
250    
251            /**
252            * Finds all the d l file versions where fileEntryId = &#63; and status = &#63;.
253            *
254            * @param fileEntryId the file entry ID to search with
255            * @param status the status to search with
256            * @return the matching d l file versions
257            * @throws SystemException if a system exception occurred
258            */
259            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S(
260                    long fileEntryId, int status)
261                    throws com.liferay.portal.kernel.exception.SystemException;
262    
263            /**
264            * Finds a range of all the d l file versions where fileEntryId = &#63; and status = &#63;.
265            *
266            * <p>
267            * 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.
268            * </p>
269            *
270            * @param fileEntryId the file entry ID to search with
271            * @param status the status to search with
272            * @param start the lower bound of the range of d l file versions to return
273            * @param end the upper bound of the range of d l file versions to return (not inclusive)
274            * @return the range of matching d l file versions
275            * @throws SystemException if a system exception occurred
276            */
277            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S(
278                    long fileEntryId, int status, int start, int end)
279                    throws com.liferay.portal.kernel.exception.SystemException;
280    
281            /**
282            * Finds an ordered range of all the d l file versions where fileEntryId = &#63; and status = &#63;.
283            *
284            * <p>
285            * 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.
286            * </p>
287            *
288            * @param fileEntryId the file entry ID to search with
289            * @param status the status to search with
290            * @param start the lower bound of the range of d l file versions to return
291            * @param end the upper bound of the range of d l file versions to return (not inclusive)
292            * @param orderByComparator the comparator to order the results by
293            * @return the ordered range of matching d l file versions
294            * @throws SystemException if a system exception occurred
295            */
296            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S(
297                    long fileEntryId, int status, int start, int end,
298                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
299                    throws com.liferay.portal.kernel.exception.SystemException;
300    
301            /**
302            * Finds the first d l file version in the ordered set where fileEntryId = &#63; and status = &#63;.
303            *
304            * <p>
305            * 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.
306            * </p>
307            *
308            * @param fileEntryId the file entry ID to search with
309            * @param status the status to search with
310            * @param orderByComparator the comparator to order the set by
311            * @return the first matching d l file version
312            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching d l file version could not be found
313            * @throws SystemException if a system exception occurred
314            */
315            public com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_S_First(
316                    long fileEntryId, int status,
317                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
318                    throws com.liferay.portal.kernel.exception.SystemException,
319                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
320    
321            /**
322            * Finds the last d l file version in the ordered set where fileEntryId = &#63; and status = &#63;.
323            *
324            * <p>
325            * 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.
326            * </p>
327            *
328            * @param fileEntryId the file entry ID to search with
329            * @param status the status to search with
330            * @param orderByComparator the comparator to order the set by
331            * @return the last matching d l file version
332            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching d l file version could not be found
333            * @throws SystemException if a system exception occurred
334            */
335            public com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_S_Last(
336                    long fileEntryId, int status,
337                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
338                    throws com.liferay.portal.kernel.exception.SystemException,
339                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
340    
341            /**
342            * Finds the d l file versions before and after the current d l file version in the ordered set where fileEntryId = &#63; and status = &#63;.
343            *
344            * <p>
345            * 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.
346            * </p>
347            *
348            * @param fileVersionId the primary key of the current d l file version
349            * @param fileEntryId the file entry ID to search with
350            * @param status the status to search with
351            * @param orderByComparator the comparator to order the set by
352            * @return the previous, current, and next d l file version
353            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a d l file version with the primary key could not be found
354            * @throws SystemException if a system exception occurred
355            */
356            public com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByF_S_PrevAndNext(
357                    long fileVersionId, long fileEntryId, int status,
358                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
359                    throws com.liferay.portal.kernel.exception.SystemException,
360                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
361    
362            /**
363            * Finds all the d l file versions.
364            *
365            * @return the d l file versions
366            * @throws SystemException if a system exception occurred
367            */
368            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll()
369                    throws com.liferay.portal.kernel.exception.SystemException;
370    
371            /**
372            * Finds a range of all the d l file versions.
373            *
374            * <p>
375            * 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.
376            * </p>
377            *
378            * @param start the lower bound of the range of d l file versions to return
379            * @param end the upper bound of the range of d l file versions to return (not inclusive)
380            * @return the range of d l file versions
381            * @throws SystemException if a system exception occurred
382            */
383            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll(
384                    int start, int end)
385                    throws com.liferay.portal.kernel.exception.SystemException;
386    
387            /**
388            * Finds an ordered range of all the d l file versions.
389            *
390            * <p>
391            * 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.
392            * </p>
393            *
394            * @param start the lower bound of the range of d l file versions to return
395            * @param end the upper bound of the range of d l file versions to return (not inclusive)
396            * @param orderByComparator the comparator to order the results by
397            * @return the ordered range of d l file versions
398            * @throws SystemException if a system exception occurred
399            */
400            public java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll(
401                    int start, int end,
402                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
403                    throws com.liferay.portal.kernel.exception.SystemException;
404    
405            /**
406            * Removes all the d l file versions where fileEntryId = &#63; from the database.
407            *
408            * @param fileEntryId the file entry ID to search with
409            * @throws SystemException if a system exception occurred
410            */
411            public void removeByFileEntryId(long fileEntryId)
412                    throws com.liferay.portal.kernel.exception.SystemException;
413    
414            /**
415            * Removes the d l file version where fileEntryId = &#63; and version = &#63; from the database.
416            *
417            * @param fileEntryId the file entry ID to search with
418            * @param version the version to search with
419            * @throws SystemException if a system exception occurred
420            */
421            public void removeByF_V(long fileEntryId, java.lang.String version)
422                    throws com.liferay.portal.kernel.exception.SystemException,
423                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException;
424    
425            /**
426            * Removes all the d l file versions where fileEntryId = &#63; and status = &#63; from the database.
427            *
428            * @param fileEntryId the file entry ID to search with
429            * @param status the status to search with
430            * @throws SystemException if a system exception occurred
431            */
432            public void removeByF_S(long fileEntryId, int status)
433                    throws com.liferay.portal.kernel.exception.SystemException;
434    
435            /**
436            * Removes all the d l file versions from the database.
437            *
438            * @throws SystemException if a system exception occurred
439            */
440            public void removeAll()
441                    throws com.liferay.portal.kernel.exception.SystemException;
442    
443            /**
444            * Counts all the d l file versions where fileEntryId = &#63;.
445            *
446            * @param fileEntryId the file entry ID to search with
447            * @return the number of matching d l file versions
448            * @throws SystemException if a system exception occurred
449            */
450            public int countByFileEntryId(long fileEntryId)
451                    throws com.liferay.portal.kernel.exception.SystemException;
452    
453            /**
454            * Counts all the d l file versions where fileEntryId = &#63; and version = &#63;.
455            *
456            * @param fileEntryId the file entry ID to search with
457            * @param version the version to search with
458            * @return the number of matching d l file versions
459            * @throws SystemException if a system exception occurred
460            */
461            public int countByF_V(long fileEntryId, java.lang.String version)
462                    throws com.liferay.portal.kernel.exception.SystemException;
463    
464            /**
465            * Counts all the d l file versions where fileEntryId = &#63; and status = &#63;.
466            *
467            * @param fileEntryId the file entry ID to search with
468            * @param status the status to search with
469            * @return the number of matching d l file versions
470            * @throws SystemException if a system exception occurred
471            */
472            public int countByF_S(long fileEntryId, int status)
473                    throws com.liferay.portal.kernel.exception.SystemException;
474    
475            /**
476            * Counts all the d l file versions.
477            *
478            * @return the number of d l file versions
479            * @throws SystemException if a system exception occurred
480            */
481            public int countAll()
482                    throws com.liferay.portal.kernel.exception.SystemException;
483    
484            public DLFileVersion remove(DLFileVersion dlFileVersion)
485                    throws SystemException;
486    }