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.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 where groupId = &#63; and folderId = &#63; and status = &#63;.
500            *
501            * @param groupId the group ID
502            * @param folderId the folder ID
503            * @param status the status
504            * @return the matching document library file versions
505            * @throws SystemException if a system exception occurred
506            */
507            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByG_F_S(
508                    long groupId, long folderId, int status)
509                    throws com.liferay.portal.kernel.exception.SystemException {
510                    return getPersistence().findByG_F_S(groupId, folderId, status);
511            }
512    
513            /**
514            * Returns a range of all the document library file versions where groupId = &#63; and folderId = &#63; and status = &#63;.
515            *
516            * <p>
517            * 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.
518            * </p>
519            *
520            * @param groupId the group ID
521            * @param folderId the folder ID
522            * @param status the status
523            * @param start the lower bound of the range of document library file versions
524            * @param end the upper bound of the range of document library file versions (not inclusive)
525            * @return the range of matching document library file versions
526            * @throws SystemException if a system exception occurred
527            */
528            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByG_F_S(
529                    long groupId, long folderId, int status, int start, int end)
530                    throws com.liferay.portal.kernel.exception.SystemException {
531                    return getPersistence()
532                                       .findByG_F_S(groupId, folderId, status, start, end);
533            }
534    
535            /**
536            * Returns an ordered range of all the document library file versions where groupId = &#63; and folderId = &#63; and status = &#63;.
537            *
538            * <p>
539            * 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.
540            * </p>
541            *
542            * @param groupId the group ID
543            * @param folderId the folder ID
544            * @param status the status
545            * @param start the lower bound of the range of document library file versions
546            * @param end the upper bound of the range of document library file versions (not inclusive)
547            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
548            * @return the ordered range of matching document library file versions
549            * @throws SystemException if a system exception occurred
550            */
551            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findByG_F_S(
552                    long groupId, long folderId, int status, int start, int end,
553                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
554                    throws com.liferay.portal.kernel.exception.SystemException {
555                    return getPersistence()
556                                       .findByG_F_S(groupId, folderId, status, start, end,
557                            orderByComparator);
558            }
559    
560            /**
561            * Returns the first document library file version in the ordered set where groupId = &#63; and folderId = &#63; and status = &#63;.
562            *
563            * <p>
564            * 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.
565            * </p>
566            *
567            * @param groupId the group ID
568            * @param folderId the folder ID
569            * @param status the status
570            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
571            * @return the first matching document library file version
572            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found
573            * @throws SystemException if a system exception occurred
574            */
575            public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByG_F_S_First(
576                    long groupId, long folderId, int status,
577                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
578                    throws com.liferay.portal.kernel.exception.SystemException,
579                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
580                    return getPersistence()
581                                       .findByG_F_S_First(groupId, folderId, status,
582                            orderByComparator);
583            }
584    
585            /**
586            * Returns the last document library file version in the ordered set where groupId = &#63; and folderId = &#63; and status = &#63;.
587            *
588            * <p>
589            * 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.
590            * </p>
591            *
592            * @param groupId the group ID
593            * @param folderId the folder ID
594            * @param status the status
595            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
596            * @return the last matching document library file version
597            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a matching document library file version could not be found
598            * @throws SystemException if a system exception occurred
599            */
600            public static com.liferay.portlet.documentlibrary.model.DLFileVersion findByG_F_S_Last(
601                    long groupId, long folderId, int status,
602                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
603                    throws com.liferay.portal.kernel.exception.SystemException,
604                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
605                    return getPersistence()
606                                       .findByG_F_S_Last(groupId, folderId, status,
607                            orderByComparator);
608            }
609    
610            /**
611            * Returns the document library file versions before and after the current document library file version in the ordered set where groupId = &#63; and folderId = &#63; and status = &#63;.
612            *
613            * <p>
614            * 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.
615            * </p>
616            *
617            * @param fileVersionId the primary key of the current document library file version
618            * @param groupId the group ID
619            * @param folderId the folder ID
620            * @param status the status
621            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
622            * @return the previous, current, and next document library file version
623            * @throws com.liferay.portlet.documentlibrary.NoSuchFileVersionException if a document library file version with the primary key could not be found
624            * @throws SystemException if a system exception occurred
625            */
626            public static com.liferay.portlet.documentlibrary.model.DLFileVersion[] findByG_F_S_PrevAndNext(
627                    long fileVersionId, long groupId, long folderId, int status,
628                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
629                    throws com.liferay.portal.kernel.exception.SystemException,
630                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
631                    return getPersistence()
632                                       .findByG_F_S_PrevAndNext(fileVersionId, groupId, folderId,
633                            status, orderByComparator);
634            }
635    
636            /**
637            * Returns all the document library file versions.
638            *
639            * @return the document library file versions
640            * @throws SystemException if a system exception occurred
641            */
642            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll()
643                    throws com.liferay.portal.kernel.exception.SystemException {
644                    return getPersistence().findAll();
645            }
646    
647            /**
648            * Returns a range of all the document library file versions.
649            *
650            * <p>
651            * 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.
652            * </p>
653            *
654            * @param start the lower bound of the range of document library file versions
655            * @param end the upper bound of the range of document library file versions (not inclusive)
656            * @return the range of document library file versions
657            * @throws SystemException if a system exception occurred
658            */
659            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll(
660                    int start, int end)
661                    throws com.liferay.portal.kernel.exception.SystemException {
662                    return getPersistence().findAll(start, end);
663            }
664    
665            /**
666            * Returns an ordered range of all the document library file versions.
667            *
668            * <p>
669            * 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.
670            * </p>
671            *
672            * @param start the lower bound of the range of document library file versions
673            * @param end the upper bound of the range of document library file versions (not inclusive)
674            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
675            * @return the ordered range of document library file versions
676            * @throws SystemException if a system exception occurred
677            */
678            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileVersion> findAll(
679                    int start, int end,
680                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
681                    throws com.liferay.portal.kernel.exception.SystemException {
682                    return getPersistence().findAll(start, end, orderByComparator);
683            }
684    
685            /**
686            * Removes all the document library file versions where fileEntryId = &#63; from the database.
687            *
688            * @param fileEntryId the file entry ID
689            * @throws SystemException if a system exception occurred
690            */
691            public static void removeByFileEntryId(long fileEntryId)
692                    throws com.liferay.portal.kernel.exception.SystemException {
693                    getPersistence().removeByFileEntryId(fileEntryId);
694            }
695    
696            /**
697            * Removes the document library file version where fileEntryId = &#63; and version = &#63; from the database.
698            *
699            * @param fileEntryId the file entry ID
700            * @param version the version
701            * @throws SystemException if a system exception occurred
702            */
703            public static void removeByF_V(long fileEntryId, java.lang.String version)
704                    throws com.liferay.portal.kernel.exception.SystemException,
705                            com.liferay.portlet.documentlibrary.NoSuchFileVersionException {
706                    getPersistence().removeByF_V(fileEntryId, version);
707            }
708    
709            /**
710            * Removes all the document library file versions where fileEntryId = &#63; and status = &#63; from the database.
711            *
712            * @param fileEntryId the file entry ID
713            * @param status the status
714            * @throws SystemException if a system exception occurred
715            */
716            public static void removeByF_S(long fileEntryId, int status)
717                    throws com.liferay.portal.kernel.exception.SystemException {
718                    getPersistence().removeByF_S(fileEntryId, status);
719            }
720    
721            /**
722            * Removes all the document library file versions where groupId = &#63; and folderId = &#63; and status = &#63; from the database.
723            *
724            * @param groupId the group ID
725            * @param folderId the folder ID
726            * @param status the status
727            * @throws SystemException if a system exception occurred
728            */
729            public static void removeByG_F_S(long groupId, long folderId, int status)
730                    throws com.liferay.portal.kernel.exception.SystemException {
731                    getPersistence().removeByG_F_S(groupId, folderId, status);
732            }
733    
734            /**
735            * Removes all the document library file versions from the database.
736            *
737            * @throws SystemException if a system exception occurred
738            */
739            public static void removeAll()
740                    throws com.liferay.portal.kernel.exception.SystemException {
741                    getPersistence().removeAll();
742            }
743    
744            /**
745            * Returns the number of document library file versions where fileEntryId = &#63;.
746            *
747            * @param fileEntryId the file entry ID
748            * @return the number of matching document library file versions
749            * @throws SystemException if a system exception occurred
750            */
751            public static int countByFileEntryId(long fileEntryId)
752                    throws com.liferay.portal.kernel.exception.SystemException {
753                    return getPersistence().countByFileEntryId(fileEntryId);
754            }
755    
756            /**
757            * Returns the number of document library file versions where fileEntryId = &#63; and version = &#63;.
758            *
759            * @param fileEntryId the file entry ID
760            * @param version the version
761            * @return the number of matching document library file versions
762            * @throws SystemException if a system exception occurred
763            */
764            public static int countByF_V(long fileEntryId, java.lang.String version)
765                    throws com.liferay.portal.kernel.exception.SystemException {
766                    return getPersistence().countByF_V(fileEntryId, version);
767            }
768    
769            /**
770            * Returns the number of document library file versions where fileEntryId = &#63; and status = &#63;.
771            *
772            * @param fileEntryId the file entry ID
773            * @param status the status
774            * @return the number of matching document library file versions
775            * @throws SystemException if a system exception occurred
776            */
777            public static int countByF_S(long fileEntryId, int status)
778                    throws com.liferay.portal.kernel.exception.SystemException {
779                    return getPersistence().countByF_S(fileEntryId, status);
780            }
781    
782            /**
783            * Returns the number of document library file versions where groupId = &#63; and folderId = &#63; and status = &#63;.
784            *
785            * @param groupId the group ID
786            * @param folderId the folder ID
787            * @param status the status
788            * @return the number of matching document library file versions
789            * @throws SystemException if a system exception occurred
790            */
791            public static int countByG_F_S(long groupId, long folderId, int status)
792                    throws com.liferay.portal.kernel.exception.SystemException {
793                    return getPersistence().countByG_F_S(groupId, folderId, status);
794            }
795    
796            /**
797            * Returns the number of document library file versions.
798            *
799            * @return the number of document library file versions
800            * @throws SystemException if a system exception occurred
801            */
802            public static int countAll()
803                    throws com.liferay.portal.kernel.exception.SystemException {
804                    return getPersistence().countAll();
805            }
806    
807            public static DLFileVersionPersistence getPersistence() {
808                    if (_persistence == null) {
809                            _persistence = (DLFileVersionPersistence)PortalBeanLocatorUtil.locate(DLFileVersionPersistence.class.getName());
810    
811                            ReferenceRegistry.registerReference(DLFileVersionUtil.class,
812                                    "_persistence");
813                    }
814    
815                    return _persistence;
816            }
817    
818            public void setPersistence(DLFileVersionPersistence persistence) {
819                    _persistence = persistence;
820    
821                    ReferenceRegistry.registerReference(DLFileVersionUtil.class,
822                            "_persistence");
823            }
824    
825            private static DLFileVersionPersistence _persistence;
826    }