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