1   /**
2    * Copyright (c) 2000-2008 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.SystemException, 
40              com.liferay.portal.NoSuchMembershipRequestException {
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      public static com.liferay.portal.model.MembershipRequest update(
51          com.liferay.portal.model.MembershipRequest membershipRequest)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(membershipRequest);
54      }
55  
56      public static com.liferay.portal.model.MembershipRequest update(
57          com.liferay.portal.model.MembershipRequest membershipRequest,
58          boolean merge) throws com.liferay.portal.SystemException {
59          return getPersistence().update(membershipRequest, merge);
60      }
61  
62      public static com.liferay.portal.model.MembershipRequest updateImpl(
63          com.liferay.portal.model.MembershipRequest membershipRequest,
64          boolean merge) throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(membershipRequest, merge);
66      }
67  
68      public static com.liferay.portal.model.MembershipRequest findByPrimaryKey(
69          long membershipRequestId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portal.NoSuchMembershipRequestException {
72          return getPersistence().findByPrimaryKey(membershipRequestId);
73      }
74  
75      public static com.liferay.portal.model.MembershipRequest fetchByPrimaryKey(
76          long membershipRequestId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(membershipRequestId);
78      }
79  
80      public static java.util.List findByGroupId(long groupId)
81          throws com.liferay.portal.SystemException {
82          return getPersistence().findByGroupId(groupId);
83      }
84  
85      public static java.util.List findByGroupId(long groupId, int begin, int end)
86          throws com.liferay.portal.SystemException {
87          return getPersistence().findByGroupId(groupId, begin, end);
88      }
89  
90      public static java.util.List findByGroupId(long groupId, int begin,
91          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findByGroupId(groupId, begin, end, obc);
94      }
95  
96      public static com.liferay.portal.model.MembershipRequest findByGroupId_First(
97          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portal.NoSuchMembershipRequestException {
100         return getPersistence().findByGroupId_First(groupId, obc);
101     }
102 
103     public static com.liferay.portal.model.MembershipRequest findByGroupId_Last(
104         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portal.NoSuchMembershipRequestException {
107         return getPersistence().findByGroupId_Last(groupId, obc);
108     }
109 
110     public static com.liferay.portal.model.MembershipRequest[] findByGroupId_PrevAndNext(
111         long membershipRequestId, long groupId,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portal.NoSuchMembershipRequestException {
115         return getPersistence().findByGroupId_PrevAndNext(membershipRequestId,
116             groupId, obc);
117     }
118 
119     public static java.util.List findByUserId(long userId)
120         throws com.liferay.portal.SystemException {
121         return getPersistence().findByUserId(userId);
122     }
123 
124     public static java.util.List findByUserId(long userId, int begin, int end)
125         throws com.liferay.portal.SystemException {
126         return getPersistence().findByUserId(userId, begin, end);
127     }
128 
129     public static java.util.List findByUserId(long userId, int begin, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByUserId(userId, begin, end, obc);
133     }
134 
135     public static com.liferay.portal.model.MembershipRequest findByUserId_First(
136         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException, 
138             com.liferay.portal.NoSuchMembershipRequestException {
139         return getPersistence().findByUserId_First(userId, obc);
140     }
141 
142     public static com.liferay.portal.model.MembershipRequest findByUserId_Last(
143         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException, 
145             com.liferay.portal.NoSuchMembershipRequestException {
146         return getPersistence().findByUserId_Last(userId, obc);
147     }
148 
149     public static com.liferay.portal.model.MembershipRequest[] findByUserId_PrevAndNext(
150         long membershipRequestId, long userId,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException, 
153             com.liferay.portal.NoSuchMembershipRequestException {
154         return getPersistence().findByUserId_PrevAndNext(membershipRequestId,
155             userId, obc);
156     }
157 
158     public static java.util.List findByG_S(long groupId, int statusId)
159         throws com.liferay.portal.SystemException {
160         return getPersistence().findByG_S(groupId, statusId);
161     }
162 
163     public static java.util.List findByG_S(long groupId, int statusId,
164         int begin, int end) throws com.liferay.portal.SystemException {
165         return getPersistence().findByG_S(groupId, statusId, begin, end);
166     }
167 
168     public static java.util.List findByG_S(long groupId, int statusId,
169         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
170         throws com.liferay.portal.SystemException {
171         return getPersistence().findByG_S(groupId, statusId, begin, end, obc);
172     }
173 
174     public static com.liferay.portal.model.MembershipRequest findByG_S_First(
175         long groupId, int statusId,
176         com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException, 
178             com.liferay.portal.NoSuchMembershipRequestException {
179         return getPersistence().findByG_S_First(groupId, statusId, obc);
180     }
181 
182     public static com.liferay.portal.model.MembershipRequest findByG_S_Last(
183         long groupId, int statusId,
184         com.liferay.portal.kernel.util.OrderByComparator obc)
185         throws com.liferay.portal.SystemException, 
186             com.liferay.portal.NoSuchMembershipRequestException {
187         return getPersistence().findByG_S_Last(groupId, statusId, obc);
188     }
189 
190     public static com.liferay.portal.model.MembershipRequest[] findByG_S_PrevAndNext(
191         long membershipRequestId, long groupId, int statusId,
192         com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.SystemException, 
194             com.liferay.portal.NoSuchMembershipRequestException {
195         return getPersistence().findByG_S_PrevAndNext(membershipRequestId,
196             groupId, statusId, obc);
197     }
198 
199     public static java.util.List findWithDynamicQuery(
200         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().findWithDynamicQuery(queryInitializer);
203     }
204 
205     public static java.util.List findWithDynamicQuery(
206         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
207         int begin, int end) throws com.liferay.portal.SystemException {
208         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
209             end);
210     }
211 
212     public static java.util.List findAll()
213         throws com.liferay.portal.SystemException {
214         return getPersistence().findAll();
215     }
216 
217     public static java.util.List findAll(int begin, int end)
218         throws com.liferay.portal.SystemException {
219         return getPersistence().findAll(begin, end);
220     }
221 
222     public static java.util.List findAll(int begin, int end,
223         com.liferay.portal.kernel.util.OrderByComparator obc)
224         throws com.liferay.portal.SystemException {
225         return getPersistence().findAll(begin, end, obc);
226     }
227 
228     public static void removeByGroupId(long groupId)
229         throws com.liferay.portal.SystemException {
230         getPersistence().removeByGroupId(groupId);
231     }
232 
233     public static void removeByUserId(long userId)
234         throws com.liferay.portal.SystemException {
235         getPersistence().removeByUserId(userId);
236     }
237 
238     public static void removeByG_S(long groupId, int statusId)
239         throws com.liferay.portal.SystemException {
240         getPersistence().removeByG_S(groupId, statusId);
241     }
242 
243     public static void removeAll() throws com.liferay.portal.SystemException {
244         getPersistence().removeAll();
245     }
246 
247     public static int countByGroupId(long groupId)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().countByGroupId(groupId);
250     }
251 
252     public static int countByUserId(long userId)
253         throws com.liferay.portal.SystemException {
254         return getPersistence().countByUserId(userId);
255     }
256 
257     public static int countByG_S(long groupId, int statusId)
258         throws com.liferay.portal.SystemException {
259         return getPersistence().countByG_S(groupId, statusId);
260     }
261 
262     public static int countAll() throws com.liferay.portal.SystemException {
263         return getPersistence().countAll();
264     }
265 
266     public static MembershipRequestPersistence getPersistence() {
267         return _getUtil()._persistence;
268     }
269 
270     public void setPersistence(MembershipRequestPersistence persistence) {
271         _persistence = persistence;
272     }
273 
274     private static MembershipRequestUtil _getUtil() {
275         if (_util == null) {
276             _util = (MembershipRequestUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
277         }
278 
279         return _util;
280     }
281 
282     private static final String _UTIL = MembershipRequestUtil.class.getName();
283     private static MembershipRequestUtil _util;
284     private MembershipRequestPersistence _persistence;
285 }