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