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