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.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.util.OrderByComparator; 022 import com.liferay.portal.kernel.util.ReferenceRegistry; 023 import com.liferay.portal.service.ServiceContext; 024 025 import com.liferay.portlet.messageboards.model.MBDiscussion; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the message boards discussion service. This utility wraps {@link com.liferay.portlet.messageboards.service.persistence.impl.MBDiscussionPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 031 * 032 * <p> 033 * Caching information and settings can be found in <code>portal.properties</code> 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see MBDiscussionPersistence 038 * @see com.liferay.portlet.messageboards.service.persistence.impl.MBDiscussionPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class MBDiscussionUtil { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 047 */ 048 049 /** 050 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 051 */ 052 public static void clearCache() { 053 getPersistence().clearCache(); 054 } 055 056 /** 057 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 058 */ 059 public static void clearCache(MBDiscussion mbDiscussion) { 060 getPersistence().clearCache(mbDiscussion); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 067 return getPersistence().countWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 072 */ 073 public static List<MBDiscussion> findWithDynamicQuery( 074 DynamicQuery dynamicQuery) { 075 return getPersistence().findWithDynamicQuery(dynamicQuery); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 080 */ 081 public static List<MBDiscussion> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end) { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<MBDiscussion> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<MBDiscussion> orderByComparator) { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static MBDiscussion update(MBDiscussion mbDiscussion) { 101 return getPersistence().update(mbDiscussion); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static MBDiscussion update(MBDiscussion mbDiscussion, 108 ServiceContext serviceContext) { 109 return getPersistence().update(mbDiscussion, serviceContext); 110 } 111 112 /** 113 * Returns all the message boards discussions where uuid = ?. 114 * 115 * @param uuid the uuid 116 * @return the matching message boards discussions 117 */ 118 public static List<MBDiscussion> findByUuid(java.lang.String uuid) { 119 return getPersistence().findByUuid(uuid); 120 } 121 122 /** 123 * Returns a range of all the message boards discussions where uuid = ?. 124 * 125 * <p> 126 * 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. 127 * </p> 128 * 129 * @param uuid the uuid 130 * @param start the lower bound of the range of message boards discussions 131 * @param end the upper bound of the range of message boards discussions (not inclusive) 132 * @return the range of matching message boards discussions 133 */ 134 public static List<MBDiscussion> findByUuid(java.lang.String uuid, 135 int start, int end) { 136 return getPersistence().findByUuid(uuid, start, end); 137 } 138 139 /** 140 * Returns an ordered range of all the message boards discussions where uuid = ?. 141 * 142 * <p> 143 * 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. 144 * </p> 145 * 146 * @param uuid the uuid 147 * @param start the lower bound of the range of message boards discussions 148 * @param end the upper bound of the range of message boards discussions (not inclusive) 149 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 150 * @return the ordered range of matching message boards discussions 151 */ 152 public static List<MBDiscussion> findByUuid(java.lang.String uuid, 153 int start, int end, OrderByComparator<MBDiscussion> orderByComparator) { 154 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 155 } 156 157 /** 158 * Returns an ordered range of all the message boards discussions where uuid = ?. 159 * 160 * <p> 161 * 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. 162 * </p> 163 * 164 * @param uuid the uuid 165 * @param start the lower bound of the range of message boards discussions 166 * @param end the upper bound of the range of message boards discussions (not inclusive) 167 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 168 * @param retrieveFromCache whether to retrieve from the finder cache 169 * @return the ordered range of matching message boards discussions 170 */ 171 public static List<MBDiscussion> findByUuid(java.lang.String uuid, 172 int start, int end, OrderByComparator<MBDiscussion> orderByComparator, 173 boolean retrieveFromCache) { 174 return getPersistence() 175 .findByUuid(uuid, start, end, orderByComparator, 176 retrieveFromCache); 177 } 178 179 /** 180 * Returns the first message boards discussion in the ordered set where uuid = ?. 181 * 182 * @param uuid the uuid 183 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 184 * @return the first matching message boards discussion 185 * @throws NoSuchDiscussionException if a matching message boards discussion could not be found 186 */ 187 public static MBDiscussion findByUuid_First(java.lang.String uuid, 188 OrderByComparator<MBDiscussion> orderByComparator) 189 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 190 return getPersistence().findByUuid_First(uuid, orderByComparator); 191 } 192 193 /** 194 * Returns the first message boards discussion in the ordered set where uuid = ?. 195 * 196 * @param uuid the uuid 197 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 198 * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 199 */ 200 public static MBDiscussion fetchByUuid_First(java.lang.String uuid, 201 OrderByComparator<MBDiscussion> orderByComparator) { 202 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 203 } 204 205 /** 206 * Returns the last message boards discussion in the ordered set where uuid = ?. 207 * 208 * @param uuid the uuid 209 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 210 * @return the last matching message boards discussion 211 * @throws NoSuchDiscussionException if a matching message boards discussion could not be found 212 */ 213 public static MBDiscussion findByUuid_Last(java.lang.String uuid, 214 OrderByComparator<MBDiscussion> orderByComparator) 215 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 216 return getPersistence().findByUuid_Last(uuid, orderByComparator); 217 } 218 219 /** 220 * Returns the last message boards discussion in the ordered set where uuid = ?. 221 * 222 * @param uuid the uuid 223 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 224 * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 225 */ 226 public static MBDiscussion fetchByUuid_Last(java.lang.String uuid, 227 OrderByComparator<MBDiscussion> orderByComparator) { 228 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 229 } 230 231 /** 232 * Returns the message boards discussions before and after the current message boards discussion in the ordered set where uuid = ?. 233 * 234 * @param discussionId the primary key of the current message boards discussion 235 * @param uuid the uuid 236 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 237 * @return the previous, current, and next message boards discussion 238 * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found 239 */ 240 public static MBDiscussion[] findByUuid_PrevAndNext(long discussionId, 241 java.lang.String uuid, OrderByComparator<MBDiscussion> orderByComparator) 242 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 243 return getPersistence() 244 .findByUuid_PrevAndNext(discussionId, uuid, orderByComparator); 245 } 246 247 /** 248 * Removes all the message boards discussions where uuid = ? from the database. 249 * 250 * @param uuid the uuid 251 */ 252 public static void removeByUuid(java.lang.String uuid) { 253 getPersistence().removeByUuid(uuid); 254 } 255 256 /** 257 * Returns the number of message boards discussions where uuid = ?. 258 * 259 * @param uuid the uuid 260 * @return the number of matching message boards discussions 261 */ 262 public static int countByUuid(java.lang.String uuid) { 263 return getPersistence().countByUuid(uuid); 264 } 265 266 /** 267 * Returns the message boards discussion where uuid = ? and groupId = ? or throws a {@link NoSuchDiscussionException} if it could not be found. 268 * 269 * @param uuid the uuid 270 * @param groupId the group ID 271 * @return the matching message boards discussion 272 * @throws NoSuchDiscussionException if a matching message boards discussion could not be found 273 */ 274 public static MBDiscussion findByUUID_G(java.lang.String uuid, long groupId) 275 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 276 return getPersistence().findByUUID_G(uuid, groupId); 277 } 278 279 /** 280 * Returns the message boards discussion where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 281 * 282 * @param uuid the uuid 283 * @param groupId the group ID 284 * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 285 */ 286 public static MBDiscussion fetchByUUID_G(java.lang.String uuid, long groupId) { 287 return getPersistence().fetchByUUID_G(uuid, groupId); 288 } 289 290 /** 291 * 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. 292 * 293 * @param uuid the uuid 294 * @param groupId the group ID 295 * @param retrieveFromCache whether to retrieve from the finder cache 296 * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 297 */ 298 public static MBDiscussion fetchByUUID_G(java.lang.String uuid, 299 long groupId, boolean retrieveFromCache) { 300 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 301 } 302 303 /** 304 * Removes the message boards discussion where uuid = ? and groupId = ? from the database. 305 * 306 * @param uuid the uuid 307 * @param groupId the group ID 308 * @return the message boards discussion that was removed 309 */ 310 public static MBDiscussion removeByUUID_G(java.lang.String uuid, 311 long groupId) 312 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 313 return getPersistence().removeByUUID_G(uuid, groupId); 314 } 315 316 /** 317 * Returns the number of message boards discussions where uuid = ? and groupId = ?. 318 * 319 * @param uuid the uuid 320 * @param groupId the group ID 321 * @return the number of matching message boards discussions 322 */ 323 public static int countByUUID_G(java.lang.String uuid, long groupId) { 324 return getPersistence().countByUUID_G(uuid, groupId); 325 } 326 327 /** 328 * Returns all the message boards discussions where uuid = ? and companyId = ?. 329 * 330 * @param uuid the uuid 331 * @param companyId the company ID 332 * @return the matching message boards discussions 333 */ 334 public static List<MBDiscussion> findByUuid_C(java.lang.String uuid, 335 long companyId) { 336 return getPersistence().findByUuid_C(uuid, companyId); 337 } 338 339 /** 340 * Returns a range of all the message boards discussions where uuid = ? and companyId = ?. 341 * 342 * <p> 343 * 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. 344 * </p> 345 * 346 * @param uuid the uuid 347 * @param companyId the company ID 348 * @param start the lower bound of the range of message boards discussions 349 * @param end the upper bound of the range of message boards discussions (not inclusive) 350 * @return the range of matching message boards discussions 351 */ 352 public static List<MBDiscussion> findByUuid_C(java.lang.String uuid, 353 long companyId, int start, int end) { 354 return getPersistence().findByUuid_C(uuid, companyId, start, end); 355 } 356 357 /** 358 * Returns an ordered range of all the message boards discussions where uuid = ? and companyId = ?. 359 * 360 * <p> 361 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBDiscussionModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 362 * </p> 363 * 364 * @param uuid the uuid 365 * @param companyId the company ID 366 * @param start the lower bound of the range of message boards discussions 367 * @param end the upper bound of the range of message boards discussions (not inclusive) 368 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 369 * @return the ordered range of matching message boards discussions 370 */ 371 public static List<MBDiscussion> findByUuid_C(java.lang.String uuid, 372 long companyId, int start, int end, 373 OrderByComparator<MBDiscussion> orderByComparator) { 374 return getPersistence() 375 .findByUuid_C(uuid, companyId, start, end, orderByComparator); 376 } 377 378 /** 379 * Returns an ordered range of all the message boards discussions where uuid = ? and companyId = ?. 380 * 381 * <p> 382 * 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. 383 * </p> 384 * 385 * @param uuid the uuid 386 * @param companyId the company ID 387 * @param start the lower bound of the range of message boards discussions 388 * @param end the upper bound of the range of message boards discussions (not inclusive) 389 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 390 * @param retrieveFromCache whether to retrieve from the finder cache 391 * @return the ordered range of matching message boards discussions 392 */ 393 public static List<MBDiscussion> findByUuid_C(java.lang.String uuid, 394 long companyId, int start, int end, 395 OrderByComparator<MBDiscussion> orderByComparator, 396 boolean retrieveFromCache) { 397 return getPersistence() 398 .findByUuid_C(uuid, companyId, start, end, 399 orderByComparator, retrieveFromCache); 400 } 401 402 /** 403 * Returns the first message boards discussion in the ordered set where uuid = ? and companyId = ?. 404 * 405 * @param uuid the uuid 406 * @param companyId the company ID 407 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 408 * @return the first matching message boards discussion 409 * @throws NoSuchDiscussionException if a matching message boards discussion could not be found 410 */ 411 public static MBDiscussion findByUuid_C_First(java.lang.String uuid, 412 long companyId, OrderByComparator<MBDiscussion> orderByComparator) 413 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 414 return getPersistence() 415 .findByUuid_C_First(uuid, companyId, orderByComparator); 416 } 417 418 /** 419 * Returns the first message boards discussion in the ordered set where uuid = ? and companyId = ?. 420 * 421 * @param uuid the uuid 422 * @param companyId the company ID 423 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 424 * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 425 */ 426 public static MBDiscussion fetchByUuid_C_First(java.lang.String uuid, 427 long companyId, OrderByComparator<MBDiscussion> orderByComparator) { 428 return getPersistence() 429 .fetchByUuid_C_First(uuid, companyId, orderByComparator); 430 } 431 432 /** 433 * Returns the last message boards discussion in the ordered set where uuid = ? and companyId = ?. 434 * 435 * @param uuid the uuid 436 * @param companyId the company ID 437 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 438 * @return the last matching message boards discussion 439 * @throws NoSuchDiscussionException if a matching message boards discussion could not be found 440 */ 441 public static MBDiscussion findByUuid_C_Last(java.lang.String uuid, 442 long companyId, OrderByComparator<MBDiscussion> orderByComparator) 443 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 444 return getPersistence() 445 .findByUuid_C_Last(uuid, companyId, orderByComparator); 446 } 447 448 /** 449 * Returns the last message boards discussion in the ordered set where uuid = ? and companyId = ?. 450 * 451 * @param uuid the uuid 452 * @param companyId the company ID 453 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 454 * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 455 */ 456 public static MBDiscussion fetchByUuid_C_Last(java.lang.String uuid, 457 long companyId, OrderByComparator<MBDiscussion> orderByComparator) { 458 return getPersistence() 459 .fetchByUuid_C_Last(uuid, companyId, orderByComparator); 460 } 461 462 /** 463 * Returns the message boards discussions before and after the current message boards discussion in the ordered set where uuid = ? and companyId = ?. 464 * 465 * @param discussionId the primary key of the current message boards discussion 466 * @param uuid the uuid 467 * @param companyId the company ID 468 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 469 * @return the previous, current, and next message boards discussion 470 * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found 471 */ 472 public static MBDiscussion[] findByUuid_C_PrevAndNext(long discussionId, 473 java.lang.String uuid, long companyId, 474 OrderByComparator<MBDiscussion> orderByComparator) 475 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 476 return getPersistence() 477 .findByUuid_C_PrevAndNext(discussionId, uuid, companyId, 478 orderByComparator); 479 } 480 481 /** 482 * Removes all the message boards discussions where uuid = ? and companyId = ? from the database. 483 * 484 * @param uuid the uuid 485 * @param companyId the company ID 486 */ 487 public static void removeByUuid_C(java.lang.String uuid, long companyId) { 488 getPersistence().removeByUuid_C(uuid, companyId); 489 } 490 491 /** 492 * Returns the number of message boards discussions where uuid = ? and companyId = ?. 493 * 494 * @param uuid the uuid 495 * @param companyId the company ID 496 * @return the number of matching message boards discussions 497 */ 498 public static int countByUuid_C(java.lang.String uuid, long companyId) { 499 return getPersistence().countByUuid_C(uuid, companyId); 500 } 501 502 /** 503 * Returns all the message boards discussions where classNameId = ?. 504 * 505 * @param classNameId the class name ID 506 * @return the matching message boards discussions 507 */ 508 public static List<MBDiscussion> findByClassNameId(long classNameId) { 509 return getPersistence().findByClassNameId(classNameId); 510 } 511 512 /** 513 * Returns a range of all the message boards discussions where classNameId = ?. 514 * 515 * <p> 516 * 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. 517 * </p> 518 * 519 * @param classNameId the class name ID 520 * @param start the lower bound of the range of message boards discussions 521 * @param end the upper bound of the range of message boards discussions (not inclusive) 522 * @return the range of matching message boards discussions 523 */ 524 public static List<MBDiscussion> findByClassNameId(long classNameId, 525 int start, int end) { 526 return getPersistence().findByClassNameId(classNameId, start, end); 527 } 528 529 /** 530 * Returns an ordered range of all the message boards discussions where classNameId = ?. 531 * 532 * <p> 533 * 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. 534 * </p> 535 * 536 * @param classNameId the class name ID 537 * @param start the lower bound of the range of message boards discussions 538 * @param end the upper bound of the range of message boards discussions (not inclusive) 539 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 540 * @return the ordered range of matching message boards discussions 541 */ 542 public static List<MBDiscussion> findByClassNameId(long classNameId, 543 int start, int end, OrderByComparator<MBDiscussion> orderByComparator) { 544 return getPersistence() 545 .findByClassNameId(classNameId, start, end, orderByComparator); 546 } 547 548 /** 549 * Returns an ordered range of all the message boards discussions where classNameId = ?. 550 * 551 * <p> 552 * 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. 553 * </p> 554 * 555 * @param classNameId the class name ID 556 * @param start the lower bound of the range of message boards discussions 557 * @param end the upper bound of the range of message boards discussions (not inclusive) 558 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 559 * @param retrieveFromCache whether to retrieve from the finder cache 560 * @return the ordered range of matching message boards discussions 561 */ 562 public static List<MBDiscussion> findByClassNameId(long classNameId, 563 int start, int end, OrderByComparator<MBDiscussion> orderByComparator, 564 boolean retrieveFromCache) { 565 return getPersistence() 566 .findByClassNameId(classNameId, start, end, 567 orderByComparator, retrieveFromCache); 568 } 569 570 /** 571 * Returns the first message boards discussion in the ordered set where classNameId = ?. 572 * 573 * @param classNameId the class name ID 574 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 575 * @return the first matching message boards discussion 576 * @throws NoSuchDiscussionException if a matching message boards discussion could not be found 577 */ 578 public static MBDiscussion findByClassNameId_First(long classNameId, 579 OrderByComparator<MBDiscussion> orderByComparator) 580 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 581 return getPersistence() 582 .findByClassNameId_First(classNameId, orderByComparator); 583 } 584 585 /** 586 * Returns the first message boards discussion in the ordered set where classNameId = ?. 587 * 588 * @param classNameId the class name ID 589 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 590 * @return the first matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 591 */ 592 public static MBDiscussion fetchByClassNameId_First(long classNameId, 593 OrderByComparator<MBDiscussion> orderByComparator) { 594 return getPersistence() 595 .fetchByClassNameId_First(classNameId, orderByComparator); 596 } 597 598 /** 599 * Returns the last message boards discussion in the ordered set where classNameId = ?. 600 * 601 * @param classNameId the class name ID 602 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 603 * @return the last matching message boards discussion 604 * @throws NoSuchDiscussionException if a matching message boards discussion could not be found 605 */ 606 public static MBDiscussion findByClassNameId_Last(long classNameId, 607 OrderByComparator<MBDiscussion> orderByComparator) 608 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 609 return getPersistence() 610 .findByClassNameId_Last(classNameId, orderByComparator); 611 } 612 613 /** 614 * Returns the last message boards discussion in the ordered set where classNameId = ?. 615 * 616 * @param classNameId the class name ID 617 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 618 * @return the last matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 619 */ 620 public static MBDiscussion fetchByClassNameId_Last(long classNameId, 621 OrderByComparator<MBDiscussion> orderByComparator) { 622 return getPersistence() 623 .fetchByClassNameId_Last(classNameId, orderByComparator); 624 } 625 626 /** 627 * Returns the message boards discussions before and after the current message boards discussion in the ordered set where classNameId = ?. 628 * 629 * @param discussionId the primary key of the current message boards discussion 630 * @param classNameId the class name ID 631 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 632 * @return the previous, current, and next message boards discussion 633 * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found 634 */ 635 public static MBDiscussion[] findByClassNameId_PrevAndNext( 636 long discussionId, long classNameId, 637 OrderByComparator<MBDiscussion> orderByComparator) 638 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 639 return getPersistence() 640 .findByClassNameId_PrevAndNext(discussionId, classNameId, 641 orderByComparator); 642 } 643 644 /** 645 * Removes all the message boards discussions where classNameId = ? from the database. 646 * 647 * @param classNameId the class name ID 648 */ 649 public static void removeByClassNameId(long classNameId) { 650 getPersistence().removeByClassNameId(classNameId); 651 } 652 653 /** 654 * Returns the number of message boards discussions where classNameId = ?. 655 * 656 * @param classNameId the class name ID 657 * @return the number of matching message boards discussions 658 */ 659 public static int countByClassNameId(long classNameId) { 660 return getPersistence().countByClassNameId(classNameId); 661 } 662 663 /** 664 * Returns the message boards discussion where threadId = ? or throws a {@link NoSuchDiscussionException} if it could not be found. 665 * 666 * @param threadId the thread ID 667 * @return the matching message boards discussion 668 * @throws NoSuchDiscussionException if a matching message boards discussion could not be found 669 */ 670 public static MBDiscussion findByThreadId(long threadId) 671 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 672 return getPersistence().findByThreadId(threadId); 673 } 674 675 /** 676 * Returns the message boards discussion where threadId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 677 * 678 * @param threadId the thread ID 679 * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 680 */ 681 public static MBDiscussion fetchByThreadId(long threadId) { 682 return getPersistence().fetchByThreadId(threadId); 683 } 684 685 /** 686 * Returns the message boards discussion where threadId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 687 * 688 * @param threadId the thread ID 689 * @param retrieveFromCache whether to retrieve from the finder cache 690 * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 691 */ 692 public static MBDiscussion fetchByThreadId(long threadId, 693 boolean retrieveFromCache) { 694 return getPersistence().fetchByThreadId(threadId, retrieveFromCache); 695 } 696 697 /** 698 * Removes the message boards discussion where threadId = ? from the database. 699 * 700 * @param threadId the thread ID 701 * @return the message boards discussion that was removed 702 */ 703 public static MBDiscussion removeByThreadId(long threadId) 704 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 705 return getPersistence().removeByThreadId(threadId); 706 } 707 708 /** 709 * Returns the number of message boards discussions where threadId = ?. 710 * 711 * @param threadId the thread ID 712 * @return the number of matching message boards discussions 713 */ 714 public static int countByThreadId(long threadId) { 715 return getPersistence().countByThreadId(threadId); 716 } 717 718 /** 719 * Returns the message boards discussion where classNameId = ? and classPK = ? or throws a {@link NoSuchDiscussionException} if it could not be found. 720 * 721 * @param classNameId the class name ID 722 * @param classPK the class p k 723 * @return the matching message boards discussion 724 * @throws NoSuchDiscussionException if a matching message boards discussion could not be found 725 */ 726 public static MBDiscussion findByC_C(long classNameId, long classPK) 727 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 728 return getPersistence().findByC_C(classNameId, classPK); 729 } 730 731 /** 732 * Returns the message boards discussion where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 733 * 734 * @param classNameId the class name ID 735 * @param classPK the class p k 736 * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 737 */ 738 public static MBDiscussion fetchByC_C(long classNameId, long classPK) { 739 return getPersistence().fetchByC_C(classNameId, classPK); 740 } 741 742 /** 743 * 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. 744 * 745 * @param classNameId the class name ID 746 * @param classPK the class p k 747 * @param retrieveFromCache whether to retrieve from the finder cache 748 * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 749 */ 750 public static MBDiscussion fetchByC_C(long classNameId, long classPK, 751 boolean retrieveFromCache) { 752 return getPersistence() 753 .fetchByC_C(classNameId, classPK, retrieveFromCache); 754 } 755 756 /** 757 * Removes the message boards discussion where classNameId = ? and classPK = ? from the database. 758 * 759 * @param classNameId the class name ID 760 * @param classPK the class p k 761 * @return the message boards discussion that was removed 762 */ 763 public static MBDiscussion removeByC_C(long classNameId, long classPK) 764 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 765 return getPersistence().removeByC_C(classNameId, classPK); 766 } 767 768 /** 769 * Returns the number of message boards discussions where classNameId = ? and classPK = ?. 770 * 771 * @param classNameId the class name ID 772 * @param classPK the class p k 773 * @return the number of matching message boards discussions 774 */ 775 public static int countByC_C(long classNameId, long classPK) { 776 return getPersistence().countByC_C(classNameId, classPK); 777 } 778 779 /** 780 * Caches the message boards discussion in the entity cache if it is enabled. 781 * 782 * @param mbDiscussion the message boards discussion 783 */ 784 public static void cacheResult(MBDiscussion mbDiscussion) { 785 getPersistence().cacheResult(mbDiscussion); 786 } 787 788 /** 789 * Caches the message boards discussions in the entity cache if it is enabled. 790 * 791 * @param mbDiscussions the message boards discussions 792 */ 793 public static void cacheResult(List<MBDiscussion> mbDiscussions) { 794 getPersistence().cacheResult(mbDiscussions); 795 } 796 797 /** 798 * Creates a new message boards discussion with the primary key. Does not add the message boards discussion to the database. 799 * 800 * @param discussionId the primary key for the new message boards discussion 801 * @return the new message boards discussion 802 */ 803 public static MBDiscussion create(long discussionId) { 804 return getPersistence().create(discussionId); 805 } 806 807 /** 808 * Removes the message boards discussion with the primary key from the database. Also notifies the appropriate model listeners. 809 * 810 * @param discussionId the primary key of the message boards discussion 811 * @return the message boards discussion that was removed 812 * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found 813 */ 814 public static MBDiscussion remove(long discussionId) 815 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 816 return getPersistence().remove(discussionId); 817 } 818 819 public static MBDiscussion updateImpl(MBDiscussion mbDiscussion) { 820 return getPersistence().updateImpl(mbDiscussion); 821 } 822 823 /** 824 * Returns the message boards discussion with the primary key or throws a {@link NoSuchDiscussionException} if it could not be found. 825 * 826 * @param discussionId the primary key of the message boards discussion 827 * @return the message boards discussion 828 * @throws NoSuchDiscussionException if a message boards discussion with the primary key could not be found 829 */ 830 public static MBDiscussion findByPrimaryKey(long discussionId) 831 throws com.liferay.portlet.messageboards.exception.NoSuchDiscussionException { 832 return getPersistence().findByPrimaryKey(discussionId); 833 } 834 835 /** 836 * Returns the message boards discussion with the primary key or returns <code>null</code> if it could not be found. 837 * 838 * @param discussionId the primary key of the message boards discussion 839 * @return the message boards discussion, or <code>null</code> if a message boards discussion with the primary key could not be found 840 */ 841 public static MBDiscussion fetchByPrimaryKey(long discussionId) { 842 return getPersistence().fetchByPrimaryKey(discussionId); 843 } 844 845 public static java.util.Map<java.io.Serializable, MBDiscussion> fetchByPrimaryKeys( 846 java.util.Set<java.io.Serializable> primaryKeys) { 847 return getPersistence().fetchByPrimaryKeys(primaryKeys); 848 } 849 850 /** 851 * Returns all the message boards discussions. 852 * 853 * @return the message boards discussions 854 */ 855 public static List<MBDiscussion> findAll() { 856 return getPersistence().findAll(); 857 } 858 859 /** 860 * Returns a range of all the message boards discussions. 861 * 862 * <p> 863 * 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. 864 * </p> 865 * 866 * @param start the lower bound of the range of message boards discussions 867 * @param end the upper bound of the range of message boards discussions (not inclusive) 868 * @return the range of message boards discussions 869 */ 870 public static List<MBDiscussion> findAll(int start, int end) { 871 return getPersistence().findAll(start, end); 872 } 873 874 /** 875 * Returns an ordered range of all the message boards discussions. 876 * 877 * <p> 878 * 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. 879 * </p> 880 * 881 * @param start the lower bound of the range of message boards discussions 882 * @param end the upper bound of the range of message boards discussions (not inclusive) 883 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 884 * @return the ordered range of message boards discussions 885 */ 886 public static List<MBDiscussion> findAll(int start, int end, 887 OrderByComparator<MBDiscussion> orderByComparator) { 888 return getPersistence().findAll(start, end, orderByComparator); 889 } 890 891 /** 892 * Returns an ordered range of all the message boards discussions. 893 * 894 * <p> 895 * 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. 896 * </p> 897 * 898 * @param start the lower bound of the range of message boards discussions 899 * @param end the upper bound of the range of message boards discussions (not inclusive) 900 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 901 * @param retrieveFromCache whether to retrieve from the finder cache 902 * @return the ordered range of message boards discussions 903 */ 904 public static List<MBDiscussion> findAll(int start, int end, 905 OrderByComparator<MBDiscussion> orderByComparator, 906 boolean retrieveFromCache) { 907 return getPersistence() 908 .findAll(start, end, orderByComparator, retrieveFromCache); 909 } 910 911 /** 912 * Removes all the message boards discussions from the database. 913 */ 914 public static void removeAll() { 915 getPersistence().removeAll(); 916 } 917 918 /** 919 * Returns the number of message boards discussions. 920 * 921 * @return the number of message boards discussions 922 */ 923 public static int countAll() { 924 return getPersistence().countAll(); 925 } 926 927 public static java.util.Set<java.lang.String> getBadColumnNames() { 928 return getPersistence().getBadColumnNames(); 929 } 930 931 public static MBDiscussionPersistence getPersistence() { 932 if (_persistence == null) { 933 _persistence = (MBDiscussionPersistence)PortalBeanLocatorUtil.locate(MBDiscussionPersistence.class.getName()); 934 935 ReferenceRegistry.registerReference(MBDiscussionUtil.class, 936 "_persistence"); 937 } 938 939 return _persistence; 940 } 941 942 private static MBDiscussionPersistence _persistence; 943 }