1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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   * <a href="MBMessageUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class MBMessageUtil {
32      public static com.liferay.portlet.messageboards.model.MBMessage create(
33          long messageId) {
34          return getPersistence().create(messageId);
35      }
36  
37      public static com.liferay.portlet.messageboards.model.MBMessage remove(
38          long messageId)
39          throws com.liferay.portal.SystemException, 
40              com.liferay.portlet.messageboards.NoSuchMessageException {
41          return getPersistence().remove(messageId);
42      }
43  
44      public static com.liferay.portlet.messageboards.model.MBMessage remove(
45          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
46          throws com.liferay.portal.SystemException {
47          return getPersistence().remove(mbMessage);
48      }
49  
50      public static com.liferay.portlet.messageboards.model.MBMessage update(
51          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
52          throws com.liferay.portal.SystemException {
53          return getPersistence().update(mbMessage);
54      }
55  
56      public static com.liferay.portlet.messageboards.model.MBMessage update(
57          com.liferay.portlet.messageboards.model.MBMessage mbMessage,
58          boolean merge) throws com.liferay.portal.SystemException {
59          return getPersistence().update(mbMessage, merge);
60      }
61  
62      public static com.liferay.portlet.messageboards.model.MBMessage updateImpl(
63          com.liferay.portlet.messageboards.model.MBMessage mbMessage,
64          boolean merge) throws com.liferay.portal.SystemException {
65          return getPersistence().updateImpl(mbMessage, merge);
66      }
67  
68      public static com.liferay.portlet.messageboards.model.MBMessage findByPrimaryKey(
69          long messageId)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portlet.messageboards.NoSuchMessageException {
72          return getPersistence().findByPrimaryKey(messageId);
73      }
74  
75      public static com.liferay.portlet.messageboards.model.MBMessage fetchByPrimaryKey(
76          long messageId) throws com.liferay.portal.SystemException {
77          return getPersistence().fetchByPrimaryKey(messageId);
78      }
79  
80      public static java.util.List findByUuid(java.lang.String uuid)
81          throws com.liferay.portal.SystemException {
82          return getPersistence().findByUuid(uuid);
83      }
84  
85      public static java.util.List findByUuid(java.lang.String uuid, int begin,
86          int end) throws com.liferay.portal.SystemException {
87          return getPersistence().findByUuid(uuid, begin, end);
88      }
89  
90      public static java.util.List findByUuid(java.lang.String uuid, int begin,
91          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException {
93          return getPersistence().findByUuid(uuid, begin, end, obc);
94      }
95  
96      public static com.liferay.portlet.messageboards.model.MBMessage findByUuid_First(
97          java.lang.String uuid,
98          com.liferay.portal.kernel.util.OrderByComparator obc)
99          throws com.liferay.portal.SystemException, 
100             com.liferay.portlet.messageboards.NoSuchMessageException {
101         return getPersistence().findByUuid_First(uuid, obc);
102     }
103 
104     public static com.liferay.portlet.messageboards.model.MBMessage findByUuid_Last(
105         java.lang.String uuid,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException, 
108             com.liferay.portlet.messageboards.NoSuchMessageException {
109         return getPersistence().findByUuid_Last(uuid, obc);
110     }
111 
112     public static com.liferay.portlet.messageboards.model.MBMessage[] findByUuid_PrevAndNext(
113         long messageId, java.lang.String uuid,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException, 
116             com.liferay.portlet.messageboards.NoSuchMessageException {
117         return getPersistence().findByUuid_PrevAndNext(messageId, uuid, obc);
118     }
119 
120     public static java.util.List findByCompanyId(long companyId)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findByCompanyId(companyId);
123     }
124 
125     public static java.util.List findByCompanyId(long companyId, int begin,
126         int end) throws com.liferay.portal.SystemException {
127         return getPersistence().findByCompanyId(companyId, begin, end);
128     }
129 
130     public static java.util.List findByCompanyId(long companyId, int begin,
131         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
132         throws com.liferay.portal.SystemException {
133         return getPersistence().findByCompanyId(companyId, begin, end, obc);
134     }
135 
136     public static com.liferay.portlet.messageboards.model.MBMessage findByCompanyId_First(
137         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
138         throws com.liferay.portal.SystemException, 
139             com.liferay.portlet.messageboards.NoSuchMessageException {
140         return getPersistence().findByCompanyId_First(companyId, obc);
141     }
142 
143     public static com.liferay.portlet.messageboards.model.MBMessage findByCompanyId_Last(
144         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException, 
146             com.liferay.portlet.messageboards.NoSuchMessageException {
147         return getPersistence().findByCompanyId_Last(companyId, obc);
148     }
149 
150     public static com.liferay.portlet.messageboards.model.MBMessage[] findByCompanyId_PrevAndNext(
151         long messageId, long companyId,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException, 
154             com.liferay.portlet.messageboards.NoSuchMessageException {
155         return getPersistence().findByCompanyId_PrevAndNext(messageId,
156             companyId, obc);
157     }
158 
159     public static java.util.List findByCategoryId(long categoryId)
160         throws com.liferay.portal.SystemException {
161         return getPersistence().findByCategoryId(categoryId);
162     }
163 
164     public static java.util.List findByCategoryId(long categoryId, int begin,
165         int end) throws com.liferay.portal.SystemException {
166         return getPersistence().findByCategoryId(categoryId, begin, end);
167     }
168 
169     public static java.util.List findByCategoryId(long categoryId, int begin,
170         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException {
172         return getPersistence().findByCategoryId(categoryId, begin, end, obc);
173     }
174 
175     public static com.liferay.portlet.messageboards.model.MBMessage findByCategoryId_First(
176         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
177         throws com.liferay.portal.SystemException, 
178             com.liferay.portlet.messageboards.NoSuchMessageException {
179         return getPersistence().findByCategoryId_First(categoryId, obc);
180     }
181 
182     public static com.liferay.portlet.messageboards.model.MBMessage findByCategoryId_Last(
183         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException, 
185             com.liferay.portlet.messageboards.NoSuchMessageException {
186         return getPersistence().findByCategoryId_Last(categoryId, obc);
187     }
188 
189     public static com.liferay.portlet.messageboards.model.MBMessage[] findByCategoryId_PrevAndNext(
190         long messageId, long categoryId,
191         com.liferay.portal.kernel.util.OrderByComparator obc)
192         throws com.liferay.portal.SystemException, 
193             com.liferay.portlet.messageboards.NoSuchMessageException {
194         return getPersistence().findByCategoryId_PrevAndNext(messageId,
195             categoryId, obc);
196     }
197 
198     public static java.util.List findByThreadId(long threadId)
199         throws com.liferay.portal.SystemException {
200         return getPersistence().findByThreadId(threadId);
201     }
202 
203     public static java.util.List findByThreadId(long threadId, int begin,
204         int end) throws com.liferay.portal.SystemException {
205         return getPersistence().findByThreadId(threadId, begin, end);
206     }
207 
208     public static java.util.List findByThreadId(long threadId, int begin,
209         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
210         throws com.liferay.portal.SystemException {
211         return getPersistence().findByThreadId(threadId, begin, end, obc);
212     }
213 
214     public static com.liferay.portlet.messageboards.model.MBMessage findByThreadId_First(
215         long threadId, com.liferay.portal.kernel.util.OrderByComparator obc)
216         throws com.liferay.portal.SystemException, 
217             com.liferay.portlet.messageboards.NoSuchMessageException {
218         return getPersistence().findByThreadId_First(threadId, obc);
219     }
220 
221     public static com.liferay.portlet.messageboards.model.MBMessage findByThreadId_Last(
222         long threadId, com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.SystemException, 
224             com.liferay.portlet.messageboards.NoSuchMessageException {
225         return getPersistence().findByThreadId_Last(threadId, obc);
226     }
227 
228     public static com.liferay.portlet.messageboards.model.MBMessage[] findByThreadId_PrevAndNext(
229         long messageId, long threadId,
230         com.liferay.portal.kernel.util.OrderByComparator obc)
231         throws com.liferay.portal.SystemException, 
232             com.liferay.portlet.messageboards.NoSuchMessageException {
233         return getPersistence().findByThreadId_PrevAndNext(messageId, threadId,
234             obc);
235     }
236 
237     public static java.util.List findByC_T(long categoryId, long threadId)
238         throws com.liferay.portal.SystemException {
239         return getPersistence().findByC_T(categoryId, threadId);
240     }
241 
242     public static java.util.List findByC_T(long categoryId, long threadId,
243         int begin, int end) throws com.liferay.portal.SystemException {
244         return getPersistence().findByC_T(categoryId, threadId, begin, end);
245     }
246 
247     public static java.util.List findByC_T(long categoryId, long threadId,
248         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
249         throws com.liferay.portal.SystemException {
250         return getPersistence().findByC_T(categoryId, threadId, begin, end, obc);
251     }
252 
253     public static com.liferay.portlet.messageboards.model.MBMessage findByC_T_First(
254         long categoryId, long threadId,
255         com.liferay.portal.kernel.util.OrderByComparator obc)
256         throws com.liferay.portal.SystemException, 
257             com.liferay.portlet.messageboards.NoSuchMessageException {
258         return getPersistence().findByC_T_First(categoryId, threadId, obc);
259     }
260 
261     public static com.liferay.portlet.messageboards.model.MBMessage findByC_T_Last(
262         long categoryId, long threadId,
263         com.liferay.portal.kernel.util.OrderByComparator obc)
264         throws com.liferay.portal.SystemException, 
265             com.liferay.portlet.messageboards.NoSuchMessageException {
266         return getPersistence().findByC_T_Last(categoryId, threadId, obc);
267     }
268 
269     public static com.liferay.portlet.messageboards.model.MBMessage[] findByC_T_PrevAndNext(
270         long messageId, long categoryId, long threadId,
271         com.liferay.portal.kernel.util.OrderByComparator obc)
272         throws com.liferay.portal.SystemException, 
273             com.liferay.portlet.messageboards.NoSuchMessageException {
274         return getPersistence().findByC_T_PrevAndNext(messageId, categoryId,
275             threadId, obc);
276     }
277 
278     public static java.util.List findByT_P(long threadId, long parentMessageId)
279         throws com.liferay.portal.SystemException {
280         return getPersistence().findByT_P(threadId, parentMessageId);
281     }
282 
283     public static java.util.List findByT_P(long threadId, long parentMessageId,
284         int begin, int end) throws com.liferay.portal.SystemException {
285         return getPersistence().findByT_P(threadId, parentMessageId, begin, end);
286     }
287 
288     public static java.util.List findByT_P(long threadId, long parentMessageId,
289         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
290         throws com.liferay.portal.SystemException {
291         return getPersistence().findByT_P(threadId, parentMessageId, begin,
292             end, obc);
293     }
294 
295     public static com.liferay.portlet.messageboards.model.MBMessage findByT_P_First(
296         long threadId, long parentMessageId,
297         com.liferay.portal.kernel.util.OrderByComparator obc)
298         throws com.liferay.portal.SystemException, 
299             com.liferay.portlet.messageboards.NoSuchMessageException {
300         return getPersistence().findByT_P_First(threadId, parentMessageId, obc);
301     }
302 
303     public static com.liferay.portlet.messageboards.model.MBMessage findByT_P_Last(
304         long threadId, long parentMessageId,
305         com.liferay.portal.kernel.util.OrderByComparator obc)
306         throws com.liferay.portal.SystemException, 
307             com.liferay.portlet.messageboards.NoSuchMessageException {
308         return getPersistence().findByT_P_Last(threadId, parentMessageId, obc);
309     }
310 
311     public static com.liferay.portlet.messageboards.model.MBMessage[] findByT_P_PrevAndNext(
312         long messageId, long threadId, long parentMessageId,
313         com.liferay.portal.kernel.util.OrderByComparator obc)
314         throws com.liferay.portal.SystemException, 
315             com.liferay.portlet.messageboards.NoSuchMessageException {
316         return getPersistence().findByT_P_PrevAndNext(messageId, threadId,
317             parentMessageId, obc);
318     }
319 
320     public static java.util.List findWithDynamicQuery(
321         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
322         throws com.liferay.portal.SystemException {
323         return getPersistence().findWithDynamicQuery(queryInitializer);
324     }
325 
326     public static java.util.List findWithDynamicQuery(
327         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
328         int begin, int end) throws com.liferay.portal.SystemException {
329         return getPersistence().findWithDynamicQuery(queryInitializer, begin,
330             end);
331     }
332 
333     public static java.util.List findAll()
334         throws com.liferay.portal.SystemException {
335         return getPersistence().findAll();
336     }
337 
338     public static java.util.List findAll(int begin, int end)
339         throws com.liferay.portal.SystemException {
340         return getPersistence().findAll(begin, end);
341     }
342 
343     public static java.util.List findAll(int begin, int end,
344         com.liferay.portal.kernel.util.OrderByComparator obc)
345         throws com.liferay.portal.SystemException {
346         return getPersistence().findAll(begin, end, obc);
347     }
348 
349     public static void removeByUuid(java.lang.String uuid)
350         throws com.liferay.portal.SystemException {
351         getPersistence().removeByUuid(uuid);
352     }
353 
354     public static void removeByCompanyId(long companyId)
355         throws com.liferay.portal.SystemException {
356         getPersistence().removeByCompanyId(companyId);
357     }
358 
359     public static void removeByCategoryId(long categoryId)
360         throws com.liferay.portal.SystemException {
361         getPersistence().removeByCategoryId(categoryId);
362     }
363 
364     public static void removeByThreadId(long threadId)
365         throws com.liferay.portal.SystemException {
366         getPersistence().removeByThreadId(threadId);
367     }
368 
369     public static void removeByC_T(long categoryId, long threadId)
370         throws com.liferay.portal.SystemException {
371         getPersistence().removeByC_T(categoryId, threadId);
372     }
373 
374     public static void removeByT_P(long threadId, long parentMessageId)
375         throws com.liferay.portal.SystemException {
376         getPersistence().removeByT_P(threadId, parentMessageId);
377     }
378 
379     public static void removeAll() throws com.liferay.portal.SystemException {
380         getPersistence().removeAll();
381     }
382 
383     public static int countByUuid(java.lang.String uuid)
384         throws com.liferay.portal.SystemException {
385         return getPersistence().countByUuid(uuid);
386     }
387 
388     public static int countByCompanyId(long companyId)
389         throws com.liferay.portal.SystemException {
390         return getPersistence().countByCompanyId(companyId);
391     }
392 
393     public static int countByCategoryId(long categoryId)
394         throws com.liferay.portal.SystemException {
395         return getPersistence().countByCategoryId(categoryId);
396     }
397 
398     public static int countByThreadId(long threadId)
399         throws com.liferay.portal.SystemException {
400         return getPersistence().countByThreadId(threadId);
401     }
402 
403     public static int countByC_T(long categoryId, long threadId)
404         throws com.liferay.portal.SystemException {
405         return getPersistence().countByC_T(categoryId, threadId);
406     }
407 
408     public static int countByT_P(long threadId, long parentMessageId)
409         throws com.liferay.portal.SystemException {
410         return getPersistence().countByT_P(threadId, parentMessageId);
411     }
412 
413     public static int countAll() throws com.liferay.portal.SystemException {
414         return getPersistence().countAll();
415     }
416 
417     public static MBMessagePersistence getPersistence() {
418         return _getUtil()._persistence;
419     }
420 
421     public void setPersistence(MBMessagePersistence persistence) {
422         _persistence = persistence;
423     }
424 
425     private static MBMessageUtil _getUtil() {
426         if (_util == null) {
427             _util = (MBMessageUtil)com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(_UTIL);
428         }
429 
430         return _util;
431     }
432 
433     private static final String _UTIL = MBMessageUtil.class.getName();
434     private static MBMessageUtil _util;
435     private MBMessagePersistence _persistence;
436 }