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.portlet.messageboards.service.persistence;
24  
25  /**
26   * <a href="MBBanUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class MBBanUtil {
32      public static com.liferay.portlet.messageboards.model.MBBan create(
33          long banId) {
34          return getPersistence().create(banId);
35      }
36  
37      public static com.liferay.portlet.messageboards.model.MBBan remove(
38          long banId)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portlet.messageboards.NoSuchBanException {
41          return getPersistence().remove(banId);
42      }
43  
44      public static com.liferay.portlet.messageboards.model.MBBan remove(
45          com.liferay.portlet.messageboards.model.MBBan mbBan)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(mbBan);
48      }
49  
50      public static com.liferay.portlet.messageboards.model.MBBan update(
51          com.liferay.portlet.messageboards.model.MBBan mbBan)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(mbBan);
54      }
55  
56      public static com.liferay.portlet.messageboards.model.MBBan update(
57          com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
58          throws com.liferay.portal.SystemException {
59          return getPersistence().update(mbBan, merge);
60      }
61  
62      public static com.liferay.portlet.messageboards.model.MBBan updateImpl(
63          com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
64          throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(mbBan, merge);
66      }
67  
68      public static com.liferay.portlet.messageboards.model.MBBan findByPrimaryKey(
69          long banId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portlet.messageboards.NoSuchBanException {
72          return getPersistence().findByPrimaryKey(banId);
73      }
74  
75      public static com.liferay.portlet.messageboards.model.MBBan fetchByPrimaryKey(
76          long banId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(banId);
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.portlet.messageboards.model.MBBan findByGroupId_First(
97          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException, 
99              com.liferay.portlet.messageboards.NoSuchBanException {
100         return getPersistence().findByGroupId_First(groupId, obc);
101     }
102 
103     public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last(
104         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException, 
106             com.liferay.portlet.messageboards.NoSuchBanException {
107         return getPersistence().findByGroupId_Last(groupId, obc);
108     }
109 
110     public static com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext(
111         long banId, long groupId,
112         com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException, 
114             com.liferay.portlet.messageboards.NoSuchBanException {
115         return getPersistence().findByGroupId_PrevAndNext(banId, groupId, obc);
116     }
117 
118     public static java.util.List findByUserId(long userId)
119         throws com.liferay.portal.SystemException {
120         return getPersistence().findByUserId(userId);
121     }
122 
123     public static java.util.List findByUserId(long userId, int begin, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByUserId(userId, begin, end);
126     }
127 
128     public static java.util.List findByUserId(long userId, int begin, int end,
129         com.liferay.portal.kernel.util.OrderByComparator obc)
130         throws com.liferay.portal.SystemException {
131         return getPersistence().findByUserId(userId, begin, end, obc);
132     }
133 
134     public static com.liferay.portlet.messageboards.model.MBBan findByUserId_First(
135         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.SystemException, 
137             com.liferay.portlet.messageboards.NoSuchBanException {
138         return getPersistence().findByUserId_First(userId, obc);
139     }
140 
141     public static com.liferay.portlet.messageboards.model.MBBan findByUserId_Last(
142         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.SystemException, 
144             com.liferay.portlet.messageboards.NoSuchBanException {
145         return getPersistence().findByUserId_Last(userId, obc);
146     }
147 
148     public static com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext(
149         long banId, long userId,
150         com.liferay.portal.kernel.util.OrderByComparator obc)
151         throws com.liferay.portal.SystemException, 
152             com.liferay.portlet.messageboards.NoSuchBanException {
153         return getPersistence().findByUserId_PrevAndNext(banId, userId, obc);
154     }
155 
156     public static java.util.List findByBanUserId(long banUserId)
157         throws com.liferay.portal.SystemException {
158         return getPersistence().findByBanUserId(banUserId);
159     }
160 
161     public static java.util.List findByBanUserId(long banUserId, int begin,
162         int end) throws com.liferay.portal.SystemException {
163         return getPersistence().findByBanUserId(banUserId, begin, end);
164     }
165 
166     public static java.util.List findByBanUserId(long banUserId, int begin,
167         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.SystemException {
169         return getPersistence().findByBanUserId(banUserId, begin, end, obc);
170     }
171 
172     public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First(
173         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
174         throws com.liferay.portal.SystemException, 
175             com.liferay.portlet.messageboards.NoSuchBanException {
176         return getPersistence().findByBanUserId_First(banUserId, obc);
177     }
178 
179     public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last(
180         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
181         throws com.liferay.portal.SystemException, 
182             com.liferay.portlet.messageboards.NoSuchBanException {
183         return getPersistence().findByBanUserId_Last(banUserId, obc);
184     }
185 
186     public static com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext(
187         long banId, long banUserId,
188         com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.SystemException, 
190             com.liferay.portlet.messageboards.NoSuchBanException {
191         return getPersistence().findByBanUserId_PrevAndNext(banId, banUserId,
192             obc);
193     }
194 
195     public static com.liferay.portlet.messageboards.model.MBBan findByG_B(
196         long groupId, long banUserId)
197         throws com.liferay.portal.SystemException, 
198             com.liferay.portlet.messageboards.NoSuchBanException {
199         return getPersistence().findByG_B(groupId, banUserId);
200     }
201 
202     public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
203         long groupId, long banUserId) throws com.liferay.portal.SystemException {
204         return getPersistence().fetchByG_B(groupId, banUserId);
205     }
206 
207     public static java.util.List findWithDynamicQuery(
208         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
209         throws com.liferay.portal.SystemException {
210         return getPersistence().findWithDynamicQuery(queryInitializer);
211     }
212 
213     public static java.util.List findWithDynamicQuery(
214         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
215         int begin, int end) throws com.liferay.portal.SystemException {
216         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
217             end);
218     }
219 
220     public static java.util.List findAll()
221         throws com.liferay.portal.SystemException {
222         return getPersistence().findAll();
223     }
224 
225     public static java.util.List findAll(int begin, int end)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().findAll(begin, end);
228     }
229 
230     public static java.util.List findAll(int begin, int end,
231         com.liferay.portal.kernel.util.OrderByComparator obc)
232         throws com.liferay.portal.SystemException {
233         return getPersistence().findAll(begin, end, obc);
234     }
235 
236     public static void removeByGroupId(long groupId)
237         throws com.liferay.portal.SystemException {
238         getPersistence().removeByGroupId(groupId);
239     }
240 
241     public static void removeByUserId(long userId)
242         throws com.liferay.portal.SystemException {
243         getPersistence().removeByUserId(userId);
244     }
245 
246     public static void removeByBanUserId(long banUserId)
247         throws com.liferay.portal.SystemException {
248         getPersistence().removeByBanUserId(banUserId);
249     }
250 
251     public static void removeByG_B(long groupId, long banUserId)
252         throws com.liferay.portal.SystemException, 
253             com.liferay.portlet.messageboards.NoSuchBanException {
254         getPersistence().removeByG_B(groupId, banUserId);
255     }
256 
257     public static void removeAll() throws com.liferay.portal.SystemException {
258         getPersistence().removeAll();
259     }
260 
261     public static int countByGroupId(long groupId)
262         throws com.liferay.portal.SystemException {
263         return getPersistence().countByGroupId(groupId);
264     }
265 
266     public static int countByUserId(long userId)
267         throws com.liferay.portal.SystemException {
268         return getPersistence().countByUserId(userId);
269     }
270 
271     public static int countByBanUserId(long banUserId)
272         throws com.liferay.portal.SystemException {
273         return getPersistence().countByBanUserId(banUserId);
274     }
275 
276     public static int countByG_B(long groupId, long banUserId)
277         throws com.liferay.portal.SystemException {
278         return getPersistence().countByG_B(groupId, banUserId);
279     }
280 
281     public static int countAll() throws com.liferay.portal.SystemException {
282         return getPersistence().countAll();
283     }
284 
285     public static MBBanPersistence getPersistence() {
286         return _getUtil()._persistence;
287     }
288 
289     public void setPersistence(MBBanPersistence persistence) {
290         _persistence = persistence;
291     }
292 
293     private static MBBanUtil _getUtil() {
294         if (_util == null) {
295             _util = (MBBanUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
296         }
297 
298         return _util;
299     }
300 
301     private static final String _UTIL = MBBanUtil.class.getName();
302     private static MBBanUtil _util;
303     private MBBanPersistence _persistence;
304 }