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