001    /**
002     * Copyright (c) 2000-2012 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.DLFileRank;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the document library file rank service. This utility wraps {@link DLFileRankPersistenceImpl} 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 DLFileRankPersistence
037     * @see DLFileRankPersistenceImpl
038     * @generated
039     */
040    public class DLFileRankUtil {
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(DLFileRank dlFileRank) {
058                    getPersistence().clearCache(dlFileRank);
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<DLFileRank> 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<DLFileRank> 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<DLFileRank> 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#update(com.liferay.portal.model.BaseModel, boolean)
099             */
100            public static DLFileRank update(DLFileRank dlFileRank, boolean merge)
101                    throws SystemException {
102                    return getPersistence().update(dlFileRank, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static DLFileRank update(DLFileRank dlFileRank, boolean merge,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(dlFileRank, merge, serviceContext);
111            }
112    
113            /**
114            * Caches the document library file rank in the entity cache if it is enabled.
115            *
116            * @param dlFileRank the document library file rank
117            */
118            public static void cacheResult(
119                    com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) {
120                    getPersistence().cacheResult(dlFileRank);
121            }
122    
123            /**
124            * Caches the document library file ranks in the entity cache if it is enabled.
125            *
126            * @param dlFileRanks the document library file ranks
127            */
128            public static void cacheResult(
129                    java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> dlFileRanks) {
130                    getPersistence().cacheResult(dlFileRanks);
131            }
132    
133            /**
134            * Creates a new document library file rank with the primary key. Does not add the document library file rank to the database.
135            *
136            * @param fileRankId the primary key for the new document library file rank
137            * @return the new document library file rank
138            */
139            public static com.liferay.portlet.documentlibrary.model.DLFileRank create(
140                    long fileRankId) {
141                    return getPersistence().create(fileRankId);
142            }
143    
144            /**
145            * Removes the document library file rank with the primary key from the database. Also notifies the appropriate model listeners.
146            *
147            * @param fileRankId the primary key of the document library file rank
148            * @return the document library file rank that was removed
149            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            public static com.liferay.portlet.documentlibrary.model.DLFileRank remove(
153                    long fileRankId)
154                    throws com.liferay.portal.kernel.exception.SystemException,
155                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
156                    return getPersistence().remove(fileRankId);
157            }
158    
159            public static com.liferay.portlet.documentlibrary.model.DLFileRank updateImpl(
160                    com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank,
161                    boolean merge)
162                    throws com.liferay.portal.kernel.exception.SystemException {
163                    return getPersistence().updateImpl(dlFileRank, merge);
164            }
165    
166            /**
167            * Returns the document library file rank with the primary key or throws a {@link com.liferay.portlet.documentlibrary.NoSuchFileRankException} if it could not be found.
168            *
169            * @param fileRankId the primary key of the document library file rank
170            * @return the document library file rank
171            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found
172            * @throws SystemException if a system exception occurred
173            */
174            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByPrimaryKey(
175                    long fileRankId)
176                    throws com.liferay.portal.kernel.exception.SystemException,
177                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
178                    return getPersistence().findByPrimaryKey(fileRankId);
179            }
180    
181            /**
182            * Returns the document library file rank with the primary key or returns <code>null</code> if it could not be found.
183            *
184            * @param fileRankId the primary key of the document library file rank
185            * @return the document library file rank, or <code>null</code> if a document library file rank with the primary key could not be found
186            * @throws SystemException if a system exception occurred
187            */
188            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByPrimaryKey(
189                    long fileRankId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getPersistence().fetchByPrimaryKey(fileRankId);
192            }
193    
194            /**
195            * Returns all the document library file ranks where userId = &#63;.
196            *
197            * @param userId the user ID
198            * @return the matching document library file ranks
199            * @throws SystemException if a system exception occurred
200            */
201            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
202                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().findByUserId(userId);
204            }
205    
206            /**
207            * Returns a range of all the document library file ranks where userId = &#63;.
208            *
209            * <p>
210            * 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.
211            * </p>
212            *
213            * @param userId the user ID
214            * @param start the lower bound of the range of document library file ranks
215            * @param end the upper bound of the range of document library file ranks (not inclusive)
216            * @return the range of matching document library file ranks
217            * @throws SystemException if a system exception occurred
218            */
219            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
220                    long userId, int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getPersistence().findByUserId(userId, start, end);
223            }
224    
225            /**
226            * Returns an ordered range of all the document library file ranks where userId = &#63;.
227            *
228            * <p>
229            * 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.
230            * </p>
231            *
232            * @param userId the user ID
233            * @param start the lower bound of the range of document library file ranks
234            * @param end the upper bound of the range of document library file ranks (not inclusive)
235            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
236            * @return the ordered range of matching document library file ranks
237            * @throws SystemException if a system exception occurred
238            */
239            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
240                    long userId, int start, int end,
241                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return getPersistence()
244                                       .findByUserId(userId, start, end, orderByComparator);
245            }
246    
247            /**
248            * Returns the first document library file rank in the ordered set where userId = &#63;.
249            *
250            * <p>
251            * 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.
252            * </p>
253            *
254            * @param userId the user ID
255            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
256            * @return the first matching document library file rank
257            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
258            * @throws SystemException if a system exception occurred
259            */
260            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_First(
261                    long userId,
262                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
263                    throws com.liferay.portal.kernel.exception.SystemException,
264                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
265                    return getPersistence().findByUserId_First(userId, orderByComparator);
266            }
267    
268            /**
269            * Returns the last document library file rank in the ordered set where userId = &#63;.
270            *
271            * <p>
272            * 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.
273            * </p>
274            *
275            * @param userId the user ID
276            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
277            * @return the last matching document library file rank
278            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
279            * @throws SystemException if a system exception occurred
280            */
281            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_Last(
282                    long userId,
283                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
284                    throws com.liferay.portal.kernel.exception.SystemException,
285                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
286                    return getPersistence().findByUserId_Last(userId, orderByComparator);
287            }
288    
289            /**
290            * Returns the document library file ranks before and after the current document library file rank in the ordered set where userId = &#63;.
291            *
292            * <p>
293            * 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.
294            * </p>
295            *
296            * @param fileRankId the primary key of the current document library file rank
297            * @param userId the user ID
298            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
299            * @return the previous, current, and next document library file rank
300            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found
301            * @throws SystemException if a system exception occurred
302            */
303            public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByUserId_PrevAndNext(
304                    long fileRankId, long userId,
305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
306                    throws com.liferay.portal.kernel.exception.SystemException,
307                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
308                    return getPersistence()
309                                       .findByUserId_PrevAndNext(fileRankId, userId,
310                            orderByComparator);
311            }
312    
313            /**
314            * Returns all the document library file ranks where fileEntryId = &#63;.
315            *
316            * @param fileEntryId the file entry ID
317            * @return the matching document library file ranks
318            * @throws SystemException if a system exception occurred
319            */
320            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId(
321                    long fileEntryId)
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    return getPersistence().findByFileEntryId(fileEntryId);
324            }
325    
326            /**
327            * Returns a range of all the document library file ranks where fileEntryId = &#63;.
328            *
329            * <p>
330            * 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.
331            * </p>
332            *
333            * @param fileEntryId the file entry ID
334            * @param start the lower bound of the range of document library file ranks
335            * @param end the upper bound of the range of document library file ranks (not inclusive)
336            * @return the range of matching document library file ranks
337            * @throws SystemException if a system exception occurred
338            */
339            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId(
340                    long fileEntryId, int start, int end)
341                    throws com.liferay.portal.kernel.exception.SystemException {
342                    return getPersistence().findByFileEntryId(fileEntryId, start, end);
343            }
344    
345            /**
346            * Returns an ordered range of all the document library file ranks where fileEntryId = &#63;.
347            *
348            * <p>
349            * 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.
350            * </p>
351            *
352            * @param fileEntryId the file entry ID
353            * @param start the lower bound of the range of document library file ranks
354            * @param end the upper bound of the range of document library file ranks (not inclusive)
355            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
356            * @return the ordered range of matching document library file ranks
357            * @throws SystemException if a system exception occurred
358            */
359            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId(
360                    long fileEntryId, int start, int end,
361                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
362                    throws com.liferay.portal.kernel.exception.SystemException {
363                    return getPersistence()
364                                       .findByFileEntryId(fileEntryId, start, end, orderByComparator);
365            }
366    
367            /**
368            * Returns the first document library file rank in the ordered set where fileEntryId = &#63;.
369            *
370            * <p>
371            * 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.
372            * </p>
373            *
374            * @param fileEntryId the file entry ID
375            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
376            * @return the first matching document library file rank
377            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
378            * @throws SystemException if a system exception occurred
379            */
380            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByFileEntryId_First(
381                    long fileEntryId,
382                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
383                    throws com.liferay.portal.kernel.exception.SystemException,
384                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
385                    return getPersistence()
386                                       .findByFileEntryId_First(fileEntryId, orderByComparator);
387            }
388    
389            /**
390            * Returns the last document library file rank in the ordered set where fileEntryId = &#63;.
391            *
392            * <p>
393            * 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.
394            * </p>
395            *
396            * @param fileEntryId the file entry ID
397            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
398            * @return the last matching document library file rank
399            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
400            * @throws SystemException if a system exception occurred
401            */
402            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByFileEntryId_Last(
403                    long fileEntryId,
404                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
405                    throws com.liferay.portal.kernel.exception.SystemException,
406                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
407                    return getPersistence()
408                                       .findByFileEntryId_Last(fileEntryId, orderByComparator);
409            }
410    
411            /**
412            * Returns the document library file ranks before and after the current document library file rank in the ordered set where fileEntryId = &#63;.
413            *
414            * <p>
415            * 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.
416            * </p>
417            *
418            * @param fileRankId the primary key of the current document library file rank
419            * @param fileEntryId the file entry ID
420            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
421            * @return the previous, current, and next document library file rank
422            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found
423            * @throws SystemException if a system exception occurred
424            */
425            public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByFileEntryId_PrevAndNext(
426                    long fileRankId, long fileEntryId,
427                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
428                    throws com.liferay.portal.kernel.exception.SystemException,
429                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
430                    return getPersistence()
431                                       .findByFileEntryId_PrevAndNext(fileRankId, fileEntryId,
432                            orderByComparator);
433            }
434    
435            /**
436            * Returns all the document library file ranks where groupId = &#63; and userId = &#63;.
437            *
438            * @param groupId the group ID
439            * @param userId the user ID
440            * @return the matching document library file ranks
441            * @throws SystemException if a system exception occurred
442            */
443            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
444                    long groupId, long userId)
445                    throws com.liferay.portal.kernel.exception.SystemException {
446                    return getPersistence().findByG_U(groupId, userId);
447            }
448    
449            /**
450            * Returns a range of all the document library file ranks where groupId = &#63; and userId = &#63;.
451            *
452            * <p>
453            * 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.
454            * </p>
455            *
456            * @param groupId the group ID
457            * @param userId the user ID
458            * @param start the lower bound of the range of document library file ranks
459            * @param end the upper bound of the range of document library file ranks (not inclusive)
460            * @return the range of matching document library file ranks
461            * @throws SystemException if a system exception occurred
462            */
463            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
464                    long groupId, long userId, int start, int end)
465                    throws com.liferay.portal.kernel.exception.SystemException {
466                    return getPersistence().findByG_U(groupId, userId, start, end);
467            }
468    
469            /**
470            * Returns an ordered range of all the document library file ranks where groupId = &#63; and userId = &#63;.
471            *
472            * <p>
473            * 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.
474            * </p>
475            *
476            * @param groupId the group ID
477            * @param userId the user ID
478            * @param start the lower bound of the range of document library file ranks
479            * @param end the upper bound of the range of document library file ranks (not inclusive)
480            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
481            * @return the ordered range of matching document library file ranks
482            * @throws SystemException if a system exception occurred
483            */
484            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
485                    long groupId, long userId, int start, int end,
486                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
487                    throws com.liferay.portal.kernel.exception.SystemException {
488                    return getPersistence()
489                                       .findByG_U(groupId, userId, start, end, orderByComparator);
490            }
491    
492            /**
493            * Returns the first document library file rank in the ordered set where groupId = &#63; and userId = &#63;.
494            *
495            * <p>
496            * 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.
497            * </p>
498            *
499            * @param groupId the group ID
500            * @param userId the user ID
501            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
502            * @return the first matching document library file rank
503            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
504            * @throws SystemException if a system exception occurred
505            */
506            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_First(
507                    long groupId, long userId,
508                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
509                    throws com.liferay.portal.kernel.exception.SystemException,
510                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
511                    return getPersistence()
512                                       .findByG_U_First(groupId, userId, orderByComparator);
513            }
514    
515            /**
516            * Returns the last document library file rank in the ordered set where groupId = &#63; and userId = &#63;.
517            *
518            * <p>
519            * 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.
520            * </p>
521            *
522            * @param groupId the group ID
523            * @param userId the user ID
524            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
525            * @return the last matching document library file rank
526            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
527            * @throws SystemException if a system exception occurred
528            */
529            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_Last(
530                    long groupId, long userId,
531                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
532                    throws com.liferay.portal.kernel.exception.SystemException,
533                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
534                    return getPersistence()
535                                       .findByG_U_Last(groupId, userId, orderByComparator);
536            }
537    
538            /**
539            * Returns the document library file ranks before and after the current document library file rank in the ordered set where groupId = &#63; and userId = &#63;.
540            *
541            * <p>
542            * 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.
543            * </p>
544            *
545            * @param fileRankId the primary key of the current document library file rank
546            * @param groupId the group ID
547            * @param userId the user ID
548            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
549            * @return the previous, current, and next document library file rank
550            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found
551            * @throws SystemException if a system exception occurred
552            */
553            public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByG_U_PrevAndNext(
554                    long fileRankId, long groupId, long userId,
555                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
556                    throws com.liferay.portal.kernel.exception.SystemException,
557                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
558                    return getPersistence()
559                                       .findByG_U_PrevAndNext(fileRankId, groupId, userId,
560                            orderByComparator);
561            }
562    
563            /**
564            * Returns the document library file rank where companyId = &#63; and userId = &#63; and fileEntryId = &#63; or throws a {@link com.liferay.portlet.documentlibrary.NoSuchFileRankException} if it could not be found.
565            *
566            * @param companyId the company ID
567            * @param userId the user ID
568            * @param fileEntryId the file entry ID
569            * @return the matching document library file rank
570            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
571            * @throws SystemException if a system exception occurred
572            */
573            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByC_U_F(
574                    long companyId, long userId, long fileEntryId)
575                    throws com.liferay.portal.kernel.exception.SystemException,
576                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
577                    return getPersistence().findByC_U_F(companyId, userId, fileEntryId);
578            }
579    
580            /**
581            * Returns the document library file rank where companyId = &#63; and userId = &#63; and fileEntryId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
582            *
583            * @param companyId the company ID
584            * @param userId the user ID
585            * @param fileEntryId the file entry ID
586            * @return the matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
587            * @throws SystemException if a system exception occurred
588            */
589            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F(
590                    long companyId, long userId, long fileEntryId)
591                    throws com.liferay.portal.kernel.exception.SystemException {
592                    return getPersistence().fetchByC_U_F(companyId, userId, fileEntryId);
593            }
594    
595            /**
596            * Returns the document library file rank where companyId = &#63; and userId = &#63; and fileEntryId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
597            *
598            * @param companyId the company ID
599            * @param userId the user ID
600            * @param fileEntryId the file entry ID
601            * @param retrieveFromCache whether to use the finder cache
602            * @return the matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
603            * @throws SystemException if a system exception occurred
604            */
605            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F(
606                    long companyId, long userId, long fileEntryId, boolean retrieveFromCache)
607                    throws com.liferay.portal.kernel.exception.SystemException {
608                    return getPersistence()
609                                       .fetchByC_U_F(companyId, userId, fileEntryId,
610                            retrieveFromCache);
611            }
612    
613            /**
614            * Returns all the document library file ranks.
615            *
616            * @return the document library file ranks
617            * @throws SystemException if a system exception occurred
618            */
619            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll()
620                    throws com.liferay.portal.kernel.exception.SystemException {
621                    return getPersistence().findAll();
622            }
623    
624            /**
625            * Returns a range of all the document library file ranks.
626            *
627            * <p>
628            * 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.
629            * </p>
630            *
631            * @param start the lower bound of the range of document library file ranks
632            * @param end the upper bound of the range of document library file ranks (not inclusive)
633            * @return the range of document library file ranks
634            * @throws SystemException if a system exception occurred
635            */
636            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll(
637                    int start, int end)
638                    throws com.liferay.portal.kernel.exception.SystemException {
639                    return getPersistence().findAll(start, end);
640            }
641    
642            /**
643            * Returns an ordered range of all the document library file ranks.
644            *
645            * <p>
646            * 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.
647            * </p>
648            *
649            * @param start the lower bound of the range of document library file ranks
650            * @param end the upper bound of the range of document library file ranks (not inclusive)
651            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
652            * @return the ordered range of document library file ranks
653            * @throws SystemException if a system exception occurred
654            */
655            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll(
656                    int start, int end,
657                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
658                    throws com.liferay.portal.kernel.exception.SystemException {
659                    return getPersistence().findAll(start, end, orderByComparator);
660            }
661    
662            /**
663            * Removes all the document library file ranks where userId = &#63; from the database.
664            *
665            * @param userId the user ID
666            * @throws SystemException if a system exception occurred
667            */
668            public static void removeByUserId(long userId)
669                    throws com.liferay.portal.kernel.exception.SystemException {
670                    getPersistence().removeByUserId(userId);
671            }
672    
673            /**
674            * Removes all the document library file ranks where fileEntryId = &#63; from the database.
675            *
676            * @param fileEntryId the file entry ID
677            * @throws SystemException if a system exception occurred
678            */
679            public static void removeByFileEntryId(long fileEntryId)
680                    throws com.liferay.portal.kernel.exception.SystemException {
681                    getPersistence().removeByFileEntryId(fileEntryId);
682            }
683    
684            /**
685            * Removes all the document library file ranks where groupId = &#63; and userId = &#63; from the database.
686            *
687            * @param groupId the group ID
688            * @param userId the user ID
689            * @throws SystemException if a system exception occurred
690            */
691            public static void removeByG_U(long groupId, long userId)
692                    throws com.liferay.portal.kernel.exception.SystemException {
693                    getPersistence().removeByG_U(groupId, userId);
694            }
695    
696            /**
697            * Removes the document library file rank where companyId = &#63; and userId = &#63; and fileEntryId = &#63; from the database.
698            *
699            * @param companyId the company ID
700            * @param userId the user ID
701            * @param fileEntryId the file entry ID
702            * @throws SystemException if a system exception occurred
703            */
704            public static void removeByC_U_F(long companyId, long userId,
705                    long fileEntryId)
706                    throws com.liferay.portal.kernel.exception.SystemException,
707                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
708                    getPersistence().removeByC_U_F(companyId, userId, fileEntryId);
709            }
710    
711            /**
712            * Removes all the document library file ranks from the database.
713            *
714            * @throws SystemException if a system exception occurred
715            */
716            public static void removeAll()
717                    throws com.liferay.portal.kernel.exception.SystemException {
718                    getPersistence().removeAll();
719            }
720    
721            /**
722            * Returns the number of document library file ranks where userId = &#63;.
723            *
724            * @param userId the user ID
725            * @return the number of matching document library file ranks
726            * @throws SystemException if a system exception occurred
727            */
728            public static int countByUserId(long userId)
729                    throws com.liferay.portal.kernel.exception.SystemException {
730                    return getPersistence().countByUserId(userId);
731            }
732    
733            /**
734            * Returns the number of document library file ranks where fileEntryId = &#63;.
735            *
736            * @param fileEntryId the file entry ID
737            * @return the number of matching document library file ranks
738            * @throws SystemException if a system exception occurred
739            */
740            public static int countByFileEntryId(long fileEntryId)
741                    throws com.liferay.portal.kernel.exception.SystemException {
742                    return getPersistence().countByFileEntryId(fileEntryId);
743            }
744    
745            /**
746            * Returns the number of document library file ranks where groupId = &#63; and userId = &#63;.
747            *
748            * @param groupId the group ID
749            * @param userId the user ID
750            * @return the number of matching document library file ranks
751            * @throws SystemException if a system exception occurred
752            */
753            public static int countByG_U(long groupId, long userId)
754                    throws com.liferay.portal.kernel.exception.SystemException {
755                    return getPersistence().countByG_U(groupId, userId);
756            }
757    
758            /**
759            * Returns the number of document library file ranks where companyId = &#63; and userId = &#63; and fileEntryId = &#63;.
760            *
761            * @param companyId the company ID
762            * @param userId the user ID
763            * @param fileEntryId the file entry ID
764            * @return the number of matching document library file ranks
765            * @throws SystemException if a system exception occurred
766            */
767            public static int countByC_U_F(long companyId, long userId, long fileEntryId)
768                    throws com.liferay.portal.kernel.exception.SystemException {
769                    return getPersistence().countByC_U_F(companyId, userId, fileEntryId);
770            }
771    
772            /**
773            * Returns the number of document library file ranks.
774            *
775            * @return the number of document library file ranks
776            * @throws SystemException if a system exception occurred
777            */
778            public static int countAll()
779                    throws com.liferay.portal.kernel.exception.SystemException {
780                    return getPersistence().countAll();
781            }
782    
783            public static DLFileRankPersistence getPersistence() {
784                    if (_persistence == null) {
785                            _persistence = (DLFileRankPersistence)PortalBeanLocatorUtil.locate(DLFileRankPersistence.class.getName());
786    
787                            ReferenceRegistry.registerReference(DLFileRankUtil.class,
788                                    "_persistence");
789                    }
790    
791                    return _persistence;
792            }
793    
794            public void setPersistence(DLFileRankPersistence persistence) {
795                    _persistence = persistence;
796    
797                    ReferenceRegistry.registerReference(DLFileRankUtil.class, "_persistence");
798            }
799    
800            private static DLFileRankPersistence _persistence;
801    }