1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.messageboards.service.persistence;
21  
22  /**
23   * <a href="MBMessageFlagUtil.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   *
27   */
28  public class MBMessageFlagUtil {
29      public static void cacheResult(
30          com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag) {
31          getPersistence().cacheResult(mbMessageFlag);
32      }
33  
34      public static void cacheResult(
35          java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> mbMessageFlags) {
36          getPersistence().cacheResult(mbMessageFlags);
37      }
38  
39      public static void clearCache() {
40          getPersistence().clearCache();
41      }
42  
43      public static com.liferay.portlet.messageboards.model.MBMessageFlag create(
44          long messageFlagId) {
45          return getPersistence().create(messageFlagId);
46      }
47  
48      public static com.liferay.portlet.messageboards.model.MBMessageFlag remove(
49          long messageFlagId)
50          throws com.liferay.portal.SystemException,
51              com.liferay.portlet.messageboards.NoSuchMessageFlagException {
52          return getPersistence().remove(messageFlagId);
53      }
54  
55      public static com.liferay.portlet.messageboards.model.MBMessageFlag remove(
56          com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag)
57          throws com.liferay.portal.SystemException {
58          return getPersistence().remove(mbMessageFlag);
59      }
60  
61      /**
62       * @deprecated Use <code>update(MBMessageFlag mbMessageFlag, boolean merge)</code>.
63       */
64      public static com.liferay.portlet.messageboards.model.MBMessageFlag update(
65          com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag)
66          throws com.liferay.portal.SystemException {
67          return getPersistence().update(mbMessageFlag);
68      }
69  
70      /**
71       * Add, update, or merge, the entity. This method also calls the model
72       * listeners to trigger the proper events associated with adding, deleting,
73       * or updating an entity.
74       *
75       * @param        mbMessageFlag the entity to add, update, or merge
76       * @param        merge boolean value for whether to merge the entity. The
77       *                default value is false. Setting merge to true is more
78       *                expensive and should only be true when mbMessageFlag is
79       *                transient. See LEP-5473 for a detailed discussion of this
80       *                method.
81       * @return        true if the portlet can be displayed via Ajax
82       */
83      public static com.liferay.portlet.messageboards.model.MBMessageFlag update(
84          com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag,
85          boolean merge) throws com.liferay.portal.SystemException {
86          return getPersistence().update(mbMessageFlag, merge);
87      }
88  
89      public static com.liferay.portlet.messageboards.model.MBMessageFlag updateImpl(
90          com.liferay.portlet.messageboards.model.MBMessageFlag mbMessageFlag,
91          boolean merge) throws com.liferay.portal.SystemException {
92          return getPersistence().updateImpl(mbMessageFlag, merge);
93      }
94  
95      public static com.liferay.portlet.messageboards.model.MBMessageFlag findByPrimaryKey(
96          long messageFlagId)
97          throws com.liferay.portal.SystemException,
98              com.liferay.portlet.messageboards.NoSuchMessageFlagException {
99          return getPersistence().findByPrimaryKey(messageFlagId);
100     }
101 
102     public static com.liferay.portlet.messageboards.model.MBMessageFlag fetchByPrimaryKey(
103         long messageFlagId) throws com.liferay.portal.SystemException {
104         return getPersistence().fetchByPrimaryKey(messageFlagId);
105     }
106 
107     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByUserId(
108         long userId) throws com.liferay.portal.SystemException {
109         return getPersistence().findByUserId(userId);
110     }
111 
112     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByUserId(
113         long userId, int start, int end)
114         throws com.liferay.portal.SystemException {
115         return getPersistence().findByUserId(userId, start, end);
116     }
117 
118     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByUserId(
119         long userId, int start, int end,
120         com.liferay.portal.kernel.util.OrderByComparator obc)
121         throws com.liferay.portal.SystemException {
122         return getPersistence().findByUserId(userId, start, end, obc);
123     }
124 
125     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByUserId_First(
126         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
127         throws com.liferay.portal.SystemException,
128             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
129         return getPersistence().findByUserId_First(userId, obc);
130     }
131 
132     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByUserId_Last(
133         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
136         return getPersistence().findByUserId_Last(userId, obc);
137     }
138 
139     public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByUserId_PrevAndNext(
140         long messageFlagId, long userId,
141         com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
144         return getPersistence()
145                    .findByUserId_PrevAndNext(messageFlagId, userId, obc);
146     }
147 
148     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByThreadId(
149         long threadId) throws com.liferay.portal.SystemException {
150         return getPersistence().findByThreadId(threadId);
151     }
152 
153     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByThreadId(
154         long threadId, int start, int end)
155         throws com.liferay.portal.SystemException {
156         return getPersistence().findByThreadId(threadId, start, end);
157     }
158 
159     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByThreadId(
160         long threadId, int start, int end,
161         com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.SystemException {
163         return getPersistence().findByThreadId(threadId, start, end, obc);
164     }
165 
166     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByThreadId_First(
167         long threadId, com.liferay.portal.kernel.util.OrderByComparator obc)
168         throws com.liferay.portal.SystemException,
169             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
170         return getPersistence().findByThreadId_First(threadId, obc);
171     }
172 
173     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByThreadId_Last(
174         long threadId, com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
177         return getPersistence().findByThreadId_Last(threadId, obc);
178     }
179 
180     public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByThreadId_PrevAndNext(
181         long messageFlagId, long threadId,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException,
184             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
185         return getPersistence()
186                    .findByThreadId_PrevAndNext(messageFlagId, threadId, obc);
187     }
188 
189     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByMessageId(
190         long messageId) throws com.liferay.portal.SystemException {
191         return getPersistence().findByMessageId(messageId);
192     }
193 
194     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByMessageId(
195         long messageId, int start, int end)
196         throws com.liferay.portal.SystemException {
197         return getPersistence().findByMessageId(messageId, start, end);
198     }
199 
200     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByMessageId(
201         long messageId, int start, int end,
202         com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException {
204         return getPersistence().findByMessageId(messageId, start, end, obc);
205     }
206 
207     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByMessageId_First(
208         long messageId, com.liferay.portal.kernel.util.OrderByComparator obc)
209         throws com.liferay.portal.SystemException,
210             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
211         return getPersistence().findByMessageId_First(messageId, obc);
212     }
213 
214     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByMessageId_Last(
215         long messageId, com.liferay.portal.kernel.util.OrderByComparator obc)
216         throws com.liferay.portal.SystemException,
217             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
218         return getPersistence().findByMessageId_Last(messageId, obc);
219     }
220 
221     public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByMessageId_PrevAndNext(
222         long messageFlagId, long messageId,
223         com.liferay.portal.kernel.util.OrderByComparator obc)
224         throws com.liferay.portal.SystemException,
225             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
226         return getPersistence()
227                    .findByMessageId_PrevAndNext(messageFlagId, messageId, obc);
228     }
229 
230     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByT_F(
231         long threadId, int flag) throws com.liferay.portal.SystemException {
232         return getPersistence().findByT_F(threadId, flag);
233     }
234 
235     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByT_F(
236         long threadId, int flag, int start, int end)
237         throws com.liferay.portal.SystemException {
238         return getPersistence().findByT_F(threadId, flag, start, end);
239     }
240 
241     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByT_F(
242         long threadId, int flag, int start, int end,
243         com.liferay.portal.kernel.util.OrderByComparator obc)
244         throws com.liferay.portal.SystemException {
245         return getPersistence().findByT_F(threadId, flag, start, end, obc);
246     }
247 
248     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByT_F_First(
249         long threadId, int flag,
250         com.liferay.portal.kernel.util.OrderByComparator obc)
251         throws com.liferay.portal.SystemException,
252             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
253         return getPersistence().findByT_F_First(threadId, flag, obc);
254     }
255 
256     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByT_F_Last(
257         long threadId, int flag,
258         com.liferay.portal.kernel.util.OrderByComparator obc)
259         throws com.liferay.portal.SystemException,
260             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
261         return getPersistence().findByT_F_Last(threadId, flag, obc);
262     }
263 
264     public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByT_F_PrevAndNext(
265         long messageFlagId, long threadId, int flag,
266         com.liferay.portal.kernel.util.OrderByComparator obc)
267         throws com.liferay.portal.SystemException,
268             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
269         return getPersistence()
270                    .findByT_F_PrevAndNext(messageFlagId, threadId, flag, obc);
271     }
272 
273     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByM_F(
274         long messageId, int flag) throws com.liferay.portal.SystemException {
275         return getPersistence().findByM_F(messageId, flag);
276     }
277 
278     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByM_F(
279         long messageId, int flag, int start, int end)
280         throws com.liferay.portal.SystemException {
281         return getPersistence().findByM_F(messageId, flag, start, end);
282     }
283 
284     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByM_F(
285         long messageId, int flag, int start, int end,
286         com.liferay.portal.kernel.util.OrderByComparator obc)
287         throws com.liferay.portal.SystemException {
288         return getPersistence().findByM_F(messageId, flag, start, end, obc);
289     }
290 
291     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByM_F_First(
292         long messageId, int flag,
293         com.liferay.portal.kernel.util.OrderByComparator obc)
294         throws com.liferay.portal.SystemException,
295             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
296         return getPersistence().findByM_F_First(messageId, flag, obc);
297     }
298 
299     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByM_F_Last(
300         long messageId, int flag,
301         com.liferay.portal.kernel.util.OrderByComparator obc)
302         throws com.liferay.portal.SystemException,
303             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
304         return getPersistence().findByM_F_Last(messageId, flag, obc);
305     }
306 
307     public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByM_F_PrevAndNext(
308         long messageFlagId, long messageId, int flag,
309         com.liferay.portal.kernel.util.OrderByComparator obc)
310         throws com.liferay.portal.SystemException,
311             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
312         return getPersistence()
313                    .findByM_F_PrevAndNext(messageFlagId, messageId, flag, obc);
314     }
315 
316     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByU_T_F(
317         long userId, long threadId, int flag)
318         throws com.liferay.portal.SystemException {
319         return getPersistence().findByU_T_F(userId, threadId, flag);
320     }
321 
322     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByU_T_F(
323         long userId, long threadId, int flag, int start, int end)
324         throws com.liferay.portal.SystemException {
325         return getPersistence().findByU_T_F(userId, threadId, flag, start, end);
326     }
327 
328     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findByU_T_F(
329         long userId, long threadId, int flag, int start, int end,
330         com.liferay.portal.kernel.util.OrderByComparator obc)
331         throws com.liferay.portal.SystemException {
332         return getPersistence()
333                    .findByU_T_F(userId, threadId, flag, start, end, obc);
334     }
335 
336     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByU_T_F_First(
337         long userId, long threadId, int flag,
338         com.liferay.portal.kernel.util.OrderByComparator obc)
339         throws com.liferay.portal.SystemException,
340             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
341         return getPersistence().findByU_T_F_First(userId, threadId, flag, obc);
342     }
343 
344     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByU_T_F_Last(
345         long userId, long threadId, int flag,
346         com.liferay.portal.kernel.util.OrderByComparator obc)
347         throws com.liferay.portal.SystemException,
348             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
349         return getPersistence().findByU_T_F_Last(userId, threadId, flag, obc);
350     }
351 
352     public static com.liferay.portlet.messageboards.model.MBMessageFlag[] findByU_T_F_PrevAndNext(
353         long messageFlagId, long userId, long threadId, int flag,
354         com.liferay.portal.kernel.util.OrderByComparator obc)
355         throws com.liferay.portal.SystemException,
356             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
357         return getPersistence()
358                    .findByU_T_F_PrevAndNext(messageFlagId, userId, threadId,
359             flag, obc);
360     }
361 
362     public static com.liferay.portlet.messageboards.model.MBMessageFlag findByU_M_F(
363         long userId, long messageId, int flag)
364         throws com.liferay.portal.SystemException,
365             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
366         return getPersistence().findByU_M_F(userId, messageId, flag);
367     }
368 
369     public static com.liferay.portlet.messageboards.model.MBMessageFlag fetchByU_M_F(
370         long userId, long messageId, int flag)
371         throws com.liferay.portal.SystemException {
372         return getPersistence().fetchByU_M_F(userId, messageId, flag);
373     }
374 
375     public static com.liferay.portlet.messageboards.model.MBMessageFlag fetchByU_M_F(
376         long userId, long messageId, int flag, boolean retrieveFromCache)
377         throws com.liferay.portal.SystemException {
378         return getPersistence()
379                    .fetchByU_M_F(userId, messageId, flag, retrieveFromCache);
380     }
381 
382     public static java.util.List<Object> findWithDynamicQuery(
383         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
384         throws com.liferay.portal.SystemException {
385         return getPersistence().findWithDynamicQuery(dynamicQuery);
386     }
387 
388     public static java.util.List<Object> findWithDynamicQuery(
389         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
390         int end) throws com.liferay.portal.SystemException {
391         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
392     }
393 
394     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findAll()
395         throws com.liferay.portal.SystemException {
396         return getPersistence().findAll();
397     }
398 
399     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findAll(
400         int start, int end) throws com.liferay.portal.SystemException {
401         return getPersistence().findAll(start, end);
402     }
403 
404     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessageFlag> findAll(
405         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
406         throws com.liferay.portal.SystemException {
407         return getPersistence().findAll(start, end, obc);
408     }
409 
410     public static void removeByUserId(long userId)
411         throws com.liferay.portal.SystemException {
412         getPersistence().removeByUserId(userId);
413     }
414 
415     public static void removeByThreadId(long threadId)
416         throws com.liferay.portal.SystemException {
417         getPersistence().removeByThreadId(threadId);
418     }
419 
420     public static void removeByMessageId(long messageId)
421         throws com.liferay.portal.SystemException {
422         getPersistence().removeByMessageId(messageId);
423     }
424 
425     public static void removeByT_F(long threadId, int flag)
426         throws com.liferay.portal.SystemException {
427         getPersistence().removeByT_F(threadId, flag);
428     }
429 
430     public static void removeByM_F(long messageId, int flag)
431         throws com.liferay.portal.SystemException {
432         getPersistence().removeByM_F(messageId, flag);
433     }
434 
435     public static void removeByU_T_F(long userId, long threadId, int flag)
436         throws com.liferay.portal.SystemException {
437         getPersistence().removeByU_T_F(userId, threadId, flag);
438     }
439 
440     public static void removeByU_M_F(long userId, long messageId, int flag)
441         throws com.liferay.portal.SystemException,
442             com.liferay.portlet.messageboards.NoSuchMessageFlagException {
443         getPersistence().removeByU_M_F(userId, messageId, flag);
444     }
445 
446     public static void removeAll() throws com.liferay.portal.SystemException {
447         getPersistence().removeAll();
448     }
449 
450     public static int countByUserId(long userId)
451         throws com.liferay.portal.SystemException {
452         return getPersistence().countByUserId(userId);
453     }
454 
455     public static int countByThreadId(long threadId)
456         throws com.liferay.portal.SystemException {
457         return getPersistence().countByThreadId(threadId);
458     }
459 
460     public static int countByMessageId(long messageId)
461         throws com.liferay.portal.SystemException {
462         return getPersistence().countByMessageId(messageId);
463     }
464 
465     public static int countByT_F(long threadId, int flag)
466         throws com.liferay.portal.SystemException {
467         return getPersistence().countByT_F(threadId, flag);
468     }
469 
470     public static int countByM_F(long messageId, int flag)
471         throws com.liferay.portal.SystemException {
472         return getPersistence().countByM_F(messageId, flag);
473     }
474 
475     public static int countByU_T_F(long userId, long threadId, int flag)
476         throws com.liferay.portal.SystemException {
477         return getPersistence().countByU_T_F(userId, threadId, flag);
478     }
479 
480     public static int countByU_M_F(long userId, long messageId, int flag)
481         throws com.liferay.portal.SystemException {
482         return getPersistence().countByU_M_F(userId, messageId, flag);
483     }
484 
485     public static int countAll() throws com.liferay.portal.SystemException {
486         return getPersistence().countAll();
487     }
488 
489     public static MBMessageFlagPersistence getPersistence() {
490         return _persistence;
491     }
492 
493     public void setPersistence(MBMessageFlagPersistence persistence) {
494         _persistence = persistence;
495     }
496 
497     private static MBMessageFlagPersistence _persistence;
498 }