1   /**
2    * Copyright (c) 2000-2009 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  import com.liferay.portal.service.persistence.BasePersistence;
26  
27  /**
28   * <a href="MBMessagePersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   *
32   */
33  public interface MBMessagePersistence extends BasePersistence {
34      public void cacheResult(
35          com.liferay.portlet.messageboards.model.MBMessage mbMessage);
36  
37      public void cacheResult(
38          java.util.List<com.liferay.portlet.messageboards.model.MBMessage> mbMessages);
39  
40      public void clearCache();
41  
42      public com.liferay.portlet.messageboards.model.MBMessage create(
43          long messageId);
44  
45      public com.liferay.portlet.messageboards.model.MBMessage remove(
46          long messageId)
47          throws com.liferay.portal.SystemException,
48              com.liferay.portlet.messageboards.NoSuchMessageException;
49  
50      public com.liferay.portlet.messageboards.model.MBMessage remove(
51          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
52          throws com.liferay.portal.SystemException;
53  
54      /**
55       * @deprecated Use <code>update(MBMessage mbMessage, boolean merge)</code>.
56       */
57      public com.liferay.portlet.messageboards.model.MBMessage update(
58          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
59          throws com.liferay.portal.SystemException;
60  
61      /**
62       * Add, update, or merge, the entity. This method also calls the model
63       * listeners to trigger the proper events associated with adding, deleting,
64       * or updating an entity.
65       *
66       * @param        mbMessage the entity to add, update, or merge
67       * @param        merge boolean value for whether to merge the entity. The
68       *                default value is false. Setting merge to true is more
69       *                expensive and should only be true when mbMessage is
70       *                transient. See LEP-5473 for a detailed discussion of this
71       *                method.
72       * @return        true if the portlet can be displayed via Ajax
73       */
74      public com.liferay.portlet.messageboards.model.MBMessage update(
75          com.liferay.portlet.messageboards.model.MBMessage mbMessage,
76          boolean merge) throws com.liferay.portal.SystemException;
77  
78      public com.liferay.portlet.messageboards.model.MBMessage updateImpl(
79          com.liferay.portlet.messageboards.model.MBMessage mbMessage,
80          boolean merge) throws com.liferay.portal.SystemException;
81  
82      public com.liferay.portlet.messageboards.model.MBMessage findByPrimaryKey(
83          long messageId)
84          throws com.liferay.portal.SystemException,
85              com.liferay.portlet.messageboards.NoSuchMessageException;
86  
87      public com.liferay.portlet.messageboards.model.MBMessage fetchByPrimaryKey(
88          long messageId) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByUuid(
91          java.lang.String uuid) throws com.liferay.portal.SystemException;
92  
93      public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByUuid(
94          java.lang.String uuid, int start, int end)
95          throws com.liferay.portal.SystemException;
96  
97      public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByUuid(
98          java.lang.String uuid, int start, int end,
99          com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException;
101 
102     public com.liferay.portlet.messageboards.model.MBMessage findByUuid_First(
103         java.lang.String uuid,
104         com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.SystemException,
106             com.liferay.portlet.messageboards.NoSuchMessageException;
107 
108     public com.liferay.portlet.messageboards.model.MBMessage findByUuid_Last(
109         java.lang.String uuid,
110         com.liferay.portal.kernel.util.OrderByComparator obc)
111         throws com.liferay.portal.SystemException,
112             com.liferay.portlet.messageboards.NoSuchMessageException;
113 
114     public com.liferay.portlet.messageboards.model.MBMessage[] findByUuid_PrevAndNext(
115         long messageId, java.lang.String uuid,
116         com.liferay.portal.kernel.util.OrderByComparator obc)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.messageboards.NoSuchMessageException;
119 
120     public com.liferay.portlet.messageboards.model.MBMessage findByUUID_G(
121         java.lang.String uuid, long groupId)
122         throws com.liferay.portal.SystemException,
123             com.liferay.portlet.messageboards.NoSuchMessageException;
124 
125     public com.liferay.portlet.messageboards.model.MBMessage fetchByUUID_G(
126         java.lang.String uuid, long groupId)
127         throws com.liferay.portal.SystemException;
128 
129     public com.liferay.portlet.messageboards.model.MBMessage fetchByUUID_G(
130         java.lang.String uuid, long groupId, boolean retrieveFromCache)
131         throws com.liferay.portal.SystemException;
132 
133     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByCompanyId(
134         long companyId) throws com.liferay.portal.SystemException;
135 
136     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByCompanyId(
137         long companyId, int start, int end)
138         throws com.liferay.portal.SystemException;
139 
140     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByCompanyId(
141         long companyId, int start, int end,
142         com.liferay.portal.kernel.util.OrderByComparator obc)
143         throws com.liferay.portal.SystemException;
144 
145     public com.liferay.portlet.messageboards.model.MBMessage findByCompanyId_First(
146         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException,
148             com.liferay.portlet.messageboards.NoSuchMessageException;
149 
150     public com.liferay.portlet.messageboards.model.MBMessage findByCompanyId_Last(
151         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.SystemException,
153             com.liferay.portlet.messageboards.NoSuchMessageException;
154 
155     public com.liferay.portlet.messageboards.model.MBMessage[] findByCompanyId_PrevAndNext(
156         long messageId, long companyId,
157         com.liferay.portal.kernel.util.OrderByComparator obc)
158         throws com.liferay.portal.SystemException,
159             com.liferay.portlet.messageboards.NoSuchMessageException;
160 
161     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByGroupId(
162         long groupId) throws com.liferay.portal.SystemException;
163 
164     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByGroupId(
165         long groupId, int start, int end)
166         throws com.liferay.portal.SystemException;
167 
168     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByGroupId(
169         long groupId, int start, int end,
170         com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException;
172 
173     public com.liferay.portlet.messageboards.model.MBMessage findByGroupId_First(
174         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
175         throws com.liferay.portal.SystemException,
176             com.liferay.portlet.messageboards.NoSuchMessageException;
177 
178     public com.liferay.portlet.messageboards.model.MBMessage findByGroupId_Last(
179         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
180         throws com.liferay.portal.SystemException,
181             com.liferay.portlet.messageboards.NoSuchMessageException;
182 
183     public com.liferay.portlet.messageboards.model.MBMessage[] findByGroupId_PrevAndNext(
184         long messageId, long groupId,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.messageboards.NoSuchMessageException;
188 
189     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByCategoryId(
190         long categoryId) throws com.liferay.portal.SystemException;
191 
192     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByCategoryId(
193         long categoryId, int start, int end)
194         throws com.liferay.portal.SystemException;
195 
196     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByCategoryId(
197         long categoryId, int start, int end,
198         com.liferay.portal.kernel.util.OrderByComparator obc)
199         throws com.liferay.portal.SystemException;
200 
201     public com.liferay.portlet.messageboards.model.MBMessage findByCategoryId_First(
202         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
203         throws com.liferay.portal.SystemException,
204             com.liferay.portlet.messageboards.NoSuchMessageException;
205 
206     public com.liferay.portlet.messageboards.model.MBMessage findByCategoryId_Last(
207         long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException,
209             com.liferay.portlet.messageboards.NoSuchMessageException;
210 
211     public com.liferay.portlet.messageboards.model.MBMessage[] findByCategoryId_PrevAndNext(
212         long messageId, long categoryId,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException,
215             com.liferay.portlet.messageboards.NoSuchMessageException;
216 
217     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByThreadId(
218         long threadId) throws com.liferay.portal.SystemException;
219 
220     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByThreadId(
221         long threadId, int start, int end)
222         throws com.liferay.portal.SystemException;
223 
224     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByThreadId(
225         long threadId, int start, int end,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.SystemException;
228 
229     public com.liferay.portlet.messageboards.model.MBMessage findByThreadId_First(
230         long threadId, com.liferay.portal.kernel.util.OrderByComparator obc)
231         throws com.liferay.portal.SystemException,
232             com.liferay.portlet.messageboards.NoSuchMessageException;
233 
234     public com.liferay.portlet.messageboards.model.MBMessage findByThreadId_Last(
235         long threadId, com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.SystemException,
237             com.liferay.portlet.messageboards.NoSuchMessageException;
238 
239     public com.liferay.portlet.messageboards.model.MBMessage[] findByThreadId_PrevAndNext(
240         long messageId, long threadId,
241         com.liferay.portal.kernel.util.OrderByComparator obc)
242         throws com.liferay.portal.SystemException,
243             com.liferay.portlet.messageboards.NoSuchMessageException;
244 
245     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByThreadReplies(
246         long threadId) throws com.liferay.portal.SystemException;
247 
248     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByThreadReplies(
249         long threadId, int start, int end)
250         throws com.liferay.portal.SystemException;
251 
252     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByThreadReplies(
253         long threadId, int start, int end,
254         com.liferay.portal.kernel.util.OrderByComparator obc)
255         throws com.liferay.portal.SystemException;
256 
257     public com.liferay.portlet.messageboards.model.MBMessage findByThreadReplies_First(
258         long threadId, com.liferay.portal.kernel.util.OrderByComparator obc)
259         throws com.liferay.portal.SystemException,
260             com.liferay.portlet.messageboards.NoSuchMessageException;
261 
262     public com.liferay.portlet.messageboards.model.MBMessage findByThreadReplies_Last(
263         long threadId, com.liferay.portal.kernel.util.OrderByComparator obc)
264         throws com.liferay.portal.SystemException,
265             com.liferay.portlet.messageboards.NoSuchMessageException;
266 
267     public com.liferay.portlet.messageboards.model.MBMessage[] findByThreadReplies_PrevAndNext(
268         long messageId, long threadId,
269         com.liferay.portal.kernel.util.OrderByComparator obc)
270         throws com.liferay.portal.SystemException,
271             com.liferay.portlet.messageboards.NoSuchMessageException;
272 
273     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByG_U(
274         long groupId, long userId) throws com.liferay.portal.SystemException;
275 
276     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByG_U(
277         long groupId, long userId, int start, int end)
278         throws com.liferay.portal.SystemException;
279 
280     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByG_U(
281         long groupId, long userId, int start, int end,
282         com.liferay.portal.kernel.util.OrderByComparator obc)
283         throws com.liferay.portal.SystemException;
284 
285     public com.liferay.portlet.messageboards.model.MBMessage findByG_U_First(
286         long groupId, long userId,
287         com.liferay.portal.kernel.util.OrderByComparator obc)
288         throws com.liferay.portal.SystemException,
289             com.liferay.portlet.messageboards.NoSuchMessageException;
290 
291     public com.liferay.portlet.messageboards.model.MBMessage findByG_U_Last(
292         long groupId, long userId,
293         com.liferay.portal.kernel.util.OrderByComparator obc)
294         throws com.liferay.portal.SystemException,
295             com.liferay.portlet.messageboards.NoSuchMessageException;
296 
297     public com.liferay.portlet.messageboards.model.MBMessage[] findByG_U_PrevAndNext(
298         long messageId, long groupId, long userId,
299         com.liferay.portal.kernel.util.OrderByComparator obc)
300         throws com.liferay.portal.SystemException,
301             com.liferay.portlet.messageboards.NoSuchMessageException;
302 
303     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByC_C(
304         long classNameId, long classPK)
305         throws com.liferay.portal.SystemException;
306 
307     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByC_C(
308         long classNameId, long classPK, int start, int end)
309         throws com.liferay.portal.SystemException;
310 
311     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByC_C(
312         long classNameId, long classPK, int start, int end,
313         com.liferay.portal.kernel.util.OrderByComparator obc)
314         throws com.liferay.portal.SystemException;
315 
316     public com.liferay.portlet.messageboards.model.MBMessage findByC_C_First(
317         long classNameId, long classPK,
318         com.liferay.portal.kernel.util.OrderByComparator obc)
319         throws com.liferay.portal.SystemException,
320             com.liferay.portlet.messageboards.NoSuchMessageException;
321 
322     public com.liferay.portlet.messageboards.model.MBMessage findByC_C_Last(
323         long classNameId, long classPK,
324         com.liferay.portal.kernel.util.OrderByComparator obc)
325         throws com.liferay.portal.SystemException,
326             com.liferay.portlet.messageboards.NoSuchMessageException;
327 
328     public com.liferay.portlet.messageboards.model.MBMessage[] findByC_C_PrevAndNext(
329         long messageId, long classNameId, long classPK,
330         com.liferay.portal.kernel.util.OrderByComparator obc)
331         throws com.liferay.portal.SystemException,
332             com.liferay.portlet.messageboards.NoSuchMessageException;
333 
334     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByC_T(
335         long categoryId, long threadId)
336         throws com.liferay.portal.SystemException;
337 
338     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByC_T(
339         long categoryId, long threadId, int start, int end)
340         throws com.liferay.portal.SystemException;
341 
342     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByC_T(
343         long categoryId, long threadId, int start, int end,
344         com.liferay.portal.kernel.util.OrderByComparator obc)
345         throws com.liferay.portal.SystemException;
346 
347     public com.liferay.portlet.messageboards.model.MBMessage findByC_T_First(
348         long categoryId, long threadId,
349         com.liferay.portal.kernel.util.OrderByComparator obc)
350         throws com.liferay.portal.SystemException,
351             com.liferay.portlet.messageboards.NoSuchMessageException;
352 
353     public com.liferay.portlet.messageboards.model.MBMessage findByC_T_Last(
354         long categoryId, long threadId,
355         com.liferay.portal.kernel.util.OrderByComparator obc)
356         throws com.liferay.portal.SystemException,
357             com.liferay.portlet.messageboards.NoSuchMessageException;
358 
359     public com.liferay.portlet.messageboards.model.MBMessage[] findByC_T_PrevAndNext(
360         long messageId, long categoryId, long threadId,
361         com.liferay.portal.kernel.util.OrderByComparator obc)
362         throws com.liferay.portal.SystemException,
363             com.liferay.portlet.messageboards.NoSuchMessageException;
364 
365     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByT_P(
366         long threadId, long parentMessageId)
367         throws com.liferay.portal.SystemException;
368 
369     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByT_P(
370         long threadId, long parentMessageId, int start, int end)
371         throws com.liferay.portal.SystemException;
372 
373     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findByT_P(
374         long threadId, long parentMessageId, int start, int end,
375         com.liferay.portal.kernel.util.OrderByComparator obc)
376         throws com.liferay.portal.SystemException;
377 
378     public com.liferay.portlet.messageboards.model.MBMessage findByT_P_First(
379         long threadId, long parentMessageId,
380         com.liferay.portal.kernel.util.OrderByComparator obc)
381         throws com.liferay.portal.SystemException,
382             com.liferay.portlet.messageboards.NoSuchMessageException;
383 
384     public com.liferay.portlet.messageboards.model.MBMessage findByT_P_Last(
385         long threadId, long parentMessageId,
386         com.liferay.portal.kernel.util.OrderByComparator obc)
387         throws com.liferay.portal.SystemException,
388             com.liferay.portlet.messageboards.NoSuchMessageException;
389 
390     public com.liferay.portlet.messageboards.model.MBMessage[] findByT_P_PrevAndNext(
391         long messageId, long threadId, long parentMessageId,
392         com.liferay.portal.kernel.util.OrderByComparator obc)
393         throws com.liferay.portal.SystemException,
394             com.liferay.portlet.messageboards.NoSuchMessageException;
395 
396     public java.util.List<Object> findWithDynamicQuery(
397         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
398         throws com.liferay.portal.SystemException;
399 
400     public java.util.List<Object> findWithDynamicQuery(
401         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
402         int end) throws com.liferay.portal.SystemException;
403 
404     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findAll()
405         throws com.liferay.portal.SystemException;
406 
407     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findAll(
408         int start, int end) throws com.liferay.portal.SystemException;
409 
410     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> findAll(
411         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
412         throws com.liferay.portal.SystemException;
413 
414     public void removeByUuid(java.lang.String uuid)
415         throws com.liferay.portal.SystemException;
416 
417     public void removeByUUID_G(java.lang.String uuid, long groupId)
418         throws com.liferay.portal.SystemException,
419             com.liferay.portlet.messageboards.NoSuchMessageException;
420 
421     public void removeByCompanyId(long companyId)
422         throws com.liferay.portal.SystemException;
423 
424     public void removeByGroupId(long groupId)
425         throws com.liferay.portal.SystemException;
426 
427     public void removeByCategoryId(long categoryId)
428         throws com.liferay.portal.SystemException;
429 
430     public void removeByThreadId(long threadId)
431         throws com.liferay.portal.SystemException;
432 
433     public void removeByThreadReplies(long threadId)
434         throws com.liferay.portal.SystemException;
435 
436     public void removeByG_U(long groupId, long userId)
437         throws com.liferay.portal.SystemException;
438 
439     public void removeByC_C(long classNameId, long classPK)
440         throws com.liferay.portal.SystemException;
441 
442     public void removeByC_T(long categoryId, long threadId)
443         throws com.liferay.portal.SystemException;
444 
445     public void removeByT_P(long threadId, long parentMessageId)
446         throws com.liferay.portal.SystemException;
447 
448     public void removeAll() throws com.liferay.portal.SystemException;
449 
450     public int countByUuid(java.lang.String uuid)
451         throws com.liferay.portal.SystemException;
452 
453     public int countByUUID_G(java.lang.String uuid, long groupId)
454         throws com.liferay.portal.SystemException;
455 
456     public int countByCompanyId(long companyId)
457         throws com.liferay.portal.SystemException;
458 
459     public int countByGroupId(long groupId)
460         throws com.liferay.portal.SystemException;
461 
462     public int countByCategoryId(long categoryId)
463         throws com.liferay.portal.SystemException;
464 
465     public int countByThreadId(long threadId)
466         throws com.liferay.portal.SystemException;
467 
468     public int countByThreadReplies(long threadId)
469         throws com.liferay.portal.SystemException;
470 
471     public int countByG_U(long groupId, long userId)
472         throws com.liferay.portal.SystemException;
473 
474     public int countByC_C(long classNameId, long classPK)
475         throws com.liferay.portal.SystemException;
476 
477     public int countByC_T(long categoryId, long threadId)
478         throws com.liferay.portal.SystemException;
479 
480     public int countByT_P(long threadId, long parentMessageId)
481         throws com.liferay.portal.SystemException;
482 
483     public int countAll() throws com.liferay.portal.SystemException;
484 }