001 /** 002 * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.messageboards.model.MBBan; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the message boards ban service. This utility wraps {@link 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. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see MBBanPersistence 037 * @see MBBanPersistenceImpl 038 * @generated 039 */ 040 public class MBBanUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(MBBan mbBan) { 058 getPersistence().clearCache(mbBan); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery) 073 throws SystemException { 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) throws SystemException { 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 orderByComparator) 090 throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 098 */ 099 public static MBBan update(MBBan mbBan) throws SystemException { 100 return getPersistence().update(mbBan); 101 } 102 103 /** 104 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 105 */ 106 public static MBBan update(MBBan mbBan, ServiceContext serviceContext) 107 throws SystemException { 108 return getPersistence().update(mbBan, serviceContext); 109 } 110 111 /** 112 * Caches the message boards ban in the entity cache if it is enabled. 113 * 114 * @param mbBan the message boards ban 115 */ 116 public static void cacheResult( 117 com.liferay.portlet.messageboards.model.MBBan mbBan) { 118 getPersistence().cacheResult(mbBan); 119 } 120 121 /** 122 * Caches the message boards bans in the entity cache if it is enabled. 123 * 124 * @param mbBans the message boards bans 125 */ 126 public static void cacheResult( 127 java.util.List<com.liferay.portlet.messageboards.model.MBBan> mbBans) { 128 getPersistence().cacheResult(mbBans); 129 } 130 131 /** 132 * Creates a new message boards ban with the primary key. Does not add the message boards ban to the database. 133 * 134 * @param banId the primary key for the new message boards ban 135 * @return the new message boards ban 136 */ 137 public static com.liferay.portlet.messageboards.model.MBBan create( 138 long banId) { 139 return getPersistence().create(banId); 140 } 141 142 /** 143 * Removes the message boards ban with the primary key from the database. Also notifies the appropriate model listeners. 144 * 145 * @param banId the primary key of the message boards ban 146 * @return the message boards ban that was removed 147 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 148 * @throws SystemException if a system exception occurred 149 */ 150 public static com.liferay.portlet.messageboards.model.MBBan remove( 151 long banId) 152 throws com.liferay.portal.kernel.exception.SystemException, 153 com.liferay.portlet.messageboards.NoSuchBanException { 154 return getPersistence().remove(banId); 155 } 156 157 public static com.liferay.portlet.messageboards.model.MBBan updateImpl( 158 com.liferay.portlet.messageboards.model.MBBan mbBan) 159 throws com.liferay.portal.kernel.exception.SystemException { 160 return getPersistence().updateImpl(mbBan); 161 } 162 163 /** 164 * Returns the message boards ban with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchBanException} if it could not be found. 165 * 166 * @param banId the primary key of the message boards ban 167 * @return the message boards ban 168 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 169 * @throws SystemException if a system exception occurred 170 */ 171 public static com.liferay.portlet.messageboards.model.MBBan findByPrimaryKey( 172 long banId) 173 throws com.liferay.portal.kernel.exception.SystemException, 174 com.liferay.portlet.messageboards.NoSuchBanException { 175 return getPersistence().findByPrimaryKey(banId); 176 } 177 178 /** 179 * Returns the message boards ban with the primary key or returns <code>null</code> if it could not be found. 180 * 181 * @param banId the primary key of the message boards ban 182 * @return the message boards ban, or <code>null</code> if a message boards ban with the primary key could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public static com.liferay.portlet.messageboards.model.MBBan fetchByPrimaryKey( 186 long banId) throws com.liferay.portal.kernel.exception.SystemException { 187 return getPersistence().fetchByPrimaryKey(banId); 188 } 189 190 /** 191 * Returns all the message boards bans where groupId = ?. 192 * 193 * @param groupId the group ID 194 * @return the matching message boards bans 195 * @throws SystemException if a system exception occurred 196 */ 197 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId( 198 long groupId) 199 throws com.liferay.portal.kernel.exception.SystemException { 200 return getPersistence().findByGroupId(groupId); 201 } 202 203 /** 204 * Returns a range of all the message boards bans where groupId = ?. 205 * 206 * <p> 207 * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 208 * </p> 209 * 210 * @param groupId the group ID 211 * @param start the lower bound of the range of message boards bans 212 * @param end the upper bound of the range of message boards bans (not inclusive) 213 * @return the range of matching message boards bans 214 * @throws SystemException if a system exception occurred 215 */ 216 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId( 217 long groupId, int start, int end) 218 throws com.liferay.portal.kernel.exception.SystemException { 219 return getPersistence().findByGroupId(groupId, start, end); 220 } 221 222 /** 223 * Returns an ordered range of all the message boards bans where groupId = ?. 224 * 225 * <p> 226 * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 227 * </p> 228 * 229 * @param groupId the group ID 230 * @param start the lower bound of the range of message boards bans 231 * @param end the upper bound of the range of message boards bans (not inclusive) 232 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 233 * @return the ordered range of matching message boards bans 234 * @throws SystemException if a system exception occurred 235 */ 236 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId( 237 long groupId, int start, int end, 238 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 239 throws com.liferay.portal.kernel.exception.SystemException { 240 return getPersistence() 241 .findByGroupId(groupId, start, end, orderByComparator); 242 } 243 244 /** 245 * Returns the first message boards ban in the ordered set where groupId = ?. 246 * 247 * @param groupId the group ID 248 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 249 * @return the first matching message boards ban 250 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 251 * @throws SystemException if a system exception occurred 252 */ 253 public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_First( 254 long groupId, 255 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 256 throws com.liferay.portal.kernel.exception.SystemException, 257 com.liferay.portlet.messageboards.NoSuchBanException { 258 return getPersistence().findByGroupId_First(groupId, orderByComparator); 259 } 260 261 /** 262 * Returns the first message boards ban in the ordered set where groupId = ?. 263 * 264 * @param groupId the group ID 265 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 266 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 267 * @throws SystemException if a system exception occurred 268 */ 269 public static com.liferay.portlet.messageboards.model.MBBan fetchByGroupId_First( 270 long groupId, 271 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 272 throws com.liferay.portal.kernel.exception.SystemException { 273 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 274 } 275 276 /** 277 * Returns the last message boards ban in the ordered set where groupId = ?. 278 * 279 * @param groupId the group ID 280 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 281 * @return the last matching message boards ban 282 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 283 * @throws SystemException if a system exception occurred 284 */ 285 public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last( 286 long groupId, 287 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 288 throws com.liferay.portal.kernel.exception.SystemException, 289 com.liferay.portlet.messageboards.NoSuchBanException { 290 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 291 } 292 293 /** 294 * Returns the last message boards ban in the ordered set where groupId = ?. 295 * 296 * @param groupId the group ID 297 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 298 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 299 * @throws SystemException if a system exception occurred 300 */ 301 public static com.liferay.portlet.messageboards.model.MBBan fetchByGroupId_Last( 302 long groupId, 303 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 304 throws com.liferay.portal.kernel.exception.SystemException { 305 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 306 } 307 308 /** 309 * Returns the message boards bans before and after the current message boards ban in the ordered set where groupId = ?. 310 * 311 * @param banId the primary key of the current message boards ban 312 * @param groupId the group ID 313 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 314 * @return the previous, current, and next message boards ban 315 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 316 * @throws SystemException if a system exception occurred 317 */ 318 public static com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext( 319 long banId, long groupId, 320 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 321 throws com.liferay.portal.kernel.exception.SystemException, 322 com.liferay.portlet.messageboards.NoSuchBanException { 323 return getPersistence() 324 .findByGroupId_PrevAndNext(banId, groupId, orderByComparator); 325 } 326 327 /** 328 * Returns all the message boards bans where userId = ?. 329 * 330 * @param userId the user ID 331 * @return the matching message boards bans 332 * @throws SystemException if a system exception occurred 333 */ 334 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId( 335 long userId) throws com.liferay.portal.kernel.exception.SystemException { 336 return getPersistence().findByUserId(userId); 337 } 338 339 /** 340 * Returns a range of all the message boards bans where userId = ?. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 344 * </p> 345 * 346 * @param userId the user ID 347 * @param start the lower bound of the range of message boards bans 348 * @param end the upper bound of the range of message boards bans (not inclusive) 349 * @return the range of matching message boards bans 350 * @throws SystemException if a system exception occurred 351 */ 352 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId( 353 long userId, int start, int end) 354 throws com.liferay.portal.kernel.exception.SystemException { 355 return getPersistence().findByUserId(userId, start, end); 356 } 357 358 /** 359 * Returns an ordered range of all the message boards bans where userId = ?. 360 * 361 * <p> 362 * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 363 * </p> 364 * 365 * @param userId the user ID 366 * @param start the lower bound of the range of message boards bans 367 * @param end the upper bound of the range of message boards bans (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 bans 370 * @throws SystemException if a system exception occurred 371 */ 372 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId( 373 long userId, int start, int end, 374 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 375 throws com.liferay.portal.kernel.exception.SystemException { 376 return getPersistence() 377 .findByUserId(userId, start, end, orderByComparator); 378 } 379 380 /** 381 * Returns the first message boards ban in the ordered set where userId = ?. 382 * 383 * @param userId the user ID 384 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 385 * @return the first matching message boards ban 386 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 387 * @throws SystemException if a system exception occurred 388 */ 389 public static com.liferay.portlet.messageboards.model.MBBan findByUserId_First( 390 long userId, 391 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 392 throws com.liferay.portal.kernel.exception.SystemException, 393 com.liferay.portlet.messageboards.NoSuchBanException { 394 return getPersistence().findByUserId_First(userId, orderByComparator); 395 } 396 397 /** 398 * Returns the first message boards ban in the ordered set where userId = ?. 399 * 400 * @param userId the user ID 401 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 402 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 403 * @throws SystemException if a system exception occurred 404 */ 405 public static com.liferay.portlet.messageboards.model.MBBan fetchByUserId_First( 406 long userId, 407 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 408 throws com.liferay.portal.kernel.exception.SystemException { 409 return getPersistence().fetchByUserId_First(userId, orderByComparator); 410 } 411 412 /** 413 * Returns the last message boards ban in the ordered set where userId = ?. 414 * 415 * @param userId the user ID 416 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 417 * @return the last matching message boards ban 418 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 419 * @throws SystemException if a system exception occurred 420 */ 421 public static com.liferay.portlet.messageboards.model.MBBan findByUserId_Last( 422 long userId, 423 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 424 throws com.liferay.portal.kernel.exception.SystemException, 425 com.liferay.portlet.messageboards.NoSuchBanException { 426 return getPersistence().findByUserId_Last(userId, orderByComparator); 427 } 428 429 /** 430 * Returns the last message boards ban in the ordered set where userId = ?. 431 * 432 * @param userId the user ID 433 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 434 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 435 * @throws SystemException if a system exception occurred 436 */ 437 public static com.liferay.portlet.messageboards.model.MBBan fetchByUserId_Last( 438 long userId, 439 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 440 throws com.liferay.portal.kernel.exception.SystemException { 441 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 442 } 443 444 /** 445 * Returns the message boards bans before and after the current message boards ban in the ordered set where userId = ?. 446 * 447 * @param banId the primary key of the current message boards ban 448 * @param userId the user ID 449 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 450 * @return the previous, current, and next message boards ban 451 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 452 * @throws SystemException if a system exception occurred 453 */ 454 public static com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext( 455 long banId, long userId, 456 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 457 throws com.liferay.portal.kernel.exception.SystemException, 458 com.liferay.portlet.messageboards.NoSuchBanException { 459 return getPersistence() 460 .findByUserId_PrevAndNext(banId, userId, orderByComparator); 461 } 462 463 /** 464 * Returns all the message boards bans where banUserId = ?. 465 * 466 * @param banUserId the ban user ID 467 * @return the matching message boards bans 468 * @throws SystemException if a system exception occurred 469 */ 470 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId( 471 long banUserId) 472 throws com.liferay.portal.kernel.exception.SystemException { 473 return getPersistence().findByBanUserId(banUserId); 474 } 475 476 /** 477 * Returns a range of all the message boards bans where banUserId = ?. 478 * 479 * <p> 480 * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 481 * </p> 482 * 483 * @param banUserId the ban user ID 484 * @param start the lower bound of the range of message boards bans 485 * @param end the upper bound of the range of message boards bans (not inclusive) 486 * @return the range of matching message boards bans 487 * @throws SystemException if a system exception occurred 488 */ 489 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId( 490 long banUserId, int start, int end) 491 throws com.liferay.portal.kernel.exception.SystemException { 492 return getPersistence().findByBanUserId(banUserId, start, end); 493 } 494 495 /** 496 * Returns an ordered range of all the message boards bans where banUserId = ?. 497 * 498 * <p> 499 * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 500 * </p> 501 * 502 * @param banUserId the ban user ID 503 * @param start the lower bound of the range of message boards bans 504 * @param end the upper bound of the range of message boards bans (not inclusive) 505 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 506 * @return the ordered range of matching message boards bans 507 * @throws SystemException if a system exception occurred 508 */ 509 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId( 510 long banUserId, int start, int end, 511 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 512 throws com.liferay.portal.kernel.exception.SystemException { 513 return getPersistence() 514 .findByBanUserId(banUserId, start, end, orderByComparator); 515 } 516 517 /** 518 * Returns the first message boards ban in the ordered set where banUserId = ?. 519 * 520 * @param banUserId the ban user ID 521 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 522 * @return the first matching message boards ban 523 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 524 * @throws SystemException if a system exception occurred 525 */ 526 public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First( 527 long banUserId, 528 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 529 throws com.liferay.portal.kernel.exception.SystemException, 530 com.liferay.portlet.messageboards.NoSuchBanException { 531 return getPersistence() 532 .findByBanUserId_First(banUserId, orderByComparator); 533 } 534 535 /** 536 * Returns the first message boards ban in the ordered set where banUserId = ?. 537 * 538 * @param banUserId the ban user ID 539 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 540 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 541 * @throws SystemException if a system exception occurred 542 */ 543 public static com.liferay.portlet.messageboards.model.MBBan fetchByBanUserId_First( 544 long banUserId, 545 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 546 throws com.liferay.portal.kernel.exception.SystemException { 547 return getPersistence() 548 .fetchByBanUserId_First(banUserId, orderByComparator); 549 } 550 551 /** 552 * Returns the last message boards ban in the ordered set where banUserId = ?. 553 * 554 * @param banUserId the ban user ID 555 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 556 * @return the last matching message boards ban 557 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 558 * @throws SystemException if a system exception occurred 559 */ 560 public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last( 561 long banUserId, 562 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 563 throws com.liferay.portal.kernel.exception.SystemException, 564 com.liferay.portlet.messageboards.NoSuchBanException { 565 return getPersistence() 566 .findByBanUserId_Last(banUserId, orderByComparator); 567 } 568 569 /** 570 * Returns the last message boards ban in the ordered set where banUserId = ?. 571 * 572 * @param banUserId the ban user ID 573 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 574 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 575 * @throws SystemException if a system exception occurred 576 */ 577 public static com.liferay.portlet.messageboards.model.MBBan fetchByBanUserId_Last( 578 long banUserId, 579 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 580 throws com.liferay.portal.kernel.exception.SystemException { 581 return getPersistence() 582 .fetchByBanUserId_Last(banUserId, orderByComparator); 583 } 584 585 /** 586 * Returns the message boards bans before and after the current message boards ban in the ordered set where banUserId = ?. 587 * 588 * @param banId the primary key of the current message boards ban 589 * @param banUserId the ban user ID 590 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 591 * @return the previous, current, and next message boards ban 592 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 593 * @throws SystemException if a system exception occurred 594 */ 595 public static com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext( 596 long banId, long banUserId, 597 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 598 throws com.liferay.portal.kernel.exception.SystemException, 599 com.liferay.portlet.messageboards.NoSuchBanException { 600 return getPersistence() 601 .findByBanUserId_PrevAndNext(banId, banUserId, 602 orderByComparator); 603 } 604 605 /** 606 * Returns the message boards ban where groupId = ? and banUserId = ? or throws a {@link com.liferay.portlet.messageboards.NoSuchBanException} if it could not be found. 607 * 608 * @param groupId the group ID 609 * @param banUserId the ban user ID 610 * @return the matching message boards ban 611 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 612 * @throws SystemException if a system exception occurred 613 */ 614 public static com.liferay.portlet.messageboards.model.MBBan findByG_B( 615 long groupId, long banUserId) 616 throws com.liferay.portal.kernel.exception.SystemException, 617 com.liferay.portlet.messageboards.NoSuchBanException { 618 return getPersistence().findByG_B(groupId, banUserId); 619 } 620 621 /** 622 * Returns the message boards ban where groupId = ? and banUserId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 623 * 624 * @param groupId the group ID 625 * @param banUserId the ban user ID 626 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 627 * @throws SystemException if a system exception occurred 628 */ 629 public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B( 630 long groupId, long banUserId) 631 throws com.liferay.portal.kernel.exception.SystemException { 632 return getPersistence().fetchByG_B(groupId, banUserId); 633 } 634 635 /** 636 * 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. 637 * 638 * @param groupId the group ID 639 * @param banUserId the ban user ID 640 * @param retrieveFromCache whether to use the finder cache 641 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 642 * @throws SystemException if a system exception occurred 643 */ 644 public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B( 645 long groupId, long banUserId, boolean retrieveFromCache) 646 throws com.liferay.portal.kernel.exception.SystemException { 647 return getPersistence().fetchByG_B(groupId, banUserId, retrieveFromCache); 648 } 649 650 /** 651 * Returns all the message boards bans. 652 * 653 * @return the message boards bans 654 * @throws SystemException if a system exception occurred 655 */ 656 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll() 657 throws com.liferay.portal.kernel.exception.SystemException { 658 return getPersistence().findAll(); 659 } 660 661 /** 662 * Returns a range of all the message boards bans. 663 * 664 * <p> 665 * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 666 * </p> 667 * 668 * @param start the lower bound of the range of message boards bans 669 * @param end the upper bound of the range of message boards bans (not inclusive) 670 * @return the range of message boards bans 671 * @throws SystemException if a system exception occurred 672 */ 673 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll( 674 int start, int end) 675 throws com.liferay.portal.kernel.exception.SystemException { 676 return getPersistence().findAll(start, end); 677 } 678 679 /** 680 * Returns an ordered range of all the message boards bans. 681 * 682 * <p> 683 * 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 684 * </p> 685 * 686 * @param start the lower bound of the range of message boards bans 687 * @param end the upper bound of the range of message boards bans (not inclusive) 688 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 689 * @return the ordered range of message boards bans 690 * @throws SystemException if a system exception occurred 691 */ 692 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll( 693 int start, int end, 694 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 695 throws com.liferay.portal.kernel.exception.SystemException { 696 return getPersistence().findAll(start, end, orderByComparator); 697 } 698 699 /** 700 * Removes all the message boards bans where groupId = ? from the database. 701 * 702 * @param groupId the group ID 703 * @throws SystemException if a system exception occurred 704 */ 705 public static void removeByGroupId(long groupId) 706 throws com.liferay.portal.kernel.exception.SystemException { 707 getPersistence().removeByGroupId(groupId); 708 } 709 710 /** 711 * Removes all the message boards bans where userId = ? from the database. 712 * 713 * @param userId the user ID 714 * @throws SystemException if a system exception occurred 715 */ 716 public static void removeByUserId(long userId) 717 throws com.liferay.portal.kernel.exception.SystemException { 718 getPersistence().removeByUserId(userId); 719 } 720 721 /** 722 * Removes all the message boards bans where banUserId = ? from the database. 723 * 724 * @param banUserId the ban user ID 725 * @throws SystemException if a system exception occurred 726 */ 727 public static void removeByBanUserId(long banUserId) 728 throws com.liferay.portal.kernel.exception.SystemException { 729 getPersistence().removeByBanUserId(banUserId); 730 } 731 732 /** 733 * Removes the message boards ban where groupId = ? and banUserId = ? from the database. 734 * 735 * @param groupId the group ID 736 * @param banUserId the ban user ID 737 * @return the message boards ban that was removed 738 * @throws SystemException if a system exception occurred 739 */ 740 public static com.liferay.portlet.messageboards.model.MBBan removeByG_B( 741 long groupId, long banUserId) 742 throws com.liferay.portal.kernel.exception.SystemException, 743 com.liferay.portlet.messageboards.NoSuchBanException { 744 return getPersistence().removeByG_B(groupId, banUserId); 745 } 746 747 /** 748 * Removes all the message boards bans from the database. 749 * 750 * @throws SystemException if a system exception occurred 751 */ 752 public static void removeAll() 753 throws com.liferay.portal.kernel.exception.SystemException { 754 getPersistence().removeAll(); 755 } 756 757 /** 758 * Returns the number of message boards bans where groupId = ?. 759 * 760 * @param groupId the group ID 761 * @return the number of matching message boards bans 762 * @throws SystemException if a system exception occurred 763 */ 764 public static int countByGroupId(long groupId) 765 throws com.liferay.portal.kernel.exception.SystemException { 766 return getPersistence().countByGroupId(groupId); 767 } 768 769 /** 770 * Returns the number of message boards bans where userId = ?. 771 * 772 * @param userId the user ID 773 * @return the number of matching message boards bans 774 * @throws SystemException if a system exception occurred 775 */ 776 public static int countByUserId(long userId) 777 throws com.liferay.portal.kernel.exception.SystemException { 778 return getPersistence().countByUserId(userId); 779 } 780 781 /** 782 * Returns the number of message boards bans where banUserId = ?. 783 * 784 * @param banUserId the ban user ID 785 * @return the number of matching message boards bans 786 * @throws SystemException if a system exception occurred 787 */ 788 public static int countByBanUserId(long banUserId) 789 throws com.liferay.portal.kernel.exception.SystemException { 790 return getPersistence().countByBanUserId(banUserId); 791 } 792 793 /** 794 * Returns the number of message boards bans where groupId = ? and banUserId = ?. 795 * 796 * @param groupId the group ID 797 * @param banUserId the ban user ID 798 * @return the number of matching message boards bans 799 * @throws SystemException if a system exception occurred 800 */ 801 public static int countByG_B(long groupId, long banUserId) 802 throws com.liferay.portal.kernel.exception.SystemException { 803 return getPersistence().countByG_B(groupId, banUserId); 804 } 805 806 /** 807 * Returns the number of message boards bans. 808 * 809 * @return the number of message boards bans 810 * @throws SystemException if a system exception occurred 811 */ 812 public static int countAll() 813 throws com.liferay.portal.kernel.exception.SystemException { 814 return getPersistence().countAll(); 815 } 816 817 public static MBBanPersistence getPersistence() { 818 if (_persistence == null) { 819 _persistence = (MBBanPersistence)PortalBeanLocatorUtil.locate(MBBanPersistence.class.getName()); 820 821 ReferenceRegistry.registerReference(MBBanUtil.class, "_persistence"); 822 } 823 824 return _persistence; 825 } 826 827 /** 828 * @deprecated 829 */ 830 public void setPersistence(MBBanPersistence persistence) { 831 } 832 833 private static MBBanPersistence _persistence; 834 }