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