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