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. 029 * 030 * <p> 031 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class. 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see MBBanPersistence 036 * @see MBBanPersistenceImpl 037 * @generated 038 */ 039 public class MBBanUtil { 040 /** 041 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 042 */ 043 public static void clearCache() { 044 getPersistence().clearCache(); 045 } 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 049 */ 050 public static void clearCache(MBBan mbBan) { 051 getPersistence().clearCache(mbBan); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 056 */ 057 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 058 throws SystemException { 059 return getPersistence().countWithDynamicQuery(dynamicQuery); 060 } 061 062 /** 063 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 064 */ 065 public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery) 066 throws SystemException { 067 return getPersistence().findWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 072 */ 073 public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery, 074 int start, int end) throws SystemException { 075 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 080 */ 081 public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery, 082 int start, int end, OrderByComparator orderByComparator) 083 throws SystemException { 084 return getPersistence() 085 .findWithDynamicQuery(dynamicQuery, start, end, 086 orderByComparator); 087 } 088 089 /** 090 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 091 */ 092 public static MBBan remove(MBBan mbBan) throws SystemException { 093 return getPersistence().remove(mbBan); 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 to cache 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 to cache 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. 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 to remove 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 * Finds 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 to find 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 * Finds 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 to find 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 * Finds all the message boards bans where groupId = ?. 193 * 194 * @param groupId the group id to search with 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 * Finds 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 to search with 212 * @param start the lower bound of the range of message boards bans to return 213 * @param end the upper bound of the range of message boards bans to return (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 * Finds 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 to search with 231 * @param start the lower bound of the range of message boards bans to return 232 * @param end the upper bound of the range of message boards bans to return (not inclusive) 233 * @param orderByComparator the comparator to order the results by 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 * Finds the first message boards ban in the ordered set where groupId = ?. 247 * 248 * <p> 249 * 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. 250 * </p> 251 * 252 * @param groupId the group id to search with 253 * @param orderByComparator the comparator to order the set by 254 * @return the first matching message boards ban 255 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 256 * @throws SystemException if a system exception occurred 257 */ 258 public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_First( 259 long groupId, 260 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 261 throws com.liferay.portal.kernel.exception.SystemException, 262 com.liferay.portlet.messageboards.NoSuchBanException { 263 return getPersistence().findByGroupId_First(groupId, orderByComparator); 264 } 265 266 /** 267 * Finds the last message boards ban in the ordered set where groupId = ?. 268 * 269 * <p> 270 * 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. 271 * </p> 272 * 273 * @param groupId the group id to search with 274 * @param orderByComparator the comparator to order the set by 275 * @return the last matching message boards ban 276 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 277 * @throws SystemException if a system exception occurred 278 */ 279 public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last( 280 long groupId, 281 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 282 throws com.liferay.portal.kernel.exception.SystemException, 283 com.liferay.portlet.messageboards.NoSuchBanException { 284 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 285 } 286 287 /** 288 * Finds the message boards bans before and after the current message boards ban in the ordered set where groupId = ?. 289 * 290 * <p> 291 * 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. 292 * </p> 293 * 294 * @param banId the primary key of the current message boards ban 295 * @param groupId the group id to search with 296 * @param orderByComparator the comparator to order the set by 297 * @return the previous, current, and next message boards ban 298 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 299 * @throws SystemException if a system exception occurred 300 */ 301 public static com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext( 302 long banId, long groupId, 303 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 304 throws com.liferay.portal.kernel.exception.SystemException, 305 com.liferay.portlet.messageboards.NoSuchBanException { 306 return getPersistence() 307 .findByGroupId_PrevAndNext(banId, groupId, orderByComparator); 308 } 309 310 /** 311 * Finds all the message boards bans where userId = ?. 312 * 313 * @param userId the user id to search with 314 * @return the matching message boards bans 315 * @throws SystemException if a system exception occurred 316 */ 317 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId( 318 long userId) throws com.liferay.portal.kernel.exception.SystemException { 319 return getPersistence().findByUserId(userId); 320 } 321 322 /** 323 * Finds a range of all the message boards bans where userId = ?. 324 * 325 * <p> 326 * 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. 327 * </p> 328 * 329 * @param userId the user id to search with 330 * @param start the lower bound of the range of message boards bans to return 331 * @param end the upper bound of the range of message boards bans to return (not inclusive) 332 * @return the range of 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, int start, int end) 337 throws com.liferay.portal.kernel.exception.SystemException { 338 return getPersistence().findByUserId(userId, start, end); 339 } 340 341 /** 342 * Finds an ordered range of all the message boards bans where userId = ?. 343 * 344 * <p> 345 * 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. 346 * </p> 347 * 348 * @param userId the user id to search with 349 * @param start the lower bound of the range of message boards bans to return 350 * @param end the upper bound of the range of message boards bans to return (not inclusive) 351 * @param orderByComparator the comparator to order the results by 352 * @return the ordered range of matching message boards bans 353 * @throws SystemException if a system exception occurred 354 */ 355 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId( 356 long userId, int start, int end, 357 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 358 throws com.liferay.portal.kernel.exception.SystemException { 359 return getPersistence() 360 .findByUserId(userId, start, end, orderByComparator); 361 } 362 363 /** 364 * Finds the first message boards ban in the ordered set where userId = ?. 365 * 366 * <p> 367 * 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. 368 * </p> 369 * 370 * @param userId the user id to search with 371 * @param orderByComparator the comparator to order the set by 372 * @return the first matching message boards ban 373 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 374 * @throws SystemException if a system exception occurred 375 */ 376 public static com.liferay.portlet.messageboards.model.MBBan findByUserId_First( 377 long userId, 378 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 379 throws com.liferay.portal.kernel.exception.SystemException, 380 com.liferay.portlet.messageboards.NoSuchBanException { 381 return getPersistence().findByUserId_First(userId, orderByComparator); 382 } 383 384 /** 385 * Finds the last message boards ban in the ordered set where userId = ?. 386 * 387 * <p> 388 * 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. 389 * </p> 390 * 391 * @param userId the user id to search with 392 * @param orderByComparator the comparator to order the set by 393 * @return the last matching message boards ban 394 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 395 * @throws SystemException if a system exception occurred 396 */ 397 public static com.liferay.portlet.messageboards.model.MBBan findByUserId_Last( 398 long userId, 399 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 400 throws com.liferay.portal.kernel.exception.SystemException, 401 com.liferay.portlet.messageboards.NoSuchBanException { 402 return getPersistence().findByUserId_Last(userId, orderByComparator); 403 } 404 405 /** 406 * Finds the message boards bans before and after the current message boards ban in the ordered set where userId = ?. 407 * 408 * <p> 409 * 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. 410 * </p> 411 * 412 * @param banId the primary key of the current message boards ban 413 * @param userId the user id to search with 414 * @param orderByComparator the comparator to order the set by 415 * @return the previous, current, and next message boards ban 416 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 417 * @throws SystemException if a system exception occurred 418 */ 419 public static com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext( 420 long banId, long userId, 421 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 422 throws com.liferay.portal.kernel.exception.SystemException, 423 com.liferay.portlet.messageboards.NoSuchBanException { 424 return getPersistence() 425 .findByUserId_PrevAndNext(banId, userId, orderByComparator); 426 } 427 428 /** 429 * Finds all the message boards bans where banUserId = ?. 430 * 431 * @param banUserId the ban user id to search with 432 * @return the matching message boards bans 433 * @throws SystemException if a system exception occurred 434 */ 435 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId( 436 long banUserId) 437 throws com.liferay.portal.kernel.exception.SystemException { 438 return getPersistence().findByBanUserId(banUserId); 439 } 440 441 /** 442 * Finds a range of all the message boards bans where banUserId = ?. 443 * 444 * <p> 445 * 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. 446 * </p> 447 * 448 * @param banUserId the ban user id to search with 449 * @param start the lower bound of the range of message boards bans to return 450 * @param end the upper bound of the range of message boards bans to return (not inclusive) 451 * @return the range of matching message boards bans 452 * @throws SystemException if a system exception occurred 453 */ 454 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId( 455 long banUserId, int start, int end) 456 throws com.liferay.portal.kernel.exception.SystemException { 457 return getPersistence().findByBanUserId(banUserId, start, end); 458 } 459 460 /** 461 * Finds an ordered range of all the message boards bans where banUserId = ?. 462 * 463 * <p> 464 * 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. 465 * </p> 466 * 467 * @param banUserId the ban user id to search with 468 * @param start the lower bound of the range of message boards bans to return 469 * @param end the upper bound of the range of message boards bans to return (not inclusive) 470 * @param orderByComparator the comparator to order the results by 471 * @return the ordered range of matching message boards bans 472 * @throws SystemException if a system exception occurred 473 */ 474 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId( 475 long banUserId, int start, int end, 476 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 477 throws com.liferay.portal.kernel.exception.SystemException { 478 return getPersistence() 479 .findByBanUserId(banUserId, start, end, orderByComparator); 480 } 481 482 /** 483 * Finds the first message boards ban in the ordered set where banUserId = ?. 484 * 485 * <p> 486 * 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. 487 * </p> 488 * 489 * @param banUserId the ban user id to search with 490 * @param orderByComparator the comparator to order the set by 491 * @return the first matching message boards ban 492 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 493 * @throws SystemException if a system exception occurred 494 */ 495 public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First( 496 long banUserId, 497 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 498 throws com.liferay.portal.kernel.exception.SystemException, 499 com.liferay.portlet.messageboards.NoSuchBanException { 500 return getPersistence() 501 .findByBanUserId_First(banUserId, orderByComparator); 502 } 503 504 /** 505 * Finds the last message boards ban in the ordered set where banUserId = ?. 506 * 507 * <p> 508 * 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. 509 * </p> 510 * 511 * @param banUserId the ban user id to search with 512 * @param orderByComparator the comparator to order the set by 513 * @return the last matching message boards ban 514 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 515 * @throws SystemException if a system exception occurred 516 */ 517 public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last( 518 long banUserId, 519 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 520 throws com.liferay.portal.kernel.exception.SystemException, 521 com.liferay.portlet.messageboards.NoSuchBanException { 522 return getPersistence() 523 .findByBanUserId_Last(banUserId, orderByComparator); 524 } 525 526 /** 527 * Finds the message boards bans before and after the current message boards ban in the ordered set where banUserId = ?. 528 * 529 * <p> 530 * 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. 531 * </p> 532 * 533 * @param banId the primary key of the current message boards ban 534 * @param banUserId the ban user id to search with 535 * @param orderByComparator the comparator to order the set by 536 * @return the previous, current, and next message boards ban 537 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 538 * @throws SystemException if a system exception occurred 539 */ 540 public static com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext( 541 long banId, long banUserId, 542 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 543 throws com.liferay.portal.kernel.exception.SystemException, 544 com.liferay.portlet.messageboards.NoSuchBanException { 545 return getPersistence() 546 .findByBanUserId_PrevAndNext(banId, banUserId, 547 orderByComparator); 548 } 549 550 /** 551 * Finds the message boards ban where groupId = ? and banUserId = ? or throws a {@link com.liferay.portlet.messageboards.NoSuchBanException} if it could not be found. 552 * 553 * @param groupId the group id to search with 554 * @param banUserId the ban user id to search with 555 * @return the matching message boards ban 556 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 557 * @throws SystemException if a system exception occurred 558 */ 559 public static com.liferay.portlet.messageboards.model.MBBan findByG_B( 560 long groupId, long banUserId) 561 throws com.liferay.portal.kernel.exception.SystemException, 562 com.liferay.portlet.messageboards.NoSuchBanException { 563 return getPersistence().findByG_B(groupId, banUserId); 564 } 565 566 /** 567 * Finds the message boards ban where groupId = ? and banUserId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 568 * 569 * @param groupId the group id to search with 570 * @param banUserId the ban user id to search with 571 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 572 * @throws SystemException if a system exception occurred 573 */ 574 public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B( 575 long groupId, long banUserId) 576 throws com.liferay.portal.kernel.exception.SystemException { 577 return getPersistence().fetchByG_B(groupId, banUserId); 578 } 579 580 /** 581 * 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. 582 * 583 * @param groupId the group id to search with 584 * @param banUserId the ban user id to search with 585 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 586 * @throws SystemException if a system exception occurred 587 */ 588 public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B( 589 long groupId, long banUserId, boolean retrieveFromCache) 590 throws com.liferay.portal.kernel.exception.SystemException { 591 return getPersistence().fetchByG_B(groupId, banUserId, retrieveFromCache); 592 } 593 594 /** 595 * Finds all the message boards bans. 596 * 597 * @return the message boards bans 598 * @throws SystemException if a system exception occurred 599 */ 600 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll() 601 throws com.liferay.portal.kernel.exception.SystemException { 602 return getPersistence().findAll(); 603 } 604 605 /** 606 * Finds a range of all the message boards bans. 607 * 608 * <p> 609 * 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. 610 * </p> 611 * 612 * @param start the lower bound of the range of message boards bans to return 613 * @param end the upper bound of the range of message boards bans to return (not inclusive) 614 * @return the range of message boards bans 615 * @throws SystemException if a system exception occurred 616 */ 617 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll( 618 int start, int end) 619 throws com.liferay.portal.kernel.exception.SystemException { 620 return getPersistence().findAll(start, end); 621 } 622 623 /** 624 * Finds an ordered range of all the message boards bans. 625 * 626 * <p> 627 * 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. 628 * </p> 629 * 630 * @param start the lower bound of the range of message boards bans to return 631 * @param end the upper bound of the range of message boards bans to return (not inclusive) 632 * @param orderByComparator the comparator to order the results by 633 * @return the ordered range of message boards bans 634 * @throws SystemException if a system exception occurred 635 */ 636 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll( 637 int start, int end, 638 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 639 throws com.liferay.portal.kernel.exception.SystemException { 640 return getPersistence().findAll(start, end, orderByComparator); 641 } 642 643 /** 644 * Removes all the message boards bans where groupId = ? from the database. 645 * 646 * @param groupId the group id to search with 647 * @throws SystemException if a system exception occurred 648 */ 649 public static void removeByGroupId(long groupId) 650 throws com.liferay.portal.kernel.exception.SystemException { 651 getPersistence().removeByGroupId(groupId); 652 } 653 654 /** 655 * Removes all the message boards bans where userId = ? from the database. 656 * 657 * @param userId the user id to search with 658 * @throws SystemException if a system exception occurred 659 */ 660 public static void removeByUserId(long userId) 661 throws com.liferay.portal.kernel.exception.SystemException { 662 getPersistence().removeByUserId(userId); 663 } 664 665 /** 666 * Removes all the message boards bans where banUserId = ? from the database. 667 * 668 * @param banUserId the ban user id to search with 669 * @throws SystemException if a system exception occurred 670 */ 671 public static void removeByBanUserId(long banUserId) 672 throws com.liferay.portal.kernel.exception.SystemException { 673 getPersistence().removeByBanUserId(banUserId); 674 } 675 676 /** 677 * Removes the message boards ban where groupId = ? and banUserId = ? from the database. 678 * 679 * @param groupId the group id to search with 680 * @param banUserId the ban user id to search with 681 * @throws SystemException if a system exception occurred 682 */ 683 public static void removeByG_B(long groupId, long banUserId) 684 throws com.liferay.portal.kernel.exception.SystemException, 685 com.liferay.portlet.messageboards.NoSuchBanException { 686 getPersistence().removeByG_B(groupId, banUserId); 687 } 688 689 /** 690 * Removes all the message boards bans from the database. 691 * 692 * @throws SystemException if a system exception occurred 693 */ 694 public static void removeAll() 695 throws com.liferay.portal.kernel.exception.SystemException { 696 getPersistence().removeAll(); 697 } 698 699 /** 700 * Counts all the message boards bans where groupId = ?. 701 * 702 * @param groupId the group id to search with 703 * @return the number of matching message boards bans 704 * @throws SystemException if a system exception occurred 705 */ 706 public static int countByGroupId(long groupId) 707 throws com.liferay.portal.kernel.exception.SystemException { 708 return getPersistence().countByGroupId(groupId); 709 } 710 711 /** 712 * Counts all the message boards bans where userId = ?. 713 * 714 * @param userId the user id to search with 715 * @return the number of matching message boards bans 716 * @throws SystemException if a system exception occurred 717 */ 718 public static int countByUserId(long userId) 719 throws com.liferay.portal.kernel.exception.SystemException { 720 return getPersistence().countByUserId(userId); 721 } 722 723 /** 724 * Counts all the message boards bans where banUserId = ?. 725 * 726 * @param banUserId the ban user id to search with 727 * @return the number of matching message boards bans 728 * @throws SystemException if a system exception occurred 729 */ 730 public static int countByBanUserId(long banUserId) 731 throws com.liferay.portal.kernel.exception.SystemException { 732 return getPersistence().countByBanUserId(banUserId); 733 } 734 735 /** 736 * Counts all the message boards bans where groupId = ? and banUserId = ?. 737 * 738 * @param groupId the group id to search with 739 * @param banUserId the ban user id to search with 740 * @return the number of matching message boards bans 741 * @throws SystemException if a system exception occurred 742 */ 743 public static int countByG_B(long groupId, long banUserId) 744 throws com.liferay.portal.kernel.exception.SystemException { 745 return getPersistence().countByG_B(groupId, banUserId); 746 } 747 748 /** 749 * Counts all the message boards bans. 750 * 751 * @return the number of message boards bans 752 * @throws SystemException if a system exception occurred 753 */ 754 public static int countAll() 755 throws com.liferay.portal.kernel.exception.SystemException { 756 return getPersistence().countAll(); 757 } 758 759 public static MBBanPersistence getPersistence() { 760 if (_persistence == null) { 761 _persistence = (MBBanPersistence)PortalBeanLocatorUtil.locate(MBBanPersistence.class.getName()); 762 } 763 764 return _persistence; 765 } 766 767 public void setPersistence(MBBanPersistence persistence) { 768 _persistence = persistence; 769 } 770 771 private static MBBanPersistence _persistence; 772 }