001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.service.persistence.BasePersistence;
020    
021    import com.liferay.portlet.messageboards.model.MBDiscussion;
022    
023    /**
024     * The persistence interface for the message boards discussion service.
025     *
026     * <p>
027     * Caching information and settings can be found in <code>portal.properties</code>
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see com.liferay.portlet.messageboards.service.persistence.impl.MBDiscussionPersistenceImpl
032     * @see MBDiscussionUtil
033     * @generated
034     */
035    @ProviderType
036    public interface MBDiscussionPersistence extends BasePersistence<MBDiscussion> {
037            /*
038             * NOTE FOR DEVELOPERS:
039             *
040             * Never modify or reference this interface directly. Always use {@link MBDiscussionUtil} to access the message boards discussion persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
041             */
042    
043            /**
044            * Returns all the message boards discussions where uuid = &#63;.
045            *
046            * @param uuid the uuid
047            * @return the matching message boards discussions
048            */
049            public java.util.List<MBDiscussion> findByUuid(java.lang.String uuid);
050    
051            /**
052            * Returns a range of all the message boards discussions where uuid = &#63;.
053            *
054            * <p>
055            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
056            * </p>
057            *
058            * @param uuid the uuid
059            * @param start the lower bound of the range of message boards discussions
060            * @param end the upper bound of the range of message boards discussions (not inclusive)
061            * @return the range of matching message boards discussions
062            */
063            public java.util.List<MBDiscussion> findByUuid(java.lang.String uuid,
064                    int start, int end);
065    
066            /**
067            * Returns an ordered range of all the message boards discussions where uuid = &#63;.
068            *
069            * <p>
070            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
071            * </p>
072            *
073            * @param uuid the uuid
074            * @param start the lower bound of the range of message boards discussions
075            * @param end the upper bound of the range of message boards discussions (not inclusive)
076            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
077            * @return the ordered range of matching message boards discussions
078            */
079            public java.util.List<MBDiscussion> findByUuid(java.lang.String uuid,
080                    int start, int end,
081                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
082    
083            /**
084            * Returns the first message boards discussion in the ordered set where uuid = &#63;.
085            *
086            * @param uuid the uuid
087            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
088            * @return the first matching message boards discussion
089            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
090            */
091            public MBDiscussion findByUuid_First(java.lang.String uuid,
092                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
093                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
094    
095            /**
096            * Returns the first message boards discussion in the ordered set where uuid = &#63;.
097            *
098            * @param uuid the uuid
099            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
100            * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
101            */
102            public MBDiscussion fetchByUuid_First(java.lang.String uuid,
103                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
104    
105            /**
106            * Returns the last message boards discussion in the ordered set where uuid = &#63;.
107            *
108            * @param uuid the uuid
109            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
110            * @return the last matching message boards discussion
111            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
112            */
113            public MBDiscussion findByUuid_Last(java.lang.String uuid,
114                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
115                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
116    
117            /**
118            * Returns the last message boards discussion in the ordered set where uuid = &#63;.
119            *
120            * @param uuid the uuid
121            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
122            * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
123            */
124            public MBDiscussion fetchByUuid_Last(java.lang.String uuid,
125                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
126    
127            /**
128            * Returns the message boards discussions before and after the current message boards discussion in the ordered set where uuid = &#63;.
129            *
130            * @param discussionId the primary key of the current message boards discussion
131            * @param uuid the uuid
132            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
133            * @return the previous, current, and next message boards discussion
134            * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found
135            */
136            public MBDiscussion[] findByUuid_PrevAndNext(long discussionId,
137                    java.lang.String uuid,
138                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
139                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
140    
141            /**
142            * Removes all the message boards discussions where uuid = &#63; from the database.
143            *
144            * @param uuid the uuid
145            */
146            public void removeByUuid(java.lang.String uuid);
147    
148            /**
149            * Returns the number of message boards discussions where uuid = &#63;.
150            *
151            * @param uuid the uuid
152            * @return the number of matching message boards discussions
153            */
154            public int countByUuid(java.lang.String uuid);
155    
156            /**
157            * Returns the message boards discussion where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchDiscussionException} if it could not be found.
158            *
159            * @param uuid the uuid
160            * @param groupId the group ID
161            * @return the matching message boards discussion
162            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
163            */
164            public MBDiscussion findByUUID_G(java.lang.String uuid, long groupId)
165                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
166    
167            /**
168            * Returns the message boards discussion where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
169            *
170            * @param uuid the uuid
171            * @param groupId the group ID
172            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
173            */
174            public MBDiscussion fetchByUUID_G(java.lang.String uuid, long groupId);
175    
176            /**
177            * Returns the message boards discussion where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
178            *
179            * @param uuid the uuid
180            * @param groupId the group ID
181            * @param retrieveFromCache whether to use the finder cache
182            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
183            */
184            public MBDiscussion fetchByUUID_G(java.lang.String uuid, long groupId,
185                    boolean retrieveFromCache);
186    
187            /**
188            * Removes the message boards discussion where uuid = &#63; and groupId = &#63; from the database.
189            *
190            * @param uuid the uuid
191            * @param groupId the group ID
192            * @return the message boards discussion that was removed
193            */
194            public MBDiscussion removeByUUID_G(java.lang.String uuid, long groupId)
195                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
196    
197            /**
198            * Returns the number of message boards discussions where uuid = &#63; and groupId = &#63;.
199            *
200            * @param uuid the uuid
201            * @param groupId the group ID
202            * @return the number of matching message boards discussions
203            */
204            public int countByUUID_G(java.lang.String uuid, long groupId);
205    
206            /**
207            * Returns all the message boards discussions where uuid = &#63; and companyId = &#63;.
208            *
209            * @param uuid the uuid
210            * @param companyId the company ID
211            * @return the matching message boards discussions
212            */
213            public java.util.List<MBDiscussion> findByUuid_C(java.lang.String uuid,
214                    long companyId);
215    
216            /**
217            * Returns a range of all the message boards discussions where uuid = &#63; and companyId = &#63;.
218            *
219            * <p>
220            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
221            * </p>
222            *
223            * @param uuid the uuid
224            * @param companyId the company ID
225            * @param start the lower bound of the range of message boards discussions
226            * @param end the upper bound of the range of message boards discussions (not inclusive)
227            * @return the range of matching message boards discussions
228            */
229            public java.util.List<MBDiscussion> findByUuid_C(java.lang.String uuid,
230                    long companyId, int start, int end);
231    
232            /**
233            * Returns an ordered range of all the message boards discussions where uuid = &#63; and companyId = &#63;.
234            *
235            * <p>
236            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
237            * </p>
238            *
239            * @param uuid the uuid
240            * @param companyId the company ID
241            * @param start the lower bound of the range of message boards discussions
242            * @param end the upper bound of the range of message boards discussions (not inclusive)
243            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
244            * @return the ordered range of matching message boards discussions
245            */
246            public java.util.List<MBDiscussion> findByUuid_C(java.lang.String uuid,
247                    long companyId, int start, int end,
248                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
249    
250            /**
251            * Returns the first message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
252            *
253            * @param uuid the uuid
254            * @param companyId the company ID
255            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
256            * @return the first matching message boards discussion
257            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
258            */
259            public MBDiscussion findByUuid_C_First(java.lang.String uuid,
260                    long companyId,
261                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
262                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
263    
264            /**
265            * Returns the first message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
266            *
267            * @param uuid the uuid
268            * @param companyId the company ID
269            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
270            * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
271            */
272            public MBDiscussion fetchByUuid_C_First(java.lang.String uuid,
273                    long companyId,
274                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
275    
276            /**
277            * Returns the last message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
278            *
279            * @param uuid the uuid
280            * @param companyId the company ID
281            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
282            * @return the last matching message boards discussion
283            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
284            */
285            public MBDiscussion findByUuid_C_Last(java.lang.String uuid,
286                    long companyId,
287                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
288                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
289    
290            /**
291            * Returns the last message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
292            *
293            * @param uuid the uuid
294            * @param companyId the company ID
295            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
296            * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
297            */
298            public MBDiscussion fetchByUuid_C_Last(java.lang.String uuid,
299                    long companyId,
300                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
301    
302            /**
303            * Returns the message boards discussions before and after the current message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
304            *
305            * @param discussionId the primary key of the current message boards discussion
306            * @param uuid the uuid
307            * @param companyId the company ID
308            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
309            * @return the previous, current, and next message boards discussion
310            * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found
311            */
312            public MBDiscussion[] findByUuid_C_PrevAndNext(long discussionId,
313                    java.lang.String uuid, long companyId,
314                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
315                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
316    
317            /**
318            * Removes all the message boards discussions where uuid = &#63; and companyId = &#63; from the database.
319            *
320            * @param uuid the uuid
321            * @param companyId the company ID
322            */
323            public void removeByUuid_C(java.lang.String uuid, long companyId);
324    
325            /**
326            * Returns the number of message boards discussions where uuid = &#63; and companyId = &#63;.
327            *
328            * @param uuid the uuid
329            * @param companyId the company ID
330            * @return the number of matching message boards discussions
331            */
332            public int countByUuid_C(java.lang.String uuid, long companyId);
333    
334            /**
335            * Returns all the message boards discussions where classNameId = &#63;.
336            *
337            * @param classNameId the class name ID
338            * @return the matching message boards discussions
339            */
340            public java.util.List<MBDiscussion> findByClassNameId(long classNameId);
341    
342            /**
343            * Returns a range of all the message boards discussions where classNameId = &#63;.
344            *
345            * <p>
346            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
347            * </p>
348            *
349            * @param classNameId the class name ID
350            * @param start the lower bound of the range of message boards discussions
351            * @param end the upper bound of the range of message boards discussions (not inclusive)
352            * @return the range of matching message boards discussions
353            */
354            public java.util.List<MBDiscussion> findByClassNameId(long classNameId,
355                    int start, int end);
356    
357            /**
358            * Returns an ordered range of all the message boards discussions where classNameId = &#63;.
359            *
360            * <p>
361            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
362            * </p>
363            *
364            * @param classNameId the class name ID
365            * @param start the lower bound of the range of message boards discussions
366            * @param end the upper bound of the range of message boards discussions (not inclusive)
367            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
368            * @return the ordered range of matching message boards discussions
369            */
370            public java.util.List<MBDiscussion> findByClassNameId(long classNameId,
371                    int start, int end,
372                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
373    
374            /**
375            * Returns the first message boards discussion in the ordered set where classNameId = &#63;.
376            *
377            * @param classNameId the class name ID
378            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
379            * @return the first matching message boards discussion
380            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
381            */
382            public MBDiscussion findByClassNameId_First(long classNameId,
383                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
384                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
385    
386            /**
387            * Returns the first message boards discussion in the ordered set where classNameId = &#63;.
388            *
389            * @param classNameId the class name ID
390            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
391            * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
392            */
393            public MBDiscussion fetchByClassNameId_First(long classNameId,
394                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
395    
396            /**
397            * Returns the last message boards discussion in the ordered set where classNameId = &#63;.
398            *
399            * @param classNameId the class name ID
400            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
401            * @return the last matching message boards discussion
402            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
403            */
404            public MBDiscussion findByClassNameId_Last(long classNameId,
405                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
406                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
407    
408            /**
409            * Returns the last message boards discussion in the ordered set where classNameId = &#63;.
410            *
411            * @param classNameId the class name ID
412            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
413            * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
414            */
415            public MBDiscussion fetchByClassNameId_Last(long classNameId,
416                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
417    
418            /**
419            * Returns the message boards discussions before and after the current message boards discussion in the ordered set where classNameId = &#63;.
420            *
421            * @param discussionId the primary key of the current message boards discussion
422            * @param classNameId the class name ID
423            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
424            * @return the previous, current, and next message boards discussion
425            * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found
426            */
427            public MBDiscussion[] findByClassNameId_PrevAndNext(long discussionId,
428                    long classNameId,
429                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
430                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
431    
432            /**
433            * Removes all the message boards discussions where classNameId = &#63; from the database.
434            *
435            * @param classNameId the class name ID
436            */
437            public void removeByClassNameId(long classNameId);
438    
439            /**
440            * Returns the number of message boards discussions where classNameId = &#63;.
441            *
442            * @param classNameId the class name ID
443            * @return the number of matching message boards discussions
444            */
445            public int countByClassNameId(long classNameId);
446    
447            /**
448            * Returns the message boards discussion where threadId = &#63; or throws a {@link NoSuchDiscussionException} if it could not be found.
449            *
450            * @param threadId the thread ID
451            * @return the matching message boards discussion
452            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
453            */
454            public MBDiscussion findByThreadId(long threadId)
455                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
456    
457            /**
458            * Returns the message boards discussion where threadId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
459            *
460            * @param threadId the thread ID
461            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
462            */
463            public MBDiscussion fetchByThreadId(long threadId);
464    
465            /**
466            * Returns the message boards discussion where threadId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
467            *
468            * @param threadId the thread ID
469            * @param retrieveFromCache whether to use the finder cache
470            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
471            */
472            public MBDiscussion fetchByThreadId(long threadId, boolean retrieveFromCache);
473    
474            /**
475            * Removes the message boards discussion where threadId = &#63; from the database.
476            *
477            * @param threadId the thread ID
478            * @return the message boards discussion that was removed
479            */
480            public MBDiscussion removeByThreadId(long threadId)
481                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
482    
483            /**
484            * Returns the number of message boards discussions where threadId = &#63;.
485            *
486            * @param threadId the thread ID
487            * @return the number of matching message boards discussions
488            */
489            public int countByThreadId(long threadId);
490    
491            /**
492            * Returns the message boards discussion where classNameId = &#63; and classPK = &#63; or throws a {@link NoSuchDiscussionException} if it could not be found.
493            *
494            * @param classNameId the class name ID
495            * @param classPK the class p k
496            * @return the matching message boards discussion
497            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
498            */
499            public MBDiscussion findByC_C(long classNameId, long classPK)
500                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
501    
502            /**
503            * Returns the message boards discussion where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
504            *
505            * @param classNameId the class name ID
506            * @param classPK the class p k
507            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
508            */
509            public MBDiscussion fetchByC_C(long classNameId, long classPK);
510    
511            /**
512            * Returns the message boards discussion where classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
513            *
514            * @param classNameId the class name ID
515            * @param classPK the class p k
516            * @param retrieveFromCache whether to use the finder cache
517            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
518            */
519            public MBDiscussion fetchByC_C(long classNameId, long classPK,
520                    boolean retrieveFromCache);
521    
522            /**
523            * Removes the message boards discussion where classNameId = &#63; and classPK = &#63; from the database.
524            *
525            * @param classNameId the class name ID
526            * @param classPK the class p k
527            * @return the message boards discussion that was removed
528            */
529            public MBDiscussion removeByC_C(long classNameId, long classPK)
530                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
531    
532            /**
533            * Returns the number of message boards discussions where classNameId = &#63; and classPK = &#63;.
534            *
535            * @param classNameId the class name ID
536            * @param classPK the class p k
537            * @return the number of matching message boards discussions
538            */
539            public int countByC_C(long classNameId, long classPK);
540    
541            /**
542            * Caches the message boards discussion in the entity cache if it is enabled.
543            *
544            * @param mbDiscussion the message boards discussion
545            */
546            public void cacheResult(MBDiscussion mbDiscussion);
547    
548            /**
549            * Caches the message boards discussions in the entity cache if it is enabled.
550            *
551            * @param mbDiscussions the message boards discussions
552            */
553            public void cacheResult(java.util.List<MBDiscussion> mbDiscussions);
554    
555            /**
556            * Creates a new message boards discussion with the primary key. Does not add the message boards discussion to the database.
557            *
558            * @param discussionId the primary key for the new message boards discussion
559            * @return the new message boards discussion
560            */
561            public MBDiscussion create(long discussionId);
562    
563            /**
564            * Removes the message boards discussion with the primary key from the database. Also notifies the appropriate model listeners.
565            *
566            * @param discussionId the primary key of the message boards discussion
567            * @return the message boards discussion that was removed
568            * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found
569            */
570            public MBDiscussion remove(long discussionId)
571                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
572    
573            public MBDiscussion updateImpl(MBDiscussion mbDiscussion);
574    
575            /**
576            * Returns the message boards discussion with the primary key or throws a {@link NoSuchDiscussionException} if it could not be found.
577            *
578            * @param discussionId the primary key of the message boards discussion
579            * @return the message boards discussion
580            * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found
581            */
582            public MBDiscussion findByPrimaryKey(long discussionId)
583                    throws com.liferay.portlet.messageboards.NoSuchDiscussionException;
584    
585            /**
586            * Returns the message boards discussion with the primary key or returns <code>null</code> if it could not be found.
587            *
588            * @param discussionId the primary key of the message boards discussion
589            * @return the message boards discussion, or <code>null</code> if a message boards discussion with the primary key could not be found
590            */
591            public MBDiscussion fetchByPrimaryKey(long discussionId);
592    
593            @Override
594            public java.util.Map<java.io.Serializable, MBDiscussion> fetchByPrimaryKeys(
595                    java.util.Set<java.io.Serializable> primaryKeys);
596    
597            /**
598            * Returns all the message boards discussions.
599            *
600            * @return the message boards discussions
601            */
602            public java.util.List<MBDiscussion> findAll();
603    
604            /**
605            * Returns a range of all the message boards discussions.
606            *
607            * <p>
608            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
609            * </p>
610            *
611            * @param start the lower bound of the range of message boards discussions
612            * @param end the upper bound of the range of message boards discussions (not inclusive)
613            * @return the range of message boards discussions
614            */
615            public java.util.List<MBDiscussion> findAll(int start, int end);
616    
617            /**
618            * Returns an ordered range of all the message boards discussions.
619            *
620            * <p>
621            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
622            * </p>
623            *
624            * @param start the lower bound of the range of message boards discussions
625            * @param end the upper bound of the range of message boards discussions (not inclusive)
626            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
627            * @return the ordered range of message boards discussions
628            */
629            public java.util.List<MBDiscussion> findAll(int start, int end,
630                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
631    
632            /**
633            * Removes all the message boards discussions from the database.
634            */
635            public void removeAll();
636    
637            /**
638            * Returns the number of message boards discussions.
639            *
640            * @return the number of message boards discussions
641            */
642            public int countAll();
643    }