001    /**
002     * Copyright (c) 2000-2011 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.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.documentlibrary.model.DLFileVersion;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the document library file version service. This utility wraps {@link DLFileVersionPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see DLFileVersionPersistence
037     * @see DLFileVersionPersistenceImpl
038     * @generated
039     */
040    public class DLFileVersionUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(DLFileVersion dlFileVersion) {
058                    getPersistence().clearCache(dlFileVersion);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<DLFileVersion> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<DLFileVersion> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<DLFileVersion> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
099             */
100            public static DLFileVersion remove(DLFileVersion dlFileVersion)
101                    throws SystemException {
102                    return getPersistence().remove(dlFileVersion);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
107             */
108            public static DLFileVersion update(DLFileVersion dlFileVersion,
109                    boolean merge) throws SystemException {
110                    return getPersistence().update(dlFileVersion, merge);
111            }
112    
113            /**
114             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
115             */
116            public static DLFileVersion update(DLFileVersion dlFileVersion,
117                    boolean merge, ServiceContext serviceContext) throws SystemException {
118                    return getPersistence().update(dlFileVersion, merge, serviceContext);
119            }
120    
121            /**
122            * Caches the document library file version in the entity cache if it is enabled.
123            *
124            * @param dlFileVersion the document library file version
125            */
126            public static void cacheResult(
127                    com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion) {
128                    getPersistence().cacheResult(dlFileVersion);
129            }
130    
131            /**
132            * Caches the document library file versions in the entity cache if it is enabled.
133            *
134            * @param dlFileVersions the document library file versions
135            */
136            public static void cacheResult(
137                    java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> dlFileVersions) {
138                    getPersistence().cacheResult(dlFileVersions);
139            }
140    
141            /**
142            * Creates a new document library file version with the primary key. Does not add the document library file version to the database.
143            *
144            * @param fileVersionId the primary key for the new document library file version
145            * @return the new document library file version
146            */
147            public static com.liferay.portlet.documentlibrary.model.DLFileVersion create(
148                    long fileVersionId) {
149                    return getPersistence().create(fileVersionId);
150            }
151    
152            /**
153            * Removes the document library file version with the primary key from the database. Also notifies the appropriate model listeners.
154            *
155            * @param fileVersionId the primary key of the document library file version
156            * @return the document library file version that was removed
157            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            public static com.liferay.portlet.documentlibrary.model.DLFileVersion remove(
161                    long fileVersionId)
162                    throws com.liferay.portal.kernel.exception.SystemException,
163                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
164                    return getPersistence().remove(fileVersionId);
165            }
166    
167            public static com.liferay.portlet.documentlibrary.model.DLFileVersion updateImpl(
168                    com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion,
169                    boolean merge)
170                    throws com.liferay.portal.kernel.exception.SystemException {
171                    return getPersistence().updateImpl(dlFileVersion, merge);
172            }
173    
174            /**
175            * Returns the document library file version with the primary key or throws a {@link com.liferay.portlet.documentlibrary.NoSuchFileVersionException} if it could not be found.
176            *
177            * @param fileVersionId the primary key of the document library file version
178            * @return the document library file version
179            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found
180            * @throws SystemException if a system exception occurred
181            */
182            public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByPrimaryKey(
183                    long fileVersionId)
184                    throws com.liferay.portal.kernel.exception.SystemException,
185                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
186                    return getPersistence().findByPrimaryKey(fileVersionId);
187            }
188    
189            /**
190            * Returns the document library file version with the primary key or returns <code>null</code> if it could not be found.
191            *
192            * @param fileVersionId the primary key of the document library file version
193            * @return the document library file version, or <code>null</code> if a document library file version with the primary key could not be found
194            * @throws SystemException if a system exception occurred
195            */
196            public static com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByPrimaryKey(
197                    long fileVersionId)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getPersistence().fetchByPrimaryKey(fileVersionId);
200            }
201    
202            /**
203            * Returns all the document library file versions where fileEntryId = &#63;.
204            *
205            * @param fileEntryId the file entry ID
206            * @return the matching document library file versions
207            * @throws SystemException if a system exception occurred
208            */
209            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId(
210                    long fileEntryId)
211                    throws com.liferay.portal.kernel.exception.SystemException {
212                    return getPersistence().findByFileEntryId(fileEntryId);
213            }
214    
215            /**
216            * Returns a range of all the document library file versions where fileEntryId = &#63;.
217            *
218            * <p>
219            * 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.
220            * </p>
221            *
222            * @param fileEntryId the file entry ID
223            * @param start the lower bound of the range of document library file versions
224            * @param end the upper bound of the range of document library file versions (not inclusive)
225            * @return the range of matching document library file versions
226            * @throws SystemException if a system exception occurred
227            */
228            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId(
229                    long fileEntryId, int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getPersistence().findByFileEntryId(fileEntryId, start, end);
232            }
233    
234            /**
235            * Returns an ordered range of all the document library file versions where fileEntryId = &#63;.
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.
239            * </p>
240            *
241            * @param fileEntryId the file entry ID
242            * @param start the lower bound of the range of document library file versions
243            * @param end the upper bound of the range of document library file versions (not inclusive)
244            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
245            * @return the ordered range of matching document library file versions
246            * @throws SystemException if a system exception occurred
247            */
248            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByFileEntryId(
249                    long fileEntryId, int start, int end,
250                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251                    throws com.liferay.portal.kernel.exception.SystemException {
252                    return getPersistence()
253                                       .findByFileEntryId(fileEntryId, start, end, orderByComparator);
254            }
255    
256            /**
257            * Returns the first document library file version in the ordered set where fileEntryId = &#63;.
258            *
259            * <p>
260            * 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.
261            * </p>
262            *
263            * @param fileEntryId the file entry ID
264            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
265            * @return the first matching document library file version
266            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found
267            * @throws SystemException if a system exception occurred
268            */
269            public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByFileEntryId_First(
270                    long fileEntryId,
271                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272                    throws com.liferay.portal.kernel.exception.SystemException,
273                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
274                    return getPersistence()
275                                       .findByFileEntryId_First(fileEntryId, orderByComparator);
276            }
277    
278            /**
279            * Returns the last document library file version in the ordered set where fileEntryId = &#63;.
280            *
281            * <p>
282            * 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.
283            * </p>
284            *
285            * @param fileEntryId the file entry ID
286            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
287            * @return the last matching document library file version
288            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found
289            * @throws SystemException if a system exception occurred
290            */
291            public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByFileEntryId_Last(
292                    long fileEntryId,
293                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
294                    throws com.liferay.portal.kernel.exception.SystemException,
295                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
296                    return getPersistence()
297                                       .findByFileEntryId_Last(fileEntryId, orderByComparator);
298            }
299    
300            /**
301            * Returns the document library file versions before and after the current document library file version in the ordered set where fileEntryId = &#63;.
302            *
303            * <p>
304            * 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.
305            * </p>
306            *
307            * @param fileVersionId the primary key of the current document library file version
308            * @param fileEntryId the file entry ID
309            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
310            * @return the previous, current, and next document library file version
311            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found
312            * @throws SystemException if a system exception occurred
313            */
314            public static com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByFileEntryId_PrevAndNext(
315                    long fileVersionId, long fileEntryId,
316                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
317                    throws com.liferay.portal.kernel.exception.SystemException,
318                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
319                    return getPersistence()
320                                       .findByFileEntryId_PrevAndNext(fileVersionId, fileEntryId,
321                            orderByComparator);
322            }
323    
324            /**
325            * Returns the document library file version where fileEntryId = &#63; and version = &#63; or throws a {@link com.liferay.portlet.documentlibrary.NoSuchFileVersionException} if it could not be found.
326            *
327            * @param fileEntryId the file entry ID
328            * @param version the version
329            * @return the matching document library file version
330            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found
331            * @throws SystemException if a system exception occurred
332            */
333            public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_V(
334                    long fileEntryId, java.lang.String version)
335                    throws com.liferay.portal.kernel.exception.SystemException,
336                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
337                    return getPersistence().findByF_V(fileEntryId, version);
338            }
339    
340            /**
341            * Returns the document library file version where fileEntryId = &#63; and version = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
342            *
343            * @param fileEntryId the file entry ID
344            * @param version the version
345            * @return the matching document library file version, or <code>null</code> if a matching document library file version could not be found
346            * @throws SystemException if a system exception occurred
347            */
348            public static com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByF_V(
349                    long fileEntryId, java.lang.String version)
350                    throws com.liferay.portal.kernel.exception.SystemException {
351                    return getPersistence().fetchByF_V(fileEntryId, version);
352            }
353    
354            /**
355            * Returns the document library file version where fileEntryId = &#63; and version = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
356            *
357            * @param fileEntryId the file entry ID
358            * @param version the version
359            * @param retrieveFromCache whether to use the finder cache
360            * @return the matching document library file version, or <code>null</code> if a matching document library file version could not be found
361            * @throws SystemException if a system exception occurred
362            */
363            public static com.liferay.portlet.documentlibrary.model.DLFileVersion fetchByF_V(
364                    long fileEntryId, java.lang.String version, boolean retrieveFromCache)
365                    throws com.liferay.portal.kernel.exception.SystemException {
366                    return getPersistence()
367                                       .fetchByF_V(fileEntryId, version, retrieveFromCache);
368            }
369    
370            /**
371            * Returns all the document library file versions where fileEntryId = &#63; and status = &#63;.
372            *
373            * @param fileEntryId the file entry ID
374            * @param status the status
375            * @return the matching document library file versions
376            * @throws SystemException if a system exception occurred
377            */
378            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S(
379                    long fileEntryId, int status)
380                    throws com.liferay.portal.kernel.exception.SystemException {
381                    return getPersistence().findByF_S(fileEntryId, status);
382            }
383    
384            /**
385            * Returns a range of all the document library file versions where fileEntryId = &#63; and status = &#63;.
386            *
387            * <p>
388            * 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.
389            * </p>
390            *
391            * @param fileEntryId the file entry ID
392            * @param status the status
393            * @param start the lower bound of the range of document library file versions
394            * @param end the upper bound of the range of document library file versions (not inclusive)
395            * @return the range of matching document library file versions
396            * @throws SystemException if a system exception occurred
397            */
398            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S(
399                    long fileEntryId, int status, int start, int end)
400                    throws com.liferay.portal.kernel.exception.SystemException {
401                    return getPersistence().findByF_S(fileEntryId, status, start, end);
402            }
403    
404            /**
405            * Returns an ordered range of all the document library file versions where fileEntryId = &#63; and status = &#63;.
406            *
407            * <p>
408            * 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.
409            * </p>
410            *
411            * @param fileEntryId the file entry ID
412            * @param status the status
413            * @param start the lower bound of the range of document library file versions
414            * @param end the upper bound of the range of document library file versions (not inclusive)
415            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
416            * @return the ordered range of matching document library file versions
417            * @throws SystemException if a system exception occurred
418            */
419            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByF_S(
420                    long fileEntryId, int status, int start, int end,
421                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
422                    throws com.liferay.portal.kernel.exception.SystemException {
423                    return getPersistence()
424                                       .findByF_S(fileEntryId, status, start, end, orderByComparator);
425            }
426    
427            /**
428            * Returns the first document library file version in the ordered set where fileEntryId = &#63; and status = &#63;.
429            *
430            * <p>
431            * 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.
432            * </p>
433            *
434            * @param fileEntryId the file entry ID
435            * @param status the status
436            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
437            * @return the first matching document library file version
438            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found
439            * @throws SystemException if a system exception occurred
440            */
441            public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_S_First(
442                    long fileEntryId, int status,
443                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
444                    throws com.liferay.portal.kernel.exception.SystemException,
445                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
446                    return getPersistence()
447                                       .findByF_S_First(fileEntryId, status, orderByComparator);
448            }
449    
450            /**
451            * Returns the last document library file version in the ordered set where fileEntryId = &#63; and status = &#63;.
452            *
453            * <p>
454            * 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.
455            * </p>
456            *
457            * @param fileEntryId the file entry ID
458            * @param status the status
459            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
460            * @return the last matching document library file version
461            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found
462            * @throws SystemException if a system exception occurred
463            */
464            public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByF_S_Last(
465                    long fileEntryId, int status,
466                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
467                    throws com.liferay.portal.kernel.exception.SystemException,
468                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
469                    return getPersistence()
470                                       .findByF_S_Last(fileEntryId, status, orderByComparator);
471            }
472    
473            /**
474            * Returns the document library file versions before and after the current document library file version in the ordered set where fileEntryId = &#63; and status = &#63;.
475            *
476            * <p>
477            * 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.
478            * </p>
479            *
480            * @param fileVersionId the primary key of the current document library file version
481            * @param fileEntryId the file entry ID
482            * @param status the status
483            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
484            * @return the previous, current, and next document library file version
485            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found
486            * @throws SystemException if a system exception occurred
487            */
488            public static com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByF_S_PrevAndNext(
489                    long fileVersionId, long fileEntryId, int status,
490                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
491                    throws com.liferay.portal.kernel.exception.SystemException,
492                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
493                    return getPersistence()
494                                       .findByF_S_PrevAndNext(fileVersionId, fileEntryId, status,
495                            orderByComparator);
496            }
497    
498            /**
499            * Returns all the document library file versions.
500            *
501            * @return the document library file versions
502            * @throws SystemException if a system exception occurred
503            */
504            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll()
505                    throws com.liferay.portal.kernel.exception.SystemException {
506                    return getPersistence().findAll();
507            }
508    
509            /**
510            * Returns a range of all the document library file versions.
511            *
512            * <p>
513            * 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.
514            * </p>
515            *
516            * @param start the lower bound of the range of document library file versions
517            * @param end the upper bound of the range of document library file versions (not inclusive)
518            * @return the range of document library file versions
519            * @throws SystemException if a system exception occurred
520            */
521            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll(
522                    int start, int end)
523                    throws com.liferay.portal.kernel.exception.SystemException {
524                    return getPersistence().findAll(start, end);
525            }
526    
527            /**
528            * Returns an ordered range of all the document library file versions.
529            *
530            * <p>
531            * 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.
532            * </p>
533            *
534            * @param start the lower bound of the range of document library file versions
535            * @param end the upper bound of the range of document library file versions (not inclusive)
536            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
537            * @return the ordered range of document library file versions
538            * @throws SystemException if a system exception occurred
539            */
540            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll(
541                    int start, int end,
542                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
543                    throws com.liferay.portal.kernel.exception.SystemException {
544                    return getPersistence().findAll(start, end, orderByComparator);
545            }
546    
547            /**
548            * Removes all the document library file versions where fileEntryId = &#63; from the database.
549            *
550            * @param fileEntryId the file entry ID
551            * @throws SystemException if a system exception occurred
552            */
553            public static void removeByFileEntryId(long fileEntryId)
554                    throws com.liferay.portal.kernel.exception.SystemException {
555                    getPersistence().removeByFileEntryId(fileEntryId);
556            }
557    
558            /**
559            * Removes the document library file version where fileEntryId = &#63; and version = &#63; from the database.
560            *
561            * @param fileEntryId the file entry ID
562            * @param version the version
563            * @throws SystemException if a system exception occurred
564            */
565            public static void removeByF_V(long fileEntryId, java.lang.String version)
566                    throws com.liferay.portal.kernel.exception.SystemException,
567                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
568                    getPersistence().removeByF_V(fileEntryId, version);
569            }
570    
571            /**
572            * Removes all the document library file versions where fileEntryId = &#63; and status = &#63; from the database.
573            *
574            * @param fileEntryId the file entry ID
575            * @param status the status
576            * @throws SystemException if a system exception occurred
577            */
578            public static void removeByF_S(long fileEntryId, int status)
579                    throws com.liferay.portal.kernel.exception.SystemException {
580                    getPersistence().removeByF_S(fileEntryId, status);
581            }
582    
583            /**
584            * Removes all the document library file versions from the database.
585            *
586            * @throws SystemException if a system exception occurred
587            */
588            public static void removeAll()
589                    throws com.liferay.portal.kernel.exception.SystemException {
590                    getPersistence().removeAll();
591            }
592    
593            /**
594            * Returns the number of document library file versions where fileEntryId = &#63;.
595            *
596            * @param fileEntryId the file entry ID
597            * @return the number of matching document library file versions
598            * @throws SystemException if a system exception occurred
599            */
600            public static int countByFileEntryId(long fileEntryId)
601                    throws com.liferay.portal.kernel.exception.SystemException {
602                    return getPersistence().countByFileEntryId(fileEntryId);
603            }
604    
605            /**
606            * Returns the number of document library file versions where fileEntryId = &#63; and version = &#63;.
607            *
608            * @param fileEntryId the file entry ID
609            * @param version the version
610            * @return the number of matching document library file versions
611            * @throws SystemException if a system exception occurred
612            */
613            public static int countByF_V(long fileEntryId, java.lang.String version)
614                    throws com.liferay.portal.kernel.exception.SystemException {
615                    return getPersistence().countByF_V(fileEntryId, version);
616            }
617    
618            /**
619            * Returns the number of document library file versions where fileEntryId = &#63; and status = &#63;.
620            *
621            * @param fileEntryId the file entry ID
622            * @param status the status
623            * @return the number of matching document library file versions
624            * @throws SystemException if a system exception occurred
625            */
626            public static int countByF_S(long fileEntryId, int status)
627                    throws com.liferay.portal.kernel.exception.SystemException {
628                    return getPersistence().countByF_S(fileEntryId, status);
629            }
630    
631            /**
632            * Returns the number of document library file versions.
633            *
634            * @return the number of document library file versions
635            * @throws SystemException if a system exception occurred
636            */
637            public static int countAll()
638                    throws com.liferay.portal.kernel.exception.SystemException {
639                    return getPersistence().countAll();
640            }
641    
642            public static DLFileVersionPersistence getPersistence() {
643                    if (_persistence == null) {
644                            _persistence = (DLFileVersionPersistence)PortalBeanLocatorUtil.locate(DLFileVersionPersistence.class.getName());
645    
646                            ReferenceRegistry.registerReference(DLFileVersionUtil.class,
647                                    "_persistence");
648                    }
649    
650                    return _persistence;
651            }
652    
653            public void setPersistence(DLFileVersionPersistence persistence) {
654                    _persistence = persistence;
655    
656                    ReferenceRegistry.registerReference(DLFileVersionUtil.class,
657                            "_persistence");
658            }
659    
660            private static DLFileVersionPersistence _persistence;
661    }