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.MBMailingList; 026 027 import java.util.List; 028 029 /** 030 * The persistence utility for the message boards mailing list service. This utility wraps {@link com.liferay.portlet.messageboards.service.persistence.impl.MBMailingListPersistenceImpl} 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 MBMailingListPersistence 038 * @see com.liferay.portlet.messageboards.service.persistence.impl.MBMailingListPersistenceImpl 039 * @generated 040 */ 041 @ProviderType 042 public class MBMailingListUtil { 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(MBMailingList mbMailingList) { 060 getPersistence().clearCache(mbMailingList); 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<MBMailingList> findWithDynamicQuery( 074 DynamicQuery dynamicQuery) { 075 return getPersistence().findWithDynamicQuery(dynamicQuery); 076 } 077 078 /** 079 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 080 */ 081 public static List<MBMailingList> findWithDynamicQuery( 082 DynamicQuery dynamicQuery, int start, int end) { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<MBMailingList> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator<MBMailingList> orderByComparator) { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static MBMailingList update(MBMailingList mbMailingList) { 101 return getPersistence().update(mbMailingList); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static MBMailingList update(MBMailingList mbMailingList, 108 ServiceContext serviceContext) { 109 return getPersistence().update(mbMailingList, serviceContext); 110 } 111 112 /** 113 * Returns all the message boards mailing lists where uuid = ?. 114 * 115 * @param uuid the uuid 116 * @return the matching message boards mailing lists 117 */ 118 public static List<MBMailingList> findByUuid(java.lang.String uuid) { 119 return getPersistence().findByUuid(uuid); 120 } 121 122 /** 123 * Returns a range of all the message boards mailing lists where uuid = ?. 124 * 125 * <p> 126 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMailingListModelImpl}. 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. 127 * </p> 128 * 129 * @param uuid the uuid 130 * @param start the lower bound of the range of message boards mailing lists 131 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 132 * @return the range of matching message boards mailing lists 133 */ 134 public static List<MBMailingList> findByUuid(java.lang.String uuid, 135 int start, int end) { 136 return getPersistence().findByUuid(uuid, start, end); 137 } 138 139 /** 140 * Returns an ordered range of all the message boards mailing lists where uuid = ?. 141 * 142 * <p> 143 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMailingListModelImpl}. 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. 144 * </p> 145 * 146 * @param uuid the uuid 147 * @param start the lower bound of the range of message boards mailing lists 148 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 149 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 150 * @return the ordered range of matching message boards mailing lists 151 */ 152 public static List<MBMailingList> findByUuid(java.lang.String uuid, 153 int start, int end, OrderByComparator<MBMailingList> orderByComparator) { 154 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 155 } 156 157 /** 158 * Returns the first message boards mailing list in the ordered set where uuid = ?. 159 * 160 * @param uuid the uuid 161 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 162 * @return the first matching message boards mailing list 163 * @throws NoSuchMailingListException if a matching message boards mailing list could not be found 164 */ 165 public static MBMailingList findByUuid_First(java.lang.String uuid, 166 OrderByComparator<MBMailingList> orderByComparator) 167 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 168 return getPersistence().findByUuid_First(uuid, orderByComparator); 169 } 170 171 /** 172 * Returns the first message boards mailing list 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 mailing list, or <code>null</code> if a matching message boards mailing list could not be found 177 */ 178 public static MBMailingList fetchByUuid_First(java.lang.String uuid, 179 OrderByComparator<MBMailingList> orderByComparator) { 180 return getPersistence().fetchByUuid_First(uuid, orderByComparator); 181 } 182 183 /** 184 * Returns the last message boards mailing list in the ordered set where uuid = ?. 185 * 186 * @param uuid the uuid 187 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 188 * @return the last matching message boards mailing list 189 * @throws NoSuchMailingListException if a matching message boards mailing list could not be found 190 */ 191 public static MBMailingList findByUuid_Last(java.lang.String uuid, 192 OrderByComparator<MBMailingList> orderByComparator) 193 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 194 return getPersistence().findByUuid_Last(uuid, orderByComparator); 195 } 196 197 /** 198 * Returns the last message boards mailing list in the ordered set where uuid = ?. 199 * 200 * @param uuid the uuid 201 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 202 * @return the last matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 203 */ 204 public static MBMailingList fetchByUuid_Last(java.lang.String uuid, 205 OrderByComparator<MBMailingList> orderByComparator) { 206 return getPersistence().fetchByUuid_Last(uuid, orderByComparator); 207 } 208 209 /** 210 * Returns the message boards mailing lists before and after the current message boards mailing list in the ordered set where uuid = ?. 211 * 212 * @param mailingListId the primary key of the current message boards mailing list 213 * @param uuid the uuid 214 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 215 * @return the previous, current, and next message boards mailing list 216 * @throws NoSuchMailingListException if a message boards mailing list with the primary key could not be found 217 */ 218 public static MBMailingList[] findByUuid_PrevAndNext(long mailingListId, 219 java.lang.String uuid, 220 OrderByComparator<MBMailingList> orderByComparator) 221 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 222 return getPersistence() 223 .findByUuid_PrevAndNext(mailingListId, uuid, 224 orderByComparator); 225 } 226 227 /** 228 * Removes all the message boards mailing lists where uuid = ? from the database. 229 * 230 * @param uuid the uuid 231 */ 232 public static void removeByUuid(java.lang.String uuid) { 233 getPersistence().removeByUuid(uuid); 234 } 235 236 /** 237 * Returns the number of message boards mailing lists where uuid = ?. 238 * 239 * @param uuid the uuid 240 * @return the number of matching message boards mailing lists 241 */ 242 public static int countByUuid(java.lang.String uuid) { 243 return getPersistence().countByUuid(uuid); 244 } 245 246 /** 247 * Returns the message boards mailing list where uuid = ? and groupId = ? or throws a {@link NoSuchMailingListException} if it could not be found. 248 * 249 * @param uuid the uuid 250 * @param groupId the group ID 251 * @return the matching message boards mailing list 252 * @throws NoSuchMailingListException if a matching message boards mailing list could not be found 253 */ 254 public static MBMailingList findByUUID_G(java.lang.String uuid, long groupId) 255 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 256 return getPersistence().findByUUID_G(uuid, groupId); 257 } 258 259 /** 260 * Returns the message boards mailing list where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 261 * 262 * @param uuid the uuid 263 * @param groupId the group ID 264 * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 265 */ 266 public static MBMailingList fetchByUUID_G(java.lang.String uuid, 267 long groupId) { 268 return getPersistence().fetchByUUID_G(uuid, groupId); 269 } 270 271 /** 272 * Returns the message boards mailing list where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 273 * 274 * @param uuid the uuid 275 * @param groupId the group ID 276 * @param retrieveFromCache whether to use the finder cache 277 * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 278 */ 279 public static MBMailingList fetchByUUID_G(java.lang.String uuid, 280 long groupId, boolean retrieveFromCache) { 281 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 282 } 283 284 /** 285 * Removes the message boards mailing list where uuid = ? and groupId = ? from the database. 286 * 287 * @param uuid the uuid 288 * @param groupId the group ID 289 * @return the message boards mailing list that was removed 290 */ 291 public static MBMailingList removeByUUID_G(java.lang.String uuid, 292 long groupId) 293 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 294 return getPersistence().removeByUUID_G(uuid, groupId); 295 } 296 297 /** 298 * Returns the number of message boards mailing lists where uuid = ? and groupId = ?. 299 * 300 * @param uuid the uuid 301 * @param groupId the group ID 302 * @return the number of matching message boards mailing lists 303 */ 304 public static int countByUUID_G(java.lang.String uuid, long groupId) { 305 return getPersistence().countByUUID_G(uuid, groupId); 306 } 307 308 /** 309 * Returns all the message boards mailing lists where uuid = ? and companyId = ?. 310 * 311 * @param uuid the uuid 312 * @param companyId the company ID 313 * @return the matching message boards mailing lists 314 */ 315 public static List<MBMailingList> findByUuid_C(java.lang.String uuid, 316 long companyId) { 317 return getPersistence().findByUuid_C(uuid, companyId); 318 } 319 320 /** 321 * Returns a range of all the message boards mailing lists where uuid = ? and companyId = ?. 322 * 323 * <p> 324 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMailingListModelImpl}. 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. 325 * </p> 326 * 327 * @param uuid the uuid 328 * @param companyId the company ID 329 * @param start the lower bound of the range of message boards mailing lists 330 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 331 * @return the range of matching message boards mailing lists 332 */ 333 public static List<MBMailingList> findByUuid_C(java.lang.String uuid, 334 long companyId, int start, int end) { 335 return getPersistence().findByUuid_C(uuid, companyId, start, end); 336 } 337 338 /** 339 * Returns an ordered range of all the message boards mailing lists where uuid = ? and companyId = ?. 340 * 341 * <p> 342 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMailingListModelImpl}. 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. 343 * </p> 344 * 345 * @param uuid the uuid 346 * @param companyId the company ID 347 * @param start the lower bound of the range of message boards mailing lists 348 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 349 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 350 * @return the ordered range of matching message boards mailing lists 351 */ 352 public static List<MBMailingList> findByUuid_C(java.lang.String uuid, 353 long companyId, int start, int end, 354 OrderByComparator<MBMailingList> orderByComparator) { 355 return getPersistence() 356 .findByUuid_C(uuid, companyId, start, end, orderByComparator); 357 } 358 359 /** 360 * Returns the first message boards mailing list in the ordered set where uuid = ? and companyId = ?. 361 * 362 * @param uuid the uuid 363 * @param companyId the company ID 364 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 365 * @return the first matching message boards mailing list 366 * @throws NoSuchMailingListException if a matching message boards mailing list could not be found 367 */ 368 public static MBMailingList findByUuid_C_First(java.lang.String uuid, 369 long companyId, OrderByComparator<MBMailingList> orderByComparator) 370 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 371 return getPersistence() 372 .findByUuid_C_First(uuid, companyId, orderByComparator); 373 } 374 375 /** 376 * Returns the first message boards mailing list in the ordered set where uuid = ? and companyId = ?. 377 * 378 * @param uuid the uuid 379 * @param companyId the company ID 380 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 381 * @return the first matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 382 */ 383 public static MBMailingList fetchByUuid_C_First(java.lang.String uuid, 384 long companyId, OrderByComparator<MBMailingList> orderByComparator) { 385 return getPersistence() 386 .fetchByUuid_C_First(uuid, companyId, orderByComparator); 387 } 388 389 /** 390 * Returns the last message boards mailing list in the ordered set where uuid = ? and companyId = ?. 391 * 392 * @param uuid the uuid 393 * @param companyId the company ID 394 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 395 * @return the last matching message boards mailing list 396 * @throws NoSuchMailingListException if a matching message boards mailing list could not be found 397 */ 398 public static MBMailingList findByUuid_C_Last(java.lang.String uuid, 399 long companyId, OrderByComparator<MBMailingList> orderByComparator) 400 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 401 return getPersistence() 402 .findByUuid_C_Last(uuid, companyId, orderByComparator); 403 } 404 405 /** 406 * Returns the last message boards mailing list in the ordered set where uuid = ? and companyId = ?. 407 * 408 * @param uuid the uuid 409 * @param companyId the company ID 410 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 411 * @return the last matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 412 */ 413 public static MBMailingList fetchByUuid_C_Last(java.lang.String uuid, 414 long companyId, OrderByComparator<MBMailingList> orderByComparator) { 415 return getPersistence() 416 .fetchByUuid_C_Last(uuid, companyId, orderByComparator); 417 } 418 419 /** 420 * Returns the message boards mailing lists before and after the current message boards mailing list in the ordered set where uuid = ? and companyId = ?. 421 * 422 * @param mailingListId the primary key of the current message boards mailing list 423 * @param uuid the uuid 424 * @param companyId the company ID 425 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 426 * @return the previous, current, and next message boards mailing list 427 * @throws NoSuchMailingListException if a message boards mailing list with the primary key could not be found 428 */ 429 public static MBMailingList[] findByUuid_C_PrevAndNext(long mailingListId, 430 java.lang.String uuid, long companyId, 431 OrderByComparator<MBMailingList> orderByComparator) 432 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 433 return getPersistence() 434 .findByUuid_C_PrevAndNext(mailingListId, uuid, companyId, 435 orderByComparator); 436 } 437 438 /** 439 * Removes all the message boards mailing lists where uuid = ? and companyId = ? from the database. 440 * 441 * @param uuid the uuid 442 * @param companyId the company ID 443 */ 444 public static void removeByUuid_C(java.lang.String uuid, long companyId) { 445 getPersistence().removeByUuid_C(uuid, companyId); 446 } 447 448 /** 449 * Returns the number of message boards mailing lists where uuid = ? and companyId = ?. 450 * 451 * @param uuid the uuid 452 * @param companyId the company ID 453 * @return the number of matching message boards mailing lists 454 */ 455 public static int countByUuid_C(java.lang.String uuid, long companyId) { 456 return getPersistence().countByUuid_C(uuid, companyId); 457 } 458 459 /** 460 * Returns all the message boards mailing lists where active = ?. 461 * 462 * @param active the active 463 * @return the matching message boards mailing lists 464 */ 465 public static List<MBMailingList> findByActive(boolean active) { 466 return getPersistence().findByActive(active); 467 } 468 469 /** 470 * Returns a range of all the message boards mailing lists where active = ?. 471 * 472 * <p> 473 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMailingListModelImpl}. 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. 474 * </p> 475 * 476 * @param active the active 477 * @param start the lower bound of the range of message boards mailing lists 478 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 479 * @return the range of matching message boards mailing lists 480 */ 481 public static List<MBMailingList> findByActive(boolean active, int start, 482 int end) { 483 return getPersistence().findByActive(active, start, end); 484 } 485 486 /** 487 * Returns an ordered range of all the message boards mailing lists where active = ?. 488 * 489 * <p> 490 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMailingListModelImpl}. 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. 491 * </p> 492 * 493 * @param active the active 494 * @param start the lower bound of the range of message boards mailing lists 495 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 496 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 497 * @return the ordered range of matching message boards mailing lists 498 */ 499 public static List<MBMailingList> findByActive(boolean active, int start, 500 int end, OrderByComparator<MBMailingList> orderByComparator) { 501 return getPersistence() 502 .findByActive(active, start, end, orderByComparator); 503 } 504 505 /** 506 * Returns the first message boards mailing list in the ordered set where active = ?. 507 * 508 * @param active the active 509 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 510 * @return the first matching message boards mailing list 511 * @throws NoSuchMailingListException if a matching message boards mailing list could not be found 512 */ 513 public static MBMailingList findByActive_First(boolean active, 514 OrderByComparator<MBMailingList> orderByComparator) 515 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 516 return getPersistence().findByActive_First(active, orderByComparator); 517 } 518 519 /** 520 * Returns the first message boards mailing list in the ordered set where active = ?. 521 * 522 * @param active the active 523 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 524 * @return the first matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 525 */ 526 public static MBMailingList fetchByActive_First(boolean active, 527 OrderByComparator<MBMailingList> orderByComparator) { 528 return getPersistence().fetchByActive_First(active, orderByComparator); 529 } 530 531 /** 532 * Returns the last message boards mailing list in the ordered set where active = ?. 533 * 534 * @param active the active 535 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 536 * @return the last matching message boards mailing list 537 * @throws NoSuchMailingListException if a matching message boards mailing list could not be found 538 */ 539 public static MBMailingList findByActive_Last(boolean active, 540 OrderByComparator<MBMailingList> orderByComparator) 541 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 542 return getPersistence().findByActive_Last(active, orderByComparator); 543 } 544 545 /** 546 * Returns the last message boards mailing list in the ordered set where active = ?. 547 * 548 * @param active the active 549 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 550 * @return the last matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 551 */ 552 public static MBMailingList fetchByActive_Last(boolean active, 553 OrderByComparator<MBMailingList> orderByComparator) { 554 return getPersistence().fetchByActive_Last(active, orderByComparator); 555 } 556 557 /** 558 * Returns the message boards mailing lists before and after the current message boards mailing list in the ordered set where active = ?. 559 * 560 * @param mailingListId the primary key of the current message boards mailing list 561 * @param active the active 562 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 563 * @return the previous, current, and next message boards mailing list 564 * @throws NoSuchMailingListException if a message boards mailing list with the primary key could not be found 565 */ 566 public static MBMailingList[] findByActive_PrevAndNext(long mailingListId, 567 boolean active, OrderByComparator<MBMailingList> orderByComparator) 568 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 569 return getPersistence() 570 .findByActive_PrevAndNext(mailingListId, active, 571 orderByComparator); 572 } 573 574 /** 575 * Removes all the message boards mailing lists where active = ? from the database. 576 * 577 * @param active the active 578 */ 579 public static void removeByActive(boolean active) { 580 getPersistence().removeByActive(active); 581 } 582 583 /** 584 * Returns the number of message boards mailing lists where active = ?. 585 * 586 * @param active the active 587 * @return the number of matching message boards mailing lists 588 */ 589 public static int countByActive(boolean active) { 590 return getPersistence().countByActive(active); 591 } 592 593 /** 594 * Returns the message boards mailing list where groupId = ? and categoryId = ? or throws a {@link NoSuchMailingListException} if it could not be found. 595 * 596 * @param groupId the group ID 597 * @param categoryId the category ID 598 * @return the matching message boards mailing list 599 * @throws NoSuchMailingListException if a matching message boards mailing list could not be found 600 */ 601 public static MBMailingList findByG_C(long groupId, long categoryId) 602 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 603 return getPersistence().findByG_C(groupId, categoryId); 604 } 605 606 /** 607 * Returns the message boards mailing list where groupId = ? and categoryId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 608 * 609 * @param groupId the group ID 610 * @param categoryId the category ID 611 * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 612 */ 613 public static MBMailingList fetchByG_C(long groupId, long categoryId) { 614 return getPersistence().fetchByG_C(groupId, categoryId); 615 } 616 617 /** 618 * Returns the message boards mailing list where groupId = ? and categoryId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 619 * 620 * @param groupId the group ID 621 * @param categoryId the category ID 622 * @param retrieveFromCache whether to use the finder cache 623 * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 624 */ 625 public static MBMailingList fetchByG_C(long groupId, long categoryId, 626 boolean retrieveFromCache) { 627 return getPersistence() 628 .fetchByG_C(groupId, categoryId, retrieveFromCache); 629 } 630 631 /** 632 * Removes the message boards mailing list where groupId = ? and categoryId = ? from the database. 633 * 634 * @param groupId the group ID 635 * @param categoryId the category ID 636 * @return the message boards mailing list that was removed 637 */ 638 public static MBMailingList removeByG_C(long groupId, long categoryId) 639 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 640 return getPersistence().removeByG_C(groupId, categoryId); 641 } 642 643 /** 644 * Returns the number of message boards mailing lists where groupId = ? and categoryId = ?. 645 * 646 * @param groupId the group ID 647 * @param categoryId the category ID 648 * @return the number of matching message boards mailing lists 649 */ 650 public static int countByG_C(long groupId, long categoryId) { 651 return getPersistence().countByG_C(groupId, categoryId); 652 } 653 654 /** 655 * Caches the message boards mailing list in the entity cache if it is enabled. 656 * 657 * @param mbMailingList the message boards mailing list 658 */ 659 public static void cacheResult(MBMailingList mbMailingList) { 660 getPersistence().cacheResult(mbMailingList); 661 } 662 663 /** 664 * Caches the message boards mailing lists in the entity cache if it is enabled. 665 * 666 * @param mbMailingLists the message boards mailing lists 667 */ 668 public static void cacheResult(List<MBMailingList> mbMailingLists) { 669 getPersistence().cacheResult(mbMailingLists); 670 } 671 672 /** 673 * Creates a new message boards mailing list with the primary key. Does not add the message boards mailing list to the database. 674 * 675 * @param mailingListId the primary key for the new message boards mailing list 676 * @return the new message boards mailing list 677 */ 678 public static MBMailingList create(long mailingListId) { 679 return getPersistence().create(mailingListId); 680 } 681 682 /** 683 * Removes the message boards mailing list with the primary key from the database. Also notifies the appropriate model listeners. 684 * 685 * @param mailingListId the primary key of the message boards mailing list 686 * @return the message boards mailing list that was removed 687 * @throws NoSuchMailingListException if a message boards mailing list with the primary key could not be found 688 */ 689 public static MBMailingList remove(long mailingListId) 690 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 691 return getPersistence().remove(mailingListId); 692 } 693 694 public static MBMailingList updateImpl(MBMailingList mbMailingList) { 695 return getPersistence().updateImpl(mbMailingList); 696 } 697 698 /** 699 * Returns the message boards mailing list with the primary key or throws a {@link NoSuchMailingListException} if it could not be found. 700 * 701 * @param mailingListId the primary key of the message boards mailing list 702 * @return the message boards mailing list 703 * @throws NoSuchMailingListException if a message boards mailing list with the primary key could not be found 704 */ 705 public static MBMailingList findByPrimaryKey(long mailingListId) 706 throws com.liferay.portlet.messageboards.NoSuchMailingListException { 707 return getPersistence().findByPrimaryKey(mailingListId); 708 } 709 710 /** 711 * Returns the message boards mailing list with the primary key or returns <code>null</code> if it could not be found. 712 * 713 * @param mailingListId the primary key of the message boards mailing list 714 * @return the message boards mailing list, or <code>null</code> if a message boards mailing list with the primary key could not be found 715 */ 716 public static MBMailingList fetchByPrimaryKey(long mailingListId) { 717 return getPersistence().fetchByPrimaryKey(mailingListId); 718 } 719 720 public static java.util.Map<java.io.Serializable, MBMailingList> fetchByPrimaryKeys( 721 java.util.Set<java.io.Serializable> primaryKeys) { 722 return getPersistence().fetchByPrimaryKeys(primaryKeys); 723 } 724 725 /** 726 * Returns all the message boards mailing lists. 727 * 728 * @return the message boards mailing lists 729 */ 730 public static List<MBMailingList> findAll() { 731 return getPersistence().findAll(); 732 } 733 734 /** 735 * Returns a range of all the message boards mailing lists. 736 * 737 * <p> 738 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMailingListModelImpl}. 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. 739 * </p> 740 * 741 * @param start the lower bound of the range of message boards mailing lists 742 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 743 * @return the range of message boards mailing lists 744 */ 745 public static List<MBMailingList> findAll(int start, int end) { 746 return getPersistence().findAll(start, end); 747 } 748 749 /** 750 * Returns an ordered range of all the message boards mailing lists. 751 * 752 * <p> 753 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link MBMailingListModelImpl}. 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. 754 * </p> 755 * 756 * @param start the lower bound of the range of message boards mailing lists 757 * @param end the upper bound of the range of message boards mailing lists (not inclusive) 758 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 759 * @return the ordered range of message boards mailing lists 760 */ 761 public static List<MBMailingList> findAll(int start, int end, 762 OrderByComparator<MBMailingList> orderByComparator) { 763 return getPersistence().findAll(start, end, orderByComparator); 764 } 765 766 /** 767 * Removes all the message boards mailing lists from the database. 768 */ 769 public static void removeAll() { 770 getPersistence().removeAll(); 771 } 772 773 /** 774 * Returns the number of message boards mailing lists. 775 * 776 * @return the number of message boards mailing lists 777 */ 778 public static int countAll() { 779 return getPersistence().countAll(); 780 } 781 782 public static MBMailingListPersistence getPersistence() { 783 if (_persistence == null) { 784 _persistence = (MBMailingListPersistence)PortalBeanLocatorUtil.locate(MBMailingListPersistence.class.getName()); 785 786 ReferenceRegistry.registerReference(MBMailingListUtil.class, 787 "_persistence"); 788 } 789 790 return _persistence; 791 } 792 793 /** 794 * @deprecated As of 6.2.0 795 */ 796 @Deprecated 797 public void setPersistence(MBMailingListPersistence persistence) { 798 } 799 800 private static MBMailingListPersistence _persistence; 801 }