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)
099             */
100            public static DLFileRank update(DLFileRank dlFileRank)
101                    throws SystemException {
102                    return getPersistence().update(dlFileRank);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
107             */
108            public static DLFileRank update(DLFileRank dlFileRank,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(dlFileRank, 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                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence().updateImpl(dlFileRank);
163            }
164    
165            /**
166            * 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.
167            *
168            * @param fileRankId the primary key of the document library file rank
169            * @return the document library file rank
170            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByPrimaryKey(
174                    long fileRankId)
175                    throws com.liferay.portal.kernel.exception.SystemException,
176                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
177                    return getPersistence().findByPrimaryKey(fileRankId);
178            }
179    
180            /**
181            * Returns the document library file rank with the primary key or returns <code>null</code> if it could not be found.
182            *
183            * @param fileRankId the primary key of the document library file rank
184            * @return the document library file rank, or <code>null</code> if a document library file rank with the primary key could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByPrimaryKey(
188                    long fileRankId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().fetchByPrimaryKey(fileRankId);
191            }
192    
193            /**
194            * Returns all the document library file ranks where userId = &#63;.
195            *
196            * @param userId the user ID
197            * @return the matching document library file ranks
198            * @throws SystemException if a system exception occurred
199            */
200            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
201                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
202                    return getPersistence().findByUserId(userId);
203            }
204    
205            /**
206            * Returns a range of all the document library file ranks where userId = &#63;.
207            *
208            * <p>
209            * 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.
210            * </p>
211            *
212            * @param userId the user ID
213            * @param start the lower bound of the range of document library file ranks
214            * @param end the upper bound of the range of document library file ranks (not inclusive)
215            * @return the range of matching document library file ranks
216            * @throws SystemException if a system exception occurred
217            */
218            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
219                    long userId, int start, int end)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence().findByUserId(userId, start, end);
222            }
223    
224            /**
225            * Returns an ordered range of all the document library file ranks where userId = &#63;.
226            *
227            * <p>
228            * 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.
229            * </p>
230            *
231            * @param userId the user ID
232            * @param start the lower bound of the range of document library file ranks
233            * @param end the upper bound of the range of document library file ranks (not inclusive)
234            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
235            * @return the ordered range of matching document library file ranks
236            * @throws SystemException if a system exception occurred
237            */
238            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByUserId(
239                    long userId, int start, int end,
240                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
241                    throws com.liferay.portal.kernel.exception.SystemException {
242                    return getPersistence()
243                                       .findByUserId(userId, start, end, orderByComparator);
244            }
245    
246            /**
247            * Returns the first document library file rank in the ordered set where userId = &#63;.
248            *
249            * @param userId the user ID
250            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
251            * @return the first matching document library file rank
252            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
253            * @throws SystemException if a system exception occurred
254            */
255            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_First(
256                    long userId,
257                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
258                    throws com.liferay.portal.kernel.exception.SystemException,
259                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
260                    return getPersistence().findByUserId_First(userId, orderByComparator);
261            }
262    
263            /**
264            * Returns the first document library file rank in the ordered set where userId = &#63;.
265            *
266            * @param userId the user ID
267            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
268            * @return the first matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
269            * @throws SystemException if a system exception occurred
270            */
271            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByUserId_First(
272                    long userId,
273                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
274                    throws com.liferay.portal.kernel.exception.SystemException {
275                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
276            }
277    
278            /**
279            * Returns the last document library file rank in the ordered set where userId = &#63;.
280            *
281            * @param userId the user ID
282            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
283            * @return the last matching document library file rank
284            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
285            * @throws SystemException if a system exception occurred
286            */
287            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByUserId_Last(
288                    long userId,
289                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
290                    throws com.liferay.portal.kernel.exception.SystemException,
291                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
292                    return getPersistence().findByUserId_Last(userId, orderByComparator);
293            }
294    
295            /**
296            * Returns the last document library file rank in the ordered set where userId = &#63;.
297            *
298            * @param userId the user ID
299            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
300            * @return the last matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
301            * @throws SystemException if a system exception occurred
302            */
303            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByUserId_Last(
304                    long userId,
305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
306                    throws com.liferay.portal.kernel.exception.SystemException {
307                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
308            }
309    
310            /**
311            * Returns the document library file ranks before and after the current document library file rank in the ordered set where userId = &#63;.
312            *
313            * @param fileRankId the primary key of the current document library file rank
314            * @param userId the user ID
315            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
316            * @return the previous, current, and next document library file rank
317            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found
318            * @throws SystemException if a system exception occurred
319            */
320            public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByUserId_PrevAndNext(
321                    long fileRankId, long userId,
322                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
323                    throws com.liferay.portal.kernel.exception.SystemException,
324                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
325                    return getPersistence()
326                                       .findByUserId_PrevAndNext(fileRankId, userId,
327                            orderByComparator);
328            }
329    
330            /**
331            * Returns all the document library file ranks where fileEntryId = &#63;.
332            *
333            * @param fileEntryId the file entry ID
334            * @return the matching document library file ranks
335            * @throws SystemException if a system exception occurred
336            */
337            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId(
338                    long fileEntryId)
339                    throws com.liferay.portal.kernel.exception.SystemException {
340                    return getPersistence().findByFileEntryId(fileEntryId);
341            }
342    
343            /**
344            * Returns a range of all the document library file ranks where fileEntryId = &#63;.
345            *
346            * <p>
347            * 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.
348            * </p>
349            *
350            * @param fileEntryId the file entry ID
351            * @param start the lower bound of the range of document library file ranks
352            * @param end the upper bound of the range of document library file ranks (not inclusive)
353            * @return the range of matching document library file ranks
354            * @throws SystemException if a system exception occurred
355            */
356            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId(
357                    long fileEntryId, int start, int end)
358                    throws com.liferay.portal.kernel.exception.SystemException {
359                    return getPersistence().findByFileEntryId(fileEntryId, start, end);
360            }
361    
362            /**
363            * Returns an ordered range of all the document library file ranks where fileEntryId = &#63;.
364            *
365            * <p>
366            * 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.
367            * </p>
368            *
369            * @param fileEntryId the file entry ID
370            * @param start the lower bound of the range of document library file ranks
371            * @param end the upper bound of the range of document library file ranks (not inclusive)
372            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
373            * @return the ordered range of matching document library file ranks
374            * @throws SystemException if a system exception occurred
375            */
376            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByFileEntryId(
377                    long fileEntryId, int start, int end,
378                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
379                    throws com.liferay.portal.kernel.exception.SystemException {
380                    return getPersistence()
381                                       .findByFileEntryId(fileEntryId, start, end, orderByComparator);
382            }
383    
384            /**
385            * Returns the first document library file rank in the ordered set where fileEntryId = &#63;.
386            *
387            * @param fileEntryId the file entry ID
388            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
389            * @return the first matching document library file rank
390            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
391            * @throws SystemException if a system exception occurred
392            */
393            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByFileEntryId_First(
394                    long fileEntryId,
395                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
396                    throws com.liferay.portal.kernel.exception.SystemException,
397                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
398                    return getPersistence()
399                                       .findByFileEntryId_First(fileEntryId, orderByComparator);
400            }
401    
402            /**
403            * Returns the first document library file rank in the ordered set where fileEntryId = &#63;.
404            *
405            * @param fileEntryId the file entry ID
406            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
407            * @return the first matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
408            * @throws SystemException if a system exception occurred
409            */
410            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByFileEntryId_First(
411                    long fileEntryId,
412                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
413                    throws com.liferay.portal.kernel.exception.SystemException {
414                    return getPersistence()
415                                       .fetchByFileEntryId_First(fileEntryId, orderByComparator);
416            }
417    
418            /**
419            * Returns the last document library file rank in the ordered set where fileEntryId = &#63;.
420            *
421            * @param fileEntryId the file entry ID
422            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
423            * @return the last matching document library file rank
424            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
425            * @throws SystemException if a system exception occurred
426            */
427            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByFileEntryId_Last(
428                    long fileEntryId,
429                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
430                    throws com.liferay.portal.kernel.exception.SystemException,
431                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
432                    return getPersistence()
433                                       .findByFileEntryId_Last(fileEntryId, orderByComparator);
434            }
435    
436            /**
437            * Returns the last document library file rank in the ordered set where fileEntryId = &#63;.
438            *
439            * @param fileEntryId the file entry ID
440            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
441            * @return the last matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
442            * @throws SystemException if a system exception occurred
443            */
444            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByFileEntryId_Last(
445                    long fileEntryId,
446                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
447                    throws com.liferay.portal.kernel.exception.SystemException {
448                    return getPersistence()
449                                       .fetchByFileEntryId_Last(fileEntryId, orderByComparator);
450            }
451    
452            /**
453            * Returns the document library file ranks before and after the current document library file rank in the ordered set where fileEntryId = &#63;.
454            *
455            * @param fileRankId the primary key of the current document library file rank
456            * @param fileEntryId the file entry ID
457            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
458            * @return the previous, current, and next document library file rank
459            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found
460            * @throws SystemException if a system exception occurred
461            */
462            public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByFileEntryId_PrevAndNext(
463                    long fileRankId, long fileEntryId,
464                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
465                    throws com.liferay.portal.kernel.exception.SystemException,
466                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
467                    return getPersistence()
468                                       .findByFileEntryId_PrevAndNext(fileRankId, fileEntryId,
469                            orderByComparator);
470            }
471    
472            /**
473            * Returns all the document library file ranks where groupId = &#63; and userId = &#63;.
474            *
475            * @param groupId the group ID
476            * @param userId the user ID
477            * @return the matching document library file ranks
478            * @throws SystemException if a system exception occurred
479            */
480            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
481                    long groupId, long userId)
482                    throws com.liferay.portal.kernel.exception.SystemException {
483                    return getPersistence().findByG_U(groupId, userId);
484            }
485    
486            /**
487            * Returns a range of all the document library file ranks where groupId = &#63; and userId = &#63;.
488            *
489            * <p>
490            * 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.
491            * </p>
492            *
493            * @param groupId the group ID
494            * @param userId the user ID
495            * @param start the lower bound of the range of document library file ranks
496            * @param end the upper bound of the range of document library file ranks (not inclusive)
497            * @return the range of matching document library file ranks
498            * @throws SystemException if a system exception occurred
499            */
500            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
501                    long groupId, long userId, int start, int end)
502                    throws com.liferay.portal.kernel.exception.SystemException {
503                    return getPersistence().findByG_U(groupId, userId, start, end);
504            }
505    
506            /**
507            * Returns an ordered range of all the document library file ranks where groupId = &#63; and userId = &#63;.
508            *
509            * <p>
510            * 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.
511            * </p>
512            *
513            * @param groupId the group ID
514            * @param userId the user ID
515            * @param start the lower bound of the range of document library file ranks
516            * @param end the upper bound of the range of document library file ranks (not inclusive)
517            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
518            * @return the ordered range of matching document library file ranks
519            * @throws SystemException if a system exception occurred
520            */
521            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U(
522                    long groupId, long userId, int start, int end,
523                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
524                    throws com.liferay.portal.kernel.exception.SystemException {
525                    return getPersistence()
526                                       .findByG_U(groupId, userId, start, end, orderByComparator);
527            }
528    
529            /**
530            * Returns the first document library file rank in the ordered set where groupId = &#63; and userId = &#63;.
531            *
532            * @param groupId the group ID
533            * @param userId the user ID
534            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
535            * @return the first matching document library file rank
536            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
537            * @throws SystemException if a system exception occurred
538            */
539            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_First(
540                    long groupId, long userId,
541                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
542                    throws com.liferay.portal.kernel.exception.SystemException,
543                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
544                    return getPersistence()
545                                       .findByG_U_First(groupId, userId, orderByComparator);
546            }
547    
548            /**
549            * Returns the first document library file rank in the ordered set where groupId = &#63; and userId = &#63;.
550            *
551            * @param groupId the group ID
552            * @param userId the user ID
553            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
554            * @return the first matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
555            * @throws SystemException if a system exception occurred
556            */
557            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByG_U_First(
558                    long groupId, long userId,
559                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
560                    throws com.liferay.portal.kernel.exception.SystemException {
561                    return getPersistence()
562                                       .fetchByG_U_First(groupId, userId, orderByComparator);
563            }
564    
565            /**
566            * Returns the last document library file rank in the ordered set where groupId = &#63; and userId = &#63;.
567            *
568            * @param groupId the group ID
569            * @param userId the user ID
570            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
571            * @return the last matching document library file rank
572            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
573            * @throws SystemException if a system exception occurred
574            */
575            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_Last(
576                    long groupId, long userId,
577                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
578                    throws com.liferay.portal.kernel.exception.SystemException,
579                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
580                    return getPersistence()
581                                       .findByG_U_Last(groupId, userId, orderByComparator);
582            }
583    
584            /**
585            * Returns the last document library file rank in the ordered set where groupId = &#63; and userId = &#63;.
586            *
587            * @param groupId the group ID
588            * @param userId the user ID
589            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
590            * @return the last matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
591            * @throws SystemException if a system exception occurred
592            */
593            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByG_U_Last(
594                    long groupId, long userId,
595                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
596                    throws com.liferay.portal.kernel.exception.SystemException {
597                    return getPersistence()
598                                       .fetchByG_U_Last(groupId, userId, orderByComparator);
599            }
600    
601            /**
602            * 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;.
603            *
604            * @param fileRankId the primary key of the current document library file rank
605            * @param groupId the group ID
606            * @param userId the user ID
607            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
608            * @return the previous, current, and next document library file rank
609            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found
610            * @throws SystemException if a system exception occurred
611            */
612            public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByG_U_PrevAndNext(
613                    long fileRankId, long groupId, long userId,
614                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
615                    throws com.liferay.portal.kernel.exception.SystemException,
616                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
617                    return getPersistence()
618                                       .findByG_U_PrevAndNext(fileRankId, groupId, userId,
619                            orderByComparator);
620            }
621    
622            /**
623            * Returns all the document library file ranks where groupId = &#63; and userId = &#63; and active = &#63;.
624            *
625            * @param groupId the group ID
626            * @param userId the user ID
627            * @param active the active
628            * @return the matching document library file ranks
629            * @throws SystemException if a system exception occurred
630            */
631            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U_A(
632                    long groupId, long userId, boolean active)
633                    throws com.liferay.portal.kernel.exception.SystemException {
634                    return getPersistence().findByG_U_A(groupId, userId, active);
635            }
636    
637            /**
638            * Returns a range of all the document library file ranks where groupId = &#63; and userId = &#63; and active = &#63;.
639            *
640            * <p>
641            * 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.
642            * </p>
643            *
644            * @param groupId the group ID
645            * @param userId the user ID
646            * @param active the active
647            * @param start the lower bound of the range of document library file ranks
648            * @param end the upper bound of the range of document library file ranks (not inclusive)
649            * @return the range of matching document library file ranks
650            * @throws SystemException if a system exception occurred
651            */
652            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U_A(
653                    long groupId, long userId, boolean active, int start, int end)
654                    throws com.liferay.portal.kernel.exception.SystemException {
655                    return getPersistence().findByG_U_A(groupId, userId, active, start, end);
656            }
657    
658            /**
659            * Returns an ordered range of all the document library file ranks where groupId = &#63; and userId = &#63; and active = &#63;.
660            *
661            * <p>
662            * 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.
663            * </p>
664            *
665            * @param groupId the group ID
666            * @param userId the user ID
667            * @param active the active
668            * @param start the lower bound of the range of document library file ranks
669            * @param end the upper bound of the range of document library file ranks (not inclusive)
670            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
671            * @return the ordered range of matching document library file ranks
672            * @throws SystemException if a system exception occurred
673            */
674            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findByG_U_A(
675                    long groupId, long userId, boolean active, int start, int end,
676                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
677                    throws com.liferay.portal.kernel.exception.SystemException {
678                    return getPersistence()
679                                       .findByG_U_A(groupId, userId, active, start, end,
680                            orderByComparator);
681            }
682    
683            /**
684            * Returns the first document library file rank in the ordered set where groupId = &#63; and userId = &#63; and active = &#63;.
685            *
686            * @param groupId the group ID
687            * @param userId the user ID
688            * @param active the active
689            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
690            * @return the first matching document library file rank
691            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
692            * @throws SystemException if a system exception occurred
693            */
694            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_A_First(
695                    long groupId, long userId, boolean active,
696                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
697                    throws com.liferay.portal.kernel.exception.SystemException,
698                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
699                    return getPersistence()
700                                       .findByG_U_A_First(groupId, userId, active, orderByComparator);
701            }
702    
703            /**
704            * Returns the first document library file rank in the ordered set where groupId = &#63; and userId = &#63; and active = &#63;.
705            *
706            * @param groupId the group ID
707            * @param userId the user ID
708            * @param active the active
709            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
710            * @return the first matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
711            * @throws SystemException if a system exception occurred
712            */
713            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByG_U_A_First(
714                    long groupId, long userId, boolean active,
715                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
716                    throws com.liferay.portal.kernel.exception.SystemException {
717                    return getPersistence()
718                                       .fetchByG_U_A_First(groupId, userId, active,
719                            orderByComparator);
720            }
721    
722            /**
723            * Returns the last document library file rank in the ordered set where groupId = &#63; and userId = &#63; and active = &#63;.
724            *
725            * @param groupId the group ID
726            * @param userId the user ID
727            * @param active the active
728            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
729            * @return the last matching document library file rank
730            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
731            * @throws SystemException if a system exception occurred
732            */
733            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByG_U_A_Last(
734                    long groupId, long userId, boolean active,
735                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
736                    throws com.liferay.portal.kernel.exception.SystemException,
737                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
738                    return getPersistence()
739                                       .findByG_U_A_Last(groupId, userId, active, orderByComparator);
740            }
741    
742            /**
743            * Returns the last document library file rank in the ordered set where groupId = &#63; and userId = &#63; and active = &#63;.
744            *
745            * @param groupId the group ID
746            * @param userId the user ID
747            * @param active the active
748            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
749            * @return the last matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
750            * @throws SystemException if a system exception occurred
751            */
752            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByG_U_A_Last(
753                    long groupId, long userId, boolean active,
754                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
755                    throws com.liferay.portal.kernel.exception.SystemException {
756                    return getPersistence()
757                                       .fetchByG_U_A_Last(groupId, userId, active, orderByComparator);
758            }
759    
760            /**
761            * 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; and active = &#63;.
762            *
763            * @param fileRankId the primary key of the current document library file rank
764            * @param groupId the group ID
765            * @param userId the user ID
766            * @param active the active
767            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
768            * @return the previous, current, and next document library file rank
769            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a document library file rank with the primary key could not be found
770            * @throws SystemException if a system exception occurred
771            */
772            public static com.liferay.portlet.documentlibrary.model.DLFileRank[] findByG_U_A_PrevAndNext(
773                    long fileRankId, long groupId, long userId, boolean active,
774                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
775                    throws com.liferay.portal.kernel.exception.SystemException,
776                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
777                    return getPersistence()
778                                       .findByG_U_A_PrevAndNext(fileRankId, groupId, userId,
779                            active, orderByComparator);
780            }
781    
782            /**
783            * 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.
784            *
785            * @param companyId the company ID
786            * @param userId the user ID
787            * @param fileEntryId the file entry ID
788            * @return the matching document library file rank
789            * @throws com.liferay.portlet.documentlibrary.NoSuchFileRankException if a matching document library file rank could not be found
790            * @throws SystemException if a system exception occurred
791            */
792            public static com.liferay.portlet.documentlibrary.model.DLFileRank findByC_U_F(
793                    long companyId, long userId, long fileEntryId)
794                    throws com.liferay.portal.kernel.exception.SystemException,
795                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
796                    return getPersistence().findByC_U_F(companyId, userId, fileEntryId);
797            }
798    
799            /**
800            * 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.
801            *
802            * @param companyId the company ID
803            * @param userId the user ID
804            * @param fileEntryId the file entry ID
805            * @return the matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
806            * @throws SystemException if a system exception occurred
807            */
808            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F(
809                    long companyId, long userId, long fileEntryId)
810                    throws com.liferay.portal.kernel.exception.SystemException {
811                    return getPersistence().fetchByC_U_F(companyId, userId, fileEntryId);
812            }
813    
814            /**
815            * 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.
816            *
817            * @param companyId the company ID
818            * @param userId the user ID
819            * @param fileEntryId the file entry ID
820            * @param retrieveFromCache whether to use the finder cache
821            * @return the matching document library file rank, or <code>null</code> if a matching document library file rank could not be found
822            * @throws SystemException if a system exception occurred
823            */
824            public static com.liferay.portlet.documentlibrary.model.DLFileRank fetchByC_U_F(
825                    long companyId, long userId, long fileEntryId, boolean retrieveFromCache)
826                    throws com.liferay.portal.kernel.exception.SystemException {
827                    return getPersistence()
828                                       .fetchByC_U_F(companyId, userId, fileEntryId,
829                            retrieveFromCache);
830            }
831    
832            /**
833            * Returns all the document library file ranks.
834            *
835            * @return the document library file ranks
836            * @throws SystemException if a system exception occurred
837            */
838            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll()
839                    throws com.liferay.portal.kernel.exception.SystemException {
840                    return getPersistence().findAll();
841            }
842    
843            /**
844            * Returns a range of all the document library file ranks.
845            *
846            * <p>
847            * 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.
848            * </p>
849            *
850            * @param start the lower bound of the range of document library file ranks
851            * @param end the upper bound of the range of document library file ranks (not inclusive)
852            * @return the range of document library file ranks
853            * @throws SystemException if a system exception occurred
854            */
855            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll(
856                    int start, int end)
857                    throws com.liferay.portal.kernel.exception.SystemException {
858                    return getPersistence().findAll(start, end);
859            }
860    
861            /**
862            * Returns an ordered range of all the document library file ranks.
863            *
864            * <p>
865            * 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.
866            * </p>
867            *
868            * @param start the lower bound of the range of document library file ranks
869            * @param end the upper bound of the range of document library file ranks (not inclusive)
870            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
871            * @return the ordered range of document library file ranks
872            * @throws SystemException if a system exception occurred
873            */
874            public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFileRank> findAll(
875                    int start, int end,
876                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
877                    throws com.liferay.portal.kernel.exception.SystemException {
878                    return getPersistence().findAll(start, end, orderByComparator);
879            }
880    
881            /**
882            * Removes all the document library file ranks where userId = &#63; from the database.
883            *
884            * @param userId the user ID
885            * @throws SystemException if a system exception occurred
886            */
887            public static void removeByUserId(long userId)
888                    throws com.liferay.portal.kernel.exception.SystemException {
889                    getPersistence().removeByUserId(userId);
890            }
891    
892            /**
893            * Removes all the document library file ranks where fileEntryId = &#63; from the database.
894            *
895            * @param fileEntryId the file entry ID
896            * @throws SystemException if a system exception occurred
897            */
898            public static void removeByFileEntryId(long fileEntryId)
899                    throws com.liferay.portal.kernel.exception.SystemException {
900                    getPersistence().removeByFileEntryId(fileEntryId);
901            }
902    
903            /**
904            * Removes all the document library file ranks where groupId = &#63; and userId = &#63; from the database.
905            *
906            * @param groupId the group ID
907            * @param userId the user ID
908            * @throws SystemException if a system exception occurred
909            */
910            public static void removeByG_U(long groupId, long userId)
911                    throws com.liferay.portal.kernel.exception.SystemException {
912                    getPersistence().removeByG_U(groupId, userId);
913            }
914    
915            /**
916            * Removes all the document library file ranks where groupId = &#63; and userId = &#63; and active = &#63; from the database.
917            *
918            * @param groupId the group ID
919            * @param userId the user ID
920            * @param active the active
921            * @throws SystemException if a system exception occurred
922            */
923            public static void removeByG_U_A(long groupId, long userId, boolean active)
924                    throws com.liferay.portal.kernel.exception.SystemException {
925                    getPersistence().removeByG_U_A(groupId, userId, active);
926            }
927    
928            /**
929            * Removes the document library file rank where companyId = &#63; and userId = &#63; and fileEntryId = &#63; from the database.
930            *
931            * @param companyId the company ID
932            * @param userId the user ID
933            * @param fileEntryId the file entry ID
934            * @return the document library file rank that was removed
935            * @throws SystemException if a system exception occurred
936            */
937            public static com.liferay.portlet.documentlibrary.model.DLFileRank removeByC_U_F(
938                    long companyId, long userId, long fileEntryId)
939                    throws com.liferay.portal.kernel.exception.SystemException,
940                            com.liferay.portlet.documentlibrary.NoSuchFileRankException {
941                    return getPersistence().removeByC_U_F(companyId, userId, fileEntryId);
942            }
943    
944            /**
945            * Removes all the document library file ranks from the database.
946            *
947            * @throws SystemException if a system exception occurred
948            */
949            public static void removeAll()
950                    throws com.liferay.portal.kernel.exception.SystemException {
951                    getPersistence().removeAll();
952            }
953    
954            /**
955            * Returns the number of document library file ranks where userId = &#63;.
956            *
957            * @param userId the user ID
958            * @return the number of matching document library file ranks
959            * @throws SystemException if a system exception occurred
960            */
961            public static int countByUserId(long userId)
962                    throws com.liferay.portal.kernel.exception.SystemException {
963                    return getPersistence().countByUserId(userId);
964            }
965    
966            /**
967            * Returns the number of document library file ranks where fileEntryId = &#63;.
968            *
969            * @param fileEntryId the file entry ID
970            * @return the number of matching document library file ranks
971            * @throws SystemException if a system exception occurred
972            */
973            public static int countByFileEntryId(long fileEntryId)
974                    throws com.liferay.portal.kernel.exception.SystemException {
975                    return getPersistence().countByFileEntryId(fileEntryId);
976            }
977    
978            /**
979            * Returns the number of document library file ranks where groupId = &#63; and userId = &#63;.
980            *
981            * @param groupId the group ID
982            * @param userId the user ID
983            * @return the number of matching document library file ranks
984            * @throws SystemException if a system exception occurred
985            */
986            public static int countByG_U(long groupId, long userId)
987                    throws com.liferay.portal.kernel.exception.SystemException {
988                    return getPersistence().countByG_U(groupId, userId);
989            }
990    
991            /**
992            * Returns the number of document library file ranks where groupId = &#63; and userId = &#63; and active = &#63;.
993            *
994            * @param groupId the group ID
995            * @param userId the user ID
996            * @param active the active
997            * @return the number of matching document library file ranks
998            * @throws SystemException if a system exception occurred
999            */
1000            public static int countByG_U_A(long groupId, long userId, boolean active)
1001                    throws com.liferay.portal.kernel.exception.SystemException {
1002                    return getPersistence().countByG_U_A(groupId, userId, active);
1003            }
1004    
1005            /**
1006            * Returns the number of document library file ranks where companyId = &#63; and userId = &#63; and fileEntryId = &#63;.
1007            *
1008            * @param companyId the company ID
1009            * @param userId the user ID
1010            * @param fileEntryId the file entry ID
1011            * @return the number of matching document library file ranks
1012            * @throws SystemException if a system exception occurred
1013            */
1014            public static int countByC_U_F(long companyId, long userId, long fileEntryId)
1015                    throws com.liferay.portal.kernel.exception.SystemException {
1016                    return getPersistence().countByC_U_F(companyId, userId, fileEntryId);
1017            }
1018    
1019            /**
1020            * Returns the number of document library file ranks.
1021            *
1022            * @return the number of document library file ranks
1023            * @throws SystemException if a system exception occurred
1024            */
1025            public static int countAll()
1026                    throws com.liferay.portal.kernel.exception.SystemException {
1027                    return getPersistence().countAll();
1028            }
1029    
1030            public static DLFileRankPersistence getPersistence() {
1031                    if (_persistence == null) {
1032                            _persistence = (DLFileRankPersistence)PortalBeanLocatorUtil.locate(DLFileRankPersistence.class.getName());
1033    
1034                            ReferenceRegistry.registerReference(DLFileRankUtil.class,
1035                                    "_persistence");
1036                    }
1037    
1038                    return _persistence;
1039            }
1040    
1041            /**
1042             * @deprecated
1043             */
1044            public void setPersistence(DLFileRankPersistence persistence) {
1045            }
1046    
1047            private static DLFileRankPersistence _persistence;
1048    }