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.MBBan; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the message boards ban service. This utility wraps {@link com.liferay.portlet.messageboards.service.persistence.impl.MBBanPersistenceImpl} 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 MBBanPersistence 038 * @see com.liferay.portlet.messageboards.service.persistence.impl.MBBanPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class MBBanUtil { 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(MBBan mbBan) { 060 getPersistence().clearCache(mbBan); 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<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery) { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery, 081 int start, int end) { 082 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 083 } 084 085 /** 086 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 087 */ 088 public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery, 089 int start, int end, OrderByComparator<MBBan> orderByComparator) { 090 return getPersistence() 091 .findWithDynamicQuery(dynamicQuery, start, end, 092 orderByComparator); 093 } 094 095 /** 096 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 097 */ 098 public static MBBan update(MBBan mbBan) { 099 return getPersistence().update(mbBan); 100 } 101 102 /** 103 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 104 */ 105 public static MBBan update(MBBan mbBan, ServiceContext serviceContext) { 106 return getPersistence().update(mbBan, serviceContext); 107 } 108 109 /** 110 * Returns all the message boards bans where uuid = ?. 111 * 112 * @param uuid the uuid 113 * @return the matching message boards bans 114 */ 115 public static List<MBBan> findByUuid(java.lang.String uuid) { 116 return getPersistence().findByUuid(uuid); 117 } 118 119 /** 120 * Returns a range of all the message boards bans where uuid = ?. 121 * 122 * <p> 123 * 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 MBBanModelImpl}. 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. 124 * </p> 125 * 126 * @param uuid the uuid 127 * @param start the lower bound of the range of message boards bans 128 * @param end the upper bound of the range of message boards bans (not inclusive) 129 * @return the range of matching message boards bans 130 */ 131 public static List<MBBan> findByUuid(java.lang.String uuid, int start, 132 int end) { 133 return getPersistence().findByUuid(uuid, start, end); 134 } 135 136 /** 137 * Returns an ordered range of all the message boards bans where uuid = ?. 138 * 139 * <p> 140 * 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 MBBanModelImpl}. 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. 141 * </p> 142 * 143 * @param uuid the uuid 144 * @param start the lower bound of the range of message boards bans 145 * @param end the upper bound of the range of message boards bans (not inclusive) 146 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 147 * @return the ordered range of matching message boards bans 148 */ 149 public static List<MBBan> findByUuid(java.lang.String uuid, int start, 150 int end, OrderByComparator<MBBan> orderByComparator) { 151 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 152 } 153 154 /** 155 * Returns the first message boards ban in the ordered set where uuid = ?. 156 * 157 * @param uuid the uuid 158 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 159 * @return the first matching message boards ban 160 * @throws NoSuchBanException if a matching message boards ban could not be found 161 */ 162 public static MBBan findByUuid_First(java.lang.String uuid, 163 OrderByComparator<MBBan> orderByComparator) 164 throws com.liferay.portlet.messageboards.NoSuchBanException { 165 return getPersistence().findByUuid_First(uuid, orderByComparator); 166 } 167 168 /** 169 * Returns the first message boards ban in the ordered set where uuid = ?. 170 * 171 * @param uuid the uuid 172 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 173 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 174 */ 175 public static MBBan fetchByUuid_First(java.lang.String uuid, 176 OrderByComparator<MBBan> orderByComparator) { 177 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 178 } 179 180 /** 181 * Returns the last message boards ban in the ordered set where uuid = ?. 182 * 183 * @param uuid the uuid 184 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 185 * @return the last matching message boards ban 186 * @throws NoSuchBanException if a matching message boards ban could not be found 187 */ 188 public static MBBan findByUuid_Last(java.lang.String uuid, 189 OrderByComparator<MBBan> orderByComparator) 190 throws com.liferay.portlet.messageboards.NoSuchBanException { 191 return getPersistence().findByUuid_Last(uuid, orderByComparator); 192 } 193 194 /** 195 * Returns the last message boards ban in the ordered set where uuid = ?. 196 * 197 * @param uuid the uuid 198 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 199 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 200 */ 201 public static MBBan fetchByUuid_Last(java.lang.String uuid, 202 OrderByComparator<MBBan> orderByComparator) { 203 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 204 } 205 206 /** 207 * Returns the message boards bans before and after the current message boards ban in the ordered set where uuid = ?. 208 * 209 * @param banId the primary key of the current message boards ban 210 * @param uuid the uuid 211 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 212 * @return the previous, current, and next message boards ban 213 * @throws NoSuchBanException if a message boards ban with the primary key could not be found 214 */ 215 public static MBBan[] findByUuid_PrevAndNext(long banId, 216 java.lang.String uuid, OrderByComparator<MBBan> orderByComparator) 217 throws com.liferay.portlet.messageboards.NoSuchBanException { 218 return getPersistence() 219 .findByUuid_PrevAndNext(banId, uuid, orderByComparator); 220 } 221 222 /** 223 * Removes all the message boards bans where uuid = ? from the database. 224 * 225 * @param uuid the uuid 226 */ 227 public static void removeByUuid(java.lang.String uuid) { 228 getPersistence().removeByUuid(uuid); 229 } 230 231 /** 232 * Returns the number of message boards bans where uuid = ?. 233 * 234 * @param uuid the uuid 235 * @return the number of matching message boards bans 236 */ 237 public static int countByUuid(java.lang.String uuid) { 238 return getPersistence().countByUuid(uuid); 239 } 240 241 /** 242 * Returns the message boards ban where uuid = ? and groupId = ? or throws a {@link NoSuchBanException} if it could not be found. 243 * 244 * @param uuid the uuid 245 * @param groupId the group ID 246 * @return the matching message boards ban 247 * @throws NoSuchBanException if a matching message boards ban could not be found 248 */ 249 public static MBBan findByUUID_G(java.lang.String uuid, long groupId) 250 throws com.liferay.portlet.messageboards.NoSuchBanException { 251 return getPersistence().findByUUID_G(uuid, groupId); 252 } 253 254 /** 255 * Returns the message boards ban where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 256 * 257 * @param uuid the uuid 258 * @param groupId the group ID 259 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 260 */ 261 public static MBBan fetchByUUID_G(java.lang.String uuid, long groupId) { 262 return getPersistence().fetchByUUID_G(uuid, groupId); 263 } 264 265 /** 266 * Returns the message boards ban where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 267 * 268 * @param uuid the uuid 269 * @param groupId the group ID 270 * @param retrieveFromCache whether to use the finder cache 271 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 272 */ 273 public static MBBan fetchByUUID_G(java.lang.String uuid, long groupId, 274 boolean retrieveFromCache) { 275 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 276 } 277 278 /** 279 * Removes the message boards ban where uuid = ? and groupId = ? from the database. 280 * 281 * @param uuid the uuid 282 * @param groupId the group ID 283 * @return the message boards ban that was removed 284 */ 285 public static MBBan removeByUUID_G(java.lang.String uuid, long groupId) 286 throws com.liferay.portlet.messageboards.NoSuchBanException { 287 return getPersistence().removeByUUID_G(uuid, groupId); 288 } 289 290 /** 291 * Returns the number of message boards bans where uuid = ? and groupId = ?. 292 * 293 * @param uuid the uuid 294 * @param groupId the group ID 295 * @return the number of matching message boards bans 296 */ 297 public static int countByUUID_G(java.lang.String uuid, long groupId) { 298 return getPersistence().countByUUID_G(uuid, groupId); 299 } 300 301 /** 302 * Returns all the message boards bans where uuid = ? and companyId = ?. 303 * 304 * @param uuid the uuid 305 * @param companyId the company ID 306 * @return the matching message boards bans 307 */ 308 public static List<MBBan> findByUuid_C(java.lang.String uuid, long companyId) { 309 return getPersistence().findByUuid_C(uuid, companyId); 310 } 311 312 /** 313 * Returns a range of all the message boards bans where uuid = ? and companyId = ?. 314 * 315 * <p> 316 * 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 MBBanModelImpl}. 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. 317 * </p> 318 * 319 * @param uuid the uuid 320 * @param companyId the company ID 321 * @param start the lower bound of the range of message boards bans 322 * @param end the upper bound of the range of message boards bans (not inclusive) 323 * @return the range of matching message boards bans 324 */ 325 public static List<MBBan> findByUuid_C(java.lang.String uuid, 326 long companyId, int start, int end) { 327 return getPersistence().findByUuid_C(uuid, companyId, start, end); 328 } 329 330 /** 331 * Returns an ordered range of all the message boards bans where uuid = ? and companyId = ?. 332 * 333 * <p> 334 * 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 MBBanModelImpl}. 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. 335 * </p> 336 * 337 * @param uuid the uuid 338 * @param companyId the company ID 339 * @param start the lower bound of the range of message boards bans 340 * @param end the upper bound of the range of message boards bans (not inclusive) 341 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 342 * @return the ordered range of matching message boards bans 343 */ 344 public static List<MBBan> findByUuid_C(java.lang.String uuid, 345 long companyId, int start, int end, 346 OrderByComparator<MBBan> orderByComparator) { 347 return getPersistence() 348 .findByUuid_C(uuid, companyId, start, end, orderByComparator); 349 } 350 351 /** 352 * Returns the first message boards ban in the ordered set where uuid = ? and companyId = ?. 353 * 354 * @param uuid the uuid 355 * @param companyId the company ID 356 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 357 * @return the first matching message boards ban 358 * @throws NoSuchBanException if a matching message boards ban could not be found 359 */ 360 public static MBBan findByUuid_C_First(java.lang.String uuid, 361 long companyId, OrderByComparator<MBBan> orderByComparator) 362 throws com.liferay.portlet.messageboards.NoSuchBanException { 363 return getPersistence() 364 .findByUuid_C_First(uuid, companyId, orderByComparator); 365 } 366 367 /** 368 * Returns the first message boards ban in the ordered set where uuid = ? and companyId = ?. 369 * 370 * @param uuid the uuid 371 * @param companyId the company ID 372 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 373 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 374 */ 375 public static MBBan fetchByUuid_C_First(java.lang.String uuid, 376 long companyId, OrderByComparator<MBBan> orderByComparator) { 377 return getPersistence() 378 .fetchByUuid_C_First(uuid, companyId, orderByComparator); 379 } 380 381 /** 382 * Returns the last message boards ban in the ordered set where uuid = ? and companyId = ?. 383 * 384 * @param uuid the uuid 385 * @param companyId the company ID 386 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 387 * @return the last matching message boards ban 388 * @throws NoSuchBanException if a matching message boards ban could not be found 389 */ 390 public static MBBan findByUuid_C_Last(java.lang.String uuid, 391 long companyId, OrderByComparator<MBBan> orderByComparator) 392 throws com.liferay.portlet.messageboards.NoSuchBanException { 393 return getPersistence() 394 .findByUuid_C_Last(uuid, companyId, orderByComparator); 395 } 396 397 /** 398 * Returns the last message boards ban in the ordered set where uuid = ? and companyId = ?. 399 * 400 * @param uuid the uuid 401 * @param companyId the company ID 402 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 403 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 404 */ 405 public static MBBan fetchByUuid_C_Last(java.lang.String uuid, 406 long companyId, OrderByComparator<MBBan> orderByComparator) { 407 return getPersistence() 408 .fetchByUuid_C_Last(uuid, companyId, orderByComparator); 409 } 410 411 /** 412 * Returns the message boards bans before and after the current message boards ban in the ordered set where uuid = ? and companyId = ?. 413 * 414 * @param banId the primary key of the current message boards ban 415 * @param uuid the uuid 416 * @param companyId the company ID 417 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 418 * @return the previous, current, and next message boards ban 419 * @throws NoSuchBanException if a message boards ban with the primary key could not be found 420 */ 421 public static MBBan[] findByUuid_C_PrevAndNext(long banId, 422 java.lang.String uuid, long companyId, 423 OrderByComparator<MBBan> orderByComparator) 424 throws com.liferay.portlet.messageboards.NoSuchBanException { 425 return getPersistence() 426 .findByUuid_C_PrevAndNext(banId, uuid, companyId, 427 orderByComparator); 428 } 429 430 /** 431 * Removes all the message boards bans where uuid = ? and companyId = ? from the database. 432 * 433 * @param uuid the uuid 434 * @param companyId the company ID 435 */ 436 public static void removeByUuid_C(java.lang.String uuid, long companyId) { 437 getPersistence().removeByUuid_C(uuid, companyId); 438 } 439 440 /** 441 * Returns the number of message boards bans where uuid = ? and companyId = ?. 442 * 443 * @param uuid the uuid 444 * @param companyId the company ID 445 * @return the number of matching message boards bans 446 */ 447 public static int countByUuid_C(java.lang.String uuid, long companyId) { 448 return getPersistence().countByUuid_C(uuid, companyId); 449 } 450 451 /** 452 * Returns all the message boards bans where groupId = ?. 453 * 454 * @param groupId the group ID 455 * @return the matching message boards bans 456 */ 457 public static List<MBBan> findByGroupId(long groupId) { 458 return getPersistence().findByGroupId(groupId); 459 } 460 461 /** 462 * Returns a range of all the message boards bans where groupId = ?. 463 * 464 * <p> 465 * 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 MBBanModelImpl}. 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. 466 * </p> 467 * 468 * @param groupId the group ID 469 * @param start the lower bound of the range of message boards bans 470 * @param end the upper bound of the range of message boards bans (not inclusive) 471 * @return the range of matching message boards bans 472 */ 473 public static List<MBBan> findByGroupId(long groupId, int start, int end) { 474 return getPersistence().findByGroupId(groupId, start, end); 475 } 476 477 /** 478 * Returns an ordered range of all the message boards bans where groupId = ?. 479 * 480 * <p> 481 * 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 MBBanModelImpl}. 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. 482 * </p> 483 * 484 * @param groupId the group ID 485 * @param start the lower bound of the range of message boards bans 486 * @param end the upper bound of the range of message boards bans (not inclusive) 487 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 488 * @return the ordered range of matching message boards bans 489 */ 490 public static List<MBBan> findByGroupId(long groupId, int start, int end, 491 OrderByComparator<MBBan> orderByComparator) { 492 return getPersistence() 493 .findByGroupId(groupId, start, end, orderByComparator); 494 } 495 496 /** 497 * Returns the first message boards ban in the ordered set where groupId = ?. 498 * 499 * @param groupId the group ID 500 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 501 * @return the first matching message boards ban 502 * @throws NoSuchBanException if a matching message boards ban could not be found 503 */ 504 public static MBBan findByGroupId_First(long groupId, 505 OrderByComparator<MBBan> orderByComparator) 506 throws com.liferay.portlet.messageboards.NoSuchBanException { 507 return getPersistence().findByGroupId_First(groupId, orderByComparator); 508 } 509 510 /** 511 * Returns the first message boards ban in the ordered set where groupId = ?. 512 * 513 * @param groupId the group ID 514 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 515 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 516 */ 517 public static MBBan fetchByGroupId_First(long groupId, 518 OrderByComparator<MBBan> orderByComparator) { 519 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 520 } 521 522 /** 523 * Returns the last message boards ban in the ordered set where groupId = ?. 524 * 525 * @param groupId the group ID 526 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 527 * @return the last matching message boards ban 528 * @throws NoSuchBanException if a matching message boards ban could not be found 529 */ 530 public static MBBan findByGroupId_Last(long groupId, 531 OrderByComparator<MBBan> orderByComparator) 532 throws com.liferay.portlet.messageboards.NoSuchBanException { 533 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 534 } 535 536 /** 537 * Returns the last message boards ban in the ordered set where groupId = ?. 538 * 539 * @param groupId the group ID 540 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 541 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 542 */ 543 public static MBBan fetchByGroupId_Last(long groupId, 544 OrderByComparator<MBBan> orderByComparator) { 545 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 546 } 547 548 /** 549 * Returns the message boards bans before and after the current message boards ban in the ordered set where groupId = ?. 550 * 551 * @param banId the primary key of the current message boards ban 552 * @param groupId the group ID 553 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 554 * @return the previous, current, and next message boards ban 555 * @throws NoSuchBanException if a message boards ban with the primary key could not be found 556 */ 557 public static MBBan[] findByGroupId_PrevAndNext(long banId, long groupId, 558 OrderByComparator<MBBan> orderByComparator) 559 throws com.liferay.portlet.messageboards.NoSuchBanException { 560 return getPersistence() 561 .findByGroupId_PrevAndNext(banId, groupId, orderByComparator); 562 } 563 564 /** 565 * Removes all the message boards bans where groupId = ? from the database. 566 * 567 * @param groupId the group ID 568 */ 569 public static void removeByGroupId(long groupId) { 570 getPersistence().removeByGroupId(groupId); 571 } 572 573 /** 574 * Returns the number of message boards bans where groupId = ?. 575 * 576 * @param groupId the group ID 577 * @return the number of matching message boards bans 578 */ 579 public static int countByGroupId(long groupId) { 580 return getPersistence().countByGroupId(groupId); 581 } 582 583 /** 584 * Returns all the message boards bans where userId = ?. 585 * 586 * @param userId the user ID 587 * @return the matching message boards bans 588 */ 589 public static List<MBBan> findByUserId(long userId) { 590 return getPersistence().findByUserId(userId); 591 } 592 593 /** 594 * Returns a range of all the message boards bans where userId = ?. 595 * 596 * <p> 597 * 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 MBBanModelImpl}. 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. 598 * </p> 599 * 600 * @param userId the user ID 601 * @param start the lower bound of the range of message boards bans 602 * @param end the upper bound of the range of message boards bans (not inclusive) 603 * @return the range of matching message boards bans 604 */ 605 public static List<MBBan> findByUserId(long userId, int start, int end) { 606 return getPersistence().findByUserId(userId, start, end); 607 } 608 609 /** 610 * Returns an ordered range of all the message boards bans where userId = ?. 611 * 612 * <p> 613 * 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 MBBanModelImpl}. 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. 614 * </p> 615 * 616 * @param userId the user ID 617 * @param start the lower bound of the range of message boards bans 618 * @param end the upper bound of the range of message boards bans (not inclusive) 619 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 620 * @return the ordered range of matching message boards bans 621 */ 622 public static List<MBBan> findByUserId(long userId, int start, int end, 623 OrderByComparator<MBBan> orderByComparator) { 624 return getPersistence() 625 .findByUserId(userId, start, end, orderByComparator); 626 } 627 628 /** 629 * Returns the first message boards ban in the ordered set where userId = ?. 630 * 631 * @param userId the user ID 632 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 633 * @return the first matching message boards ban 634 * @throws NoSuchBanException if a matching message boards ban could not be found 635 */ 636 public static MBBan findByUserId_First(long userId, 637 OrderByComparator<MBBan> orderByComparator) 638 throws com.liferay.portlet.messageboards.NoSuchBanException { 639 return getPersistence().findByUserId_First(userId, orderByComparator); 640 } 641 642 /** 643 * Returns the first message boards ban in the ordered set where userId = ?. 644 * 645 * @param userId the user ID 646 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 647 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 648 */ 649 public static MBBan fetchByUserId_First(long userId, 650 OrderByComparator<MBBan> orderByComparator) { 651 return getPersistence().fetchByUserId_First(userId, orderByComparator); 652 } 653 654 /** 655 * Returns the last message boards ban in the ordered set where userId = ?. 656 * 657 * @param userId the user ID 658 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 659 * @return the last matching message boards ban 660 * @throws NoSuchBanException if a matching message boards ban could not be found 661 */ 662 public static MBBan findByUserId_Last(long userId, 663 OrderByComparator<MBBan> orderByComparator) 664 throws com.liferay.portlet.messageboards.NoSuchBanException { 665 return getPersistence().findByUserId_Last(userId, orderByComparator); 666 } 667 668 /** 669 * Returns the last message boards ban in the ordered set where userId = ?. 670 * 671 * @param userId the user ID 672 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 673 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 674 */ 675 public static MBBan fetchByUserId_Last(long userId, 676 OrderByComparator<MBBan> orderByComparator) { 677 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 678 } 679 680 /** 681 * Returns the message boards bans before and after the current message boards ban in the ordered set where userId = ?. 682 * 683 * @param banId the primary key of the current message boards ban 684 * @param userId the user ID 685 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 686 * @return the previous, current, and next message boards ban 687 * @throws NoSuchBanException if a message boards ban with the primary key could not be found 688 */ 689 public static MBBan[] findByUserId_PrevAndNext(long banId, long userId, 690 OrderByComparator<MBBan> orderByComparator) 691 throws com.liferay.portlet.messageboards.NoSuchBanException { 692 return getPersistence() 693 .findByUserId_PrevAndNext(banId, userId, orderByComparator); 694 } 695 696 /** 697 * Removes all the message boards bans where userId = ? from the database. 698 * 699 * @param userId the user ID 700 */ 701 public static void removeByUserId(long userId) { 702 getPersistence().removeByUserId(userId); 703 } 704 705 /** 706 * Returns the number of message boards bans where userId = ?. 707 * 708 * @param userId the user ID 709 * @return the number of matching message boards bans 710 */ 711 public static int countByUserId(long userId) { 712 return getPersistence().countByUserId(userId); 713 } 714 715 /** 716 * Returns all the message boards bans where banUserId = ?. 717 * 718 * @param banUserId the ban user ID 719 * @return the matching message boards bans 720 */ 721 public static List<MBBan> findByBanUserId(long banUserId) { 722 return getPersistence().findByBanUserId(banUserId); 723 } 724 725 /** 726 * Returns a range of all the message boards bans where banUserId = ?. 727 * 728 * <p> 729 * 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 MBBanModelImpl}. 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. 730 * </p> 731 * 732 * @param banUserId the ban user ID 733 * @param start the lower bound of the range of message boards bans 734 * @param end the upper bound of the range of message boards bans (not inclusive) 735 * @return the range of matching message boards bans 736 */ 737 public static List<MBBan> findByBanUserId(long banUserId, int start, int end) { 738 return getPersistence().findByBanUserId(banUserId, start, end); 739 } 740 741 /** 742 * Returns an ordered range of all the message boards bans where banUserId = ?. 743 * 744 * <p> 745 * 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 MBBanModelImpl}. 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. 746 * </p> 747 * 748 * @param banUserId the ban user ID 749 * @param start the lower bound of the range of message boards bans 750 * @param end the upper bound of the range of message boards bans (not inclusive) 751 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 752 * @return the ordered range of matching message boards bans 753 */ 754 public static List<MBBan> findByBanUserId(long banUserId, int start, 755 int end, OrderByComparator<MBBan> orderByComparator) { 756 return getPersistence() 757 .findByBanUserId(banUserId, start, end, orderByComparator); 758 } 759 760 /** 761 * Returns the first message boards ban in the ordered set where banUserId = ?. 762 * 763 * @param banUserId the ban user ID 764 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 765 * @return the first matching message boards ban 766 * @throws NoSuchBanException if a matching message boards ban could not be found 767 */ 768 public static MBBan findByBanUserId_First(long banUserId, 769 OrderByComparator<MBBan> orderByComparator) 770 throws com.liferay.portlet.messageboards.NoSuchBanException { 771 return getPersistence() 772 .findByBanUserId_First(banUserId, orderByComparator); 773 } 774 775 /** 776 * Returns the first message boards ban in the ordered set where banUserId = ?. 777 * 778 * @param banUserId the ban user ID 779 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 780 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 781 */ 782 public static MBBan fetchByBanUserId_First(long banUserId, 783 OrderByComparator<MBBan> orderByComparator) { 784 return getPersistence() 785 .fetchByBanUserId_First(banUserId, orderByComparator); 786 } 787 788 /** 789 * Returns the last message boards ban in the ordered set where banUserId = ?. 790 * 791 * @param banUserId the ban user ID 792 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 793 * @return the last matching message boards ban 794 * @throws NoSuchBanException if a matching message boards ban could not be found 795 */ 796 public static MBBan findByBanUserId_Last(long banUserId, 797 OrderByComparator<MBBan> orderByComparator) 798 throws com.liferay.portlet.messageboards.NoSuchBanException { 799 return getPersistence() 800 .findByBanUserId_Last(banUserId, orderByComparator); 801 } 802 803 /** 804 * Returns the last message boards ban in the ordered set where banUserId = ?. 805 * 806 * @param banUserId the ban user ID 807 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 808 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 809 */ 810 public static MBBan fetchByBanUserId_Last(long banUserId, 811 OrderByComparator<MBBan> orderByComparator) { 812 return getPersistence() 813 .fetchByBanUserId_Last(banUserId, orderByComparator); 814 } 815 816 /** 817 * Returns the message boards bans before and after the current message boards ban in the ordered set where banUserId = ?. 818 * 819 * @param banId the primary key of the current message boards ban 820 * @param banUserId the ban user ID 821 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 822 * @return the previous, current, and next message boards ban 823 * @throws NoSuchBanException if a message boards ban with the primary key could not be found 824 */ 825 public static MBBan[] findByBanUserId_PrevAndNext(long banId, 826 long banUserId, OrderByComparator<MBBan> orderByComparator) 827 throws com.liferay.portlet.messageboards.NoSuchBanException { 828 return getPersistence() 829 .findByBanUserId_PrevAndNext(banId, banUserId, 830 orderByComparator); 831 } 832 833 /** 834 * Removes all the message boards bans where banUserId = ? from the database. 835 * 836 * @param banUserId the ban user ID 837 */ 838 public static void removeByBanUserId(long banUserId) { 839 getPersistence().removeByBanUserId(banUserId); 840 } 841 842 /** 843 * Returns the number of message boards bans where banUserId = ?. 844 * 845 * @param banUserId the ban user ID 846 * @return the number of matching message boards bans 847 */ 848 public static int countByBanUserId(long banUserId) { 849 return getPersistence().countByBanUserId(banUserId); 850 } 851 852 /** 853 * Returns the message boards ban where groupId = ? and banUserId = ? or throws a {@link NoSuchBanException} if it could not be found. 854 * 855 * @param groupId the group ID 856 * @param banUserId the ban user ID 857 * @return the matching message boards ban 858 * @throws NoSuchBanException if a matching message boards ban could not be found 859 */ 860 public static MBBan findByG_B(long groupId, long banUserId) 861 throws com.liferay.portlet.messageboards.NoSuchBanException { 862 return getPersistence().findByG_B(groupId, banUserId); 863 } 864 865 /** 866 * Returns the message boards ban where groupId = ? and banUserId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 867 * 868 * @param groupId the group ID 869 * @param banUserId the ban user ID 870 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 871 */ 872 public static MBBan fetchByG_B(long groupId, long banUserId) { 873 return getPersistence().fetchByG_B(groupId, banUserId); 874 } 875 876 /** 877 * Returns the message boards ban where groupId = ? and banUserId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 878 * 879 * @param groupId the group ID 880 * @param banUserId the ban user ID 881 * @param retrieveFromCache whether to use the finder cache 882 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 883 */ 884 public static MBBan fetchByG_B(long groupId, long banUserId, 885 boolean retrieveFromCache) { 886 return getPersistence().fetchByG_B(groupId, banUserId, retrieveFromCache); 887 } 888 889 /** 890 * Removes the message boards ban where groupId = ? and banUserId = ? from the database. 891 * 892 * @param groupId the group ID 893 * @param banUserId the ban user ID 894 * @return the message boards ban that was removed 895 */ 896 public static MBBan removeByG_B(long groupId, long banUserId) 897 throws com.liferay.portlet.messageboards.NoSuchBanException { 898 return getPersistence().removeByG_B(groupId, banUserId); 899 } 900 901 /** 902 * Returns the number of message boards bans where groupId = ? and banUserId = ?. 903 * 904 * @param groupId the group ID 905 * @param banUserId the ban user ID 906 * @return the number of matching message boards bans 907 */ 908 public static int countByG_B(long groupId, long banUserId) { 909 return getPersistence().countByG_B(groupId, banUserId); 910 } 911 912 /** 913 * Caches the message boards ban in the entity cache if it is enabled. 914 * 915 * @param mbBan the message boards ban 916 */ 917 public static void cacheResult(MBBan mbBan) { 918 getPersistence().cacheResult(mbBan); 919 } 920 921 /** 922 * Caches the message boards bans in the entity cache if it is enabled. 923 * 924 * @param mbBans the message boards bans 925 */ 926 public static void cacheResult(List<MBBan> mbBans) { 927 getPersistence().cacheResult(mbBans); 928 } 929 930 /** 931 * Creates a new message boards ban with the primary key. Does not add the message boards ban to the database. 932 * 933 * @param banId the primary key for the new message boards ban 934 * @return the new message boards ban 935 */ 936 public static MBBan create(long banId) { 937 return getPersistence().create(banId); 938 } 939 940 /** 941 * Removes the message boards ban with the primary key from the database. Also notifies the appropriate model listeners. 942 * 943 * @param banId the primary key of the message boards ban 944 * @return the message boards ban that was removed 945 * @throws NoSuchBanException if a message boards ban with the primary key could not be found 946 */ 947 public static MBBan remove(long banId) 948 throws com.liferay.portlet.messageboards.NoSuchBanException { 949 return getPersistence().remove(banId); 950 } 951 952 public static MBBan updateImpl(MBBan mbBan) { 953 return getPersistence().updateImpl(mbBan); 954 } 955 956 /** 957 * Returns the message boards ban with the primary key or throws a {@link NoSuchBanException} if it could not be found. 958 * 959 * @param banId the primary key of the message boards ban 960 * @return the message boards ban 961 * @throws NoSuchBanException if a message boards ban with the primary key could not be found 962 */ 963 public static MBBan findByPrimaryKey(long banId) 964 throws com.liferay.portlet.messageboards.NoSuchBanException { 965 return getPersistence().findByPrimaryKey(banId); 966 } 967 968 /** 969 * Returns the message boards ban with the primary key or returns <code>null</code> if it could not be found. 970 * 971 * @param banId the primary key of the message boards ban 972 * @return the message boards ban, or <code>null</code> if a message boards ban with the primary key could not be found 973 */ 974 public static MBBan fetchByPrimaryKey(long banId) { 975 return getPersistence().fetchByPrimaryKey(banId); 976 } 977 978 public static java.util.Map<java.io.Serializable, MBBan> fetchByPrimaryKeys( 979 java.util.Set<java.io.Serializable> primaryKeys) { 980 return getPersistence().fetchByPrimaryKeys(primaryKeys); 981 } 982 983 /** 984 * Returns all the message boards bans. 985 * 986 * @return the message boards bans 987 */ 988 public static List<MBBan> findAll() { 989 return getPersistence().findAll(); 990 } 991 992 /** 993 * Returns a range of all the message boards bans. 994 * 995 * <p> 996 * 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 MBBanModelImpl}. 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. 997 * </p> 998 * 999 * @param start the lower bound of the range of message boards bans 1000 * @param end the upper bound of the range of message boards bans (not inclusive) 1001 * @return the range of message boards bans 1002 */ 1003 public static List<MBBan> findAll(int start, int end) { 1004 return getPersistence().findAll(start, end); 1005 } 1006 1007 /** 1008 * Returns an ordered range of all the message boards bans. 1009 * 1010 * <p> 1011 * 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 MBBanModelImpl}. 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. 1012 * </p> 1013 * 1014 * @param start the lower bound of the range of message boards bans 1015 * @param end the upper bound of the range of message boards bans (not inclusive) 1016 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1017 * @return the ordered range of message boards bans 1018 */ 1019 public static List<MBBan> findAll(int start, int end, 1020 OrderByComparator<MBBan> orderByComparator) { 1021 return getPersistence().findAll(start, end, orderByComparator); 1022 } 1023 1024 /** 1025 * Removes all the message boards bans from the database. 1026 */ 1027 public static void removeAll() { 1028 getPersistence().removeAll(); 1029 } 1030 1031 /** 1032 * Returns the number of message boards bans. 1033 * 1034 * @return the number of message boards bans 1035 */ 1036 public static int countAll() { 1037 return getPersistence().countAll(); 1038 } 1039 1040 public static MBBanPersistence getPersistence() { 1041 if (_persistence == null) { 1042 _persistence = (MBBanPersistence)PortalBeanLocatorUtil.locate(MBBanPersistence.class.getName()); 1043 1044 ReferenceRegistry.registerReference(MBBanUtil.class, "_persistence"); 1045 } 1046 1047 return _persistence; 1048 } 1049 1050 /** 1051 * @deprecated As of 6.2.0 1052 */ 1053 @Deprecated 1054 public void setPersistence(MBBanPersistence persistence) { 1055 } 1056 1057 private static MBBanPersistence _persistence; 1058 }