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