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#findWithDynamicQuery(DynamicQuery)
48       */
49      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50          throws SystemException {
51          return getPersistence().findWithDynamicQuery(dynamicQuery);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
58          int start, int end) throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
64       */
65      public static MBCategory remove(MBCategory mbCategory)
66          throws SystemException {
67          return getPersistence().remove(mbCategory);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
72       */
73      public static MBCategory update(MBCategory mbCategory, boolean merge)
74          throws SystemException {
75          return getPersistence().update(mbCategory, merge);
76      }
77  
78      public static void cacheResult(
79          com.liferay.portlet.messageboards.model.MBCategory mbCategory) {
80          getPersistence().cacheResult(mbCategory);
81      }
82  
83      public static void cacheResult(
84          java.util.List<com.liferay.portlet.messageboards.model.MBCategory> mbCategories) {
85          getPersistence().cacheResult(mbCategories);
86      }
87  
88      public static com.liferay.portlet.messageboards.model.MBCategory create(
89          long categoryId) {
90          return getPersistence().create(categoryId);
91      }
92  
93      public static com.liferay.portlet.messageboards.model.MBCategory remove(
94          long categoryId)
95          throws com.liferay.portal.kernel.exception.SystemException,
96              com.liferay.portlet.messageboards.NoSuchCategoryException {
97          return getPersistence().remove(categoryId);
98      }
99  
100     public static com.liferay.portlet.messageboards.model.MBCategory updateImpl(
101         com.liferay.portlet.messageboards.model.MBCategory mbCategory,
102         boolean merge)
103         throws com.liferay.portal.kernel.exception.SystemException {
104         return getPersistence().updateImpl(mbCategory, merge);
105     }
106 
107     public static com.liferay.portlet.messageboards.model.MBCategory findByPrimaryKey(
108         long categoryId)
109         throws com.liferay.portal.kernel.exception.SystemException,
110             com.liferay.portlet.messageboards.NoSuchCategoryException {
111         return getPersistence().findByPrimaryKey(categoryId);
112     }
113 
114     public static com.liferay.portlet.messageboards.model.MBCategory fetchByPrimaryKey(
115         long categoryId)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getPersistence().fetchByPrimaryKey(categoryId);
118     }
119 
120     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
121         java.lang.String uuid)
122         throws com.liferay.portal.kernel.exception.SystemException {
123         return getPersistence().findByUuid(uuid);
124     }
125 
126     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
127         java.lang.String uuid, int start, int end)
128         throws com.liferay.portal.kernel.exception.SystemException {
129         return getPersistence().findByUuid(uuid, start, end);
130     }
131 
132     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
133         java.lang.String uuid, int start, int end,
134         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135         throws com.liferay.portal.kernel.exception.SystemException {
136         return getPersistence().findByUuid(uuid, start, end, orderByComparator);
137     }
138 
139     public static com.liferay.portlet.messageboards.model.MBCategory findByUuid_First(
140         java.lang.String uuid,
141         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
142         throws com.liferay.portal.kernel.exception.SystemException,
143             com.liferay.portlet.messageboards.NoSuchCategoryException {
144         return getPersistence().findByUuid_First(uuid, orderByComparator);
145     }
146 
147     public static com.liferay.portlet.messageboards.model.MBCategory findByUuid_Last(
148         java.lang.String uuid,
149         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
150         throws com.liferay.portal.kernel.exception.SystemException,
151             com.liferay.portlet.messageboards.NoSuchCategoryException {
152         return getPersistence().findByUuid_Last(uuid, orderByComparator);
153     }
154 
155     public static com.liferay.portlet.messageboards.model.MBCategory[] findByUuid_PrevAndNext(
156         long categoryId, 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()
161                    .findByUuid_PrevAndNext(categoryId, uuid, orderByComparator);
162     }
163 
164     public static com.liferay.portlet.messageboards.model.MBCategory findByUUID_G(
165         java.lang.String uuid, long groupId)
166         throws com.liferay.portal.kernel.exception.SystemException,
167             com.liferay.portlet.messageboards.NoSuchCategoryException {
168         return getPersistence().findByUUID_G(uuid, groupId);
169     }
170 
171     public static com.liferay.portlet.messageboards.model.MBCategory fetchByUUID_G(
172         java.lang.String uuid, long groupId)
173         throws com.liferay.portal.kernel.exception.SystemException {
174         return getPersistence().fetchByUUID_G(uuid, groupId);
175     }
176 
177     public static com.liferay.portlet.messageboards.model.MBCategory fetchByUUID_G(
178         java.lang.String uuid, long groupId, boolean retrieveFromCache)
179         throws com.liferay.portal.kernel.exception.SystemException {
180         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
181     }
182 
183     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
184         long groupId)
185         throws com.liferay.portal.kernel.exception.SystemException {
186         return getPersistence().findByGroupId(groupId);
187     }
188 
189     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
190         long groupId, int start, int end)
191         throws com.liferay.portal.kernel.exception.SystemException {
192         return getPersistence().findByGroupId(groupId, start, end);
193     }
194 
195     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
196         long groupId, int start, int end,
197         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
198         throws com.liferay.portal.kernel.exception.SystemException {
199         return getPersistence()
200                    .findByGroupId(groupId, start, end, orderByComparator);
201     }
202 
203     public static com.liferay.portlet.messageboards.model.MBCategory findByGroupId_First(
204         long groupId,
205         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
206         throws com.liferay.portal.kernel.exception.SystemException,
207             com.liferay.portlet.messageboards.NoSuchCategoryException {
208         return getPersistence().findByGroupId_First(groupId, orderByComparator);
209     }
210 
211     public static com.liferay.portlet.messageboards.model.MBCategory findByGroupId_Last(
212         long groupId,
213         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
214         throws com.liferay.portal.kernel.exception.SystemException,
215             com.liferay.portlet.messageboards.NoSuchCategoryException {
216         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
217     }
218 
219     public static com.liferay.portlet.messageboards.model.MBCategory[] findByGroupId_PrevAndNext(
220         long categoryId, 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()
225                    .findByGroupId_PrevAndNext(categoryId, groupId,
226             orderByComparator);
227     }
228 
229     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
230         long companyId)
231         throws com.liferay.portal.kernel.exception.SystemException {
232         return getPersistence().findByCompanyId(companyId);
233     }
234 
235     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
236         long companyId, int start, int end)
237         throws com.liferay.portal.kernel.exception.SystemException {
238         return getPersistence().findByCompanyId(companyId, start, end);
239     }
240 
241     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
242         long companyId, int start, int end,
243         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244         throws com.liferay.portal.kernel.exception.SystemException {
245         return getPersistence()
246                    .findByCompanyId(companyId, start, end, orderByComparator);
247     }
248 
249     public static com.liferay.portlet.messageboards.model.MBCategory findByCompanyId_First(
250         long companyId,
251         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
252         throws com.liferay.portal.kernel.exception.SystemException,
253             com.liferay.portlet.messageboards.NoSuchCategoryException {
254         return getPersistence()
255                    .findByCompanyId_First(companyId, orderByComparator);
256     }
257 
258     public static com.liferay.portlet.messageboards.model.MBCategory findByCompanyId_Last(
259         long companyId,
260         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
261         throws com.liferay.portal.kernel.exception.SystemException,
262             com.liferay.portlet.messageboards.NoSuchCategoryException {
263         return getPersistence()
264                    .findByCompanyId_Last(companyId, orderByComparator);
265     }
266 
267     public static com.liferay.portlet.messageboards.model.MBCategory[] findByCompanyId_PrevAndNext(
268         long categoryId, long companyId,
269         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
270         throws com.liferay.portal.kernel.exception.SystemException,
271             com.liferay.portlet.messageboards.NoSuchCategoryException {
272         return getPersistence()
273                    .findByCompanyId_PrevAndNext(categoryId, companyId,
274             orderByComparator);
275     }
276 
277     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
278         long groupId, long parentCategoryId)
279         throws com.liferay.portal.kernel.exception.SystemException {
280         return getPersistence().findByG_P(groupId, parentCategoryId);
281     }
282 
283     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
284         long groupId, long parentCategoryId, int start, int end)
285         throws com.liferay.portal.kernel.exception.SystemException {
286         return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
287     }
288 
289     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
290         long groupId, long parentCategoryId, int start, int end,
291         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
292         throws com.liferay.portal.kernel.exception.SystemException {
293         return getPersistence()
294                    .findByG_P(groupId, parentCategoryId, start, end,
295             orderByComparator);
296     }
297 
298     public static com.liferay.portlet.messageboards.model.MBCategory findByG_P_First(
299         long groupId, long parentCategoryId,
300         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
301         throws com.liferay.portal.kernel.exception.SystemException,
302             com.liferay.portlet.messageboards.NoSuchCategoryException {
303         return getPersistence()
304                    .findByG_P_First(groupId, parentCategoryId, orderByComparator);
305     }
306 
307     public static com.liferay.portlet.messageboards.model.MBCategory findByG_P_Last(
308         long groupId, long parentCategoryId,
309         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
310         throws com.liferay.portal.kernel.exception.SystemException,
311             com.liferay.portlet.messageboards.NoSuchCategoryException {
312         return getPersistence()
313                    .findByG_P_Last(groupId, parentCategoryId, orderByComparator);
314     }
315 
316     public static com.liferay.portlet.messageboards.model.MBCategory[] findByG_P_PrevAndNext(
317         long categoryId, long groupId, long parentCategoryId,
318         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
319         throws com.liferay.portal.kernel.exception.SystemException,
320             com.liferay.portlet.messageboards.NoSuchCategoryException {
321         return getPersistence()
322                    .findByG_P_PrevAndNext(categoryId, groupId,
323             parentCategoryId, orderByComparator);
324     }
325 
326     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll()
327         throws com.liferay.portal.kernel.exception.SystemException {
328         return getPersistence().findAll();
329     }
330 
331     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll(
332         int start, int end)
333         throws com.liferay.portal.kernel.exception.SystemException {
334         return getPersistence().findAll(start, end);
335     }
336 
337     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll(
338         int start, int end,
339         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
340         throws com.liferay.portal.kernel.exception.SystemException {
341         return getPersistence().findAll(start, end, orderByComparator);
342     }
343 
344     public static void removeByUuid(java.lang.String uuid)
345         throws com.liferay.portal.kernel.exception.SystemException {
346         getPersistence().removeByUuid(uuid);
347     }
348 
349     public static void removeByUUID_G(java.lang.String uuid, long groupId)
350         throws com.liferay.portal.kernel.exception.SystemException,
351             com.liferay.portlet.messageboards.NoSuchCategoryException {
352         getPersistence().removeByUUID_G(uuid, groupId);
353     }
354 
355     public static void removeByGroupId(long groupId)
356         throws com.liferay.portal.kernel.exception.SystemException {
357         getPersistence().removeByGroupId(groupId);
358     }
359 
360     public static void removeByCompanyId(long companyId)
361         throws com.liferay.portal.kernel.exception.SystemException {
362         getPersistence().removeByCompanyId(companyId);
363     }
364 
365     public static void removeByG_P(long groupId, long parentCategoryId)
366         throws com.liferay.portal.kernel.exception.SystemException {
367         getPersistence().removeByG_P(groupId, parentCategoryId);
368     }
369 
370     public static void removeAll()
371         throws com.liferay.portal.kernel.exception.SystemException {
372         getPersistence().removeAll();
373     }
374 
375     public static int countByUuid(java.lang.String uuid)
376         throws com.liferay.portal.kernel.exception.SystemException {
377         return getPersistence().countByUuid(uuid);
378     }
379 
380     public static int countByUUID_G(java.lang.String uuid, long groupId)
381         throws com.liferay.portal.kernel.exception.SystemException {
382         return getPersistence().countByUUID_G(uuid, groupId);
383     }
384 
385     public static int countByGroupId(long groupId)
386         throws com.liferay.portal.kernel.exception.SystemException {
387         return getPersistence().countByGroupId(groupId);
388     }
389 
390     public static int countByCompanyId(long companyId)
391         throws com.liferay.portal.kernel.exception.SystemException {
392         return getPersistence().countByCompanyId(companyId);
393     }
394 
395     public static int countByG_P(long groupId, long parentCategoryId)
396         throws com.liferay.portal.kernel.exception.SystemException {
397         return getPersistence().countByG_P(groupId, parentCategoryId);
398     }
399 
400     public static int countAll()
401         throws com.liferay.portal.kernel.exception.SystemException {
402         return getPersistence().countAll();
403     }
404 
405     public static MBCategoryPersistence getPersistence() {
406         if (_persistence == null) {
407             _persistence = (MBCategoryPersistence)PortalBeanLocatorUtil.locate(MBCategoryPersistence.class.getName());
408         }
409 
410         return _persistence;
411     }
412 
413     public void setPersistence(MBCategoryPersistence persistence) {
414         _persistence = persistence;
415     }
416 
417     private static MBCategoryPersistence _persistence;
418 }