001 /** 002 * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 021 import com.liferay.portal.kernel.util.OrderByComparator; 022 import com.liferay.portal.kernel.util.ReferenceRegistry; 023 import com.liferay.portal.service.ServiceContext; 024 025 import com.liferay.portlet.messageboards.model.MBBan; 026 027 import java.util.List; 028 029 /** 030 * 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. 031 * 032 * <p> 033 * Caching information and settings can be found in <code>portal.properties</code> 034 * </p> 035 * 036 * @author Brian Wing Shun Chan 037 * @see MBBanPersistence 038 * @see MBBanPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class MBBanUtil { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 047 */ 048 049 /** 050 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 051 */ 052 public static void clearCache() { 053 getPersistence().clearCache(); 054 } 055 056 /** 057 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 058 */ 059 public static void clearCache(MBBan mbBan) { 060 getPersistence().clearCache(mbBan); 061 } 062 063 /** 064 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 065 */ 066 public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { 067 return getPersistence().countWithDynamicQuery(dynamicQuery); 068 } 069 070 /** 071 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 072 */ 073 public static List<MBBan> findWithDynamicQuery(DynamicQuery dynamicQuery) { 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) { 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<MBBan> orderByComparator) { 090 return getPersistence() 091 .findWithDynamicQuery(dynamicQuery, start, end, 092 orderByComparator); 093 } 094 095 /** 096 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 097 */ 098 public static MBBan update(MBBan mbBan) { 099 return getPersistence().update(mbBan); 100 } 101 102 /** 103 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 104 */ 105 public static MBBan update(MBBan mbBan, ServiceContext serviceContext) { 106 return getPersistence().update(mbBan, serviceContext); 107 } 108 109 /** 110 * Returns all the message boards bans where uuid = ?. 111 * 112 * @param uuid the uuid 113 * @return the matching message boards bans 114 */ 115 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUuid( 116 java.lang.String uuid) { 117 return getPersistence().findByUuid(uuid); 118 } 119 120 /** 121 * Returns a range of all the message boards bans where uuid = ?. 122 * 123 * <p> 124 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 125 * </p> 126 * 127 * @param uuid the uuid 128 * @param start the lower bound of the range of message boards bans 129 * @param end the upper bound of the range of message boards bans (not inclusive) 130 * @return the range of matching message boards bans 131 */ 132 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUuid( 133 java.lang.String uuid, int start, int end) { 134 return getPersistence().findByUuid(uuid, start, end); 135 } 136 137 /** 138 * Returns an ordered range of all the message boards bans where uuid = ?. 139 * 140 * <p> 141 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 142 * </p> 143 * 144 * @param uuid the uuid 145 * @param start the lower bound of the range of message boards bans 146 * @param end the upper bound of the range of message boards bans (not inclusive) 147 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 148 * @return the ordered range of matching message boards bans 149 */ 150 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUuid( 151 java.lang.String uuid, int start, int end, 152 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 153 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 154 } 155 156 /** 157 * Returns the first message boards ban in the ordered set where uuid = ?. 158 * 159 * @param uuid the uuid 160 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 161 * @return the first matching message boards ban 162 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 163 */ 164 public static com.liferay.portlet.messageboards.model.MBBan findByUuid_First( 165 java.lang.String uuid, 166 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 167 throws com.liferay.portlet.messageboards.NoSuchBanException { 168 return getPersistence().findByUuid_First(uuid, orderByComparator); 169 } 170 171 /** 172 * Returns the first message boards ban in the ordered set where uuid = ?. 173 * 174 * @param uuid the uuid 175 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 176 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 177 */ 178 public static com.liferay.portlet.messageboards.model.MBBan fetchByUuid_First( 179 java.lang.String uuid, 180 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 181 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 182 } 183 184 /** 185 * Returns the last message boards ban in the ordered set where uuid = ?. 186 * 187 * @param uuid the uuid 188 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 189 * @return the last matching message boards ban 190 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 191 */ 192 public static com.liferay.portlet.messageboards.model.MBBan findByUuid_Last( 193 java.lang.String uuid, 194 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 195 throws com.liferay.portlet.messageboards.NoSuchBanException { 196 return getPersistence().findByUuid_Last(uuid, orderByComparator); 197 } 198 199 /** 200 * Returns the last message boards ban in the ordered set where uuid = ?. 201 * 202 * @param uuid the uuid 203 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 204 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 205 */ 206 public static com.liferay.portlet.messageboards.model.MBBan fetchByUuid_Last( 207 java.lang.String uuid, 208 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 209 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 210 } 211 212 /** 213 * Returns the message boards bans before and after the current message boards ban in the ordered set where uuid = ?. 214 * 215 * @param banId the primary key of the current message boards ban 216 * @param uuid the uuid 217 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 218 * @return the previous, current, and next message boards ban 219 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 220 */ 221 public static com.liferay.portlet.messageboards.model.MBBan[] findByUuid_PrevAndNext( 222 long banId, java.lang.String uuid, 223 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 224 throws com.liferay.portlet.messageboards.NoSuchBanException { 225 return getPersistence() 226 .findByUuid_PrevAndNext(banId, uuid, orderByComparator); 227 } 228 229 /** 230 * Removes all the message boards bans where uuid = ? from the database. 231 * 232 * @param uuid the uuid 233 */ 234 public static void removeByUuid(java.lang.String uuid) { 235 getPersistence().removeByUuid(uuid); 236 } 237 238 /** 239 * Returns the number of message boards bans where uuid = ?. 240 * 241 * @param uuid the uuid 242 * @return the number of matching message boards bans 243 */ 244 public static int countByUuid(java.lang.String uuid) { 245 return getPersistence().countByUuid(uuid); 246 } 247 248 /** 249 * Returns the message boards ban where uuid = ? and groupId = ? or throws a {@link com.liferay.portlet.messageboards.NoSuchBanException} if it could not be found. 250 * 251 * @param uuid the uuid 252 * @param groupId the group ID 253 * @return the matching message boards ban 254 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 255 */ 256 public static com.liferay.portlet.messageboards.model.MBBan findByUUID_G( 257 java.lang.String uuid, long groupId) 258 throws com.liferay.portlet.messageboards.NoSuchBanException { 259 return getPersistence().findByUUID_G(uuid, groupId); 260 } 261 262 /** 263 * Returns the message boards ban where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 264 * 265 * @param uuid the uuid 266 * @param groupId the group ID 267 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 268 */ 269 public static com.liferay.portlet.messageboards.model.MBBan fetchByUUID_G( 270 java.lang.String uuid, long groupId) { 271 return getPersistence().fetchByUUID_G(uuid, groupId); 272 } 273 274 /** 275 * Returns the message boards ban where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 276 * 277 * @param uuid the uuid 278 * @param groupId the group ID 279 * @param retrieveFromCache whether to use the finder cache 280 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 281 */ 282 public static com.liferay.portlet.messageboards.model.MBBan fetchByUUID_G( 283 java.lang.String uuid, long groupId, boolean retrieveFromCache) { 284 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 285 } 286 287 /** 288 * Removes the message boards ban where uuid = ? and groupId = ? from the database. 289 * 290 * @param uuid the uuid 291 * @param groupId the group ID 292 * @return the message boards ban that was removed 293 */ 294 public static com.liferay.portlet.messageboards.model.MBBan removeByUUID_G( 295 java.lang.String uuid, long groupId) 296 throws com.liferay.portlet.messageboards.NoSuchBanException { 297 return getPersistence().removeByUUID_G(uuid, groupId); 298 } 299 300 /** 301 * Returns the number of message boards bans where uuid = ? and groupId = ?. 302 * 303 * @param uuid the uuid 304 * @param groupId the group ID 305 * @return the number of matching message boards bans 306 */ 307 public static int countByUUID_G(java.lang.String uuid, long groupId) { 308 return getPersistence().countByUUID_G(uuid, groupId); 309 } 310 311 /** 312 * Returns all the message boards bans where uuid = ? and companyId = ?. 313 * 314 * @param uuid the uuid 315 * @param companyId the company ID 316 * @return the matching message boards bans 317 */ 318 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUuid_C( 319 java.lang.String uuid, long companyId) { 320 return getPersistence().findByUuid_C(uuid, companyId); 321 } 322 323 /** 324 * Returns a range of all the message boards bans where uuid = ? and companyId = ?. 325 * 326 * <p> 327 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 328 * </p> 329 * 330 * @param uuid the uuid 331 * @param companyId the company ID 332 * @param start the lower bound of the range of message boards bans 333 * @param end the upper bound of the range of message boards bans (not inclusive) 334 * @return the range of matching message boards bans 335 */ 336 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUuid_C( 337 java.lang.String uuid, long companyId, int start, int end) { 338 return getPersistence().findByUuid_C(uuid, companyId, start, end); 339 } 340 341 /** 342 * Returns an ordered range of all the message boards bans where uuid = ? and companyId = ?. 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 346 * </p> 347 * 348 * @param uuid the uuid 349 * @param companyId the company ID 350 * @param start the lower bound of the range of message boards bans 351 * @param end the upper bound of the range of message boards bans (not inclusive) 352 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 353 * @return the ordered range of matching message boards bans 354 */ 355 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUuid_C( 356 java.lang.String uuid, long companyId, int start, int end, 357 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 358 return getPersistence() 359 .findByUuid_C(uuid, companyId, start, end, orderByComparator); 360 } 361 362 /** 363 * Returns the first message boards ban in the ordered set where uuid = ? and companyId = ?. 364 * 365 * @param uuid the uuid 366 * @param companyId the company ID 367 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 368 * @return the first matching message boards ban 369 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 370 */ 371 public static com.liferay.portlet.messageboards.model.MBBan findByUuid_C_First( 372 java.lang.String uuid, long companyId, 373 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 374 throws com.liferay.portlet.messageboards.NoSuchBanException { 375 return getPersistence() 376 .findByUuid_C_First(uuid, companyId, orderByComparator); 377 } 378 379 /** 380 * Returns the first message boards ban in the ordered set where uuid = ? and companyId = ?. 381 * 382 * @param uuid the uuid 383 * @param companyId the company ID 384 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 385 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 386 */ 387 public static com.liferay.portlet.messageboards.model.MBBan fetchByUuid_C_First( 388 java.lang.String uuid, long companyId, 389 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 390 return getPersistence() 391 .fetchByUuid_C_First(uuid, companyId, orderByComparator); 392 } 393 394 /** 395 * Returns the last message boards ban in the ordered set where uuid = ? and companyId = ?. 396 * 397 * @param uuid the uuid 398 * @param companyId the company 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 */ 403 public static com.liferay.portlet.messageboards.model.MBBan findByUuid_C_Last( 404 java.lang.String uuid, long companyId, 405 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 406 throws com.liferay.portlet.messageboards.NoSuchBanException { 407 return getPersistence() 408 .findByUuid_C_Last(uuid, companyId, orderByComparator); 409 } 410 411 /** 412 * Returns the last message boards ban in the ordered set where uuid = ? and companyId = ?. 413 * 414 * @param uuid the uuid 415 * @param companyId the company ID 416 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 417 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 418 */ 419 public static com.liferay.portlet.messageboards.model.MBBan fetchByUuid_C_Last( 420 java.lang.String uuid, long companyId, 421 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 422 return getPersistence() 423 .fetchByUuid_C_Last(uuid, companyId, orderByComparator); 424 } 425 426 /** 427 * Returns the message boards bans before and after the current message boards ban in the ordered set where uuid = ? and companyId = ?. 428 * 429 * @param banId the primary key of the current message boards ban 430 * @param uuid the uuid 431 * @param companyId the company ID 432 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 433 * @return the previous, current, and next message boards ban 434 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 435 */ 436 public static com.liferay.portlet.messageboards.model.MBBan[] findByUuid_C_PrevAndNext( 437 long banId, java.lang.String uuid, long companyId, 438 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 439 throws com.liferay.portlet.messageboards.NoSuchBanException { 440 return getPersistence() 441 .findByUuid_C_PrevAndNext(banId, uuid, companyId, 442 orderByComparator); 443 } 444 445 /** 446 * Removes all the message boards bans where uuid = ? and companyId = ? from the database. 447 * 448 * @param uuid the uuid 449 * @param companyId the company ID 450 */ 451 public static void removeByUuid_C(java.lang.String uuid, long companyId) { 452 getPersistence().removeByUuid_C(uuid, companyId); 453 } 454 455 /** 456 * Returns the number of message boards bans where uuid = ? and companyId = ?. 457 * 458 * @param uuid the uuid 459 * @param companyId the company ID 460 * @return the number of matching message boards bans 461 */ 462 public static int countByUuid_C(java.lang.String uuid, long companyId) { 463 return getPersistence().countByUuid_C(uuid, companyId); 464 } 465 466 /** 467 * Returns all the message boards bans where groupId = ?. 468 * 469 * @param groupId the group ID 470 * @return the matching message boards bans 471 */ 472 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId( 473 long groupId) { 474 return getPersistence().findByGroupId(groupId); 475 } 476 477 /** 478 * Returns a range of all the message boards bans where groupId = ?. 479 * 480 * <p> 481 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 482 * </p> 483 * 484 * @param groupId the group ID 485 * @param start the lower bound of the range of message boards bans 486 * @param end the upper bound of the range of message boards bans (not inclusive) 487 * @return the range of matching message boards bans 488 */ 489 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId( 490 long groupId, int start, int end) { 491 return getPersistence().findByGroupId(groupId, start, end); 492 } 493 494 /** 495 * Returns an ordered range of all the message boards bans where groupId = ?. 496 * 497 * <p> 498 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 499 * </p> 500 * 501 * @param groupId the group ID 502 * @param start the lower bound of the range of message boards bans 503 * @param end the upper bound of the range of message boards bans (not inclusive) 504 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 505 * @return the ordered range of matching message boards bans 506 */ 507 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByGroupId( 508 long groupId, int start, int end, 509 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 510 return getPersistence() 511 .findByGroupId(groupId, start, end, orderByComparator); 512 } 513 514 /** 515 * Returns the first message boards ban in the ordered set where groupId = ?. 516 * 517 * @param groupId the group ID 518 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 519 * @return the first matching message boards ban 520 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 521 */ 522 public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_First( 523 long groupId, 524 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 525 throws com.liferay.portlet.messageboards.NoSuchBanException { 526 return getPersistence().findByGroupId_First(groupId, orderByComparator); 527 } 528 529 /** 530 * Returns the first message boards ban in the ordered set where groupId = ?. 531 * 532 * @param groupId the group ID 533 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 534 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 535 */ 536 public static com.liferay.portlet.messageboards.model.MBBan fetchByGroupId_First( 537 long groupId, 538 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 539 return getPersistence().fetchByGroupId_First(groupId, orderByComparator); 540 } 541 542 /** 543 * Returns the last message boards ban in the ordered set where groupId = ?. 544 * 545 * @param groupId the group ID 546 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 547 * @return the last matching message boards ban 548 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 549 */ 550 public static com.liferay.portlet.messageboards.model.MBBan findByGroupId_Last( 551 long groupId, 552 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 553 throws com.liferay.portlet.messageboards.NoSuchBanException { 554 return getPersistence().findByGroupId_Last(groupId, orderByComparator); 555 } 556 557 /** 558 * Returns the last message boards ban in the ordered set where groupId = ?. 559 * 560 * @param groupId the group ID 561 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 562 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 563 */ 564 public static com.liferay.portlet.messageboards.model.MBBan fetchByGroupId_Last( 565 long groupId, 566 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 567 return getPersistence().fetchByGroupId_Last(groupId, orderByComparator); 568 } 569 570 /** 571 * Returns the message boards bans before and after the current message boards ban in the ordered set where groupId = ?. 572 * 573 * @param banId the primary key of the current message boards ban 574 * @param groupId the group ID 575 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 576 * @return the previous, current, and next message boards ban 577 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 578 */ 579 public static com.liferay.portlet.messageboards.model.MBBan[] findByGroupId_PrevAndNext( 580 long banId, long groupId, 581 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 582 throws com.liferay.portlet.messageboards.NoSuchBanException { 583 return getPersistence() 584 .findByGroupId_PrevAndNext(banId, groupId, orderByComparator); 585 } 586 587 /** 588 * Removes all the message boards bans where groupId = ? from the database. 589 * 590 * @param groupId the group ID 591 */ 592 public static void removeByGroupId(long groupId) { 593 getPersistence().removeByGroupId(groupId); 594 } 595 596 /** 597 * Returns the number of message boards bans where groupId = ?. 598 * 599 * @param groupId the group ID 600 * @return the number of matching message boards bans 601 */ 602 public static int countByGroupId(long groupId) { 603 return getPersistence().countByGroupId(groupId); 604 } 605 606 /** 607 * Returns all the message boards bans where userId = ?. 608 * 609 * @param userId the user ID 610 * @return the matching message boards bans 611 */ 612 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId( 613 long userId) { 614 return getPersistence().findByUserId(userId); 615 } 616 617 /** 618 * Returns a range of all the message boards bans where userId = ?. 619 * 620 * <p> 621 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 622 * </p> 623 * 624 * @param userId the user ID 625 * @param start the lower bound of the range of message boards bans 626 * @param end the upper bound of the range of message boards bans (not inclusive) 627 * @return the range of matching message boards bans 628 */ 629 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId( 630 long userId, int start, int end) { 631 return getPersistence().findByUserId(userId, start, end); 632 } 633 634 /** 635 * Returns an ordered range of all the message boards bans where userId = ?. 636 * 637 * <p> 638 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 639 * </p> 640 * 641 * @param userId the user ID 642 * @param start the lower bound of the range of message boards bans 643 * @param end the upper bound of the range of message boards bans (not inclusive) 644 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 645 * @return the ordered range of matching message boards bans 646 */ 647 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByUserId( 648 long userId, int start, int end, 649 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 650 return getPersistence() 651 .findByUserId(userId, start, end, orderByComparator); 652 } 653 654 /** 655 * Returns the first message boards ban in the ordered set where userId = ?. 656 * 657 * @param userId the user ID 658 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 659 * @return the first matching message boards ban 660 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 661 */ 662 public static com.liferay.portlet.messageboards.model.MBBan findByUserId_First( 663 long userId, 664 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 665 throws com.liferay.portlet.messageboards.NoSuchBanException { 666 return getPersistence().findByUserId_First(userId, orderByComparator); 667 } 668 669 /** 670 * Returns the first message boards ban in the ordered set where userId = ?. 671 * 672 * @param userId the user ID 673 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 674 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 675 */ 676 public static com.liferay.portlet.messageboards.model.MBBan fetchByUserId_First( 677 long userId, 678 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 679 return getPersistence().fetchByUserId_First(userId, orderByComparator); 680 } 681 682 /** 683 * Returns the last message boards ban in the ordered set where userId = ?. 684 * 685 * @param userId the user ID 686 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 687 * @return the last matching message boards ban 688 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 689 */ 690 public static com.liferay.portlet.messageboards.model.MBBan findByUserId_Last( 691 long userId, 692 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 693 throws com.liferay.portlet.messageboards.NoSuchBanException { 694 return getPersistence().findByUserId_Last(userId, orderByComparator); 695 } 696 697 /** 698 * Returns the last message boards ban in the ordered set where userId = ?. 699 * 700 * @param userId the user ID 701 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 702 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 703 */ 704 public static com.liferay.portlet.messageboards.model.MBBan fetchByUserId_Last( 705 long userId, 706 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 707 return getPersistence().fetchByUserId_Last(userId, orderByComparator); 708 } 709 710 /** 711 * Returns the message boards bans before and after the current message boards ban in the ordered set where userId = ?. 712 * 713 * @param banId the primary key of the current message boards ban 714 * @param userId the user ID 715 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 716 * @return the previous, current, and next message boards ban 717 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 718 */ 719 public static com.liferay.portlet.messageboards.model.MBBan[] findByUserId_PrevAndNext( 720 long banId, long userId, 721 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 722 throws com.liferay.portlet.messageboards.NoSuchBanException { 723 return getPersistence() 724 .findByUserId_PrevAndNext(banId, userId, orderByComparator); 725 } 726 727 /** 728 * Removes all the message boards bans where userId = ? from the database. 729 * 730 * @param userId the user ID 731 */ 732 public static void removeByUserId(long userId) { 733 getPersistence().removeByUserId(userId); 734 } 735 736 /** 737 * Returns the number of message boards bans where userId = ?. 738 * 739 * @param userId the user ID 740 * @return the number of matching message boards bans 741 */ 742 public static int countByUserId(long userId) { 743 return getPersistence().countByUserId(userId); 744 } 745 746 /** 747 * Returns all the message boards bans where banUserId = ?. 748 * 749 * @param banUserId the ban user ID 750 * @return the matching message boards bans 751 */ 752 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId( 753 long banUserId) { 754 return getPersistence().findByBanUserId(banUserId); 755 } 756 757 /** 758 * Returns a range of all the message boards bans where banUserId = ?. 759 * 760 * <p> 761 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 762 * </p> 763 * 764 * @param banUserId the ban user ID 765 * @param start the lower bound of the range of message boards bans 766 * @param end the upper bound of the range of message boards bans (not inclusive) 767 * @return the range of matching message boards bans 768 */ 769 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId( 770 long banUserId, int start, int end) { 771 return getPersistence().findByBanUserId(banUserId, start, end); 772 } 773 774 /** 775 * Returns an ordered range of all the message boards bans where banUserId = ?. 776 * 777 * <p> 778 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 779 * </p> 780 * 781 * @param banUserId the ban user ID 782 * @param start the lower bound of the range of message boards bans 783 * @param end the upper bound of the range of message boards bans (not inclusive) 784 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 785 * @return the ordered range of matching message boards bans 786 */ 787 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findByBanUserId( 788 long banUserId, int start, int end, 789 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 790 return getPersistence() 791 .findByBanUserId(banUserId, start, end, orderByComparator); 792 } 793 794 /** 795 * Returns the first message boards ban in the ordered set where banUserId = ?. 796 * 797 * @param banUserId the ban user ID 798 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 799 * @return the first matching message boards ban 800 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 801 */ 802 public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_First( 803 long banUserId, 804 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 805 throws com.liferay.portlet.messageboards.NoSuchBanException { 806 return getPersistence() 807 .findByBanUserId_First(banUserId, orderByComparator); 808 } 809 810 /** 811 * Returns the first message boards ban in the ordered set where banUserId = ?. 812 * 813 * @param banUserId the ban user ID 814 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 815 * @return the first matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 816 */ 817 public static com.liferay.portlet.messageboards.model.MBBan fetchByBanUserId_First( 818 long banUserId, 819 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 820 return getPersistence() 821 .fetchByBanUserId_First(banUserId, orderByComparator); 822 } 823 824 /** 825 * Returns the last message boards ban in the ordered set where banUserId = ?. 826 * 827 * @param banUserId the ban user ID 828 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 829 * @return the last matching message boards ban 830 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 831 */ 832 public static com.liferay.portlet.messageboards.model.MBBan findByBanUserId_Last( 833 long banUserId, 834 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 835 throws com.liferay.portlet.messageboards.NoSuchBanException { 836 return getPersistence() 837 .findByBanUserId_Last(banUserId, orderByComparator); 838 } 839 840 /** 841 * Returns the last message boards ban in the ordered set where banUserId = ?. 842 * 843 * @param banUserId the ban user ID 844 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 845 * @return the last matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 846 */ 847 public static com.liferay.portlet.messageboards.model.MBBan fetchByBanUserId_Last( 848 long banUserId, 849 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 850 return getPersistence() 851 .fetchByBanUserId_Last(banUserId, orderByComparator); 852 } 853 854 /** 855 * Returns the message boards bans before and after the current message boards ban in the ordered set where banUserId = ?. 856 * 857 * @param banId the primary key of the current message boards ban 858 * @param banUserId the ban user ID 859 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 860 * @return the previous, current, and next message boards ban 861 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 862 */ 863 public static com.liferay.portlet.messageboards.model.MBBan[] findByBanUserId_PrevAndNext( 864 long banId, long banUserId, 865 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) 866 throws com.liferay.portlet.messageboards.NoSuchBanException { 867 return getPersistence() 868 .findByBanUserId_PrevAndNext(banId, banUserId, 869 orderByComparator); 870 } 871 872 /** 873 * Removes all the message boards bans where banUserId = ? from the database. 874 * 875 * @param banUserId the ban user ID 876 */ 877 public static void removeByBanUserId(long banUserId) { 878 getPersistence().removeByBanUserId(banUserId); 879 } 880 881 /** 882 * Returns the number of message boards bans where banUserId = ?. 883 * 884 * @param banUserId the ban user ID 885 * @return the number of matching message boards bans 886 */ 887 public static int countByBanUserId(long banUserId) { 888 return getPersistence().countByBanUserId(banUserId); 889 } 890 891 /** 892 * Returns the message boards ban where groupId = ? and banUserId = ? or throws a {@link com.liferay.portlet.messageboards.NoSuchBanException} if it could not be found. 893 * 894 * @param groupId the group ID 895 * @param banUserId the ban user ID 896 * @return the matching message boards ban 897 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a matching message boards ban could not be found 898 */ 899 public static com.liferay.portlet.messageboards.model.MBBan findByG_B( 900 long groupId, long banUserId) 901 throws com.liferay.portlet.messageboards.NoSuchBanException { 902 return getPersistence().findByG_B(groupId, banUserId); 903 } 904 905 /** 906 * Returns the message boards ban where groupId = ? and banUserId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 907 * 908 * @param groupId the group ID 909 * @param banUserId the ban user ID 910 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 911 */ 912 public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B( 913 long groupId, long banUserId) { 914 return getPersistence().fetchByG_B(groupId, banUserId); 915 } 916 917 /** 918 * 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. 919 * 920 * @param groupId the group ID 921 * @param banUserId the ban user ID 922 * @param retrieveFromCache whether to use the finder cache 923 * @return the matching message boards ban, or <code>null</code> if a matching message boards ban could not be found 924 */ 925 public static com.liferay.portlet.messageboards.model.MBBan fetchByG_B( 926 long groupId, long banUserId, boolean retrieveFromCache) { 927 return getPersistence().fetchByG_B(groupId, banUserId, retrieveFromCache); 928 } 929 930 /** 931 * Removes the message boards ban where groupId = ? and banUserId = ? from the database. 932 * 933 * @param groupId the group ID 934 * @param banUserId the ban user ID 935 * @return the message boards ban that was removed 936 */ 937 public static com.liferay.portlet.messageboards.model.MBBan removeByG_B( 938 long groupId, long banUserId) 939 throws com.liferay.portlet.messageboards.NoSuchBanException { 940 return getPersistence().removeByG_B(groupId, banUserId); 941 } 942 943 /** 944 * Returns the number of message boards bans where groupId = ? and banUserId = ?. 945 * 946 * @param groupId the group ID 947 * @param banUserId the ban user ID 948 * @return the number of matching message boards bans 949 */ 950 public static int countByG_B(long groupId, long banUserId) { 951 return getPersistence().countByG_B(groupId, banUserId); 952 } 953 954 /** 955 * Caches the message boards ban in the entity cache if it is enabled. 956 * 957 * @param mbBan the message boards ban 958 */ 959 public static void cacheResult( 960 com.liferay.portlet.messageboards.model.MBBan mbBan) { 961 getPersistence().cacheResult(mbBan); 962 } 963 964 /** 965 * Caches the message boards bans in the entity cache if it is enabled. 966 * 967 * @param mbBans the message boards bans 968 */ 969 public static void cacheResult( 970 java.util.List<com.liferay.portlet.messageboards.model.MBBan> mbBans) { 971 getPersistence().cacheResult(mbBans); 972 } 973 974 /** 975 * Creates a new message boards ban with the primary key. Does not add the message boards ban to the database. 976 * 977 * @param banId the primary key for the new message boards ban 978 * @return the new message boards ban 979 */ 980 public static com.liferay.portlet.messageboards.model.MBBan create( 981 long banId) { 982 return getPersistence().create(banId); 983 } 984 985 /** 986 * Removes the message boards ban with the primary key from the database. Also notifies the appropriate model listeners. 987 * 988 * @param banId the primary key of the message boards ban 989 * @return the message boards ban that was removed 990 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 991 */ 992 public static com.liferay.portlet.messageboards.model.MBBan remove( 993 long banId) throws com.liferay.portlet.messageboards.NoSuchBanException { 994 return getPersistence().remove(banId); 995 } 996 997 public static com.liferay.portlet.messageboards.model.MBBan updateImpl( 998 com.liferay.portlet.messageboards.model.MBBan mbBan) { 999 return getPersistence().updateImpl(mbBan); 1000 } 1001 1002 /** 1003 * Returns the message boards ban with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchBanException} if it could not be found. 1004 * 1005 * @param banId the primary key of the message boards ban 1006 * @return the message boards ban 1007 * @throws com.liferay.portlet.messageboards.NoSuchBanException if a message boards ban with the primary key could not be found 1008 */ 1009 public static com.liferay.portlet.messageboards.model.MBBan findByPrimaryKey( 1010 long banId) throws com.liferay.portlet.messageboards.NoSuchBanException { 1011 return getPersistence().findByPrimaryKey(banId); 1012 } 1013 1014 /** 1015 * Returns the message boards ban with the primary key or returns <code>null</code> if it could not be found. 1016 * 1017 * @param banId the primary key of the message boards ban 1018 * @return the message boards ban, or <code>null</code> if a message boards ban with the primary key could not be found 1019 */ 1020 public static com.liferay.portlet.messageboards.model.MBBan fetchByPrimaryKey( 1021 long banId) { 1022 return getPersistence().fetchByPrimaryKey(banId); 1023 } 1024 1025 public static java.util.Map<java.io.Serializable, com.liferay.portlet.messageboards.model.MBBan> fetchByPrimaryKeys( 1026 java.util.Set<java.io.Serializable> primaryKeys) { 1027 return getPersistence().fetchByPrimaryKeys(primaryKeys); 1028 } 1029 1030 /** 1031 * Returns all the message boards bans. 1032 * 1033 * @return the message boards bans 1034 */ 1035 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll() { 1036 return getPersistence().findAll(); 1037 } 1038 1039 /** 1040 * Returns a range of all the message boards bans. 1041 * 1042 * <p> 1043 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1044 * </p> 1045 * 1046 * @param start the lower bound of the range of message boards bans 1047 * @param end the upper bound of the range of message boards bans (not inclusive) 1048 * @return the range of message boards bans 1049 */ 1050 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll( 1051 int start, int end) { 1052 return getPersistence().findAll(start, end); 1053 } 1054 1055 /** 1056 * Returns an ordered range of all the message boards bans. 1057 * 1058 * <p> 1059 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.messageboards.model.impl.MBBanModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1060 * </p> 1061 * 1062 * @param start the lower bound of the range of message boards bans 1063 * @param end the upper bound of the range of message boards bans (not inclusive) 1064 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1065 * @return the ordered range of message boards bans 1066 */ 1067 public static java.util.List<com.liferay.portlet.messageboards.model.MBBan> findAll( 1068 int start, int end, 1069 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.messageboards.model.MBBan> orderByComparator) { 1070 return getPersistence().findAll(start, end, orderByComparator); 1071 } 1072 1073 /** 1074 * Removes all the message boards bans from the database. 1075 */ 1076 public static void removeAll() { 1077 getPersistence().removeAll(); 1078 } 1079 1080 /** 1081 * Returns the number of message boards bans. 1082 * 1083 * @return the number of message boards bans 1084 */ 1085 public static int countAll() { 1086 return getPersistence().countAll(); 1087 } 1088 1089 public static MBBanPersistence getPersistence() { 1090 if (_persistence == null) { 1091 _persistence = (MBBanPersistence)PortalBeanLocatorUtil.locate(MBBanPersistence.class.getName()); 1092 1093 ReferenceRegistry.registerReference(MBBanUtil.class, "_persistence"); 1094 } 1095 1096 return _persistence; 1097 } 1098 1099 /** 1100 * @deprecated As of 6.2.0 1101 */ 1102 @Deprecated 1103 public void setPersistence(MBBanPersistence persistence) { 1104 } 1105 1106 private static MBBanPersistence _persistence; 1107 }