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