001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.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#remove(com.liferay.portal.model.BaseModel)
098             */
099            public static MembershipRequest remove(MembershipRequest membershipRequest)
100                    throws SystemException {
101                    return getPersistence().remove(membershipRequest);
102            }
103    
104            /**
105             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
106             */
107            public static MembershipRequest update(
108                    MembershipRequest membershipRequest, boolean merge)
109                    throws SystemException {
110                    return getPersistence().update(membershipRequest, merge);
111            }
112    
113            /**
114             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
115             */
116            public static MembershipRequest update(
117                    MembershipRequest membershipRequest, boolean merge,
118                    ServiceContext serviceContext) throws SystemException {
119                    return getPersistence().update(membershipRequest, merge, serviceContext);
120            }
121    
122            /**
123            * Caches the membership request in the entity cache if it is enabled.
124            *
125            * @param membershipRequest the membership request
126            */
127            public static void cacheResult(
128                    com.liferay.portal.model.MembershipRequest membershipRequest) {
129                    getPersistence().cacheResult(membershipRequest);
130            }
131    
132            /**
133            * Caches the membership requests in the entity cache if it is enabled.
134            *
135            * @param membershipRequests the membership requests
136            */
137            public static void cacheResult(
138                    java.util.List<com.liferay.portal.model.MembershipRequest> membershipRequests) {
139                    getPersistence().cacheResult(membershipRequests);
140            }
141    
142            /**
143            * Creates a new membership request with the primary key. Does not add the membership request to the database.
144            *
145            * @param membershipRequestId the primary key for the new membership request
146            * @return the new membership request
147            */
148            public static com.liferay.portal.model.MembershipRequest create(
149                    long membershipRequestId) {
150                    return getPersistence().create(membershipRequestId);
151            }
152    
153            /**
154            * Removes the membership request with the primary key from the database. Also notifies the appropriate model listeners.
155            *
156            * @param membershipRequestId the primary key of the membership request
157            * @return the membership request that was removed
158            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
159            * @throws SystemException if a system exception occurred
160            */
161            public static com.liferay.portal.model.MembershipRequest remove(
162                    long membershipRequestId)
163                    throws com.liferay.portal.NoSuchMembershipRequestException,
164                            com.liferay.portal.kernel.exception.SystemException {
165                    return getPersistence().remove(membershipRequestId);
166            }
167    
168            public static com.liferay.portal.model.MembershipRequest updateImpl(
169                    com.liferay.portal.model.MembershipRequest membershipRequest,
170                    boolean merge)
171                    throws com.liferay.portal.kernel.exception.SystemException {
172                    return getPersistence().updateImpl(membershipRequest, merge);
173            }
174    
175            /**
176            * Returns the membership request with the primary key or throws a {@link com.liferay.portal.NoSuchMembershipRequestException} if it could not be found.
177            *
178            * @param membershipRequestId the primary key of the membership request
179            * @return the membership request
180            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
181            * @throws SystemException if a system exception occurred
182            */
183            public static com.liferay.portal.model.MembershipRequest findByPrimaryKey(
184                    long membershipRequestId)
185                    throws com.liferay.portal.NoSuchMembershipRequestException,
186                            com.liferay.portal.kernel.exception.SystemException {
187                    return getPersistence().findByPrimaryKey(membershipRequestId);
188            }
189    
190            /**
191            * Returns the membership request with the primary key or returns <code>null</code> if it could not be found.
192            *
193            * @param membershipRequestId the primary key of the membership request
194            * @return the membership request, or <code>null</code> if a membership request with the primary key could not be found
195            * @throws SystemException if a system exception occurred
196            */
197            public static com.liferay.portal.model.MembershipRequest fetchByPrimaryKey(
198                    long membershipRequestId)
199                    throws com.liferay.portal.kernel.exception.SystemException {
200                    return getPersistence().fetchByPrimaryKey(membershipRequestId);
201            }
202    
203            /**
204            * Returns all the membership requests where groupId = &#63;.
205            *
206            * @param groupId the group ID
207            * @return the matching membership requests
208            * @throws SystemException if a system exception occurred
209            */
210            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
211                    long groupId)
212                    throws com.liferay.portal.kernel.exception.SystemException {
213                    return getPersistence().findByGroupId(groupId);
214            }
215    
216            /**
217            * Returns a range of all the membership requests where groupId = &#63;.
218            *
219            * <p>
220            * 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.
221            * </p>
222            *
223            * @param groupId the group ID
224            * @param start the lower bound of the range of membership requests
225            * @param end the upper bound of the range of membership requests (not inclusive)
226            * @return the range of matching membership requests
227            * @throws SystemException if a system exception occurred
228            */
229            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
230                    long groupId, int start, int end)
231                    throws com.liferay.portal.kernel.exception.SystemException {
232                    return getPersistence().findByGroupId(groupId, start, end);
233            }
234    
235            /**
236            * Returns an ordered range of all the membership requests where groupId = &#63;.
237            *
238            * <p>
239            * 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.
240            * </p>
241            *
242            * @param groupId the group ID
243            * @param start the lower bound of the range of membership requests
244            * @param end the upper bound of the range of membership requests (not inclusive)
245            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
246            * @return the ordered range of matching membership requests
247            * @throws SystemException if a system exception occurred
248            */
249            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
250                    long groupId, int start, int end,
251                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252                    throws com.liferay.portal.kernel.exception.SystemException {
253                    return getPersistence()
254                                       .findByGroupId(groupId, start, end, orderByComparator);
255            }
256    
257            /**
258            * Returns the first membership request in the ordered set where groupId = &#63;.
259            *
260            * <p>
261            * 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.
262            * </p>
263            *
264            * @param groupId the group ID
265            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
266            * @return the first matching membership request
267            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
268            * @throws SystemException if a system exception occurred
269            */
270            public static com.liferay.portal.model.MembershipRequest findByGroupId_First(
271                    long groupId,
272                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
273                    throws com.liferay.portal.NoSuchMembershipRequestException,
274                            com.liferay.portal.kernel.exception.SystemException {
275                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
276            }
277    
278            /**
279            * Returns the last membership request in the ordered set where groupId = &#63;.
280            *
281            * <p>
282            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
283            * </p>
284            *
285            * @param groupId the group ID
286            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
287            * @return the last matching membership request
288            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
289            * @throws SystemException if a system exception occurred
290            */
291            public static com.liferay.portal.model.MembershipRequest findByGroupId_Last(
292                    long groupId,
293                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
294                    throws com.liferay.portal.NoSuchMembershipRequestException,
295                            com.liferay.portal.kernel.exception.SystemException {
296                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
297            }
298    
299            /**
300            * Returns the membership requests before and after the current membership request in the ordered set where groupId = &#63;.
301            *
302            * <p>
303            * 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.
304            * </p>
305            *
306            * @param membershipRequestId the primary key of the current membership request
307            * @param groupId the group ID
308            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
309            * @return the previous, current, and next membership request
310            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
311            * @throws SystemException if a system exception occurred
312            */
313            public static com.liferay.portal.model.MembershipRequest[] findByGroupId_PrevAndNext(
314                    long membershipRequestId, long groupId,
315                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
316                    throws com.liferay.portal.NoSuchMembershipRequestException,
317                            com.liferay.portal.kernel.exception.SystemException {
318                    return getPersistence()
319                                       .findByGroupId_PrevAndNext(membershipRequestId, groupId,
320                            orderByComparator);
321            }
322    
323            /**
324            * Returns all the membership requests where userId = &#63;.
325            *
326            * @param userId the user ID
327            * @return the matching membership requests
328            * @throws SystemException if a system exception occurred
329            */
330            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
331                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
332                    return getPersistence().findByUserId(userId);
333            }
334    
335            /**
336            * Returns a range of all the membership requests where userId = &#63;.
337            *
338            * <p>
339            * 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.
340            * </p>
341            *
342            * @param userId the user ID
343            * @param start the lower bound of the range of membership requests
344            * @param end the upper bound of the range of membership requests (not inclusive)
345            * @return the range of matching membership requests
346            * @throws SystemException if a system exception occurred
347            */
348            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
349                    long userId, int start, int end)
350                    throws com.liferay.portal.kernel.exception.SystemException {
351                    return getPersistence().findByUserId(userId, start, end);
352            }
353    
354            /**
355            * Returns an ordered range of all the membership requests where userId = &#63;.
356            *
357            * <p>
358            * 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.
359            * </p>
360            *
361            * @param userId the user ID
362            * @param start the lower bound of the range of membership requests
363            * @param end the upper bound of the range of membership requests (not inclusive)
364            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
365            * @return the ordered range of matching membership requests
366            * @throws SystemException if a system exception occurred
367            */
368            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
369                    long userId, int start, int end,
370                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
371                    throws com.liferay.portal.kernel.exception.SystemException {
372                    return getPersistence()
373                                       .findByUserId(userId, start, end, orderByComparator);
374            }
375    
376            /**
377            * Returns the first membership request in the ordered set where userId = &#63;.
378            *
379            * <p>
380            * 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.
381            * </p>
382            *
383            * @param userId the user ID
384            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
385            * @return the first matching membership request
386            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
387            * @throws SystemException if a system exception occurred
388            */
389            public static com.liferay.portal.model.MembershipRequest findByUserId_First(
390                    long userId,
391                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
392                    throws com.liferay.portal.NoSuchMembershipRequestException,
393                            com.liferay.portal.kernel.exception.SystemException {
394                    return getPersistence().findByUserId_First(userId, orderByComparator);
395            }
396    
397            /**
398            * Returns the last membership request in the ordered set where userId = &#63;.
399            *
400            * <p>
401            * 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.
402            * </p>
403            *
404            * @param userId the user ID
405            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
406            * @return the last matching membership request
407            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
408            * @throws SystemException if a system exception occurred
409            */
410            public static com.liferay.portal.model.MembershipRequest findByUserId_Last(
411                    long userId,
412                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
413                    throws com.liferay.portal.NoSuchMembershipRequestException,
414                            com.liferay.portal.kernel.exception.SystemException {
415                    return getPersistence().findByUserId_Last(userId, orderByComparator);
416            }
417    
418            /**
419            * Returns the membership requests before and after the current membership request in the ordered set where userId = &#63;.
420            *
421            * <p>
422            * 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.
423            * </p>
424            *
425            * @param membershipRequestId the primary key of the current membership request
426            * @param userId the user ID
427            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
428            * @return the previous, current, and next membership request
429            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
430            * @throws SystemException if a system exception occurred
431            */
432            public static com.liferay.portal.model.MembershipRequest[] findByUserId_PrevAndNext(
433                    long membershipRequestId, long userId,
434                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
435                    throws com.liferay.portal.NoSuchMembershipRequestException,
436                            com.liferay.portal.kernel.exception.SystemException {
437                    return getPersistence()
438                                       .findByUserId_PrevAndNext(membershipRequestId, userId,
439                            orderByComparator);
440            }
441    
442            /**
443            * Returns all the membership requests where groupId = &#63; and statusId = &#63;.
444            *
445            * @param groupId the group ID
446            * @param statusId the status ID
447            * @return the matching membership requests
448            * @throws SystemException if a system exception occurred
449            */
450            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
451                    long groupId, int statusId)
452                    throws com.liferay.portal.kernel.exception.SystemException {
453                    return getPersistence().findByG_S(groupId, statusId);
454            }
455    
456            /**
457            * Returns a range of all the membership requests where groupId = &#63; and statusId = &#63;.
458            *
459            * <p>
460            * 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.
461            * </p>
462            *
463            * @param groupId the group ID
464            * @param statusId the status ID
465            * @param start the lower bound of the range of membership requests
466            * @param end the upper bound of the range of membership requests (not inclusive)
467            * @return the range of matching membership requests
468            * @throws SystemException if a system exception occurred
469            */
470            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
471                    long groupId, int statusId, int start, int end)
472                    throws com.liferay.portal.kernel.exception.SystemException {
473                    return getPersistence().findByG_S(groupId, statusId, start, end);
474            }
475    
476            /**
477            * Returns an ordered range of all the membership requests where groupId = &#63; and statusId = &#63;.
478            *
479            * <p>
480            * 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.
481            * </p>
482            *
483            * @param groupId the group ID
484            * @param statusId the status ID
485            * @param start the lower bound of the range of membership requests
486            * @param end the upper bound of the range of membership requests (not inclusive)
487            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
488            * @return the ordered range of matching membership requests
489            * @throws SystemException if a system exception occurred
490            */
491            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
492                    long groupId, int statusId, int start, int end,
493                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
494                    throws com.liferay.portal.kernel.exception.SystemException {
495                    return getPersistence()
496                                       .findByG_S(groupId, statusId, start, end, orderByComparator);
497            }
498    
499            /**
500            * Returns the first membership request in the ordered set where groupId = &#63; and statusId = &#63;.
501            *
502            * <p>
503            * 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.
504            * </p>
505            *
506            * @param groupId the group ID
507            * @param statusId the status ID
508            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
509            * @return the first matching membership request
510            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
511            * @throws SystemException if a system exception occurred
512            */
513            public static com.liferay.portal.model.MembershipRequest findByG_S_First(
514                    long groupId, int statusId,
515                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
516                    throws com.liferay.portal.NoSuchMembershipRequestException,
517                            com.liferay.portal.kernel.exception.SystemException {
518                    return getPersistence()
519                                       .findByG_S_First(groupId, statusId, orderByComparator);
520            }
521    
522            /**
523            * Returns the last membership request in the ordered set where groupId = &#63; and statusId = &#63;.
524            *
525            * <p>
526            * 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.
527            * </p>
528            *
529            * @param groupId the group ID
530            * @param statusId the status ID
531            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
532            * @return the last matching membership request
533            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
534            * @throws SystemException if a system exception occurred
535            */
536            public static com.liferay.portal.model.MembershipRequest findByG_S_Last(
537                    long groupId, int statusId,
538                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
539                    throws com.liferay.portal.NoSuchMembershipRequestException,
540                            com.liferay.portal.kernel.exception.SystemException {
541                    return getPersistence()
542                                       .findByG_S_Last(groupId, statusId, orderByComparator);
543            }
544    
545            /**
546            * Returns the membership requests before and after the current membership request in the ordered set where groupId = &#63; and statusId = &#63;.
547            *
548            * <p>
549            * 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.
550            * </p>
551            *
552            * @param membershipRequestId the primary key of the current membership request
553            * @param groupId the group ID
554            * @param statusId the status ID
555            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
556            * @return the previous, current, and next membership request
557            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
558            * @throws SystemException if a system exception occurred
559            */
560            public static com.liferay.portal.model.MembershipRequest[] findByG_S_PrevAndNext(
561                    long membershipRequestId, long groupId, int statusId,
562                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
563                    throws com.liferay.portal.NoSuchMembershipRequestException,
564                            com.liferay.portal.kernel.exception.SystemException {
565                    return getPersistence()
566                                       .findByG_S_PrevAndNext(membershipRequestId, groupId,
567                            statusId, orderByComparator);
568            }
569    
570            /**
571            * Returns all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
572            *
573            * @param groupId the group ID
574            * @param userId the user ID
575            * @param statusId the status ID
576            * @return the matching membership requests
577            * @throws SystemException if a system exception occurred
578            */
579            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_U_S(
580                    long groupId, long userId, int statusId)
581                    throws com.liferay.portal.kernel.exception.SystemException {
582                    return getPersistence().findByG_U_S(groupId, userId, statusId);
583            }
584    
585            /**
586            * Returns a range of all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
587            *
588            * <p>
589            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
590            * </p>
591            *
592            * @param groupId the group ID
593            * @param userId the user ID
594            * @param statusId the status ID
595            * @param start the lower bound of the range of membership requests
596            * @param end the upper bound of the range of membership requests (not inclusive)
597            * @return the range of matching membership requests
598            * @throws SystemException if a system exception occurred
599            */
600            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_U_S(
601                    long groupId, long userId, int statusId, int start, int end)
602                    throws com.liferay.portal.kernel.exception.SystemException {
603                    return getPersistence()
604                                       .findByG_U_S(groupId, userId, statusId, start, end);
605            }
606    
607            /**
608            * Returns an ordered range of all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
609            *
610            * <p>
611            * 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.
612            * </p>
613            *
614            * @param groupId the group ID
615            * @param userId the user ID
616            * @param statusId the status ID
617            * @param start the lower bound of the range of membership requests
618            * @param end the upper bound of the range of membership requests (not inclusive)
619            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
620            * @return the ordered range of matching membership requests
621            * @throws SystemException if a system exception occurred
622            */
623            public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_U_S(
624                    long groupId, long userId, int statusId, int start, int end,
625                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
626                    throws com.liferay.portal.kernel.exception.SystemException {
627                    return getPersistence()
628                                       .findByG_U_S(groupId, userId, statusId, start, end,
629                            orderByComparator);
630            }
631    
632            /**
633            * Returns the first membership request in the ordered set where groupId = &#63; and userId = &#63; and statusId = &#63;.
634            *
635            * <p>
636            * 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.
637            * </p>
638            *
639            * @param groupId the group ID
640            * @param userId the user ID
641            * @param statusId the status ID
642            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
643            * @return the first matching membership request
644            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
645            * @throws SystemException if a system exception occurred
646            */
647            public static com.liferay.portal.model.MembershipRequest findByG_U_S_First(
648                    long groupId, long userId, int statusId,
649                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
650                    throws com.liferay.portal.NoSuchMembershipRequestException,
651                            com.liferay.portal.kernel.exception.SystemException {
652                    return getPersistence()
653                                       .findByG_U_S_First(groupId, userId, statusId,
654                            orderByComparator);
655            }
656    
657            /**
658            * Returns the last membership request in the ordered set 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 orderByComparator the comparator to order the set by (optionally <code>null</code>)
668            * @return the last matching membership request
669            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
670            * @throws SystemException if a system exception occurred
671            */
672            public static com.liferay.portal.model.MembershipRequest findByG_U_S_Last(
673                    long groupId, long userId, int statusId,
674                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
675                    throws com.liferay.portal.NoSuchMembershipRequestException,
676                            com.liferay.portal.kernel.exception.SystemException {
677                    return getPersistence()
678                                       .findByG_U_S_Last(groupId, userId, statusId,
679                            orderByComparator);
680            }
681    
682            /**
683            * Returns the membership requests before and after the current membership request in the ordered set where groupId = &#63; and userId = &#63; and statusId = &#63;.
684            *
685            * <p>
686            * 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.
687            * </p>
688            *
689            * @param membershipRequestId the primary key of the current membership request
690            * @param groupId the group ID
691            * @param userId the user ID
692            * @param statusId the status ID
693            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
694            * @return the previous, current, and next membership request
695            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
696            * @throws SystemException if a system exception occurred
697            */
698            public static com.liferay.portal.model.MembershipRequest[] findByG_U_S_PrevAndNext(
699                    long membershipRequestId, long groupId, long userId, int statusId,
700                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
701                    throws com.liferay.portal.NoSuchMembershipRequestException,
702                            com.liferay.portal.kernel.exception.SystemException {
703                    return getPersistence()
704                                       .findByG_U_S_PrevAndNext(membershipRequestId, groupId,
705                            userId, statusId, orderByComparator);
706            }
707    
708            /**
709            * Returns all the membership requests.
710            *
711            * @return the membership requests
712            * @throws SystemException if a system exception occurred
713            */
714            public static java.util.List<com.liferay.portal.model.MembershipRequest> findAll()
715                    throws com.liferay.portal.kernel.exception.SystemException {
716                    return getPersistence().findAll();
717            }
718    
719            /**
720            * Returns a range of all the membership requests.
721            *
722            * <p>
723            * 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.
724            * </p>
725            *
726            * @param start the lower bound of the range of membership requests
727            * @param end the upper bound of the range of membership requests (not inclusive)
728            * @return the range of membership requests
729            * @throws SystemException if a system exception occurred
730            */
731            public static java.util.List<com.liferay.portal.model.MembershipRequest> findAll(
732                    int start, int end)
733                    throws com.liferay.portal.kernel.exception.SystemException {
734                    return getPersistence().findAll(start, end);
735            }
736    
737            /**
738            * Returns an ordered range of all the membership requests.
739            *
740            * <p>
741            * 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.
742            * </p>
743            *
744            * @param start the lower bound of the range of membership requests
745            * @param end the upper bound of the range of membership requests (not inclusive)
746            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
747            * @return the ordered range of membership requests
748            * @throws SystemException if a system exception occurred
749            */
750            public static java.util.List<com.liferay.portal.model.MembershipRequest> findAll(
751                    int start, int end,
752                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
753                    throws com.liferay.portal.kernel.exception.SystemException {
754                    return getPersistence().findAll(start, end, orderByComparator);
755            }
756    
757            /**
758            * Removes all the membership requests where groupId = &#63; from the database.
759            *
760            * @param groupId the group ID
761            * @throws SystemException if a system exception occurred
762            */
763            public static void removeByGroupId(long groupId)
764                    throws com.liferay.portal.kernel.exception.SystemException {
765                    getPersistence().removeByGroupId(groupId);
766            }
767    
768            /**
769            * Removes all the membership requests where userId = &#63; from the database.
770            *
771            * @param userId the user ID
772            * @throws SystemException if a system exception occurred
773            */
774            public static void removeByUserId(long userId)
775                    throws com.liferay.portal.kernel.exception.SystemException {
776                    getPersistence().removeByUserId(userId);
777            }
778    
779            /**
780            * Removes all the membership requests where groupId = &#63; and statusId = &#63; from the database.
781            *
782            * @param groupId the group ID
783            * @param statusId the status ID
784            * @throws SystemException if a system exception occurred
785            */
786            public static void removeByG_S(long groupId, int statusId)
787                    throws com.liferay.portal.kernel.exception.SystemException {
788                    getPersistence().removeByG_S(groupId, statusId);
789            }
790    
791            /**
792            * Removes all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63; from the database.
793            *
794            * @param groupId the group ID
795            * @param userId the user ID
796            * @param statusId the status ID
797            * @throws SystemException if a system exception occurred
798            */
799            public static void removeByG_U_S(long groupId, long userId, int statusId)
800                    throws com.liferay.portal.kernel.exception.SystemException {
801                    getPersistence().removeByG_U_S(groupId, userId, statusId);
802            }
803    
804            /**
805            * Removes all the membership requests from the database.
806            *
807            * @throws SystemException if a system exception occurred
808            */
809            public static void removeAll()
810                    throws com.liferay.portal.kernel.exception.SystemException {
811                    getPersistence().removeAll();
812            }
813    
814            /**
815            * Returns the number of membership requests where groupId = &#63;.
816            *
817            * @param groupId the group ID
818            * @return the number of matching membership requests
819            * @throws SystemException if a system exception occurred
820            */
821            public static int countByGroupId(long groupId)
822                    throws com.liferay.portal.kernel.exception.SystemException {
823                    return getPersistence().countByGroupId(groupId);
824            }
825    
826            /**
827            * Returns the number of membership requests where userId = &#63;.
828            *
829            * @param userId the user ID
830            * @return the number of matching membership requests
831            * @throws SystemException if a system exception occurred
832            */
833            public static int countByUserId(long userId)
834                    throws com.liferay.portal.kernel.exception.SystemException {
835                    return getPersistence().countByUserId(userId);
836            }
837    
838            /**
839            * Returns the number of membership requests where groupId = &#63; and statusId = &#63;.
840            *
841            * @param groupId the group ID
842            * @param statusId the status ID
843            * @return the number of matching membership requests
844            * @throws SystemException if a system exception occurred
845            */
846            public static int countByG_S(long groupId, int statusId)
847                    throws com.liferay.portal.kernel.exception.SystemException {
848                    return getPersistence().countByG_S(groupId, statusId);
849            }
850    
851            /**
852            * Returns the number of membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
853            *
854            * @param groupId the group ID
855            * @param userId the user ID
856            * @param statusId the status ID
857            * @return the number of matching membership requests
858            * @throws SystemException if a system exception occurred
859            */
860            public static int countByG_U_S(long groupId, long userId, int statusId)
861                    throws com.liferay.portal.kernel.exception.SystemException {
862                    return getPersistence().countByG_U_S(groupId, userId, statusId);
863            }
864    
865            /**
866            * Returns the number of membership requests.
867            *
868            * @return the number of membership requests
869            * @throws SystemException if a system exception occurred
870            */
871            public static int countAll()
872                    throws com.liferay.portal.kernel.exception.SystemException {
873                    return getPersistence().countAll();
874            }
875    
876            public static MembershipRequestPersistence getPersistence() {
877                    if (_persistence == null) {
878                            _persistence = (MembershipRequestPersistence)PortalBeanLocatorUtil.locate(MembershipRequestPersistence.class.getName());
879    
880                            ReferenceRegistry.registerReference(MembershipRequestUtil.class,
881                                    "_persistence");
882                    }
883    
884                    return _persistence;
885            }
886    
887            public void setPersistence(MembershipRequestPersistence persistence) {
888                    _persistence = persistence;
889    
890                    ReferenceRegistry.registerReference(MembershipRequestUtil.class,
891                            "_persistence");
892            }
893    
894            private static MembershipRequestPersistence _persistence;
895    }