1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  import com.liferay.portal.SystemException;
26  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28  
29  import com.liferay.portlet.messageboards.model.MBBan;
30  
31  import java.util.List;
32  
33  /**
34   * <a href="MBBanUtil.java.html"><b><i>View Source</i></b></a>
35   *
36   * <p>
37   * ServiceBuilder generated this class. Modifications in this class will be
38   * overwritten the next time is generated.
39   * </p>
40   *
41   * @author    Brian Wing Shun Chan
42   * @see       MBBanPersistence
43   * @see       MBBanPersistenceImpl
44   * @generated
45   */
46  public class MBBanUtil {
47      /**
48       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
49       */
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
58          throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
64       */
65      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
66          int start, int end) throws SystemException {
67          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
72       */
73      public static MBBan remove(MBBan mbBan) throws SystemException {
74          return getPersistence().remove(mbBan);
75      }
76  
77      /**
78       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
79       */
80      public static MBBan update(MBBan mbBan, boolean merge)
81          throws SystemException {
82          return getPersistence().update(mbBan, merge);
83      }
84  
85      public static void cacheResult(
86          com.liferay.portlet.messageboards.model.MBBan mbBan) {
87          getPersistence().cacheResult(mbBan);
88      }
89  
90      public static void cacheResult(
91          java.util.List<com.liferay.portlet.messageboards.model.MBBan> mbBans) {
92          getPersistence().cacheResult(mbBans);
93      }
94  
95      public static com.liferay.portlet.messageboards.model.MBBan create(
96          long banId) {
97          return getPersistence().create(banId);
98      }
99  
100     public static com.liferay.portlet.messageboards.model.MBBan remove(
101         long banId)
102         throws com.liferay.portal.SystemException,
103             com.liferay.portlet.messageboards.NoSuchBanException {
104         return getPersistence().remove(banId);
105     }
106 
107     /**
108      * @deprecated Use {@link com.liferay.portal.service.persistence.BasePersistence.#update(com.liferay.portal.model.BaseModel, boolean)}.
109      */
110     public static com.liferay.portlet.messageboards.model.MBBan update(
111         com.liferay.portlet.messageboards.model.MBBan mbBan)
112         throws com.liferay.portal.SystemException {
113         return getPersistence().update(mbBan);
114     }
115 
116     public static com.liferay.portlet.messageboards.model.MBBan updateImpl(
117         com.liferay.portlet.messageboards.model.MBBan mbBan, boolean merge)
118         throws com.liferay.portal.SystemException {
119         return getPersistence().updateImpl(mbBan, merge);
120     }
121 
122     public static com.liferay.portlet.messageboards.model.MBBan findByPrimaryKey(
123         long banId)
124         throws com.liferay.portal.SystemException,
125             com.liferay.portlet.messageboards.NoSuchBanException {
126         return getPersistence().findByPrimaryKey(banId);
127     }
128 
129     public static com.liferay.portlet.messageboards.model.MBBan fetchByPrimaryKey(
130         long banId) throws com.liferay.portal.SystemException {
131         return getPersistence().fetchByPrimaryKey(banId);
132     }
133 
134     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
135         long groupId) throws com.liferay.portal.SystemException {
136         return getPersistence().findByGroupId(groupId);
137     }
138 
139     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
140         long groupId, int start, int end)
141         throws com.liferay.portal.SystemException {
142         return getPersistence().findByGroupId(groupId, start, end);
143     }
144 
145     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId(
146         long groupId, int start, int end,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException {
149         return getPersistence().findByGroupId(groupId, start, end, obc);
150     }
151 
152     public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_First(
153         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.messageboards.NoSuchBanException {
156         return getPersistence().findByGroupId_First(groupId, obc);
157     }
158 
159     public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last(
160         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
161         throws com.liferay.portal.SystemException,
162             com.liferay.portlet.messageboards.NoSuchBanException {
163         return getPersistence().findByGroupId_Last(groupId, obc);
164     }
165 
166     public static com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext(
167         long banId, long groupId,
168         com.liferay.portal.kernel.util.OrderByComparator obc)
169         throws com.liferay.portal.SystemException,
170             com.liferay.portlet.messageboards.NoSuchBanException {
171         return getPersistence().findByGroupId_PrevAndNext(banId, groupId, obc);
172     }
173 
174     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
175         long userId) throws com.liferay.portal.SystemException {
176         return getPersistence().findByUserId(userId);
177     }
178 
179     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
180         long userId, int start, int end)
181         throws com.liferay.portal.SystemException {
182         return getPersistence().findByUserId(userId, start, end);
183     }
184 
185     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId(
186         long userId, int start, int end,
187         com.liferay.portal.kernel.util.OrderByComparator obc)
188         throws com.liferay.portal.SystemException {
189         return getPersistence().findByUserId(userId, start, end, obc);
190     }
191 
192     public static com.liferay.portlet.messageboards.model.MBBan findByUserId_First(
193         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
194         throws com.liferay.portal.SystemException,
195             com.liferay.portlet.messageboards.NoSuchBanException {
196         return getPersistence().findByUserId_First(userId, obc);
197     }
198 
199     public static com.liferay.portlet.messageboards.model.MBBan findByUserId_Last(
200         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
201         throws com.liferay.portal.SystemException,
202             com.liferay.portlet.messageboards.NoSuchBanException {
203         return getPersistence().findByUserId_Last(userId, obc);
204     }
205 
206     public static com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext(
207         long banId, long userId,
208         com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.SystemException,
210             com.liferay.portlet.messageboards.NoSuchBanException {
211         return getPersistence().findByUserId_PrevAndNext(banId, userId, obc);
212     }
213 
214     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
215         long banUserId) throws com.liferay.portal.SystemException {
216         return getPersistence().findByBanUserId(banUserId);
217     }
218 
219     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
220         long banUserId, int start, int end)
221         throws com.liferay.portal.SystemException {
222         return getPersistence().findByBanUserId(banUserId, start, end);
223     }
224 
225     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId(
226         long banUserId, int start, int end,
227         com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException {
229         return getPersistence().findByBanUserId(banUserId, start, end, obc);
230     }
231 
232     public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First(
233         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
234         throws com.liferay.portal.SystemException,
235             com.liferay.portlet.messageboards.NoSuchBanException {
236         return getPersistence().findByBanUserId_First(banUserId, obc);
237     }
238 
239     public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last(
240         long banUserId, com.liferay.portal.kernel.util.OrderByComparator obc)
241         throws com.liferay.portal.SystemException,
242             com.liferay.portlet.messageboards.NoSuchBanException {
243         return getPersistence().findByBanUserId_Last(banUserId, obc);
244     }
245 
246     public static com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext(
247         long banId, long banUserId,
248         com.liferay.portal.kernel.util.OrderByComparator obc)
249         throws com.liferay.portal.SystemException,
250             com.liferay.portlet.messageboards.NoSuchBanException {
251         return getPersistence()
252                    .findByBanUserId_PrevAndNext(banId, banUserId, obc);
253     }
254 
255     public static com.liferay.portlet.messageboards.model.MBBan findByG_B(
256         long groupId, long banUserId)
257         throws com.liferay.portal.SystemException,
258             com.liferay.portlet.messageboards.NoSuchBanException {
259         return getPersistence().findByG_B(groupId, banUserId);
260     }
261 
262     public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
263         long groupId, long banUserId) throws com.liferay.portal.SystemException {
264         return getPersistence().fetchByG_B(groupId, banUserId);
265     }
266 
267     public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B(
268         long groupId, long banUserId, boolean retrieveFromCache)
269         throws com.liferay.portal.SystemException {
270         return getPersistence().fetchByG_B(groupId, banUserId, retrieveFromCache);
271     }
272 
273     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll()
274         throws com.liferay.portal.SystemException {
275         return getPersistence().findAll();
276     }
277 
278     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
279         int start, int end) throws com.liferay.portal.SystemException {
280         return getPersistence().findAll(start, end);
281     }
282 
283     public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll(
284         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
285         throws com.liferay.portal.SystemException {
286         return getPersistence().findAll(start, end, obc);
287     }
288 
289     public static void removeByGroupId(long groupId)
290         throws com.liferay.portal.SystemException {
291         getPersistence().removeByGroupId(groupId);
292     }
293 
294     public static void removeByUserId(long userId)
295         throws com.liferay.portal.SystemException {
296         getPersistence().removeByUserId(userId);
297     }
298 
299     public static void removeByBanUserId(long banUserId)
300         throws com.liferay.portal.SystemException {
301         getPersistence().removeByBanUserId(banUserId);
302     }
303 
304     public static void removeByG_B(long groupId, long banUserId)
305         throws com.liferay.portal.SystemException,
306             com.liferay.portlet.messageboards.NoSuchBanException {
307         getPersistence().removeByG_B(groupId, banUserId);
308     }
309 
310     public static void removeAll() throws com.liferay.portal.SystemException {
311         getPersistence().removeAll();
312     }
313 
314     public static int countByGroupId(long groupId)
315         throws com.liferay.portal.SystemException {
316         return getPersistence().countByGroupId(groupId);
317     }
318 
319     public static int countByUserId(long userId)
320         throws com.liferay.portal.SystemException {
321         return getPersistence().countByUserId(userId);
322     }
323 
324     public static int countByBanUserId(long banUserId)
325         throws com.liferay.portal.SystemException {
326         return getPersistence().countByBanUserId(banUserId);
327     }
328 
329     public static int countByG_B(long groupId, long banUserId)
330         throws com.liferay.portal.SystemException {
331         return getPersistence().countByG_B(groupId, banUserId);
332     }
333 
334     public static int countAll() throws com.liferay.portal.SystemException {
335         return getPersistence().countAll();
336     }
337 
338     public static MBBanPersistence getPersistence() {
339         if (_persistence == null) {
340             _persistence = (MBBanPersistence)PortalBeanLocatorUtil.locate(MBBanPersistence.class.getName());
341         }
342 
343         return _persistence;
344     }
345 
346     public void setPersistence(MBBanPersistence persistence) {
347         _persistence = persistence;
348     }
349 
350     private static MBBanPersistence _persistence;
351 }