1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.messageboards.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  
21  import com.liferay.portlet.messageboards.model.MBCategory;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="MBCategoryUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       MBCategoryPersistence
35   * @see       MBCategoryPersistenceImpl
36   * @generated
37   */
38  public class MBCategoryUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(MBCategory)
48       */
49      public static void clearCache(MBCategory mbCategory) {
50          getPersistence().clearCache(mbCategory);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<MBCategory> findWithDynamicQuery(
65          DynamicQuery dynamicQuery) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<MBCategory> findWithDynamicQuery(
73          DynamicQuery dynamicQuery, int start, int end)
74          throws SystemException {
75          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
80       */
81      public static MBCategory remove(MBCategory mbCategory)
82          throws SystemException {
83          return getPersistence().remove(mbCategory);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static MBCategory update(MBCategory mbCategory, boolean merge)
90          throws SystemException {
91          return getPersistence().update(mbCategory, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.messageboards.model.MBCategory mbCategory) {
96          getPersistence().cacheResult(mbCategory);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.messageboards.model.MBCategory> mbCategories) {
101         getPersistence().cacheResult(mbCategories);
102     }
103 
104     public static com.liferay.portlet.messageboards.model.MBCategory create(
105         long categoryId) {
106         return getPersistence().create(categoryId);
107     }
108 
109     public static com.liferay.portlet.messageboards.model.MBCategory remove(
110         long categoryId)
111         throws com.liferay.portal.kernel.exception.SystemException,
112             com.liferay.portlet.messageboards.NoSuchCategoryException {
113         return getPersistence().remove(categoryId);
114     }
115 
116     public static com.liferay.portlet.messageboards.model.MBCategory updateImpl(
117         com.liferay.portlet.messageboards.model.MBCategory mbCategory,
118         boolean merge)
119         throws com.liferay.portal.kernel.exception.SystemException {
120         return getPersistence().updateImpl(mbCategory, merge);
121     }
122 
123     public static com.liferay.portlet.messageboards.model.MBCategory findByPrimaryKey(
124         long categoryId)
125         throws com.liferay.portal.kernel.exception.SystemException,
126             com.liferay.portlet.messageboards.NoSuchCategoryException {
127         return getPersistence().findByPrimaryKey(categoryId);
128     }
129 
130     public static com.liferay.portlet.messageboards.model.MBCategory fetchByPrimaryKey(
131         long categoryId)
132         throws com.liferay.portal.kernel.exception.SystemException {
133         return getPersistence().fetchByPrimaryKey(categoryId);
134     }
135 
136     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
137         java.lang.String uuid)
138         throws com.liferay.portal.kernel.exception.SystemException {
139         return getPersistence().findByUuid(uuid);
140     }
141 
142     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
143         java.lang.String uuid, int start, int end)
144         throws com.liferay.portal.kernel.exception.SystemException {
145         return getPersistence().findByUuid(uuid, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
149         java.lang.String uuid, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151         throws com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence().findByUuid(uuid, start, end, orderByComparator);
153     }
154 
155     public static com.liferay.portlet.messageboards.model.MBCategory findByUuid_First(
156         java.lang.String uuid,
157         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158         throws com.liferay.portal.kernel.exception.SystemException,
159             com.liferay.portlet.messageboards.NoSuchCategoryException {
160         return getPersistence().findByUuid_First(uuid, orderByComparator);
161     }
162 
163     public static com.liferay.portlet.messageboards.model.MBCategory findByUuid_Last(
164         java.lang.String uuid,
165         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
166         throws com.liferay.portal.kernel.exception.SystemException,
167             com.liferay.portlet.messageboards.NoSuchCategoryException {
168         return getPersistence().findByUuid_Last(uuid, orderByComparator);
169     }
170 
171     public static com.liferay.portlet.messageboards.model.MBCategory[] findByUuid_PrevAndNext(
172         long categoryId, java.lang.String uuid,
173         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
174         throws com.liferay.portal.kernel.exception.SystemException,
175             com.liferay.portlet.messageboards.NoSuchCategoryException {
176         return getPersistence()
177                    .findByUuid_PrevAndNext(categoryId, uuid, orderByComparator);
178     }
179 
180     public static com.liferay.portlet.messageboards.model.MBCategory findByUUID_G(
181         java.lang.String uuid, long groupId)
182         throws com.liferay.portal.kernel.exception.SystemException,
183             com.liferay.portlet.messageboards.NoSuchCategoryException {
184         return getPersistence().findByUUID_G(uuid, groupId);
185     }
186 
187     public static com.liferay.portlet.messageboards.model.MBCategory fetchByUUID_G(
188         java.lang.String uuid, long groupId)
189         throws com.liferay.portal.kernel.exception.SystemException {
190         return getPersistence().fetchByUUID_G(uuid, groupId);
191     }
192 
193     public static com.liferay.portlet.messageboards.model.MBCategory fetchByUUID_G(
194         java.lang.String uuid, long groupId, boolean retrieveFromCache)
195         throws com.liferay.portal.kernel.exception.SystemException {
196         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
197     }
198 
199     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
200         long groupId)
201         throws com.liferay.portal.kernel.exception.SystemException {
202         return getPersistence().findByGroupId(groupId);
203     }
204 
205     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
206         long groupId, int start, int end)
207         throws com.liferay.portal.kernel.exception.SystemException {
208         return getPersistence().findByGroupId(groupId, start, end);
209     }
210 
211     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
212         long groupId, int start, int end,
213         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214         throws com.liferay.portal.kernel.exception.SystemException {
215         return getPersistence()
216                    .findByGroupId(groupId, start, end, orderByComparator);
217     }
218 
219     public static com.liferay.portlet.messageboards.model.MBCategory findByGroupId_First(
220         long groupId,
221         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
222         throws com.liferay.portal.kernel.exception.SystemException,
223             com.liferay.portlet.messageboards.NoSuchCategoryException {
224         return getPersistence().findByGroupId_First(groupId, orderByComparator);
225     }
226 
227     public static com.liferay.portlet.messageboards.model.MBCategory findByGroupId_Last(
228         long groupId,
229         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230         throws com.liferay.portal.kernel.exception.SystemException,
231             com.liferay.portlet.messageboards.NoSuchCategoryException {
232         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
233     }
234 
235     public static com.liferay.portlet.messageboards.model.MBCategory[] findByGroupId_PrevAndNext(
236         long categoryId, long groupId,
237         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
238         throws com.liferay.portal.kernel.exception.SystemException,
239             com.liferay.portlet.messageboards.NoSuchCategoryException {
240         return getPersistence()
241                    .findByGroupId_PrevAndNext(categoryId, groupId,
242             orderByComparator);
243     }
244 
245     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> filterFindByGroupId(
246         long groupId)
247         throws com.liferay.portal.kernel.exception.SystemException {
248         return getPersistence().filterFindByGroupId(groupId);
249     }
250 
251     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> filterFindByGroupId(
252         long groupId, int start, int end)
253         throws com.liferay.portal.kernel.exception.SystemException {
254         return getPersistence().filterFindByGroupId(groupId, start, end);
255     }
256 
257     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> filterFindByGroupId(
258         long groupId, int start, int end,
259         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
260         throws com.liferay.portal.kernel.exception.SystemException {
261         return getPersistence()
262                    .filterFindByGroupId(groupId, start, end, orderByComparator);
263     }
264 
265     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
266         long companyId)
267         throws com.liferay.portal.kernel.exception.SystemException {
268         return getPersistence().findByCompanyId(companyId);
269     }
270 
271     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
272         long companyId, int start, int end)
273         throws com.liferay.portal.kernel.exception.SystemException {
274         return getPersistence().findByCompanyId(companyId, start, end);
275     }
276 
277     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
278         long companyId, int start, int end,
279         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
280         throws com.liferay.portal.kernel.exception.SystemException {
281         return getPersistence()
282                    .findByCompanyId(companyId, start, end, orderByComparator);
283     }
284 
285     public static com.liferay.portlet.messageboards.model.MBCategory findByCompanyId_First(
286         long companyId,
287         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
288         throws com.liferay.portal.kernel.exception.SystemException,
289             com.liferay.portlet.messageboards.NoSuchCategoryException {
290         return getPersistence()
291                    .findByCompanyId_First(companyId, orderByComparator);
292     }
293 
294     public static com.liferay.portlet.messageboards.model.MBCategory findByCompanyId_Last(
295         long companyId,
296         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
297         throws com.liferay.portal.kernel.exception.SystemException,
298             com.liferay.portlet.messageboards.NoSuchCategoryException {
299         return getPersistence()
300                    .findByCompanyId_Last(companyId, orderByComparator);
301     }
302 
303     public static com.liferay.portlet.messageboards.model.MBCategory[] findByCompanyId_PrevAndNext(
304         long categoryId, long companyId,
305         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
306         throws com.liferay.portal.kernel.exception.SystemException,
307             com.liferay.portlet.messageboards.NoSuchCategoryException {
308         return getPersistence()
309                    .findByCompanyId_PrevAndNext(categoryId, companyId,
310             orderByComparator);
311     }
312 
313     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
314         long groupId, long parentCategoryId)
315         throws com.liferay.portal.kernel.exception.SystemException {
316         return getPersistence().findByG_P(groupId, parentCategoryId);
317     }
318 
319     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
320         long groupId, long parentCategoryId, int start, int end)
321         throws com.liferay.portal.kernel.exception.SystemException {
322         return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
323     }
324 
325     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
326         long groupId, long parentCategoryId, int start, int end,
327         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
328         throws com.liferay.portal.kernel.exception.SystemException {
329         return getPersistence()
330                    .findByG_P(groupId, parentCategoryId, start, end,
331             orderByComparator);
332     }
333 
334     public static com.liferay.portlet.messageboards.model.MBCategory findByG_P_First(
335         long groupId, long parentCategoryId,
336         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
337         throws com.liferay.portal.kernel.exception.SystemException,
338             com.liferay.portlet.messageboards.NoSuchCategoryException {
339         return getPersistence()
340                    .findByG_P_First(groupId, parentCategoryId, orderByComparator);
341     }
342 
343     public static com.liferay.portlet.messageboards.model.MBCategory findByG_P_Last(
344         long groupId, long parentCategoryId,
345         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
346         throws com.liferay.portal.kernel.exception.SystemException,
347             com.liferay.portlet.messageboards.NoSuchCategoryException {
348         return getPersistence()
349                    .findByG_P_Last(groupId, parentCategoryId, orderByComparator);
350     }
351 
352     public static com.liferay.portlet.messageboards.model.MBCategory[] findByG_P_PrevAndNext(
353         long categoryId, long groupId, long parentCategoryId,
354         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
355         throws com.liferay.portal.kernel.exception.SystemException,
356             com.liferay.portlet.messageboards.NoSuchCategoryException {
357         return getPersistence()
358                    .findByG_P_PrevAndNext(categoryId, groupId,
359             parentCategoryId, orderByComparator);
360     }
361 
362     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> filterFindByG_P(
363         long groupId, long parentCategoryId)
364         throws com.liferay.portal.kernel.exception.SystemException {
365         return getPersistence().filterFindByG_P(groupId, parentCategoryId);
366     }
367 
368     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> filterFindByG_P(
369         long groupId, long parentCategoryId, int start, int end)
370         throws com.liferay.portal.kernel.exception.SystemException {
371         return getPersistence()
372                    .filterFindByG_P(groupId, parentCategoryId, start, end);
373     }
374 
375     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> filterFindByG_P(
376         long groupId, long parentCategoryId, int start, int end,
377         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
378         throws com.liferay.portal.kernel.exception.SystemException {
379         return getPersistence()
380                    .filterFindByG_P(groupId, parentCategoryId, start, end,
381             orderByComparator);
382     }
383 
384     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll()
385         throws com.liferay.portal.kernel.exception.SystemException {
386         return getPersistence().findAll();
387     }
388 
389     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll(
390         int start, int end)
391         throws com.liferay.portal.kernel.exception.SystemException {
392         return getPersistence().findAll(start, end);
393     }
394 
395     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll(
396         int start, int end,
397         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
398         throws com.liferay.portal.kernel.exception.SystemException {
399         return getPersistence().findAll(start, end, orderByComparator);
400     }
401 
402     public static void removeByUuid(java.lang.String uuid)
403         throws com.liferay.portal.kernel.exception.SystemException {
404         getPersistence().removeByUuid(uuid);
405     }
406 
407     public static void removeByUUID_G(java.lang.String uuid, long groupId)
408         throws com.liferay.portal.kernel.exception.SystemException,
409             com.liferay.portlet.messageboards.NoSuchCategoryException {
410         getPersistence().removeByUUID_G(uuid, groupId);
411     }
412 
413     public static void removeByGroupId(long groupId)
414         throws com.liferay.portal.kernel.exception.SystemException {
415         getPersistence().removeByGroupId(groupId);
416     }
417 
418     public static void removeByCompanyId(long companyId)
419         throws com.liferay.portal.kernel.exception.SystemException {
420         getPersistence().removeByCompanyId(companyId);
421     }
422 
423     public static void removeByG_P(long groupId, long parentCategoryId)
424         throws com.liferay.portal.kernel.exception.SystemException {
425         getPersistence().removeByG_P(groupId, parentCategoryId);
426     }
427 
428     public static void removeAll()
429         throws com.liferay.portal.kernel.exception.SystemException {
430         getPersistence().removeAll();
431     }
432 
433     public static int countByUuid(java.lang.String uuid)
434         throws com.liferay.portal.kernel.exception.SystemException {
435         return getPersistence().countByUuid(uuid);
436     }
437 
438     public static int countByUUID_G(java.lang.String uuid, long groupId)
439         throws com.liferay.portal.kernel.exception.SystemException {
440         return getPersistence().countByUUID_G(uuid, groupId);
441     }
442 
443     public static int countByGroupId(long groupId)
444         throws com.liferay.portal.kernel.exception.SystemException {
445         return getPersistence().countByGroupId(groupId);
446     }
447 
448     public static int filterCountByGroupId(long groupId)
449         throws com.liferay.portal.kernel.exception.SystemException {
450         return getPersistence().filterCountByGroupId(groupId);
451     }
452 
453     public static int countByCompanyId(long companyId)
454         throws com.liferay.portal.kernel.exception.SystemException {
455         return getPersistence().countByCompanyId(companyId);
456     }
457 
458     public static int countByG_P(long groupId, long parentCategoryId)
459         throws com.liferay.portal.kernel.exception.SystemException {
460         return getPersistence().countByG_P(groupId, parentCategoryId);
461     }
462 
463     public static int filterCountByG_P(long groupId, long parentCategoryId)
464         throws com.liferay.portal.kernel.exception.SystemException {
465         return getPersistence().filterCountByG_P(groupId, parentCategoryId);
466     }
467 
468     public static int countAll()
469         throws com.liferay.portal.kernel.exception.SystemException {
470         return getPersistence().countAll();
471     }
472 
473     public static MBCategoryPersistence getPersistence() {
474         if (_persistence == null) {
475             _persistence = (MBCategoryPersistence)PortalBeanLocatorUtil.locate(MBCategoryPersistence.class.getName());
476         }
477 
478         return _persistence;
479     }
480 
481     public void setPersistence(MBCategoryPersistence persistence) {
482         _persistence = persistence;
483     }
484 
485     private static MBCategoryPersistence _persistence;
486 }