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 void cacheResult(
30          com.liferay.portlet.messageboards.model.MBBan mbBan) {
31          getPersistence().cacheResult(mbBan);
32      }
33  
34      public static void cacheResult(
35          java.util.List<com.liferay.portlet.messageboards.model.MBBan> mbBans) {
36          getPersistence().cacheResult(mbBans);
37      }
38  
39      public static void clearCache() {
40          getPersistence().clearCache();
41      }
42  
43      public static com.liferay.portlet.messageboards.model.MBBan create(
44          long banId) {
45          return getPersistence().create(banId);
46      }
47  
48      public static com.liferay.portlet.messageboards.model.MBBan remove(
49          long banId)
50          throws com.liferay.portal.SystemException,
51              com.liferay.portlet.messageboards.NoSuchBanException {
52          return getPersistence().remove(banId);
53      }
54  
55      public static com.liferay.portlet.messageboards.model.MBBan remove(
56          com.liferay.portlet.messageboards.model.MBBan mbBan)
57          throws com.liferay.portal.SystemException {
58          return getPersistence().remove(mbBan);
59      }
60  
61      /**
62       * @deprecated Use <code>update(MBBan mbBan, boolean merge)</code>.
63       */
64      public static com.liferay.portlet.messageboards.model.MBBan update(
65          com.liferay.portlet.messageboards.model.MBBan mbBan)
66          throws com.liferay.portal.SystemException {
67          return getPersistence().update(mbBan);
68      }
69  
70      /**
71       * Add, update, or merge, the entity. This method also calls the model
72       * listeners to trigger the proper events associated with adding, deleting,
73       * or updating an entity.
74       *
75       * @param        mbBan the entity to add, update, or merge
76       * @param        merge boolean value for whether to merge the entity. The
77       *                default value is false. Setting merge to true is more
78       *                expensive and should only be true when mbBan is
79       *                transient. See LEP-5473 for a detailed discussion of this
80       *                method.
81       * @return        true if the portlet can be displayed via Ajax
82       */
83      public static com.liferay.portlet.messageboards.model.MBBan update(
84          com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
85          throws com.liferay.portal.SystemException {
86          return getPersistence().update(mbBan, merge);
87      }
88  
89      public static com.liferay.portlet.messageboards.model.MBBan updateImpl(
90          com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
91          throws com.liferay.portal.SystemException {
92          return getPersistence().updateImpl(mbBan, merge);
93      }
94  
95      public static com.liferay.portlet.messageboards.model.MBBan findByPrimaryKey(
96          long banId)
97          throws com.liferay.portal.SystemException,
98              com.liferay.portlet.messageboards.NoSuchBanException {
99          return getPersistence().findByPrimaryKey(banId);
100     }
101 
102     public static com.liferay.portlet.messageboards.model.MBBan fetchByPrimaryKey(
103         long banId) throws com.liferay.portal.SystemException {
104         return getPersistence().fetchByPrimaryKey(banId);
105     }
106 
107     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
108         long groupId) throws com.liferay.portal.SystemException {
109         return getPersistence().findByGroupId(groupId);
110     }
111 
112     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
113         long groupId, int start, int end)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().findByGroupId(groupId, start, end);
116     }
117 
118     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
119         long groupId, int start, int end,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findByGroupId(groupId, start, end, obc);
123     }
124 
125     public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_First(
126         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.SystemException,
128             com.liferay.portlet.messageboards.NoSuchBanException {
129         return getPersistence().findByGroupId_First(groupId, obc);
130     }
131 
132     public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last(
133         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.messageboards.NoSuchBanException {
136         return getPersistence().findByGroupId_Last(groupId, obc);
137     }
138 
139     public static com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext(
140         long banId, long groupId,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.messageboards.NoSuchBanException {
144         return getPersistence().findByGroupId_PrevAndNext(banId, groupId, obc);
145     }
146 
147     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
148         long userId) throws com.liferay.portal.SystemException {
149         return getPersistence().findByUserId(userId);
150     }
151 
152     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
153         long userId, int start, int end)
154         throws com.liferay.portal.SystemException {
155         return getPersistence().findByUserId(userId, start, end);
156     }
157 
158     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
159         long userId, int start, int end,
160         com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.SystemException {
162         return getPersistence().findByUserId(userId, start, end, obc);
163     }
164 
165     public static com.liferay.portlet.messageboards.model.MBBan findByUserId_First(
166         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
167         throws com.liferay.portal.SystemException,
168             com.liferay.portlet.messageboards.NoSuchBanException {
169         return getPersistence().findByUserId_First(userId, obc);
170     }
171 
172     public static com.liferay.portlet.messageboards.model.MBBan findByUserId_Last(
173         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
174         throws com.liferay.portal.SystemException,
175             com.liferay.portlet.messageboards.NoSuchBanException {
176         return getPersistence().findByUserId_Last(userId, obc);
177     }
178 
179     public static com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext(
180         long banId, long userId,
181         com.liferay.portal.kernel.util.OrderByComparator obc)
182         throws com.liferay.portal.SystemException,
183             com.liferay.portlet.messageboards.NoSuchBanException {
184         return getPersistence().findByUserId_PrevAndNext(banId, userId, obc);
185     }
186 
187     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
188         long banUserId) throws com.liferay.portal.SystemException {
189         return getPersistence().findByBanUserId(banUserId);
190     }
191 
192     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
193         long banUserId, int start, int end)
194         throws com.liferay.portal.SystemException {
195         return getPersistence().findByBanUserId(banUserId, start, end);
196     }
197 
198     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
199         long banUserId, int start, int end,
200         com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException {
202         return getPersistence().findByBanUserId(banUserId, start, end, obc);
203     }
204 
205     public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First(
206         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.SystemException,
208             com.liferay.portlet.messageboards.NoSuchBanException {
209         return getPersistence().findByBanUserId_First(banUserId, obc);
210     }
211 
212     public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last(
213         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException,
215             com.liferay.portlet.messageboards.NoSuchBanException {
216         return getPersistence().findByBanUserId_Last(banUserId, obc);
217     }
218 
219     public static com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext(
220         long banId, long banUserId,
221         com.liferay.portal.kernel.util.OrderByComparator obc)
222         throws com.liferay.portal.SystemException,
223             com.liferay.portlet.messageboards.NoSuchBanException {
224         return getPersistence()
225                    .findByBanUserId_PrevAndNext(banId, banUserId, obc);
226     }
227 
228     public static com.liferay.portlet.messageboards.model.MBBan findByG_B(
229         long groupId, long banUserId)
230         throws com.liferay.portal.SystemException,
231             com.liferay.portlet.messageboards.NoSuchBanException {
232         return getPersistence().findByG_B(groupId, banUserId);
233     }
234 
235     public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
236         long groupId, long banUserId) throws com.liferay.portal.SystemException {
237         return getPersistence().fetchByG_B(groupId, banUserId);
238     }
239 
240     public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
241         long groupId, long banUserId, boolean retrieveFromCache)
242         throws com.liferay.portal.SystemException {
243         return getPersistence().fetchByG_B(groupId, banUserId, retrieveFromCache);
244     }
245 
246     public static java.util.List<Object> findWithDynamicQuery(
247         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().findWithDynamicQuery(dynamicQuery);
250     }
251 
252     public static java.util.List<Object> findWithDynamicQuery(
253         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
254         int end) throws com.liferay.portal.SystemException {
255         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
256     }
257 
258     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll()
259         throws com.liferay.portal.SystemException {
260         return getPersistence().findAll();
261     }
262 
263     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
264         int start, int end) throws com.liferay.portal.SystemException {
265         return getPersistence().findAll(start, end);
266     }
267 
268     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
269         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
270         throws com.liferay.portal.SystemException {
271         return getPersistence().findAll(start, end, obc);
272     }
273 
274     public static void removeByGroupId(long groupId)
275         throws com.liferay.portal.SystemException {
276         getPersistence().removeByGroupId(groupId);
277     }
278 
279     public static void removeByUserId(long userId)
280         throws com.liferay.portal.SystemException {
281         getPersistence().removeByUserId(userId);
282     }
283 
284     public static void removeByBanUserId(long banUserId)
285         throws com.liferay.portal.SystemException {
286         getPersistence().removeByBanUserId(banUserId);
287     }
288 
289     public static void removeByG_B(long groupId, long banUserId)
290         throws com.liferay.portal.SystemException,
291             com.liferay.portlet.messageboards.NoSuchBanException {
292         getPersistence().removeByG_B(groupId, banUserId);
293     }
294 
295     public static void removeAll() throws com.liferay.portal.SystemException {
296         getPersistence().removeAll();
297     }
298 
299     public static int countByGroupId(long groupId)
300         throws com.liferay.portal.SystemException {
301         return getPersistence().countByGroupId(groupId);
302     }
303 
304     public static int countByUserId(long userId)
305         throws com.liferay.portal.SystemException {
306         return getPersistence().countByUserId(userId);
307     }
308 
309     public static int countByBanUserId(long banUserId)
310         throws com.liferay.portal.SystemException {
311         return getPersistence().countByBanUserId(banUserId);
312     }
313 
314     public static int countByG_B(long groupId, long banUserId)
315         throws com.liferay.portal.SystemException {
316         return getPersistence().countByG_B(groupId, banUserId);
317     }
318 
319     public static int countAll() throws com.liferay.portal.SystemException {
320         return getPersistence().countAll();
321     }
322 
323     public static MBBanPersistence getPersistence() {
324         return _persistence;
325     }
326 
327     public void setPersistence(MBBanPersistence persistence) {
328         _persistence = persistence;
329     }
330 
331     private static MBBanPersistence _persistence;
332 }