001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.kernel.exception.SystemException;
018    import com.liferay.portal.model.MembershipRequest;
019    
020    /**
021     * The persistence interface for the membership request service.
022     *
023     * <p>
024     * Caching information and settings can be found in <code>portal.properties</code>
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see MembershipRequestPersistenceImpl
029     * @see MembershipRequestUtil
030     * @generated
031     */
032    public interface MembershipRequestPersistence extends BasePersistence<MembershipRequest> {
033            /*
034             * NOTE FOR DEVELOPERS:
035             *
036             * Never modify or reference this interface directly. Always use {@link MembershipRequestUtil} to access the membership request persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
037             */
038    
039            /**
040            * Caches the membership request in the entity cache if it is enabled.
041            *
042            * @param membershipRequest the membership request
043            */
044            public void cacheResult(
045                    com.liferay.portal.model.MembershipRequest membershipRequest);
046    
047            /**
048            * Caches the membership requests in the entity cache if it is enabled.
049            *
050            * @param membershipRequests the membership requests
051            */
052            public void cacheResult(
053                    java.util.List<com.liferay.portal.model.MembershipRequest> membershipRequests);
054    
055            /**
056            * Creates a new membership request with the primary key. Does not add the membership request to the database.
057            *
058            * @param membershipRequestId the primary key for the new membership request
059            * @return the new membership request
060            */
061            public com.liferay.portal.model.MembershipRequest create(
062                    long membershipRequestId);
063    
064            /**
065            * Removes the membership request with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param membershipRequestId the primary key of the membership request
068            * @return the membership request that was removed
069            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public com.liferay.portal.model.MembershipRequest remove(
073                    long membershipRequestId)
074                    throws com.liferay.portal.NoSuchMembershipRequestException,
075                            com.liferay.portal.kernel.exception.SystemException;
076    
077            public com.liferay.portal.model.MembershipRequest updateImpl(
078                    com.liferay.portal.model.MembershipRequest membershipRequest,
079                    boolean merge)
080                    throws com.liferay.portal.kernel.exception.SystemException;
081    
082            /**
083            * Returns the membership request with the primary key or throws a {@link com.liferay.portal.NoSuchMembershipRequestException} if it could not be found.
084            *
085            * @param membershipRequestId the primary key of the membership request
086            * @return the membership request
087            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
088            * @throws SystemException if a system exception occurred
089            */
090            public com.liferay.portal.model.MembershipRequest findByPrimaryKey(
091                    long membershipRequestId)
092                    throws com.liferay.portal.NoSuchMembershipRequestException,
093                            com.liferay.portal.kernel.exception.SystemException;
094    
095            /**
096            * Returns the membership request with the primary key or returns <code>null</code> if it could not be found.
097            *
098            * @param membershipRequestId the primary key of the membership request
099            * @return the membership request, or <code>null</code> if a membership request with the primary key could not be found
100            * @throws SystemException if a system exception occurred
101            */
102            public com.liferay.portal.model.MembershipRequest fetchByPrimaryKey(
103                    long membershipRequestId)
104                    throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Returns all the membership requests where groupId = &#63;.
108            *
109            * @param groupId the group ID
110            * @return the matching membership requests
111            * @throws SystemException if a system exception occurred
112            */
113            public java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
114                    long groupId)
115                    throws com.liferay.portal.kernel.exception.SystemException;
116    
117            /**
118            * Returns a range of all the membership requests where groupId = &#63;.
119            *
120            * <p>
121            * 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.
122            * </p>
123            *
124            * @param groupId the group ID
125            * @param start the lower bound of the range of membership requests
126            * @param end the upper bound of the range of membership requests (not inclusive)
127            * @return the range of matching membership requests
128            * @throws SystemException if a system exception occurred
129            */
130            public java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
131                    long groupId, int start, int end)
132                    throws com.liferay.portal.kernel.exception.SystemException;
133    
134            /**
135            * Returns an ordered range of all the membership requests where groupId = &#63;.
136            *
137            * <p>
138            * 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.
139            * </p>
140            *
141            * @param groupId the group ID
142            * @param start the lower bound of the range of membership requests
143            * @param end the upper bound of the range of membership requests (not inclusive)
144            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
145            * @return the ordered range of matching membership requests
146            * @throws SystemException if a system exception occurred
147            */
148            public java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
149                    long groupId, int start, int end,
150                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            /**
154            * Returns the first membership request in the ordered set where groupId = &#63;.
155            *
156            * <p>
157            * 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.
158            * </p>
159            *
160            * @param groupId the group ID
161            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
162            * @return the first matching membership request
163            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            public com.liferay.portal.model.MembershipRequest findByGroupId_First(
167                    long groupId,
168                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
169                    throws com.liferay.portal.NoSuchMembershipRequestException,
170                            com.liferay.portal.kernel.exception.SystemException;
171    
172            /**
173            * Returns the last membership request in the ordered set where groupId = &#63;.
174            *
175            * <p>
176            * 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.
177            * </p>
178            *
179            * @param groupId the group ID
180            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
181            * @return the last matching membership request
182            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
183            * @throws SystemException if a system exception occurred
184            */
185            public com.liferay.portal.model.MembershipRequest findByGroupId_Last(
186                    long groupId,
187                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
188                    throws com.liferay.portal.NoSuchMembershipRequestException,
189                            com.liferay.portal.kernel.exception.SystemException;
190    
191            /**
192            * Returns the membership requests before and after the current membership request in the ordered set where groupId = &#63;.
193            *
194            * <p>
195            * 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.
196            * </p>
197            *
198            * @param membershipRequestId the primary key of the current membership request
199            * @param groupId the group ID
200            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
201            * @return the previous, current, and next membership request
202            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
203            * @throws SystemException if a system exception occurred
204            */
205            public com.liferay.portal.model.MembershipRequest[] findByGroupId_PrevAndNext(
206                    long membershipRequestId, long groupId,
207                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208                    throws com.liferay.portal.NoSuchMembershipRequestException,
209                            com.liferay.portal.kernel.exception.SystemException;
210    
211            /**
212            * Returns all the membership requests where userId = &#63;.
213            *
214            * @param userId the user ID
215            * @return the matching membership requests
216            * @throws SystemException if a system exception occurred
217            */
218            public java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
219                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
220    
221            /**
222            * Returns a range of all the membership requests where userId = &#63;.
223            *
224            * <p>
225            * 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.
226            * </p>
227            *
228            * @param userId the user ID
229            * @param start the lower bound of the range of membership requests
230            * @param end the upper bound of the range of membership requests (not inclusive)
231            * @return the range of matching membership requests
232            * @throws SystemException if a system exception occurred
233            */
234            public java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
235                    long userId, int start, int end)
236                    throws com.liferay.portal.kernel.exception.SystemException;
237    
238            /**
239            * Returns an ordered range of all the membership requests where userId = &#63;.
240            *
241            * <p>
242            * 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.
243            * </p>
244            *
245            * @param userId the user ID
246            * @param start the lower bound of the range of membership requests
247            * @param end the upper bound of the range of membership requests (not inclusive)
248            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
249            * @return the ordered range of matching membership requests
250            * @throws SystemException if a system exception occurred
251            */
252            public java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
253                    long userId, int start, int end,
254                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
255                    throws com.liferay.portal.kernel.exception.SystemException;
256    
257            /**
258            * Returns the first membership request in the ordered set where userId = &#63;.
259            *
260            * <p>
261            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
262            * </p>
263            *
264            * @param userId the user ID
265            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
266            * @return the first matching membership request
267            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
268            * @throws SystemException if a system exception occurred
269            */
270            public com.liferay.portal.model.MembershipRequest findByUserId_First(
271                    long userId,
272                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
273                    throws com.liferay.portal.NoSuchMembershipRequestException,
274                            com.liferay.portal.kernel.exception.SystemException;
275    
276            /**
277            * Returns the last membership request in the ordered set where userId = &#63;.
278            *
279            * <p>
280            * 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.
281            * </p>
282            *
283            * @param userId the user ID
284            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
285            * @return the last matching membership request
286            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
287            * @throws SystemException if a system exception occurred
288            */
289            public com.liferay.portal.model.MembershipRequest findByUserId_Last(
290                    long userId,
291                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
292                    throws com.liferay.portal.NoSuchMembershipRequestException,
293                            com.liferay.portal.kernel.exception.SystemException;
294    
295            /**
296            * Returns the membership requests before and after the current membership request in the ordered set where userId = &#63;.
297            *
298            * <p>
299            * 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.
300            * </p>
301            *
302            * @param membershipRequestId the primary key of the current membership request
303            * @param userId the user ID
304            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
305            * @return the previous, current, and next membership request
306            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
307            * @throws SystemException if a system exception occurred
308            */
309            public com.liferay.portal.model.MembershipRequest[] findByUserId_PrevAndNext(
310                    long membershipRequestId, long userId,
311                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
312                    throws com.liferay.portal.NoSuchMembershipRequestException,
313                            com.liferay.portal.kernel.exception.SystemException;
314    
315            /**
316            * Returns all the membership requests where groupId = &#63; and statusId = &#63;.
317            *
318            * @param groupId the group ID
319            * @param statusId the status ID
320            * @return the matching membership requests
321            * @throws SystemException if a system exception occurred
322            */
323            public java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
324                    long groupId, int statusId)
325                    throws com.liferay.portal.kernel.exception.SystemException;
326    
327            /**
328            * Returns a range of all the membership requests where groupId = &#63; and statusId = &#63;.
329            *
330            * <p>
331            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
332            * </p>
333            *
334            * @param groupId the group ID
335            * @param statusId the status ID
336            * @param start the lower bound of the range of membership requests
337            * @param end the upper bound of the range of membership requests (not inclusive)
338            * @return the range of matching membership requests
339            * @throws SystemException if a system exception occurred
340            */
341            public java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
342                    long groupId, int statusId, int start, int end)
343                    throws com.liferay.portal.kernel.exception.SystemException;
344    
345            /**
346            * Returns an ordered range of all the membership requests where groupId = &#63; and statusId = &#63;.
347            *
348            * <p>
349            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
350            * </p>
351            *
352            * @param groupId the group ID
353            * @param statusId the status ID
354            * @param start the lower bound of the range of membership requests
355            * @param end the upper bound of the range of membership requests (not inclusive)
356            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
357            * @return the ordered range of matching membership requests
358            * @throws SystemException if a system exception occurred
359            */
360            public java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
361                    long groupId, int statusId, int start, int end,
362                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
363                    throws com.liferay.portal.kernel.exception.SystemException;
364    
365            /**
366            * Returns the first membership request in the ordered set where groupId = &#63; and statusId = &#63;.
367            *
368            * <p>
369            * 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.
370            * </p>
371            *
372            * @param groupId the group ID
373            * @param statusId the status ID
374            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
375            * @return the first matching membership request
376            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
377            * @throws SystemException if a system exception occurred
378            */
379            public com.liferay.portal.model.MembershipRequest findByG_S_First(
380                    long groupId, int statusId,
381                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
382                    throws com.liferay.portal.NoSuchMembershipRequestException,
383                            com.liferay.portal.kernel.exception.SystemException;
384    
385            /**
386            * Returns the last membership request in the ordered set where groupId = &#63; and statusId = &#63;.
387            *
388            * <p>
389            * 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.
390            * </p>
391            *
392            * @param groupId the group ID
393            * @param statusId the status ID
394            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
395            * @return the last matching membership request
396            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
397            * @throws SystemException if a system exception occurred
398            */
399            public com.liferay.portal.model.MembershipRequest findByG_S_Last(
400                    long groupId, int statusId,
401                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
402                    throws com.liferay.portal.NoSuchMembershipRequestException,
403                            com.liferay.portal.kernel.exception.SystemException;
404    
405            /**
406            * Returns the membership requests before and after the current membership request in the ordered set where groupId = &#63; and statusId = &#63;.
407            *
408            * <p>
409            * 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.
410            * </p>
411            *
412            * @param membershipRequestId the primary key of the current membership request
413            * @param groupId the group ID
414            * @param statusId the status ID
415            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
416            * @return the previous, current, and next membership request
417            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
418            * @throws SystemException if a system exception occurred
419            */
420            public com.liferay.portal.model.MembershipRequest[] findByG_S_PrevAndNext(
421                    long membershipRequestId, long groupId, int statusId,
422                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
423                    throws com.liferay.portal.NoSuchMembershipRequestException,
424                            com.liferay.portal.kernel.exception.SystemException;
425    
426            /**
427            * Returns all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
428            *
429            * @param groupId the group ID
430            * @param userId the user ID
431            * @param statusId the status ID
432            * @return the matching membership requests
433            * @throws SystemException if a system exception occurred
434            */
435            public java.util.List<com.liferay.portal.model.MembershipRequest> findByG_U_S(
436                    long groupId, long userId, int statusId)
437                    throws com.liferay.portal.kernel.exception.SystemException;
438    
439            /**
440            * Returns a range of all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
441            *
442            * <p>
443            * 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.
444            * </p>
445            *
446            * @param groupId the group ID
447            * @param userId the user ID
448            * @param statusId the status ID
449            * @param start the lower bound of the range of membership requests
450            * @param end the upper bound of the range of membership requests (not inclusive)
451            * @return the range of matching membership requests
452            * @throws SystemException if a system exception occurred
453            */
454            public java.util.List<com.liferay.portal.model.MembershipRequest> findByG_U_S(
455                    long groupId, long userId, int statusId, int start, int end)
456                    throws com.liferay.portal.kernel.exception.SystemException;
457    
458            /**
459            * Returns an ordered range of all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
460            *
461            * <p>
462            * 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.
463            * </p>
464            *
465            * @param groupId the group ID
466            * @param userId the user ID
467            * @param statusId the status ID
468            * @param start the lower bound of the range of membership requests
469            * @param end the upper bound of the range of membership requests (not inclusive)
470            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
471            * @return the ordered range of matching membership requests
472            * @throws SystemException if a system exception occurred
473            */
474            public java.util.List<com.liferay.portal.model.MembershipRequest> findByG_U_S(
475                    long groupId, long userId, int statusId, int start, int end,
476                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
477                    throws com.liferay.portal.kernel.exception.SystemException;
478    
479            /**
480            * Returns the first membership request in the ordered set where groupId = &#63; and userId = &#63; and statusId = &#63;.
481            *
482            * <p>
483            * 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.
484            * </p>
485            *
486            * @param groupId the group ID
487            * @param userId the user ID
488            * @param statusId the status ID
489            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
490            * @return the first matching membership request
491            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
492            * @throws SystemException if a system exception occurred
493            */
494            public com.liferay.portal.model.MembershipRequest findByG_U_S_First(
495                    long groupId, long userId, int statusId,
496                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
497                    throws com.liferay.portal.NoSuchMembershipRequestException,
498                            com.liferay.portal.kernel.exception.SystemException;
499    
500            /**
501            * Returns the last membership request in the ordered set where groupId = &#63; and userId = &#63; and statusId = &#63;.
502            *
503            * <p>
504            * 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.
505            * </p>
506            *
507            * @param groupId the group ID
508            * @param userId the user ID
509            * @param statusId the status ID
510            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
511            * @return the last matching membership request
512            * @throws com.liferay.portal.NoSuchMembershipRequestException if a matching membership request could not be found
513            * @throws SystemException if a system exception occurred
514            */
515            public com.liferay.portal.model.MembershipRequest findByG_U_S_Last(
516                    long groupId, long userId, int statusId,
517                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
518                    throws com.liferay.portal.NoSuchMembershipRequestException,
519                            com.liferay.portal.kernel.exception.SystemException;
520    
521            /**
522            * Returns the membership requests before and after the current membership request in the ordered set where groupId = &#63; and userId = &#63; and statusId = &#63;.
523            *
524            * <p>
525            * 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.
526            * </p>
527            *
528            * @param membershipRequestId the primary key of the current membership request
529            * @param groupId the group ID
530            * @param userId the user ID
531            * @param statusId the status ID
532            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
533            * @return the previous, current, and next membership request
534            * @throws com.liferay.portal.NoSuchMembershipRequestException if a membership request with the primary key could not be found
535            * @throws SystemException if a system exception occurred
536            */
537            public com.liferay.portal.model.MembershipRequest[] findByG_U_S_PrevAndNext(
538                    long membershipRequestId, long groupId, long userId, int statusId,
539                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
540                    throws com.liferay.portal.NoSuchMembershipRequestException,
541                            com.liferay.portal.kernel.exception.SystemException;
542    
543            /**
544            * Returns all the membership requests.
545            *
546            * @return the membership requests
547            * @throws SystemException if a system exception occurred
548            */
549            public java.util.List<com.liferay.portal.model.MembershipRequest> findAll()
550                    throws com.liferay.portal.kernel.exception.SystemException;
551    
552            /**
553            * Returns a range of all the membership requests.
554            *
555            * <p>
556            * 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.
557            * </p>
558            *
559            * @param start the lower bound of the range of membership requests
560            * @param end the upper bound of the range of membership requests (not inclusive)
561            * @return the range of membership requests
562            * @throws SystemException if a system exception occurred
563            */
564            public java.util.List<com.liferay.portal.model.MembershipRequest> findAll(
565                    int start, int end)
566                    throws com.liferay.portal.kernel.exception.SystemException;
567    
568            /**
569            * Returns an ordered range of all the membership requests.
570            *
571            * <p>
572            * 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.
573            * </p>
574            *
575            * @param start the lower bound of the range of membership requests
576            * @param end the upper bound of the range of membership requests (not inclusive)
577            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
578            * @return the ordered range of membership requests
579            * @throws SystemException if a system exception occurred
580            */
581            public java.util.List<com.liferay.portal.model.MembershipRequest> findAll(
582                    int start, int end,
583                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
584                    throws com.liferay.portal.kernel.exception.SystemException;
585    
586            /**
587            * Removes all the membership requests where groupId = &#63; from the database.
588            *
589            * @param groupId the group ID
590            * @throws SystemException if a system exception occurred
591            */
592            public void removeByGroupId(long groupId)
593                    throws com.liferay.portal.kernel.exception.SystemException;
594    
595            /**
596            * Removes all the membership requests where userId = &#63; from the database.
597            *
598            * @param userId the user ID
599            * @throws SystemException if a system exception occurred
600            */
601            public void removeByUserId(long userId)
602                    throws com.liferay.portal.kernel.exception.SystemException;
603    
604            /**
605            * Removes all the membership requests where groupId = &#63; and statusId = &#63; from the database.
606            *
607            * @param groupId the group ID
608            * @param statusId the status ID
609            * @throws SystemException if a system exception occurred
610            */
611            public void removeByG_S(long groupId, int statusId)
612                    throws com.liferay.portal.kernel.exception.SystemException;
613    
614            /**
615            * Removes all the membership requests where groupId = &#63; and userId = &#63; and statusId = &#63; from the database.
616            *
617            * @param groupId the group ID
618            * @param userId the user ID
619            * @param statusId the status ID
620            * @throws SystemException if a system exception occurred
621            */
622            public void removeByG_U_S(long groupId, long userId, int statusId)
623                    throws com.liferay.portal.kernel.exception.SystemException;
624    
625            /**
626            * Removes all the membership requests from the database.
627            *
628            * @throws SystemException if a system exception occurred
629            */
630            public void removeAll()
631                    throws com.liferay.portal.kernel.exception.SystemException;
632    
633            /**
634            * Returns the number of membership requests where groupId = &#63;.
635            *
636            * @param groupId the group ID
637            * @return the number of matching membership requests
638            * @throws SystemException if a system exception occurred
639            */
640            public int countByGroupId(long groupId)
641                    throws com.liferay.portal.kernel.exception.SystemException;
642    
643            /**
644            * Returns the number of membership requests where userId = &#63;.
645            *
646            * @param userId the user ID
647            * @return the number of matching membership requests
648            * @throws SystemException if a system exception occurred
649            */
650            public int countByUserId(long userId)
651                    throws com.liferay.portal.kernel.exception.SystemException;
652    
653            /**
654            * Returns the number of membership requests where groupId = &#63; and statusId = &#63;.
655            *
656            * @param groupId the group ID
657            * @param statusId the status ID
658            * @return the number of matching membership requests
659            * @throws SystemException if a system exception occurred
660            */
661            public int countByG_S(long groupId, int statusId)
662                    throws com.liferay.portal.kernel.exception.SystemException;
663    
664            /**
665            * Returns the number of membership requests where groupId = &#63; and userId = &#63; and statusId = &#63;.
666            *
667            * @param groupId the group ID
668            * @param userId the user ID
669            * @param statusId the status ID
670            * @return the number of matching membership requests
671            * @throws SystemException if a system exception occurred
672            */
673            public int countByG_U_S(long groupId, long userId, int statusId)
674                    throws com.liferay.portal.kernel.exception.SystemException;
675    
676            /**
677            * Returns the number of membership requests.
678            *
679            * @return the number of membership requests
680            * @throws SystemException if a system exception occurred
681            */
682            public int countAll()
683                    throws com.liferay.portal.kernel.exception.SystemException;
684    
685            public MembershipRequest remove(MembershipRequest membershipRequest)
686                    throws SystemException;
687    }