1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  /**
26   * <a href="MembershipRequestUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class MembershipRequestUtil {
32      public static com.liferay.portal.model.MembershipRequest create(
33          long membershipRequestId) {
34          return getPersistence().create(membershipRequestId);
35      }
36  
37      public static com.liferay.portal.model.MembershipRequest remove(
38          long membershipRequestId)
39          throws com.liferay.portal.NoSuchMembershipRequestException,
40              com.liferay.portal.SystemException {
41          return getPersistence().remove(membershipRequestId);
42      }
43  
44      public static com.liferay.portal.model.MembershipRequest remove(
45          com.liferay.portal.model.MembershipRequest membershipRequest)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(membershipRequest);
48      }
49  
50      /**
51       * @deprecated Use <code>update(MembershipRequest membershipRequest, boolean merge)</code>.
52       */
53      public static com.liferay.portal.model.MembershipRequest update(
54          com.liferay.portal.model.MembershipRequest membershipRequest)
55          throws com.liferay.portal.SystemException {
56          return getPersistence().update(membershipRequest);
57      }
58  
59      /**
60       * Add, update, or merge, the entity. This method also calls the model
61       * listeners to trigger the proper events associated with adding, deleting,
62       * or updating an entity.
63       *
64       * @param        membershipRequest the entity to add, update, or merge
65       * @param        merge boolean value for whether to merge the entity. The
66       *                default value is false. Setting merge to true is more
67       *                expensive and should only be true when membershipRequest is
68       *                transient. See LEP-5473 for a detailed discussion of this
69       *                method.
70       * @return        true if the portlet can be displayed via Ajax
71       */
72      public static com.liferay.portal.model.MembershipRequest update(
73          com.liferay.portal.model.MembershipRequest membershipRequest,
74          boolean merge) throws com.liferay.portal.SystemException {
75          return getPersistence().update(membershipRequest, merge);
76      }
77  
78      public static com.liferay.portal.model.MembershipRequest updateImpl(
79          com.liferay.portal.model.MembershipRequest membershipRequest,
80          boolean merge) throws com.liferay.portal.SystemException {
81          return getPersistence().updateImpl(membershipRequest, merge);
82      }
83  
84      public static com.liferay.portal.model.MembershipRequest findByPrimaryKey(
85          long membershipRequestId)
86          throws com.liferay.portal.NoSuchMembershipRequestException,
87              com.liferay.portal.SystemException {
88          return getPersistence().findByPrimaryKey(membershipRequestId);
89      }
90  
91      public static com.liferay.portal.model.MembershipRequest fetchByPrimaryKey(
92          long membershipRequestId) throws com.liferay.portal.SystemException {
93          return getPersistence().fetchByPrimaryKey(membershipRequestId);
94      }
95  
96      public static java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
97          long groupId) throws com.liferay.portal.SystemException {
98          return getPersistence().findByGroupId(groupId);
99      }
100 
101     public static java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
102         long groupId, int start, int end)
103         throws com.liferay.portal.SystemException {
104         return getPersistence().findByGroupId(groupId, start, end);
105     }
106 
107     public static java.util.List<com.liferay.portal.model.MembershipRequest> findByGroupId(
108         long groupId, int start, int end,
109         com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.SystemException {
111         return getPersistence().findByGroupId(groupId, start, end, obc);
112     }
113 
114     public static com.liferay.portal.model.MembershipRequest findByGroupId_First(
115         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.NoSuchMembershipRequestException,
117             com.liferay.portal.SystemException {
118         return getPersistence().findByGroupId_First(groupId, obc);
119     }
120 
121     public static com.liferay.portal.model.MembershipRequest findByGroupId_Last(
122         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.NoSuchMembershipRequestException,
124             com.liferay.portal.SystemException {
125         return getPersistence().findByGroupId_Last(groupId, obc);
126     }
127 
128     public static com.liferay.portal.model.MembershipRequest[] findByGroupId_PrevAndNext(
129         long membershipRequestId, long groupId,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.NoSuchMembershipRequestException,
132             com.liferay.portal.SystemException {
133         return getPersistence()
134                    .findByGroupId_PrevAndNext(membershipRequestId, groupId, obc);
135     }
136 
137     public static java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
138         long userId) throws com.liferay.portal.SystemException {
139         return getPersistence().findByUserId(userId);
140     }
141 
142     public static java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
143         long userId, int start, int end)
144         throws com.liferay.portal.SystemException {
145         return getPersistence().findByUserId(userId, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portal.model.MembershipRequest> findByUserId(
149         long userId, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException {
152         return getPersistence().findByUserId(userId, start, end, obc);
153     }
154 
155     public static com.liferay.portal.model.MembershipRequest findByUserId_First(
156         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.NoSuchMembershipRequestException,
158             com.liferay.portal.SystemException {
159         return getPersistence().findByUserId_First(userId, obc);
160     }
161 
162     public static com.liferay.portal.model.MembershipRequest findByUserId_Last(
163         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
164         throws com.liferay.portal.NoSuchMembershipRequestException,
165             com.liferay.portal.SystemException {
166         return getPersistence().findByUserId_Last(userId, obc);
167     }
168 
169     public static com.liferay.portal.model.MembershipRequest[] findByUserId_PrevAndNext(
170         long membershipRequestId, long userId,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.NoSuchMembershipRequestException,
173             com.liferay.portal.SystemException {
174         return getPersistence()
175                    .findByUserId_PrevAndNext(membershipRequestId, userId, obc);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
179         long groupId, int statusId) throws com.liferay.portal.SystemException {
180         return getPersistence().findByG_S(groupId, statusId);
181     }
182 
183     public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
184         long groupId, int statusId, int start, int end)
185         throws com.liferay.portal.SystemException {
186         return getPersistence().findByG_S(groupId, statusId, start, end);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.MembershipRequest> findByG_S(
190         long groupId, int statusId, int start, int end,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException {
193         return getPersistence().findByG_S(groupId, statusId, start, end, obc);
194     }
195 
196     public static com.liferay.portal.model.MembershipRequest findByG_S_First(
197         long groupId, int statusId,
198         com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.NoSuchMembershipRequestException,
200             com.liferay.portal.SystemException {
201         return getPersistence().findByG_S_First(groupId, statusId, obc);
202     }
203 
204     public static com.liferay.portal.model.MembershipRequest findByG_S_Last(
205         long groupId, int statusId,
206         com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.NoSuchMembershipRequestException,
208             com.liferay.portal.SystemException {
209         return getPersistence().findByG_S_Last(groupId, statusId, obc);
210     }
211 
212     public static com.liferay.portal.model.MembershipRequest[] findByG_S_PrevAndNext(
213         long membershipRequestId, long groupId, int statusId,
214         com.liferay.portal.kernel.util.OrderByComparator obc)
215         throws com.liferay.portal.NoSuchMembershipRequestException,
216             com.liferay.portal.SystemException {
217         return getPersistence()
218                    .findByG_S_PrevAndNext(membershipRequestId, groupId,
219             statusId, obc);
220     }
221 
222     public static java.util.List<Object> findWithDynamicQuery(
223         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
224         throws com.liferay.portal.SystemException {
225         return getPersistence().findWithDynamicQuery(dynamicQuery);
226     }
227 
228     public static java.util.List<Object> findWithDynamicQuery(
229         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
230         int end) throws com.liferay.portal.SystemException {
231         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
232     }
233 
234     public static java.util.List<com.liferay.portal.model.MembershipRequest> findAll()
235         throws com.liferay.portal.SystemException {
236         return getPersistence().findAll();
237     }
238 
239     public static java.util.List<com.liferay.portal.model.MembershipRequest> findAll(
240         int start, int end) throws com.liferay.portal.SystemException {
241         return getPersistence().findAll(start, end);
242     }
243 
244     public static java.util.List<com.liferay.portal.model.MembershipRequest> findAll(
245         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException {
247         return getPersistence().findAll(start, end, obc);
248     }
249 
250     public static void removeByGroupId(long groupId)
251         throws com.liferay.portal.SystemException {
252         getPersistence().removeByGroupId(groupId);
253     }
254 
255     public static void removeByUserId(long userId)
256         throws com.liferay.portal.SystemException {
257         getPersistence().removeByUserId(userId);
258     }
259 
260     public static void removeByG_S(long groupId, int statusId)
261         throws com.liferay.portal.SystemException {
262         getPersistence().removeByG_S(groupId, statusId);
263     }
264 
265     public static void removeAll() throws com.liferay.portal.SystemException {
266         getPersistence().removeAll();
267     }
268 
269     public static int countByGroupId(long groupId)
270         throws com.liferay.portal.SystemException {
271         return getPersistence().countByGroupId(groupId);
272     }
273 
274     public static int countByUserId(long userId)
275         throws com.liferay.portal.SystemException {
276         return getPersistence().countByUserId(userId);
277     }
278 
279     public static int countByG_S(long groupId, int statusId)
280         throws com.liferay.portal.SystemException {
281         return getPersistence().countByG_S(groupId, statusId);
282     }
283 
284     public static int countAll() throws com.liferay.portal.SystemException {
285         return getPersistence().countAll();
286     }
287 
288     public static MembershipRequestPersistence getPersistence() {
289         return _persistence;
290     }
291 
292     public void setPersistence(MembershipRequestPersistence persistence) {
293         _persistence = persistence;
294     }
295 
296     private static MembershipRequestPersistence _persistence;
297 }