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.message.boards.kernel.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.message.boards.kernel.exception.NoSuchDiscussionException;
020    import com.liferay.message.boards.kernel.model.MBDiscussion;
021    
022    import com.liferay.portal.kernel.service.persistence.BasePersistence;
023    
024    /**
025     * The persistence interface for the message boards discussion service.
026     *
027     * <p>
028     * Caching information and settings can be found in <code>portal.properties</code>
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see com.liferay.portlet.messageboards.service.persistence.impl.MBDiscussionPersistenceImpl
033     * @see MBDiscussionUtil
034     * @generated
035     */
036    @ProviderType
037    public interface MBDiscussionPersistence extends BasePersistence<MBDiscussion> {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * 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.
042             */
043    
044            /**
045            * Returns all the message boards discussions where uuid = &#63;.
046            *
047            * @param uuid the uuid
048            * @return the matching message boards discussions
049            */
050            public java.util.List<MBDiscussion> findByUuid(java.lang.String uuid);
051    
052            /**
053            * Returns a range of all the message boards discussions where uuid = &#63;.
054            *
055            * <p>
056            * 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.
057            * </p>
058            *
059            * @param uuid the uuid
060            * @param start the lower bound of the range of message boards discussions
061            * @param end the upper bound of the range of message boards discussions (not inclusive)
062            * @return the range of matching message boards discussions
063            */
064            public java.util.List<MBDiscussion> findByUuid(java.lang.String uuid,
065                    int start, int end);
066    
067            /**
068            * Returns an ordered range of all the message boards discussions where uuid = &#63;.
069            *
070            * <p>
071            * 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.
072            * </p>
073            *
074            * @param uuid the uuid
075            * @param start the lower bound of the range of message boards discussions
076            * @param end the upper bound of the range of message boards discussions (not inclusive)
077            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
078            * @return the ordered range of matching message boards discussions
079            */
080            public java.util.List<MBDiscussion> findByUuid(java.lang.String uuid,
081                    int start, int end,
082                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
083    
084            /**
085            * Returns an ordered range of all the message boards discussions where uuid = &#63;.
086            *
087            * <p>
088            * 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.
089            * </p>
090            *
091            * @param uuid the uuid
092            * @param start the lower bound of the range of message boards discussions
093            * @param end the upper bound of the range of message boards discussions (not inclusive)
094            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
095            * @param retrieveFromCache whether to retrieve from the finder cache
096            * @return the ordered range of matching message boards discussions
097            */
098            public java.util.List<MBDiscussion> findByUuid(java.lang.String uuid,
099                    int start, int end,
100                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator,
101                    boolean retrieveFromCache);
102    
103            /**
104            * Returns the first message boards discussion in the ordered set where uuid = &#63;.
105            *
106            * @param uuid the uuid
107            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
108            * @return the first matching message boards discussion
109            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
110            */
111            public MBDiscussion findByUuid_First(java.lang.String uuid,
112                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
113                    throws NoSuchDiscussionException;
114    
115            /**
116            * Returns the first message boards discussion in the ordered set where uuid = &#63;.
117            *
118            * @param uuid the uuid
119            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
120            * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
121            */
122            public MBDiscussion fetchByUuid_First(java.lang.String uuid,
123                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
124    
125            /**
126            * Returns the last message boards discussion in the ordered set where uuid = &#63;.
127            *
128            * @param uuid the uuid
129            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
130            * @return the last matching message boards discussion
131            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
132            */
133            public MBDiscussion findByUuid_Last(java.lang.String uuid,
134                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
135                    throws NoSuchDiscussionException;
136    
137            /**
138            * Returns the last message boards discussion in the ordered set where uuid = &#63;.
139            *
140            * @param uuid the uuid
141            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
142            * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
143            */
144            public MBDiscussion fetchByUuid_Last(java.lang.String uuid,
145                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
146    
147            /**
148            * Returns the message boards discussions before and after the current message boards discussion in the ordered set where uuid = &#63;.
149            *
150            * @param discussionId the primary key of the current message boards discussion
151            * @param uuid the uuid
152            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
153            * @return the previous, current, and next message boards discussion
154            * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found
155            */
156            public MBDiscussion[] findByUuid_PrevAndNext(long discussionId,
157                    java.lang.String uuid,
158                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
159                    throws NoSuchDiscussionException;
160    
161            /**
162            * Removes all the message boards discussions where uuid = &#63; from the database.
163            *
164            * @param uuid the uuid
165            */
166            public void removeByUuid(java.lang.String uuid);
167    
168            /**
169            * Returns the number of message boards discussions where uuid = &#63;.
170            *
171            * @param uuid the uuid
172            * @return the number of matching message boards discussions
173            */
174            public int countByUuid(java.lang.String uuid);
175    
176            /**
177            * Returns the message boards discussion where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchDiscussionException} if it could not be found.
178            *
179            * @param uuid the uuid
180            * @param groupId the group ID
181            * @return the matching message boards discussion
182            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
183            */
184            public MBDiscussion findByUUID_G(java.lang.String uuid, long groupId)
185                    throws NoSuchDiscussionException;
186    
187            /**
188            * 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.
189            *
190            * @param uuid the uuid
191            * @param groupId the group ID
192            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
193            */
194            public MBDiscussion fetchByUUID_G(java.lang.String uuid, long groupId);
195    
196            /**
197            * 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.
198            *
199            * @param uuid the uuid
200            * @param groupId the group ID
201            * @param retrieveFromCache whether to retrieve from the finder cache
202            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
203            */
204            public MBDiscussion fetchByUUID_G(java.lang.String uuid, long groupId,
205                    boolean retrieveFromCache);
206    
207            /**
208            * Removes the message boards discussion where uuid = &#63; and groupId = &#63; from the database.
209            *
210            * @param uuid the uuid
211            * @param groupId the group ID
212            * @return the message boards discussion that was removed
213            */
214            public MBDiscussion removeByUUID_G(java.lang.String uuid, long groupId)
215                    throws NoSuchDiscussionException;
216    
217            /**
218            * Returns the number of message boards discussions where uuid = &#63; and groupId = &#63;.
219            *
220            * @param uuid the uuid
221            * @param groupId the group ID
222            * @return the number of matching message boards discussions
223            */
224            public int countByUUID_G(java.lang.String uuid, long groupId);
225    
226            /**
227            * Returns all the message boards discussions where uuid = &#63; and companyId = &#63;.
228            *
229            * @param uuid the uuid
230            * @param companyId the company ID
231            * @return the matching message boards discussions
232            */
233            public java.util.List<MBDiscussion> findByUuid_C(java.lang.String uuid,
234                    long companyId);
235    
236            /**
237            * Returns a range of all the message boards discussions where uuid = &#63; and companyId = &#63;.
238            *
239            * <p>
240            * 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.
241            * </p>
242            *
243            * @param uuid the uuid
244            * @param companyId the company ID
245            * @param start the lower bound of the range of message boards discussions
246            * @param end the upper bound of the range of message boards discussions (not inclusive)
247            * @return the range of matching message boards discussions
248            */
249            public java.util.List<MBDiscussion> findByUuid_C(java.lang.String uuid,
250                    long companyId, int start, int end);
251    
252            /**
253            * Returns an ordered range of all the message boards discussions where uuid = &#63; and companyId = &#63;.
254            *
255            * <p>
256            * 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.
257            * </p>
258            *
259            * @param uuid the uuid
260            * @param companyId the company ID
261            * @param start the lower bound of the range of message boards discussions
262            * @param end the upper bound of the range of message boards discussions (not inclusive)
263            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
264            * @return the ordered range of matching message boards discussions
265            */
266            public java.util.List<MBDiscussion> findByUuid_C(java.lang.String uuid,
267                    long companyId, int start, int end,
268                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
269    
270            /**
271            * Returns an ordered range of all the message boards discussions where uuid = &#63; and companyId = &#63;.
272            *
273            * <p>
274            * 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.
275            * </p>
276            *
277            * @param uuid the uuid
278            * @param companyId the company ID
279            * @param start the lower bound of the range of message boards discussions
280            * @param end the upper bound of the range of message boards discussions (not inclusive)
281            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
282            * @param retrieveFromCache whether to retrieve from the finder cache
283            * @return the ordered range of matching message boards discussions
284            */
285            public java.util.List<MBDiscussion> findByUuid_C(java.lang.String uuid,
286                    long companyId, int start, int end,
287                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator,
288                    boolean retrieveFromCache);
289    
290            /**
291            * Returns the first 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 first matching message boards discussion
297            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
298            */
299            public MBDiscussion findByUuid_C_First(java.lang.String uuid,
300                    long companyId,
301                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
302                    throws NoSuchDiscussionException;
303    
304            /**
305            * Returns the first message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
306            *
307            * @param uuid the uuid
308            * @param companyId the company ID
309            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
310            * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
311            */
312            public MBDiscussion fetchByUuid_C_First(java.lang.String uuid,
313                    long companyId,
314                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
315    
316            /**
317            * Returns the last message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
318            *
319            * @param uuid the uuid
320            * @param companyId the company ID
321            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
322            * @return the last matching message boards discussion
323            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
324            */
325            public MBDiscussion findByUuid_C_Last(java.lang.String uuid,
326                    long companyId,
327                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
328                    throws NoSuchDiscussionException;
329    
330            /**
331            * Returns the last message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
332            *
333            * @param uuid the uuid
334            * @param companyId the company ID
335            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
336            * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
337            */
338            public MBDiscussion fetchByUuid_C_Last(java.lang.String uuid,
339                    long companyId,
340                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
341    
342            /**
343            * Returns the message boards discussions before and after the current message boards discussion in the ordered set where uuid = &#63; and companyId = &#63;.
344            *
345            * @param discussionId the primary key of the current message boards discussion
346            * @param uuid the uuid
347            * @param companyId the company ID
348            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
349            * @return the previous, current, and next message boards discussion
350            * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found
351            */
352            public MBDiscussion[] findByUuid_C_PrevAndNext(long discussionId,
353                    java.lang.String uuid, long companyId,
354                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
355                    throws NoSuchDiscussionException;
356    
357            /**
358            * Removes all the message boards discussions where uuid = &#63; and companyId = &#63; from the database.
359            *
360            * @param uuid the uuid
361            * @param companyId the company ID
362            */
363            public void removeByUuid_C(java.lang.String uuid, long companyId);
364    
365            /**
366            * Returns the number of message boards discussions where uuid = &#63; and companyId = &#63;.
367            *
368            * @param uuid the uuid
369            * @param companyId the company ID
370            * @return the number of matching message boards discussions
371            */
372            public int countByUuid_C(java.lang.String uuid, long companyId);
373    
374            /**
375            * Returns all the message boards discussions where classNameId = &#63;.
376            *
377            * @param classNameId the class name ID
378            * @return the matching message boards discussions
379            */
380            public java.util.List<MBDiscussion> findByClassNameId(long classNameId);
381    
382            /**
383            * Returns a range of all the message boards discussions where classNameId = &#63;.
384            *
385            * <p>
386            * 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.
387            * </p>
388            *
389            * @param classNameId the class name ID
390            * @param start the lower bound of the range of message boards discussions
391            * @param end the upper bound of the range of message boards discussions (not inclusive)
392            * @return the range of matching message boards discussions
393            */
394            public java.util.List<MBDiscussion> findByClassNameId(long classNameId,
395                    int start, int end);
396    
397            /**
398            * Returns an ordered range of all the message boards discussions where classNameId = &#63;.
399            *
400            * <p>
401            * 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.
402            * </p>
403            *
404            * @param classNameId the class name ID
405            * @param start the lower bound of the range of message boards discussions
406            * @param end the upper bound of the range of message boards discussions (not inclusive)
407            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
408            * @return the ordered range of matching message boards discussions
409            */
410            public java.util.List<MBDiscussion> findByClassNameId(long classNameId,
411                    int start, int end,
412                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
413    
414            /**
415            * Returns an ordered range of all the message boards discussions where classNameId = &#63;.
416            *
417            * <p>
418            * 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.
419            * </p>
420            *
421            * @param classNameId the class name ID
422            * @param start the lower bound of the range of message boards discussions
423            * @param end the upper bound of the range of message boards discussions (not inclusive)
424            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
425            * @param retrieveFromCache whether to retrieve from the finder cache
426            * @return the ordered range of matching message boards discussions
427            */
428            public java.util.List<MBDiscussion> findByClassNameId(long classNameId,
429                    int start, int end,
430                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator,
431                    boolean retrieveFromCache);
432    
433            /**
434            * Returns the first message boards discussion in the ordered set where classNameId = &#63;.
435            *
436            * @param classNameId the class name ID
437            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
438            * @return the first matching message boards discussion
439            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
440            */
441            public MBDiscussion findByClassNameId_First(long classNameId,
442                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
443                    throws NoSuchDiscussionException;
444    
445            /**
446            * Returns the first message boards discussion in the ordered set where classNameId = &#63;.
447            *
448            * @param classNameId the class name ID
449            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
450            * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
451            */
452            public MBDiscussion fetchByClassNameId_First(long classNameId,
453                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
454    
455            /**
456            * Returns the last message boards discussion in the ordered set where classNameId = &#63;.
457            *
458            * @param classNameId the class name ID
459            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
460            * @return the last matching message boards discussion
461            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
462            */
463            public MBDiscussion findByClassNameId_Last(long classNameId,
464                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
465                    throws NoSuchDiscussionException;
466    
467            /**
468            * Returns the last message boards discussion in the ordered set where classNameId = &#63;.
469            *
470            * @param classNameId the class name ID
471            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
472            * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
473            */
474            public MBDiscussion fetchByClassNameId_Last(long classNameId,
475                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
476    
477            /**
478            * Returns the message boards discussions before and after the current message boards discussion in the ordered set where classNameId = &#63;.
479            *
480            * @param discussionId the primary key of the current message boards discussion
481            * @param classNameId the class name ID
482            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
483            * @return the previous, current, and next message boards discussion
484            * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found
485            */
486            public MBDiscussion[] findByClassNameId_PrevAndNext(long discussionId,
487                    long classNameId,
488                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator)
489                    throws NoSuchDiscussionException;
490    
491            /**
492            * Removes all the message boards discussions where classNameId = &#63; from the database.
493            *
494            * @param classNameId the class name ID
495            */
496            public void removeByClassNameId(long classNameId);
497    
498            /**
499            * Returns the number of message boards discussions where classNameId = &#63;.
500            *
501            * @param classNameId the class name ID
502            * @return the number of matching message boards discussions
503            */
504            public int countByClassNameId(long classNameId);
505    
506            /**
507            * Returns the message boards discussion where threadId = &#63; or throws a {@link NoSuchDiscussionException} if it could not be found.
508            *
509            * @param threadId the thread ID
510            * @return the matching message boards discussion
511            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
512            */
513            public MBDiscussion findByThreadId(long threadId)
514                    throws NoSuchDiscussionException;
515    
516            /**
517            * Returns the message boards discussion where threadId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
518            *
519            * @param threadId the thread ID
520            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
521            */
522            public MBDiscussion fetchByThreadId(long threadId);
523    
524            /**
525            * Returns the message boards discussion where threadId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
526            *
527            * @param threadId the thread ID
528            * @param retrieveFromCache whether to retrieve from the finder cache
529            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
530            */
531            public MBDiscussion fetchByThreadId(long threadId, boolean retrieveFromCache);
532    
533            /**
534            * Removes the message boards discussion where threadId = &#63; from the database.
535            *
536            * @param threadId the thread ID
537            * @return the message boards discussion that was removed
538            */
539            public MBDiscussion removeByThreadId(long threadId)
540                    throws NoSuchDiscussionException;
541    
542            /**
543            * Returns the number of message boards discussions where threadId = &#63;.
544            *
545            * @param threadId the thread ID
546            * @return the number of matching message boards discussions
547            */
548            public int countByThreadId(long threadId);
549    
550            /**
551            * Returns the message boards discussion where classNameId = &#63; and classPK = &#63; or throws a {@link NoSuchDiscussionException} if it could not be found.
552            *
553            * @param classNameId the class name ID
554            * @param classPK the class p k
555            * @return the matching message boards discussion
556            * @throws NoSuchDiscussionException if a matching message boards discussion could not be found
557            */
558            public MBDiscussion findByC_C(long classNameId, long classPK)
559                    throws NoSuchDiscussionException;
560    
561            /**
562            * 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.
563            *
564            * @param classNameId the class name ID
565            * @param classPK the class p k
566            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
567            */
568            public MBDiscussion fetchByC_C(long classNameId, long classPK);
569    
570            /**
571            * 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.
572            *
573            * @param classNameId the class name ID
574            * @param classPK the class p k
575            * @param retrieveFromCache whether to retrieve from the finder cache
576            * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found
577            */
578            public MBDiscussion fetchByC_C(long classNameId, long classPK,
579                    boolean retrieveFromCache);
580    
581            /**
582            * Removes the message boards discussion where classNameId = &#63; and classPK = &#63; from the database.
583            *
584            * @param classNameId the class name ID
585            * @param classPK the class p k
586            * @return the message boards discussion that was removed
587            */
588            public MBDiscussion removeByC_C(long classNameId, long classPK)
589                    throws NoSuchDiscussionException;
590    
591            /**
592            * Returns the number of message boards discussions where classNameId = &#63; and classPK = &#63;.
593            *
594            * @param classNameId the class name ID
595            * @param classPK the class p k
596            * @return the number of matching message boards discussions
597            */
598            public int countByC_C(long classNameId, long classPK);
599    
600            /**
601            * Caches the message boards discussion in the entity cache if it is enabled.
602            *
603            * @param mbDiscussion the message boards discussion
604            */
605            public void cacheResult(MBDiscussion mbDiscussion);
606    
607            /**
608            * Caches the message boards discussions in the entity cache if it is enabled.
609            *
610            * @param mbDiscussions the message boards discussions
611            */
612            public void cacheResult(java.util.List<MBDiscussion> mbDiscussions);
613    
614            /**
615            * Creates a new message boards discussion with the primary key. Does not add the message boards discussion to the database.
616            *
617            * @param discussionId the primary key for the new message boards discussion
618            * @return the new message boards discussion
619            */
620            public MBDiscussion create(long discussionId);
621    
622            /**
623            * Removes the message boards discussion with the primary key from the database. Also notifies the appropriate model listeners.
624            *
625            * @param discussionId the primary key of the message boards discussion
626            * @return the message boards discussion that was removed
627            * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found
628            */
629            public MBDiscussion remove(long discussionId)
630                    throws NoSuchDiscussionException;
631    
632            public MBDiscussion updateImpl(MBDiscussion mbDiscussion);
633    
634            /**
635            * Returns the message boards discussion with the primary key or throws a {@link NoSuchDiscussionException} if it could not be found.
636            *
637            * @param discussionId the primary key of the message boards discussion
638            * @return the message boards discussion
639            * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found
640            */
641            public MBDiscussion findByPrimaryKey(long discussionId)
642                    throws NoSuchDiscussionException;
643    
644            /**
645            * Returns the message boards discussion with the primary key or returns <code>null</code> if it could not be found.
646            *
647            * @param discussionId the primary key of the message boards discussion
648            * @return the message boards discussion, or <code>null</code> if a message boards discussion with the primary key could not be found
649            */
650            public MBDiscussion fetchByPrimaryKey(long discussionId);
651    
652            @Override
653            public java.util.Map<java.io.Serializable, MBDiscussion> fetchByPrimaryKeys(
654                    java.util.Set<java.io.Serializable> primaryKeys);
655    
656            /**
657            * Returns all the message boards discussions.
658            *
659            * @return the message boards discussions
660            */
661            public java.util.List<MBDiscussion> findAll();
662    
663            /**
664            * Returns a range of all the message boards discussions.
665            *
666            * <p>
667            * 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.
668            * </p>
669            *
670            * @param start the lower bound of the range of message boards discussions
671            * @param end the upper bound of the range of message boards discussions (not inclusive)
672            * @return the range of message boards discussions
673            */
674            public java.util.List<MBDiscussion> findAll(int start, int end);
675    
676            /**
677            * Returns an ordered range of all the message boards discussions.
678            *
679            * <p>
680            * 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.
681            * </p>
682            *
683            * @param start the lower bound of the range of message boards discussions
684            * @param end the upper bound of the range of message boards discussions (not inclusive)
685            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
686            * @return the ordered range of message boards discussions
687            */
688            public java.util.List<MBDiscussion> findAll(int start, int end,
689                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator);
690    
691            /**
692            * Returns an ordered range of all the message boards discussions.
693            *
694            * <p>
695            * 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.
696            * </p>
697            *
698            * @param start the lower bound of the range of message boards discussions
699            * @param end the upper bound of the range of message boards discussions (not inclusive)
700            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
701            * @param retrieveFromCache whether to retrieve from the finder cache
702            * @return the ordered range of message boards discussions
703            */
704            public java.util.List<MBDiscussion> findAll(int start, int end,
705                    com.liferay.portal.kernel.util.OrderByComparator<MBDiscussion> orderByComparator,
706                    boolean retrieveFromCache);
707    
708            /**
709            * Removes all the message boards discussions from the database.
710            */
711            public void removeAll();
712    
713            /**
714            * Returns the number of message boards discussions.
715            *
716            * @return the number of message boards discussions
717            */
718            public int countAll();
719    
720            @Override
721            public java.util.Set<java.lang.String> getBadColumnNames();
722    }