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