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