001    /**
002     * Copyright (c) 2000-2013 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.portal.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.model.MembershipRequest;
023    import com.liferay.portal.service.ServiceContext;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the membership request service. This utility wraps {@link MembershipRequestPersistenceImpl} 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.
029     *
030     * <p>
031     * Caching information and settings can be found in <code>portal.properties</code>
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see MembershipRequestPersistence
036     * @see MembershipRequestPersistenceImpl
037     * @generated
038     */
039    public class MembershipRequestUtil {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
044             */
045    
046            /**
047             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
048             */
049            public static void clearCache() {
050                    getPersistence().clearCache();
051            }
052    
053            /**
054             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
055             */
056            public static void clearCache(MembershipRequest membershipRequest) {
057                    getPersistence().clearCache(membershipRequest);
058            }
059    
060            /**
061             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
062             */
063            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
064                    throws SystemException {
065                    return getPersistence().countWithDynamicQuery(dynamicQuery);
066            }
067    
068            /**
069             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
070             */
071            public static List<MembershipRequest> findWithDynamicQuery(
072                    DynamicQuery dynamicQuery) throws SystemException {
073                    return getPersistence().findWithDynamicQuery(dynamicQuery);
074            }
075    
076            /**
077             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
078             */
079            public static List<MembershipRequest> findWithDynamicQuery(
080                    DynamicQuery dynamicQuery, int start, int end)
081                    throws SystemException {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<MembershipRequest> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator orderByComparator) throws SystemException {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
098             */
099            public static MembershipRequest update(
100                    MembershipRequest membershipRequest, boolean merge)
101                    throws SystemException {
102                    return getPersistence().update(membershipRequest, merge);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
107             */
108            public static MembershipRequest update(
109                    MembershipRequest membershipRequest, boolean merge,
110                    ServiceContext serviceContext) throws SystemException {
111                    return getPersistence().update(membershipRequest, merge, serviceContext);
112            }
113    
114            /**
115            * Caches the membership request in the entity cache if it is enabled.
116            *
117            * @param membershipRequest the membership request
118            */
119            public static void cacheResult(
120                    com.liferay.portal.model.MembershipRequest membershipRequest) {
121                    getPersistence().cacheResult(membershipRequest);
122            }
123    
124            /**
125            * Caches the membership requests in the entity cache if it is enabled.
126            *
127            * @param membershipRequests the membership requests
128            */
129            public static void cacheResult(
130                    java.util.List<com.liferay.portal.model.MembershipRequest> membershipRequests) {
131                    getPersistence().cacheResult(membershipRequests);
132            }
133    
134            /**
135            * Creates a new membership request with the primary key. Does not add the membership request to the database.
136            *
137            * @param membershipRequestId the primary key for the new membership request
138            * @return the new membership request
139            */
140            public static com.liferay.portal.model.MembershipRequest create(
141                    long membershipRequestId) {
142                    return getPersistence().create(membershipRequestId);
143            }
144    
145            /**
146            * Removes the membership request with the primary key from the database. Also notifies the appropriate model listeners.
147            *
148            * @param membershipRequestId the primary key of the membership request
149            * @return the membership request that was removed
150            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            public static com.liferay.portal.model.MembershipRequest remove(
154                    long membershipRequestId)
155                    throws com.liferay.portal.NoSuchMembershipRequestException,
156                            com.liferay.portal.kernel.exception.SystemException {
157                    return getPersistence().remove(membershipRequestId);
158            }
159    
160            public static com.liferay.portal.model.MembershipRequest updateImpl(
161                    com.liferay.portal.model.MembershipRequest membershipRequest,
162                    boolean merge)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getPersistence().updateImpl(membershipRequest, merge);
165            }
166    
167            /**
168            * Returns the membership request with the primary key or throws a {@link com.liferay.portal.NoSuchMembershipRequestException} if it could not be found.
169            *
170            * @param membershipRequestId the primary key of the membership request
171            * @return the membership request
172            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portal.model.MembershipRequest findByPrimaryKey(
176                    long membershipRequestId)
177                    throws com.liferay.portal.NoSuchMembershipRequestException,
178                            com.liferay.portal.kernel.exception.SystemException {
179                    return getPersistence().findByPrimaryKey(membershipRequestId);
180            }
181    
182            /**
183            * Returns the membership request with the primary key or returns <code>null</code> if it could not be found.
184            *
185            * @param membershipRequestId the primary key of the membership request
186            * @return the membership request, or <code>null</code> if a membership request with the primary key could not be found
187            * @throws SystemException if a system exception occurred
188            */
189            public static com.liferay.portal.model.MembershipRequest fetchByPrimaryKey(
190                    long membershipRequestId)
191                    throws com.liferay.portal.kernel.exception.SystemException {
192                    return getPersistence().fetchByPrimaryKey(membershipRequestId);
193            }
194    
195            /**
196            * Returns all the membership requests where groupId = &#63;.
197            *
198            * @param groupId the group ID
199            * @return the matching membership requests
200            * @throws SystemException if a system exception occurred
201            */
202            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
203                    long groupId)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return getPersistence().findByGroupId(groupId);
206            }
207    
208            /**
209            * Returns a range of all the membership requests where groupId = &#63;.
210            *
211            * <p>
212            * 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.
213            * </p>
214            *
215            * @param groupId the group ID
216            * @param start the lower bound of the range of membership requests
217            * @param end the upper bound of the range of membership requests (not inclusive)
218            * @return the range of matching membership requests
219            * @throws SystemException if a system exception occurred
220            */
221            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
222                    long groupId, int start, int end)
223                    throws com.liferay.portal.kernel.exception.SystemException {
224                    return getPersistence().findByGroupId(groupId, start, end);
225            }
226    
227            /**
228            * Returns an ordered range of all the membership requests where groupId = &#63;.
229            *
230            * <p>
231            * 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.
232            * </p>
233            *
234            * @param groupId the group ID
235            * @param start the lower bound of the range of membership requests
236            * @param end the upper bound of the range of membership requests (not inclusive)
237            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
238            * @return the ordered range of matching membership requests
239            * @throws SystemException if a system exception occurred
240            */
241            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
242                    long groupId, int start, int end,
243                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244                    throws com.liferay.portal.kernel.exception.SystemException {
245                    return getPersistence()
246                                       .findByGroupId(groupId, start, end, orderByComparator);
247            }
248    
249            /**
250            * Returns the first membership request in the ordered set where groupId = &#63;.
251            *
252            * @param groupId the group ID
253            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
254            * @return the first matching membership request
255            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
256            * @throws SystemException if a system exception occurred
257            */
258            public static com.liferay.portal.model.MembershipRequest findByGroupId_First(
259                    long groupId,
260                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261                    throws com.liferay.portal.NoSuchMembershipRequestException,
262                            com.liferay.portal.kernel.exception.SystemException {
263                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
264            }
265    
266            /**
267            * Returns the first membership request in the ordered set where groupId = &#63;.
268            *
269            * @param groupId the group ID
270            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
271            * @return the first matching membership request, or <code>null</code> if a matching membership request could not be found
272            * @throws SystemException if a system exception occurred
273            */
274            public static com.liferay.portal.model.MembershipRequest fetchByGroupId_First(
275                    long groupId,
276                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
277                    throws com.liferay.portal.kernel.exception.SystemException {
278                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
279            }
280    
281            /**
282            * Returns the last membership request in the ordered set where groupId = &#63;.
283            *
284            * @param groupId the group ID
285            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
286            * @return the last matching membership request
287            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
288            * @throws SystemException if a system exception occurred
289            */
290            public static com.liferay.portal.model.MembershipRequest findByGroupId_Last(
291                    long groupId,
292                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
293                    throws com.liferay.portal.NoSuchMembershipRequestException,
294                            com.liferay.portal.kernel.exception.SystemException {
295                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
296            }
297    
298            /**
299            * Returns the last membership request in the ordered set where groupId = &#63;.
300            *
301            * @param groupId the group ID
302            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
303            * @return the last matching membership request, or <code>null</code> if a matching membership request could not be found
304            * @throws SystemException if a system exception occurred
305            */
306            public static com.liferay.portal.model.MembershipRequest fetchByGroupId_Last(
307                    long groupId,
308                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
309                    throws com.liferay.portal.kernel.exception.SystemException {
310                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
311            }
312    
313            /**
314            * Returns the membership requests before and after the current membership request in the ordered set where groupId = &#63;.
315            *
316            * @param membershipRequestId the primary key of the current membership request
317            * @param groupId the group ID
318            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
319            * @return the previous, current, and next membership request
320            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
321            * @throws SystemException if a system exception occurred
322            */
323            public static com.liferay.portal.model.MembershipRequest[] findByGroupId_PrevAndNext(
324                    long membershipRequestId, long groupId,
325                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
326                    throws com.liferay.portal.NoSuchMembershipRequestException,
327                            com.liferay.portal.kernel.exception.SystemException {
328                    return getPersistence()
329                                       .findByGroupId_PrevAndNext(membershipRequestId, groupId,
330                            orderByComparator);
331            }
332    
333            /**
334            * Returns all the membership requests where userId = &#63;.
335            *
336            * @param userId the user ID
337            * @return the matching membership requests
338            * @throws SystemException if a system exception occurred
339            */
340            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
341                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
342                    return getPersistence().findByUserId(userId);
343            }
344    
345            /**
346            * Returns a range of all the membership requests where userId = &#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 userId the user ID
353            * @param start the lower bound of the range of membership requests
354            * @param end the upper bound of the range of membership requests (not inclusive)
355            * @return the range of matching membership requests
356            * @throws SystemException if a system exception occurred
357            */
358            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
359                    long userId, int start, int end)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence().findByUserId(userId, start, end);
362            }
363    
364            /**
365            * Returns an ordered range of all the membership requests where userId = &#63;.
366            *
367            * <p>
368            * 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.
369            * </p>
370            *
371            * @param userId the user ID
372            * @param start the lower bound of the range of membership requests
373            * @param end the upper bound of the range of membership requests (not inclusive)
374            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
375            * @return the ordered range of matching membership requests
376            * @throws SystemException if a system exception occurred
377            */
378            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
379                    long userId, int start, int end,
380                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
381                    throws com.liferay.portal.kernel.exception.SystemException {
382                    return getPersistence()
383                                       .findByUserId(userId, start, end, orderByComparator);
384            }
385    
386            /**
387            * Returns the first membership request in the ordered set where userId = &#63;.
388            *
389            * @param userId the user ID
390            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
391            * @return the first matching membership request
392            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
393            * @throws SystemException if a system exception occurred
394            */
395            public static com.liferay.portal.model.MembershipRequest findByUserId_First(
396                    long userId,
397                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
398                    throws com.liferay.portal.NoSuchMembershipRequestException,
399                            com.liferay.portal.kernel.exception.SystemException {
400                    return getPersistence().findByUserId_First(userId, orderByComparator);
401            }
402    
403            /**
404            * Returns the first membership request in the ordered set where userId = &#63;.
405            *
406            * @param userId the user ID
407            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
408            * @return the first matching membership request, or <code>null</code> if a matching membership request could not be found
409            * @throws SystemException if a system exception occurred
410            */
411            public static com.liferay.portal.model.MembershipRequest fetchByUserId_First(
412                    long userId,
413                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
414                    throws com.liferay.portal.kernel.exception.SystemException {
415                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
416            }
417    
418            /**
419            * Returns the last membership request in the ordered set where userId = &#63;.
420            *
421            * @param userId the user ID
422            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
423            * @return the last matching membership request
424            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
425            * @throws SystemException if a system exception occurred
426            */
427            public static com.liferay.portal.model.MembershipRequest findByUserId_Last(
428                    long userId,
429                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
430                    throws com.liferay.portal.NoSuchMembershipRequestException,
431                            com.liferay.portal.kernel.exception.SystemException {
432                    return getPersistence().findByUserId_Last(userId, orderByComparator);
433            }
434    
435            /**
436            * Returns the last membership request in the ordered set where userId = &#63;.
437            *
438            * @param userId the user ID
439            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
440            * @return the last matching membership request, or <code>null</code> if a matching membership request could not be found
441            * @throws SystemException if a system exception occurred
442            */
443            public static com.liferay.portal.model.MembershipRequest fetchByUserId_Last(
444                    long userId,
445                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
446                    throws com.liferay.portal.kernel.exception.SystemException {
447                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
448            }
449    
450            /**
451            * Returns the membership requests before and after the current membership request in the ordered set where userId = &#63;.
452            *
453            * @param membershipRequestId the primary key of the current membership request
454            * @param userId the user ID
455            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
456            * @return the previous, current, and next membership request
457            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
458            * @throws SystemException if a system exception occurred
459            */
460            public static com.liferay.portal.model.MembershipRequest[] findByUserId_PrevAndNext(
461                    long membershipRequestId, long userId,
462                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
463                    throws com.liferay.portal.NoSuchMembershipRequestException,
464                            com.liferay.portal.kernel.exception.SystemException {
465                    return getPersistence()
466                                       .findByUserId_PrevAndNext(membershipRequestId, userId,
467                            orderByComparator);
468            }
469    
470            /**
471            * Returns all the membership requests where groupId = &#63; and statusId = &#63;.
472            *
473            * @param groupId the group ID
474            * @param statusId the status ID
475            * @return the matching membership requests
476            * @throws SystemException if a system exception occurred
477            */
478            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
479                    long groupId, int statusId)
480                    throws com.liferay.portal.kernel.exception.SystemException {
481                    return getPersistence().findByG_S(groupId, statusId);
482            }
483    
484            /**
485            * Returns a range of all the membership requests where groupId = &#63; and statusId = &#63;.
486            *
487            * <p>
488            * 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.
489            * </p>
490            *
491            * @param groupId the group ID
492            * @param statusId the status ID
493            * @param start the lower bound of the range of membership requests
494            * @param end the upper bound of the range of membership requests (not inclusive)
495            * @return the range of matching membership requests
496            * @throws SystemException if a system exception occurred
497            */
498            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
499                    long groupId, int statusId, int start, int end)
500                    throws com.liferay.portal.kernel.exception.SystemException {
501                    return getPersistence().findByG_S(groupId, statusId, start, end);
502            }
503    
504            /**
505            * Returns an ordered range of all the membership requests where groupId = &#63; and statusId = &#63;.
506            *
507            * <p>
508            * 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.
509            * </p>
510            *
511            * @param groupId the group ID
512            * @param statusId the status ID
513            * @param start the lower bound of the range of membership requests
514            * @param end the upper bound of the range of membership requests (not inclusive)
515            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
516            * @return the ordered range of matching membership requests
517            * @throws SystemException if a system exception occurred
518            */
519            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
520                    long groupId, int statusId, int start, int end,
521                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
522                    throws com.liferay.portal.kernel.exception.SystemException {
523                    return getPersistence()
524                                       .findByG_S(groupId, statusId, start, end, orderByComparator);
525            }
526    
527            /**
528            * Returns the first membership request in the ordered set where groupId = &#63; and statusId = &#63;.
529            *
530            * @param groupId the group ID
531            * @param statusId the status ID
532            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
533            * @return the first matching membership request
534            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
535            * @throws SystemException if a system exception occurred
536            */
537            public static com.liferay.portal.model.MembershipRequest findByG_S_First(
538                    long groupId, int statusId,
539                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
540                    throws com.liferay.portal.NoSuchMembershipRequestException,
541                            com.liferay.portal.kernel.exception.SystemException {
542                    return getPersistence()
543                                       .findByG_S_First(groupId, statusId, orderByComparator);
544            }
545    
546            /**
547            * Returns the first membership request in the ordered set where groupId = &#63; and statusId = &#63;.
548            *
549            * @param groupId the group ID
550            * @param statusId the status ID
551            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
552            * @return the first matching membership request, or <code>null</code> if a matching membership request could not be found
553            * @throws SystemException if a system exception occurred
554            */
555            public static com.liferay.portal.model.MembershipRequest fetchByG_S_First(
556                    long groupId, int statusId,
557                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
558                    throws com.liferay.portal.kernel.exception.SystemException {
559                    return getPersistence()
560                                       .fetchByG_S_First(groupId, statusId, orderByComparator);
561            }
562    
563            /**
564            * Returns the last membership request in the ordered set where groupId = &#63; and statusId = &#63;.
565            *
566            * @param groupId the group ID
567            * @param statusId the status ID
568            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
569            * @return the last matching membership request
570            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
571            * @throws SystemException if a system exception occurred
572            */
573            public static com.liferay.portal.model.MembershipRequest findByG_S_Last(
574                    long groupId, int statusId,
575                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
576                    throws com.liferay.portal.NoSuchMembershipRequestException,
577                            com.liferay.portal.kernel.exception.SystemException {
578                    return getPersistence()
579                                       .findByG_S_Last(groupId, statusId, orderByComparator);
580            }
581    
582            /**
583            * Returns the last membership request in the ordered set where groupId = &#63; and statusId = &#63;.
584            *
585            * @param groupId the group ID
586            * @param statusId the status ID
587            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
588            * @return the last matching membership request, or <code>null</code> if a matching membership request could not be found
589            * @throws SystemException if a system exception occurred
590            */
591            public static com.liferay.portal.model.MembershipRequest fetchByG_S_Last(
592                    long groupId, int statusId,
593                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
594                    throws com.liferay.portal.kernel.exception.SystemException {
595                    return getPersistence()
596                                       .fetchByG_S_Last(groupId, statusId, orderByComparator);
597            }
598    
599            /**
600            * Returns the membership requests before and after the current membership request in the ordered set where groupId = &#63; and statusId = &#63;.
601            *
602            * @param membershipRequestId the primary key of the current membership request
603            * @param groupId the group ID
604            * @param statusId the status ID
605            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
606            * @return the previous, current, and next membership request
607            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
608            * @throws SystemException if a system exception occurred
609            */
610            public static com.liferay.portal.model.MembershipRequest[] findByG_S_PrevAndNext(
611                    long membershipRequestId, long groupId, int statusId,
612                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
613                    throws com.liferay.portal.NoSuchMembershipRequestException,
614                            com.liferay.portal.kernel.exception.SystemException {
615                    return getPersistence()
616                                       .findByG_S_PrevAndNext(membershipRequestId, groupId,
617                            statusId, orderByComparator);
618            }
619    
620            /**
621            * Returns all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
622            *
623            * @param groupId the group ID
624            * @param userId the user ID
625            * @param statusId the status ID
626            * @return the matching membership requests
627            * @throws SystemException if a system exception occurred
628            */
629            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_U_S(
630                    long groupId, long userId, int statusId)
631                    throws com.liferay.portal.kernel.exception.SystemException {
632                    return getPersistence().findByG_U_S(groupId, userId, statusId);
633            }
634    
635            /**
636            * Returns a range of all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
637            *
638            * <p>
639            * 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.
640            * </p>
641            *
642            * @param groupId the group ID
643            * @param userId the user ID
644            * @param statusId the status ID
645            * @param start the lower bound of the range of membership requests
646            * @param end the upper bound of the range of membership requests (not inclusive)
647            * @return the range of matching membership requests
648            * @throws SystemException if a system exception occurred
649            */
650            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_U_S(
651                    long groupId, long userId, int statusId, int start, int end)
652                    throws com.liferay.portal.kernel.exception.SystemException {
653                    return getPersistence()
654                                       .findByG_U_S(groupId, userId, statusId, start, end);
655            }
656    
657            /**
658            * Returns an ordered range of all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
659            *
660            * <p>
661            * 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.
662            * </p>
663            *
664            * @param groupId the group ID
665            * @param userId the user ID
666            * @param statusId the status ID
667            * @param start the lower bound of the range of membership requests
668            * @param end the upper bound of the range of membership requests (not inclusive)
669            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
670            * @return the ordered range of matching membership requests
671            * @throws SystemException if a system exception occurred
672            */
673            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_U_S(
674                    long groupId, long userId, int statusId, int start, int end,
675                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
676                    throws com.liferay.portal.kernel.exception.SystemException {
677                    return getPersistence()
678                                       .findByG_U_S(groupId, userId, statusId, start, end,
679                            orderByComparator);
680            }
681    
682            /**
683            * Returns the first membership request in the ordered set where groupId = &#63; and userId = &#63; and statusId = &#63;.
684            *
685            * @param groupId the group ID
686            * @param userId the user ID
687            * @param statusId the status ID
688            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
689            * @return the first matching membership request
690            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
691            * @throws SystemException if a system exception occurred
692            */
693            public static com.liferay.portal.model.MembershipRequest findByG_U_S_First(
694                    long groupId, long userId, int statusId,
695                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
696                    throws com.liferay.portal.NoSuchMembershipRequestException,
697                            com.liferay.portal.kernel.exception.SystemException {
698                    return getPersistence()
699                                       .findByG_U_S_First(groupId, userId, statusId,
700                            orderByComparator);
701            }
702    
703            /**
704            * Returns the first membership request in the ordered set where groupId = &#63; and userId = &#63; and statusId = &#63;.
705            *
706            * @param groupId the group ID
707            * @param userId the user ID
708            * @param statusId the status ID
709            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
710            * @return the first matching membership request, or <code>null</code> if a matching membership request could not be found
711            * @throws SystemException if a system exception occurred
712            */
713            public static com.liferay.portal.model.MembershipRequest fetchByG_U_S_First(
714                    long groupId, long userId, int statusId,
715                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
716                    throws com.liferay.portal.kernel.exception.SystemException {
717                    return getPersistence()
718                                       .fetchByG_U_S_First(groupId, userId, statusId,
719                            orderByComparator);
720            }
721    
722            /**
723            * Returns the last membership request in the ordered set where groupId = &#63; and userId = &#63; and statusId = &#63;.
724            *
725            * @param groupId the group ID
726            * @param userId the user ID
727            * @param statusId the status ID
728            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
729            * @return the last matching membership request
730            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
731            * @throws SystemException if a system exception occurred
732            */
733            public static com.liferay.portal.model.MembershipRequest findByG_U_S_Last(
734                    long groupId, long userId, int statusId,
735                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
736                    throws com.liferay.portal.NoSuchMembershipRequestException,
737                            com.liferay.portal.kernel.exception.SystemException {
738                    return getPersistence()
739                                       .findByG_U_S_Last(groupId, userId, statusId,
740                            orderByComparator);
741            }
742    
743            /**
744            * Returns the last membership request in the ordered set where groupId = &#63; and userId = &#63; and statusId = &#63;.
745            *
746            * @param groupId the group ID
747            * @param userId the user ID
748            * @param statusId the status ID
749            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
750            * @return the last matching membership request, or <code>null</code> if a matching membership request could not be found
751            * @throws SystemException if a system exception occurred
752            */
753            public static com.liferay.portal.model.MembershipRequest fetchByG_U_S_Last(
754                    long groupId, long userId, int statusId,
755                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
756                    throws com.liferay.portal.kernel.exception.SystemException {
757                    return getPersistence()
758                                       .fetchByG_U_S_Last(groupId, userId, statusId,
759                            orderByComparator);
760            }
761    
762            /**
763            * Returns the membership requests before and after the current membership request in the ordered set where groupId = &#63; and userId = &#63; and statusId = &#63;.
764            *
765            * @param membershipRequestId the primary key of the current membership request
766            * @param groupId the group ID
767            * @param userId the user ID
768            * @param statusId the status ID
769            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
770            * @return the previous, current, and next membership request
771            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
772            * @throws SystemException if a system exception occurred
773            */
774            public static com.liferay.portal.model.MembershipRequest[] findByG_U_S_PrevAndNext(
775                    long membershipRequestId, long groupId, long userId, int statusId,
776                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
777                    throws com.liferay.portal.NoSuchMembershipRequestException,
778                            com.liferay.portal.kernel.exception.SystemException {
779                    return getPersistence()
780                                       .findByG_U_S_PrevAndNext(membershipRequestId, groupId,
781                            userId, statusId, orderByComparator);
782            }
783    
784            /**
785            * Returns all the membership requests.
786            *
787            * @return the membership requests
788            * @throws SystemException if a system exception occurred
789            */
790            public static java.util.List<com.liferay.portal.model.MembershipRequest> findAll()
791                    throws com.liferay.portal.kernel.exception.SystemException {
792                    return getPersistence().findAll();
793            }
794    
795            /**
796            * Returns a range of all the membership requests.
797            *
798            * <p>
799            * 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.
800            * </p>
801            *
802            * @param start the lower bound of the range of membership requests
803            * @param end the upper bound of the range of membership requests (not inclusive)
804            * @return the range of membership requests
805            * @throws SystemException if a system exception occurred
806            */
807            public static java.util.List<com.liferay.portal.model.MembershipRequest> findAll(
808                    int start, int end)
809                    throws com.liferay.portal.kernel.exception.SystemException {
810                    return getPersistence().findAll(start, end);
811            }
812    
813            /**
814            * Returns an ordered range of all the membership requests.
815            *
816            * <p>
817            * 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.
818            * </p>
819            *
820            * @param start the lower bound of the range of membership requests
821            * @param end the upper bound of the range of membership requests (not inclusive)
822            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
823            * @return the ordered range of membership requests
824            * @throws SystemException if a system exception occurred
825            */
826            public static java.util.List<com.liferay.portal.model.MembershipRequest> findAll(
827                    int start, int end,
828                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
829                    throws com.liferay.portal.kernel.exception.SystemException {
830                    return getPersistence().findAll(start, end, orderByComparator);
831            }
832    
833            /**
834            * Removes all the membership requests where groupId = &#63; from the database.
835            *
836            * @param groupId the group ID
837            * @throws SystemException if a system exception occurred
838            */
839            public static void removeByGroupId(long groupId)
840                    throws com.liferay.portal.kernel.exception.SystemException {
841                    getPersistence().removeByGroupId(groupId);
842            }
843    
844            /**
845            * Removes all the membership requests where userId = &#63; from the database.
846            *
847            * @param userId the user ID
848            * @throws SystemException if a system exception occurred
849            */
850            public static void removeByUserId(long userId)
851                    throws com.liferay.portal.kernel.exception.SystemException {
852                    getPersistence().removeByUserId(userId);
853            }
854    
855            /**
856            * Removes all the membership requests where groupId = &#63; and statusId = &#63; from the database.
857            *
858            * @param groupId the group ID
859            * @param statusId the status ID
860            * @throws SystemException if a system exception occurred
861            */
862            public static void removeByG_S(long groupId, int statusId)
863                    throws com.liferay.portal.kernel.exception.SystemException {
864                    getPersistence().removeByG_S(groupId, statusId);
865            }
866    
867            /**
868            * Removes all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63; from the database.
869            *
870            * @param groupId the group ID
871            * @param userId the user ID
872            * @param statusId the status ID
873            * @throws SystemException if a system exception occurred
874            */
875            public static void removeByG_U_S(long groupId, long userId, int statusId)
876                    throws com.liferay.portal.kernel.exception.SystemException {
877                    getPersistence().removeByG_U_S(groupId, userId, statusId);
878            }
879    
880            /**
881            * Removes all the membership requests from the database.
882            *
883            * @throws SystemException if a system exception occurred
884            */
885            public static void removeAll()
886                    throws com.liferay.portal.kernel.exception.SystemException {
887                    getPersistence().removeAll();
888            }
889    
890            /**
891            * Returns the number of membership requests where groupId = &#63;.
892            *
893            * @param groupId the group ID
894            * @return the number of matching membership requests
895            * @throws SystemException if a system exception occurred
896            */
897            public static int countByGroupId(long groupId)
898                    throws com.liferay.portal.kernel.exception.SystemException {
899                    return getPersistence().countByGroupId(groupId);
900            }
901    
902            /**
903            * Returns the number of membership requests where userId = &#63;.
904            *
905            * @param userId the user ID
906            * @return the number of matching membership requests
907            * @throws SystemException if a system exception occurred
908            */
909            public static int countByUserId(long userId)
910                    throws com.liferay.portal.kernel.exception.SystemException {
911                    return getPersistence().countByUserId(userId);
912            }
913    
914            /**
915            * Returns the number of membership requests where groupId = &#63; and statusId = &#63;.
916            *
917            * @param groupId the group ID
918            * @param statusId the status ID
919            * @return the number of matching membership requests
920            * @throws SystemException if a system exception occurred
921            */
922            public static int countByG_S(long groupId, int statusId)
923                    throws com.liferay.portal.kernel.exception.SystemException {
924                    return getPersistence().countByG_S(groupId, statusId);
925            }
926    
927            /**
928            * Returns the number of membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
929            *
930            * @param groupId the group ID
931            * @param userId the user ID
932            * @param statusId the status ID
933            * @return the number of matching membership requests
934            * @throws SystemException if a system exception occurred
935            */
936            public static int countByG_U_S(long groupId, long userId, int statusId)
937                    throws com.liferay.portal.kernel.exception.SystemException {
938                    return getPersistence().countByG_U_S(groupId, userId, statusId);
939            }
940    
941            /**
942            * Returns the number of membership requests.
943            *
944            * @return the number of membership requests
945            * @throws SystemException if a system exception occurred
946            */
947            public static int countAll()
948                    throws com.liferay.portal.kernel.exception.SystemException {
949                    return getPersistence().countAll();
950            }
951    
952            public static MembershipRequestPersistence getPersistence() {
953                    if (_persistence == null) {
954                            _persistence = (MembershipRequestPersistence)PortalBeanLocatorUtil.locate(MembershipRequestPersistence.class.getName());
955    
956                            ReferenceRegistry.registerReference(MembershipRequestUtil.class,
957                                    "_persistence");
958                    }
959    
960                    return _persistence;
961            }
962    
963            /**
964             * @deprecated
965             */
966            public void setPersistence(MembershipRequestPersistence persistence) {
967            }
968    
969            private static MembershipRequestPersistence _persistence;
970    }