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.portlet.messageboards.service.persistence;
21  
22  /**
23   * <a href="MBBanUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class MBBanUtil {
29      public static com.liferay.portlet.messageboards.model.MBBan create(
30          long banId) {
31          return getPersistence().create(banId);
32      }
33  
34      public static com.liferay.portlet.messageboards.model.MBBan remove(
35          long banId)
36          throws com.liferay.portal.SystemException,
37              com.liferay.portlet.messageboards.NoSuchBanException {
38          return getPersistence().remove(banId);
39      }
40  
41      public static com.liferay.portlet.messageboards.model.MBBan remove(
42          com.liferay.portlet.messageboards.model.MBBan mbBan)
43          throws com.liferay.portal.SystemException {
44          return getPersistence().remove(mbBan);
45      }
46  
47      /**
48       * @deprecated Use <code>update(MBBan mbBan, boolean merge)</code>.
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      /**
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        mbBan 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 mbBan 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.portlet.messageboards.model.MBBan update(
70          com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
71          throws com.liferay.portal.SystemException {
72          return getPersistence().update(mbBan, merge);
73      }
74  
75      public static com.liferay.portlet.messageboards.model.MBBan updateImpl(
76          com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().updateImpl(mbBan, merge);
79      }
80  
81      public static com.liferay.portlet.messageboards.model.MBBan findByPrimaryKey(
82          long banId)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portlet.messageboards.NoSuchBanException {
85          return getPersistence().findByPrimaryKey(banId);
86      }
87  
88      public static com.liferay.portlet.messageboards.model.MBBan fetchByPrimaryKey(
89          long banId) throws com.liferay.portal.SystemException {
90          return getPersistence().fetchByPrimaryKey(banId);
91      }
92  
93      public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
94          long groupId) throws com.liferay.portal.SystemException {
95          return getPersistence().findByGroupId(groupId);
96      }
97  
98      public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> 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.portlet.messageboards.model.MBBan> 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.portlet.messageboards.model.MBBan findByGroupId_First(
112         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
113         throws com.liferay.portal.SystemException,
114             com.liferay.portlet.messageboards.NoSuchBanException {
115         return getPersistence().findByGroupId_First(groupId, obc);
116     }
117 
118     public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last(
119         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
120         throws com.liferay.portal.SystemException,
121             com.liferay.portlet.messageboards.NoSuchBanException {
122         return getPersistence().findByGroupId_Last(groupId, obc);
123     }
124 
125     public static com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext(
126         long banId, long groupId,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException,
129             com.liferay.portlet.messageboards.NoSuchBanException {
130         return getPersistence().findByGroupId_PrevAndNext(banId, groupId, obc);
131     }
132 
133     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
134         long userId) throws com.liferay.portal.SystemException {
135         return getPersistence().findByUserId(userId);
136     }
137 
138     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
139         long userId, int start, int end)
140         throws com.liferay.portal.SystemException {
141         return getPersistence().findByUserId(userId, start, end);
142     }
143 
144     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
145         long userId, int start, int end,
146         com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException {
148         return getPersistence().findByUserId(userId, start, end, obc);
149     }
150 
151     public static com.liferay.portlet.messageboards.model.MBBan findByUserId_First(
152         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException,
154             com.liferay.portlet.messageboards.NoSuchBanException {
155         return getPersistence().findByUserId_First(userId, obc);
156     }
157 
158     public static com.liferay.portlet.messageboards.model.MBBan findByUserId_Last(
159         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
160         throws com.liferay.portal.SystemException,
161             com.liferay.portlet.messageboards.NoSuchBanException {
162         return getPersistence().findByUserId_Last(userId, obc);
163     }
164 
165     public static com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext(
166         long banId, long userId,
167         com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.SystemException,
169             com.liferay.portlet.messageboards.NoSuchBanException {
170         return getPersistence().findByUserId_PrevAndNext(banId, userId, obc);
171     }
172 
173     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
174         long banUserId) throws com.liferay.portal.SystemException {
175         return getPersistence().findByBanUserId(banUserId);
176     }
177 
178     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
179         long banUserId, int start, int end)
180         throws com.liferay.portal.SystemException {
181         return getPersistence().findByBanUserId(banUserId, start, end);
182     }
183 
184     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
185         long banUserId, int start, int end,
186         com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.SystemException {
188         return getPersistence().findByBanUserId(banUserId, start, end, obc);
189     }
190 
191     public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First(
192         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
193         throws com.liferay.portal.SystemException,
194             com.liferay.portlet.messageboards.NoSuchBanException {
195         return getPersistence().findByBanUserId_First(banUserId, obc);
196     }
197 
198     public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last(
199         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
200         throws com.liferay.portal.SystemException,
201             com.liferay.portlet.messageboards.NoSuchBanException {
202         return getPersistence().findByBanUserId_Last(banUserId, obc);
203     }
204 
205     public static com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext(
206         long banId, long banUserId,
207         com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException,
209             com.liferay.portlet.messageboards.NoSuchBanException {
210         return getPersistence()
211                    .findByBanUserId_PrevAndNext(banId, banUserId, obc);
212     }
213 
214     public static com.liferay.portlet.messageboards.model.MBBan findByG_B(
215         long groupId, long banUserId)
216         throws com.liferay.portal.SystemException,
217             com.liferay.portlet.messageboards.NoSuchBanException {
218         return getPersistence().findByG_B(groupId, banUserId);
219     }
220 
221     public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
222         long groupId, long banUserId) throws com.liferay.portal.SystemException {
223         return getPersistence().fetchByG_B(groupId, banUserId);
224     }
225 
226     public static java.util.List<Object> findWithDynamicQuery(
227         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
228         throws com.liferay.portal.SystemException {
229         return getPersistence().findWithDynamicQuery(dynamicQuery);
230     }
231 
232     public static java.util.List<Object> findWithDynamicQuery(
233         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
234         int end) throws com.liferay.portal.SystemException {
235         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
236     }
237 
238     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll()
239         throws com.liferay.portal.SystemException {
240         return getPersistence().findAll();
241     }
242 
243     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
244         int start, int end) throws com.liferay.portal.SystemException {
245         return getPersistence().findAll(start, end);
246     }
247 
248     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
249         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
250         throws com.liferay.portal.SystemException {
251         return getPersistence().findAll(start, end, obc);
252     }
253 
254     public static void removeByGroupId(long groupId)
255         throws com.liferay.portal.SystemException {
256         getPersistence().removeByGroupId(groupId);
257     }
258 
259     public static void removeByUserId(long userId)
260         throws com.liferay.portal.SystemException {
261         getPersistence().removeByUserId(userId);
262     }
263 
264     public static void removeByBanUserId(long banUserId)
265         throws com.liferay.portal.SystemException {
266         getPersistence().removeByBanUserId(banUserId);
267     }
268 
269     public static void removeByG_B(long groupId, long banUserId)
270         throws com.liferay.portal.SystemException,
271             com.liferay.portlet.messageboards.NoSuchBanException {
272         getPersistence().removeByG_B(groupId, banUserId);
273     }
274 
275     public static void removeAll() throws com.liferay.portal.SystemException {
276         getPersistence().removeAll();
277     }
278 
279     public static int countByGroupId(long groupId)
280         throws com.liferay.portal.SystemException {
281         return getPersistence().countByGroupId(groupId);
282     }
283 
284     public static int countByUserId(long userId)
285         throws com.liferay.portal.SystemException {
286         return getPersistence().countByUserId(userId);
287     }
288 
289     public static int countByBanUserId(long banUserId)
290         throws com.liferay.portal.SystemException {
291         return getPersistence().countByBanUserId(banUserId);
292     }
293 
294     public static int countByG_B(long groupId, long banUserId)
295         throws com.liferay.portal.SystemException {
296         return getPersistence().countByG_B(groupId, banUserId);
297     }
298 
299     public static int countAll() throws com.liferay.portal.SystemException {
300         return getPersistence().countAll();
301     }
302 
303     public static MBBanPersistence getPersistence() {
304         return _persistence;
305     }
306 
307     public void setPersistence(MBBanPersistence persistence) {
308         _persistence = persistence;
309     }
310 
311     private static MBBanPersistence _persistence;
312 }