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 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 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 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 * Returns 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 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 * Returns 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 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 * Returns all the message boards bans where groupId = ?. 200 * 201 * @param groupId the group ID 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 * Returns 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 219 * @param start the lower bound of the range of message boards bans 220 * @param end the upper bound of the range of message boards bans (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 * Returns 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 238 * @param start the lower bound of the range of message boards bans 239 * @param end the upper bound of the range of message boards bans (not inclusive) 240 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 * Returns 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 260 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 281 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 282 * @return the last matching message boards ban 283 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last( 287 long groupId, 288 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 289 throws com.liferay.portal.kernel.exception.SystemException, 290 com.liferay.portlet.messageboards.NoSuchBanException { 291 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 292 } 293 294 /** 295 * Returns the 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 303 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns all the message boards bans where userId = ?. 319 * 320 * @param userId the user ID 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 * Returns 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 337 * @param start the lower bound of the range of message boards bans 338 * @param end the upper bound of the range of message boards bans (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 * Returns 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 356 * @param start the lower bound of the range of message boards bans 357 * @param end the upper bound of the range of message boards bans (not inclusive) 358 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 * Returns 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 378 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 399 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 421 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns all the message boards bans where banUserId = ?. 437 * 438 * @param banUserId the ban user ID 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 * Returns 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 456 * @param start the lower bound of the range of message boards bans 457 * @param end the upper bound of the range of message boards bans (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 * Returns 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 475 * @param start the lower bound of the range of message boards bans 476 * @param end the upper bound of the range of message boards bans (not inclusive) 477 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 * Returns 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 497 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 519 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 542 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 561 * @param banUserId the ban user ID 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 * Returns 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 577 * @param banUserId the ban user ID 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 * 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. 589 * 590 * @param groupId the group ID 591 * @param banUserId the ban user ID 592 * @param retrieveFromCache whether to use the finder cache 593 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 594 * @throws SystemException if a system exception occurred 595 */ 596 public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B( 597 long groupId, long banUserId, boolean retrieveFromCache) 598 throws com.liferay.portal.kernel.exception.SystemException { 599 return getPersistence().fetchByG_B(groupId, banUserId, retrieveFromCache); 600 } 601 602 /** 603 * Returns all the message boards bans. 604 * 605 * @return the message boards bans 606 * @throws SystemException if a system exception occurred 607 */ 608 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll() 609 throws com.liferay.portal.kernel.exception.SystemException { 610 return getPersistence().findAll(); 611 } 612 613 /** 614 * Returns a range of all the message boards bans. 615 * 616 * <p> 617 * 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. 618 * </p> 619 * 620 * @param start the lower bound of the range of message boards bans 621 * @param end the upper bound of the range of message boards bans (not inclusive) 622 * @return the range of message boards bans 623 * @throws SystemException if a system exception occurred 624 */ 625 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll( 626 int start, int end) 627 throws com.liferay.portal.kernel.exception.SystemException { 628 return getPersistence().findAll(start, end); 629 } 630 631 /** 632 * Returns an ordered range of all the message boards bans. 633 * 634 * <p> 635 * 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. 636 * </p> 637 * 638 * @param start the lower bound of the range of message boards bans 639 * @param end the upper bound of the range of message boards bans (not inclusive) 640 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 641 * @return the ordered range of message boards bans 642 * @throws SystemException if a system exception occurred 643 */ 644 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll( 645 int start, int end, 646 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 647 throws com.liferay.portal.kernel.exception.SystemException { 648 return getPersistence().findAll(start, end, orderByComparator); 649 } 650 651 /** 652 * Removes all the message boards bans where groupId = ? from the database. 653 * 654 * @param groupId the group ID 655 * @throws SystemException if a system exception occurred 656 */ 657 public static void removeByGroupId(long groupId) 658 throws com.liferay.portal.kernel.exception.SystemException { 659 getPersistence().removeByGroupId(groupId); 660 } 661 662 /** 663 * Removes all the message boards bans where userId = ? from the database. 664 * 665 * @param userId the user ID 666 * @throws SystemException if a system exception occurred 667 */ 668 public static void removeByUserId(long userId) 669 throws com.liferay.portal.kernel.exception.SystemException { 670 getPersistence().removeByUserId(userId); 671 } 672 673 /** 674 * Removes all the message boards bans where banUserId = ? from the database. 675 * 676 * @param banUserId the ban user ID 677 * @throws SystemException if a system exception occurred 678 */ 679 public static void removeByBanUserId(long banUserId) 680 throws com.liferay.portal.kernel.exception.SystemException { 681 getPersistence().removeByBanUserId(banUserId); 682 } 683 684 /** 685 * Removes the message boards ban where groupId = ? and banUserId = ? from the database. 686 * 687 * @param groupId the group ID 688 * @param banUserId the ban user ID 689 * @throws SystemException if a system exception occurred 690 */ 691 public static void removeByG_B(long groupId, long banUserId) 692 throws com.liferay.portal.kernel.exception.SystemException, 693 com.liferay.portlet.messageboards.NoSuchBanException { 694 getPersistence().removeByG_B(groupId, banUserId); 695 } 696 697 /** 698 * Removes all the message boards bans from the database. 699 * 700 * @throws SystemException if a system exception occurred 701 */ 702 public static void removeAll() 703 throws com.liferay.portal.kernel.exception.SystemException { 704 getPersistence().removeAll(); 705 } 706 707 /** 708 * Returns the number of message boards bans where groupId = ?. 709 * 710 * @param groupId the group ID 711 * @return the number of matching message boards bans 712 * @throws SystemException if a system exception occurred 713 */ 714 public static int countByGroupId(long groupId) 715 throws com.liferay.portal.kernel.exception.SystemException { 716 return getPersistence().countByGroupId(groupId); 717 } 718 719 /** 720 * Returns the number of message boards bans where userId = ?. 721 * 722 * @param userId the user ID 723 * @return the number of matching message boards bans 724 * @throws SystemException if a system exception occurred 725 */ 726 public static int countByUserId(long userId) 727 throws com.liferay.portal.kernel.exception.SystemException { 728 return getPersistence().countByUserId(userId); 729 } 730 731 /** 732 * Returns the number of message boards bans where banUserId = ?. 733 * 734 * @param banUserId the ban user ID 735 * @return the number of matching message boards bans 736 * @throws SystemException if a system exception occurred 737 */ 738 public static int countByBanUserId(long banUserId) 739 throws com.liferay.portal.kernel.exception.SystemException { 740 return getPersistence().countByBanUserId(banUserId); 741 } 742 743 /** 744 * Returns the number of message boards bans where groupId = ? and banUserId = ?. 745 * 746 * @param groupId the group ID 747 * @param banUserId the ban user ID 748 * @return the number of matching message boards bans 749 * @throws SystemException if a system exception occurred 750 */ 751 public static int countByG_B(long groupId, long banUserId) 752 throws com.liferay.portal.kernel.exception.SystemException { 753 return getPersistence().countByG_B(groupId, banUserId); 754 } 755 756 /** 757 * Returns the number of message boards bans. 758 * 759 * @return the number of message boards bans 760 * @throws SystemException if a system exception occurred 761 */ 762 public static int countAll() 763 throws com.liferay.portal.kernel.exception.SystemException { 764 return getPersistence().countAll(); 765 } 766 767 public static MBBanPersistence getPersistence() { 768 if (_persistence == null) { 769 _persistence = (MBBanPersistence)PortalBeanLocatorUtil.locate(MBBanPersistence.class.getName()); 770 771 ReferenceRegistry.registerReference(MBBanUtil.class, "_persistence"); 772 } 773 774 return _persistence; 775 } 776 777 public void setPersistence(MBBanPersistence persistence) { 778 _persistence = persistence; 779 780 ReferenceRegistry.registerReference(MBBanUtil.class, "_persistence"); 781 } 782 783 private static MBBanPersistence _persistence; 784 }