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  
26  /**
27   * <a href="MBCategoryUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       MBCategoryPersistence
36   * @see       MBCategoryPersistenceImpl
37   * @generated
38   */
39  public class MBCategoryUtil {
40      public static void cacheResult(
41          com.liferay.portlet.messageboards.model.MBCategory mbCategory) {
42          getPersistence().cacheResult(mbCategory);
43      }
44  
45      public static void cacheResult(
46          java.util.List<com.liferay.portlet.messageboards.model.MBCategory> mbCategories) {
47          getPersistence().cacheResult(mbCategories);
48      }
49  
50      public static void clearCache() {
51          getPersistence().clearCache();
52      }
53  
54      public static com.liferay.portlet.messageboards.model.MBCategory create(
55          long categoryId) {
56          return getPersistence().create(categoryId);
57      }
58  
59      public static com.liferay.portlet.messageboards.model.MBCategory remove(
60          long categoryId)
61          throws com.liferay.portal.SystemException,
62              com.liferay.portlet.messageboards.NoSuchCategoryException {
63          return getPersistence().remove(categoryId);
64      }
65  
66      public static com.liferay.portlet.messageboards.model.MBCategory remove(
67          com.liferay.portlet.messageboards.model.MBCategory mbCategory)
68          throws com.liferay.portal.SystemException {
69          return getPersistence().remove(mbCategory);
70      }
71  
72      /**
73       * @deprecated Use {@link #update(MBCategory, boolean merge)}.
74       */
75      public static com.liferay.portlet.messageboards.model.MBCategory update(
76          com.liferay.portlet.messageboards.model.MBCategory mbCategory)
77          throws com.liferay.portal.SystemException {
78          return getPersistence().update(mbCategory);
79      }
80  
81      /**
82       * Add, update, or merge, the entity. This method also calls the model
83       * listeners to trigger the proper events associated with adding, deleting,
84       * or updating an entity.
85       *
86       * @param  mbCategory the entity to add, update, or merge
87       * @param  merge boolean value for whether to merge the entity. The default
88       *         value is false. Setting merge to true is more expensive and
89       *         should only be true when mbCategory is transient. See
90       *         LEP-5473 for a detailed discussion of this method.
91       * @return the entity that was added, updated, or merged
92       */
93      public static com.liferay.portlet.messageboards.model.MBCategory update(
94          com.liferay.portlet.messageboards.model.MBCategory mbCategory,
95          boolean merge) throws com.liferay.portal.SystemException {
96          return getPersistence().update(mbCategory, merge);
97      }
98  
99      public static com.liferay.portlet.messageboards.model.MBCategory updateImpl(
100         com.liferay.portlet.messageboards.model.MBCategory mbCategory,
101         boolean merge) throws com.liferay.portal.SystemException {
102         return getPersistence().updateImpl(mbCategory, merge);
103     }
104 
105     public static com.liferay.portlet.messageboards.model.MBCategory findByPrimaryKey(
106         long categoryId)
107         throws com.liferay.portal.SystemException,
108             com.liferay.portlet.messageboards.NoSuchCategoryException {
109         return getPersistence().findByPrimaryKey(categoryId);
110     }
111 
112     public static com.liferay.portlet.messageboards.model.MBCategory fetchByPrimaryKey(
113         long categoryId) throws com.liferay.portal.SystemException {
114         return getPersistence().fetchByPrimaryKey(categoryId);
115     }
116 
117     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
118         java.lang.String uuid) throws com.liferay.portal.SystemException {
119         return getPersistence().findByUuid(uuid);
120     }
121 
122     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
123         java.lang.String uuid, int start, int end)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByUuid(uuid, start, end);
126     }
127 
128     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByUuid(
129         java.lang.String uuid, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException {
132         return getPersistence().findByUuid(uuid, start, end, obc);
133     }
134 
135     public static com.liferay.portlet.messageboards.model.MBCategory findByUuid_First(
136         java.lang.String uuid,
137         com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException,
139             com.liferay.portlet.messageboards.NoSuchCategoryException {
140         return getPersistence().findByUuid_First(uuid, obc);
141     }
142 
143     public static com.liferay.portlet.messageboards.model.MBCategory findByUuid_Last(
144         java.lang.String uuid,
145         com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.SystemException,
147             com.liferay.portlet.messageboards.NoSuchCategoryException {
148         return getPersistence().findByUuid_Last(uuid, obc);
149     }
150 
151     public static com.liferay.portlet.messageboards.model.MBCategory[] findByUuid_PrevAndNext(
152         long categoryId, java.lang.String uuid,
153         com.liferay.portal.kernel.util.OrderByComparator obc)
154         throws com.liferay.portal.SystemException,
155             com.liferay.portlet.messageboards.NoSuchCategoryException {
156         return getPersistence().findByUuid_PrevAndNext(categoryId, uuid, obc);
157     }
158 
159     public static com.liferay.portlet.messageboards.model.MBCategory findByUUID_G(
160         java.lang.String uuid, long groupId)
161         throws com.liferay.portal.SystemException,
162             com.liferay.portlet.messageboards.NoSuchCategoryException {
163         return getPersistence().findByUUID_G(uuid, groupId);
164     }
165 
166     public static com.liferay.portlet.messageboards.model.MBCategory fetchByUUID_G(
167         java.lang.String uuid, long groupId)
168         throws com.liferay.portal.SystemException {
169         return getPersistence().fetchByUUID_G(uuid, groupId);
170     }
171 
172     public static com.liferay.portlet.messageboards.model.MBCategory fetchByUUID_G(
173         java.lang.String uuid, long groupId, boolean retrieveFromCache)
174         throws com.liferay.portal.SystemException {
175         return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
176     }
177 
178     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
179         long groupId) throws com.liferay.portal.SystemException {
180         return getPersistence().findByGroupId(groupId);
181     }
182 
183     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
184         long groupId, int start, int end)
185         throws com.liferay.portal.SystemException {
186         return getPersistence().findByGroupId(groupId, start, end);
187     }
188 
189     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByGroupId(
190         long groupId, int start, int end,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException {
193         return getPersistence().findByGroupId(groupId, start, end, obc);
194     }
195 
196     public static com.liferay.portlet.messageboards.model.MBCategory findByGroupId_First(
197         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.SystemException,
199             com.liferay.portlet.messageboards.NoSuchCategoryException {
200         return getPersistence().findByGroupId_First(groupId, obc);
201     }
202 
203     public static com.liferay.portlet.messageboards.model.MBCategory findByGroupId_Last(
204         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
205         throws com.liferay.portal.SystemException,
206             com.liferay.portlet.messageboards.NoSuchCategoryException {
207         return getPersistence().findByGroupId_Last(groupId, obc);
208     }
209 
210     public static com.liferay.portlet.messageboards.model.MBCategory[] findByGroupId_PrevAndNext(
211         long categoryId, long groupId,
212         com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.SystemException,
214             com.liferay.portlet.messageboards.NoSuchCategoryException {
215         return getPersistence()
216                    .findByGroupId_PrevAndNext(categoryId, groupId, obc);
217     }
218 
219     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
220         long companyId) throws com.liferay.portal.SystemException {
221         return getPersistence().findByCompanyId(companyId);
222     }
223 
224     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
225         long companyId, int start, int end)
226         throws com.liferay.portal.SystemException {
227         return getPersistence().findByCompanyId(companyId, start, end);
228     }
229 
230     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByCompanyId(
231         long companyId, int start, int end,
232         com.liferay.portal.kernel.util.OrderByComparator obc)
233         throws com.liferay.portal.SystemException {
234         return getPersistence().findByCompanyId(companyId, start, end, obc);
235     }
236 
237     public static com.liferay.portlet.messageboards.model.MBCategory findByCompanyId_First(
238         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
239         throws com.liferay.portal.SystemException,
240             com.liferay.portlet.messageboards.NoSuchCategoryException {
241         return getPersistence().findByCompanyId_First(companyId, obc);
242     }
243 
244     public static com.liferay.portlet.messageboards.model.MBCategory findByCompanyId_Last(
245         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException,
247             com.liferay.portlet.messageboards.NoSuchCategoryException {
248         return getPersistence().findByCompanyId_Last(companyId, obc);
249     }
250 
251     public static com.liferay.portlet.messageboards.model.MBCategory[] findByCompanyId_PrevAndNext(
252         long categoryId, long companyId,
253         com.liferay.portal.kernel.util.OrderByComparator obc)
254         throws com.liferay.portal.SystemException,
255             com.liferay.portlet.messageboards.NoSuchCategoryException {
256         return getPersistence()
257                    .findByCompanyId_PrevAndNext(categoryId, companyId, obc);
258     }
259 
260     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
261         long groupId, long parentCategoryId)
262         throws com.liferay.portal.SystemException {
263         return getPersistence().findByG_P(groupId, parentCategoryId);
264     }
265 
266     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
267         long groupId, long parentCategoryId, int start, int end)
268         throws com.liferay.portal.SystemException {
269         return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
270     }
271 
272     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findByG_P(
273         long groupId, long parentCategoryId, int start, int end,
274         com.liferay.portal.kernel.util.OrderByComparator obc)
275         throws com.liferay.portal.SystemException {
276         return getPersistence()
277                    .findByG_P(groupId, parentCategoryId, start, end, obc);
278     }
279 
280     public static com.liferay.portlet.messageboards.model.MBCategory findByG_P_First(
281         long groupId, long parentCategoryId,
282         com.liferay.portal.kernel.util.OrderByComparator obc)
283         throws com.liferay.portal.SystemException,
284             com.liferay.portlet.messageboards.NoSuchCategoryException {
285         return getPersistence().findByG_P_First(groupId, parentCategoryId, obc);
286     }
287 
288     public static com.liferay.portlet.messageboards.model.MBCategory findByG_P_Last(
289         long groupId, long parentCategoryId,
290         com.liferay.portal.kernel.util.OrderByComparator obc)
291         throws com.liferay.portal.SystemException,
292             com.liferay.portlet.messageboards.NoSuchCategoryException {
293         return getPersistence().findByG_P_Last(groupId, parentCategoryId, obc);
294     }
295 
296     public static com.liferay.portlet.messageboards.model.MBCategory[] findByG_P_PrevAndNext(
297         long categoryId, long groupId, long parentCategoryId,
298         com.liferay.portal.kernel.util.OrderByComparator obc)
299         throws com.liferay.portal.SystemException,
300             com.liferay.portlet.messageboards.NoSuchCategoryException {
301         return getPersistence()
302                    .findByG_P_PrevAndNext(categoryId, groupId,
303             parentCategoryId, obc);
304     }
305 
306     public static java.util.List<Object> findWithDynamicQuery(
307         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
308         throws com.liferay.portal.SystemException {
309         return getPersistence().findWithDynamicQuery(dynamicQuery);
310     }
311 
312     public static java.util.List<Object> findWithDynamicQuery(
313         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
314         int end) throws com.liferay.portal.SystemException {
315         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
316     }
317 
318     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll()
319         throws com.liferay.portal.SystemException {
320         return getPersistence().findAll();
321     }
322 
323     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll(
324         int start, int end) throws com.liferay.portal.SystemException {
325         return getPersistence().findAll(start, end);
326     }
327 
328     public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> findAll(
329         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
330         throws com.liferay.portal.SystemException {
331         return getPersistence().findAll(start, end, obc);
332     }
333 
334     public static void removeByUuid(java.lang.String uuid)
335         throws com.liferay.portal.SystemException {
336         getPersistence().removeByUuid(uuid);
337     }
338 
339     public static void removeByUUID_G(java.lang.String uuid, long groupId)
340         throws com.liferay.portal.SystemException,
341             com.liferay.portlet.messageboards.NoSuchCategoryException {
342         getPersistence().removeByUUID_G(uuid, groupId);
343     }
344 
345     public static void removeByGroupId(long groupId)
346         throws com.liferay.portal.SystemException {
347         getPersistence().removeByGroupId(groupId);
348     }
349 
350     public static void removeByCompanyId(long companyId)
351         throws com.liferay.portal.SystemException {
352         getPersistence().removeByCompanyId(companyId);
353     }
354 
355     public static void removeByG_P(long groupId, long parentCategoryId)
356         throws com.liferay.portal.SystemException {
357         getPersistence().removeByG_P(groupId, parentCategoryId);
358     }
359 
360     public static void removeAll() throws com.liferay.portal.SystemException {
361         getPersistence().removeAll();
362     }
363 
364     public static int countByUuid(java.lang.String uuid)
365         throws com.liferay.portal.SystemException {
366         return getPersistence().countByUuid(uuid);
367     }
368 
369     public static int countByUUID_G(java.lang.String uuid, long groupId)
370         throws com.liferay.portal.SystemException {
371         return getPersistence().countByUUID_G(uuid, groupId);
372     }
373 
374     public static int countByGroupId(long groupId)
375         throws com.liferay.portal.SystemException {
376         return getPersistence().countByGroupId(groupId);
377     }
378 
379     public static int countByCompanyId(long companyId)
380         throws com.liferay.portal.SystemException {
381         return getPersistence().countByCompanyId(companyId);
382     }
383 
384     public static int countByG_P(long groupId, long parentCategoryId)
385         throws com.liferay.portal.SystemException {
386         return getPersistence().countByG_P(groupId, parentCategoryId);
387     }
388 
389     public static int countAll() throws com.liferay.portal.SystemException {
390         return getPersistence().countAll();
391     }
392 
393     public static MBCategoryPersistence getPersistence() {
394         return _persistence;
395     }
396 
397     public void setPersistence(MBCategoryPersistence persistence) {
398         _persistence = persistence;
399     }
400 
401     private static MBCategoryPersistence _persistence;
402 }