001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.messageboards.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.messageboards.model.MBBan; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the message boards ban service. This utility wraps {@link MBBanPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see MBBanPersistence 037 * @see MBBanPersistenceImpl 038 * @generated 039 */ 040 public class MBBanUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(MBBan mbBan) { 058 getPersistence().clearCache(mbBan); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery) 073 throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery, 081 int start, int end) throws SystemException { 082 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 083 } 084 085 /** 086 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 087 */ 088 public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery, 089 int start, int end, OrderByComparator orderByComparator) 090 throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, 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 * <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 253 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 274 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 296 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns all the message boards bans where userId = ?. 312 * 313 * @param userId the user ID 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 * Returns 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 330 * @param start the lower bound of the range of message boards bans 331 * @param end the upper bound of the range of message boards bans (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 * Returns 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 349 * @param start the lower bound of the range of message boards bans 350 * @param end the upper bound of the range of message boards bans (not inclusive) 351 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 * Returns 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 371 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 392 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 414 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns all the message boards bans where banUserId = ?. 430 * 431 * @param banUserId the ban user ID 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 * Returns 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 449 * @param start the lower bound of the range of message boards bans 450 * @param end the upper bound of the range of message boards bans (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 * Returns 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 468 * @param start the lower bound of the range of message boards bans 469 * @param end the upper bound of the range of message boards bans (not inclusive) 470 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 * Returns 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 490 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 512 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 535 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 554 * @param banUserId the ban user ID 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 * Returns 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 570 * @param banUserId the ban user ID 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 * 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. 582 * 583 * @param groupId the group ID 584 * @param banUserId the ban user ID 585 * @param retrieveFromCache whether to use the finder cache 586 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 587 * @throws SystemException if a system exception occurred 588 */ 589 public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B( 590 long groupId, long banUserId, boolean retrieveFromCache) 591 throws com.liferay.portal.kernel.exception.SystemException { 592 return getPersistence().fetchByG_B(groupId, banUserId, retrieveFromCache); 593 } 594 595 /** 596 * Returns all the message boards bans. 597 * 598 * @return the message boards bans 599 * @throws SystemException if a system exception occurred 600 */ 601 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll() 602 throws com.liferay.portal.kernel.exception.SystemException { 603 return getPersistence().findAll(); 604 } 605 606 /** 607 * Returns a range of all the message boards bans. 608 * 609 * <p> 610 * 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. 611 * </p> 612 * 613 * @param start the lower bound of the range of message boards bans 614 * @param end the upper bound of the range of message boards bans (not inclusive) 615 * @return the range of message boards bans 616 * @throws SystemException if a system exception occurred 617 */ 618 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll( 619 int start, int end) 620 throws com.liferay.portal.kernel.exception.SystemException { 621 return getPersistence().findAll(start, end); 622 } 623 624 /** 625 * Returns an ordered range of all the message boards bans. 626 * 627 * <p> 628 * 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. 629 * </p> 630 * 631 * @param start the lower bound of the range of message boards bans 632 * @param end the upper bound of the range of message boards bans (not inclusive) 633 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 634 * @return the ordered range of message boards bans 635 * @throws SystemException if a system exception occurred 636 */ 637 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll( 638 int start, int end, 639 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 640 throws com.liferay.portal.kernel.exception.SystemException { 641 return getPersistence().findAll(start, end, orderByComparator); 642 } 643 644 /** 645 * Removes all the message boards bans where groupId = ? from the database. 646 * 647 * @param groupId the group ID 648 * @throws SystemException if a system exception occurred 649 */ 650 public static void removeByGroupId(long groupId) 651 throws com.liferay.portal.kernel.exception.SystemException { 652 getPersistence().removeByGroupId(groupId); 653 } 654 655 /** 656 * Removes all the message boards bans where userId = ? from the database. 657 * 658 * @param userId the user ID 659 * @throws SystemException if a system exception occurred 660 */ 661 public static void removeByUserId(long userId) 662 throws com.liferay.portal.kernel.exception.SystemException { 663 getPersistence().removeByUserId(userId); 664 } 665 666 /** 667 * Removes all the message boards bans where banUserId = ? from the database. 668 * 669 * @param banUserId the ban user ID 670 * @throws SystemException if a system exception occurred 671 */ 672 public static void removeByBanUserId(long banUserId) 673 throws com.liferay.portal.kernel.exception.SystemException { 674 getPersistence().removeByBanUserId(banUserId); 675 } 676 677 /** 678 * Removes the message boards ban where groupId = ? and banUserId = ? from the database. 679 * 680 * @param groupId the group ID 681 * @param banUserId the ban user ID 682 * @throws SystemException if a system exception occurred 683 */ 684 public static void removeByG_B(long groupId, long banUserId) 685 throws com.liferay.portal.kernel.exception.SystemException, 686 com.liferay.portlet.messageboards.NoSuchBanException { 687 getPersistence().removeByG_B(groupId, banUserId); 688 } 689 690 /** 691 * Removes all the message boards bans from the database. 692 * 693 * @throws SystemException if a system exception occurred 694 */ 695 public static void removeAll() 696 throws com.liferay.portal.kernel.exception.SystemException { 697 getPersistence().removeAll(); 698 } 699 700 /** 701 * Returns the number of message boards bans where groupId = ?. 702 * 703 * @param groupId the group ID 704 * @return the number of matching message boards bans 705 * @throws SystemException if a system exception occurred 706 */ 707 public static int countByGroupId(long groupId) 708 throws com.liferay.portal.kernel.exception.SystemException { 709 return getPersistence().countByGroupId(groupId); 710 } 711 712 /** 713 * Returns the number of message boards bans where userId = ?. 714 * 715 * @param userId the user ID 716 * @return the number of matching message boards bans 717 * @throws SystemException if a system exception occurred 718 */ 719 public static int countByUserId(long userId) 720 throws com.liferay.portal.kernel.exception.SystemException { 721 return getPersistence().countByUserId(userId); 722 } 723 724 /** 725 * Returns the number of message boards bans where banUserId = ?. 726 * 727 * @param banUserId the ban user ID 728 * @return the number of matching message boards bans 729 * @throws SystemException if a system exception occurred 730 */ 731 public static int countByBanUserId(long banUserId) 732 throws com.liferay.portal.kernel.exception.SystemException { 733 return getPersistence().countByBanUserId(banUserId); 734 } 735 736 /** 737 * Returns the number of message boards bans where groupId = ? and banUserId = ?. 738 * 739 * @param groupId the group ID 740 * @param banUserId the ban user ID 741 * @return the number of matching message boards bans 742 * @throws SystemException if a system exception occurred 743 */ 744 public static int countByG_B(long groupId, long banUserId) 745 throws com.liferay.portal.kernel.exception.SystemException { 746 return getPersistence().countByG_B(groupId, banUserId); 747 } 748 749 /** 750 * Returns the number of message boards bans. 751 * 752 * @return the number of message boards bans 753 * @throws SystemException if a system exception occurred 754 */ 755 public static int countAll() 756 throws com.liferay.portal.kernel.exception.SystemException { 757 return getPersistence().countAll(); 758 } 759 760 public static MBBanPersistence getPersistence() { 761 if (_persistence == null) { 762 _persistence = (MBBanPersistence)PortalBeanLocatorUtil.locate(MBBanPersistence.class.getName()); 763 764 ReferenceRegistry.registerReference(MBBanUtil.class, "_persistence"); 765 } 766 767 return _persistence; 768 } 769 770 public void setPersistence(MBBanPersistence persistence) { 771 _persistence = persistence; 772 773 ReferenceRegistry.registerReference(MBBanUtil.class, "_persistence"); 774 } 775 776 private static MBBanPersistence _persistence; 777 }