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