001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portlet.messageboards.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.messageboards.model.MBMailingList; 025 026 import java.util.List; 027 028 /** 029 * 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. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see MBMailingListPersistence 037 * @see MBMailingListPersistenceImpl 038 * @generated 039 */ 040 public class MBMailingListUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(MBMailingList mbMailingList) { 058 getPersistence().clearCache(mbMailingList); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<MBMailingList> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<MBMailingList> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 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 orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 099 */ 100 public static MBMailingList remove(MBMailingList mbMailingList) 101 throws SystemException { 102 return getPersistence().remove(mbMailingList); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 107 */ 108 public static MBMailingList update(MBMailingList mbMailingList, 109 boolean merge) throws SystemException { 110 return getPersistence().update(mbMailingList, merge); 111 } 112 113 /** 114 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 115 */ 116 public static MBMailingList update(MBMailingList mbMailingList, 117 boolean merge, ServiceContext serviceContext) throws SystemException { 118 return getPersistence().update(mbMailingList, merge, serviceContext); 119 } 120 121 /** 122 * Caches the message boards mailing list in the entity cache if it is enabled. 123 * 124 * @param mbMailingList the message boards mailing list to cache 125 */ 126 public static void cacheResult( 127 com.liferay.portlet.messageboards.model.MBMailingList mbMailingList) { 128 getPersistence().cacheResult(mbMailingList); 129 } 130 131 /** 132 * Caches the message boards mailing lists in the entity cache if it is enabled. 133 * 134 * @param mbMailingLists the message boards mailing lists to cache 135 */ 136 public static void cacheResult( 137 java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> mbMailingLists) { 138 getPersistence().cacheResult(mbMailingLists); 139 } 140 141 /** 142 * Creates a new message boards mailing list with the primary key. Does not add the message boards mailing list to the database. 143 * 144 * @param mailingListId the primary key for the new message boards mailing list 145 * @return the new message boards mailing list 146 */ 147 public static com.liferay.portlet.messageboards.model.MBMailingList create( 148 long mailingListId) { 149 return getPersistence().create(mailingListId); 150 } 151 152 /** 153 * Removes the message boards mailing list with the primary key from the database. Also notifies the appropriate model listeners. 154 * 155 * @param mailingListId the primary key of the message boards mailing list to remove 156 * @return the message boards mailing list that was removed 157 * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a message boards mailing list with the primary key could not be found 158 * @throws SystemException if a system exception occurred 159 */ 160 public static com.liferay.portlet.messageboards.model.MBMailingList remove( 161 long mailingListId) 162 throws com.liferay.portal.kernel.exception.SystemException, 163 com.liferay.portlet.messageboards.NoSuchMailingListException { 164 return getPersistence().remove(mailingListId); 165 } 166 167 public static com.liferay.portlet.messageboards.model.MBMailingList updateImpl( 168 com.liferay.portlet.messageboards.model.MBMailingList mbMailingList, 169 boolean merge) 170 throws com.liferay.portal.kernel.exception.SystemException { 171 return getPersistence().updateImpl(mbMailingList, merge); 172 } 173 174 /** 175 * Finds the message boards mailing list with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchMailingListException} if it could not be found. 176 * 177 * @param mailingListId the primary key of the message boards mailing list to find 178 * @return the message boards mailing list 179 * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a message boards mailing list with the primary key could not be found 180 * @throws SystemException if a system exception occurred 181 */ 182 public static com.liferay.portlet.messageboards.model.MBMailingList findByPrimaryKey( 183 long mailingListId) 184 throws com.liferay.portal.kernel.exception.SystemException, 185 com.liferay.portlet.messageboards.NoSuchMailingListException { 186 return getPersistence().findByPrimaryKey(mailingListId); 187 } 188 189 /** 190 * Finds the message boards mailing list with the primary key or returns <code>null</code> if it could not be found. 191 * 192 * @param mailingListId the primary key of the message boards mailing list to find 193 * @return the message boards mailing list, or <code>null</code> if a message boards mailing list with the primary key could not be found 194 * @throws SystemException if a system exception occurred 195 */ 196 public static com.liferay.portlet.messageboards.model.MBMailingList fetchByPrimaryKey( 197 long mailingListId) 198 throws com.liferay.portal.kernel.exception.SystemException { 199 return getPersistence().fetchByPrimaryKey(mailingListId); 200 } 201 202 /** 203 * Finds all the message boards mailing lists where uuid = ?. 204 * 205 * @param uuid the uuid to search with 206 * @return the matching message boards mailing lists 207 * @throws SystemException if a system exception occurred 208 */ 209 public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid( 210 java.lang.String uuid) 211 throws com.liferay.portal.kernel.exception.SystemException { 212 return getPersistence().findByUuid(uuid); 213 } 214 215 /** 216 * Finds a range of all the message boards mailing lists where uuid = ?. 217 * 218 * <p> 219 * 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. 220 * </p> 221 * 222 * @param uuid the uuid to search with 223 * @param start the lower bound of the range of message boards mailing lists to return 224 * @param end the upper bound of the range of message boards mailing lists to return (not inclusive) 225 * @return the range of matching message boards mailing lists 226 * @throws SystemException if a system exception occurred 227 */ 228 public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid( 229 java.lang.String uuid, int start, int end) 230 throws com.liferay.portal.kernel.exception.SystemException { 231 return getPersistence().findByUuid(uuid, start, end); 232 } 233 234 /** 235 * Finds an ordered range of all the message boards mailing lists where uuid = ?. 236 * 237 * <p> 238 * 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. 239 * </p> 240 * 241 * @param uuid the uuid to search with 242 * @param start the lower bound of the range of message boards mailing lists to return 243 * @param end the upper bound of the range of message boards mailing lists to return (not inclusive) 244 * @param orderByComparator the comparator to order the results by 245 * @return the ordered range of matching message boards mailing lists 246 * @throws SystemException if a system exception occurred 247 */ 248 public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByUuid( 249 java.lang.String uuid, int start, int end, 250 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 251 throws com.liferay.portal.kernel.exception.SystemException { 252 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 253 } 254 255 /** 256 * Finds the first message boards mailing list in the ordered set where uuid = ?. 257 * 258 * <p> 259 * 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. 260 * </p> 261 * 262 * @param uuid the uuid to search with 263 * @param orderByComparator the comparator to order the set by 264 * @return the first matching message boards mailing list 265 * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found 266 * @throws SystemException if a system exception occurred 267 */ 268 public static com.liferay.portlet.messageboards.model.MBMailingList findByUuid_First( 269 java.lang.String uuid, 270 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 271 throws com.liferay.portal.kernel.exception.SystemException, 272 com.liferay.portlet.messageboards.NoSuchMailingListException { 273 return getPersistence().findByUuid_First(uuid, orderByComparator); 274 } 275 276 /** 277 * Finds the last message boards mailing list in the ordered set where uuid = ?. 278 * 279 * <p> 280 * 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. 281 * </p> 282 * 283 * @param uuid the uuid to search with 284 * @param orderByComparator the comparator to order the set by 285 * @return the last matching message boards mailing list 286 * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found 287 * @throws SystemException if a system exception occurred 288 */ 289 public static com.liferay.portlet.messageboards.model.MBMailingList findByUuid_Last( 290 java.lang.String uuid, 291 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 292 throws com.liferay.portal.kernel.exception.SystemException, 293 com.liferay.portlet.messageboards.NoSuchMailingListException { 294 return getPersistence().findByUuid_Last(uuid, orderByComparator); 295 } 296 297 /** 298 * Finds the message boards mailing lists before and after the current message boards mailing list in the ordered set where uuid = ?. 299 * 300 * <p> 301 * 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. 302 * </p> 303 * 304 * @param mailingListId the primary key of the current message boards mailing list 305 * @param uuid the uuid to search with 306 * @param orderByComparator the comparator to order the set by 307 * @return the previous, current, and next message boards mailing list 308 * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a message boards mailing list with the primary key could not be found 309 * @throws SystemException if a system exception occurred 310 */ 311 public static com.liferay.portlet.messageboards.model.MBMailingList[] findByUuid_PrevAndNext( 312 long mailingListId, java.lang.String uuid, 313 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 314 throws com.liferay.portal.kernel.exception.SystemException, 315 com.liferay.portlet.messageboards.NoSuchMailingListException { 316 return getPersistence() 317 .findByUuid_PrevAndNext(mailingListId, uuid, 318 orderByComparator); 319 } 320 321 /** 322 * Finds the message boards mailing list where uuid = ? and groupId = ? or throws a {@link com.liferay.portlet.messageboards.NoSuchMailingListException} if it could not be found. 323 * 324 * @param uuid the uuid to search with 325 * @param groupId the group ID to search with 326 * @return the matching message boards mailing list 327 * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found 328 * @throws SystemException if a system exception occurred 329 */ 330 public static com.liferay.portlet.messageboards.model.MBMailingList findByUUID_G( 331 java.lang.String uuid, long groupId) 332 throws com.liferay.portal.kernel.exception.SystemException, 333 com.liferay.portlet.messageboards.NoSuchMailingListException { 334 return getPersistence().findByUUID_G(uuid, groupId); 335 } 336 337 /** 338 * Finds the message boards mailing list where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 339 * 340 * @param uuid the uuid to search with 341 * @param groupId the group ID to search with 342 * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 343 * @throws SystemException if a system exception occurred 344 */ 345 public static com.liferay.portlet.messageboards.model.MBMailingList fetchByUUID_G( 346 java.lang.String uuid, long groupId) 347 throws com.liferay.portal.kernel.exception.SystemException { 348 return getPersistence().fetchByUUID_G(uuid, groupId); 349 } 350 351 /** 352 * Finds 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. 353 * 354 * @param uuid the uuid to search with 355 * @param groupId the group ID to search with 356 * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 357 * @throws SystemException if a system exception occurred 358 */ 359 public static com.liferay.portlet.messageboards.model.MBMailingList fetchByUUID_G( 360 java.lang.String uuid, long groupId, boolean retrieveFromCache) 361 throws com.liferay.portal.kernel.exception.SystemException { 362 return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); 363 } 364 365 /** 366 * Finds all the message boards mailing lists where active = ?. 367 * 368 * @param active the active to search with 369 * @return the matching message boards mailing lists 370 * @throws SystemException if a system exception occurred 371 */ 372 public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive( 373 boolean active) 374 throws com.liferay.portal.kernel.exception.SystemException { 375 return getPersistence().findByActive(active); 376 } 377 378 /** 379 * Finds a range of all the message boards mailing lists where active = ?. 380 * 381 * <p> 382 * 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. 383 * </p> 384 * 385 * @param active the active to search with 386 * @param start the lower bound of the range of message boards mailing lists to return 387 * @param end the upper bound of the range of message boards mailing lists to return (not inclusive) 388 * @return the range of matching message boards mailing lists 389 * @throws SystemException if a system exception occurred 390 */ 391 public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive( 392 boolean active, int start, int end) 393 throws com.liferay.portal.kernel.exception.SystemException { 394 return getPersistence().findByActive(active, start, end); 395 } 396 397 /** 398 * Finds an ordered range of all the message boards mailing lists where active = ?. 399 * 400 * <p> 401 * 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. 402 * </p> 403 * 404 * @param active the active to search with 405 * @param start the lower bound of the range of message boards mailing lists to return 406 * @param end the upper bound of the range of message boards mailing lists to return (not inclusive) 407 * @param orderByComparator the comparator to order the results by 408 * @return the ordered range of matching message boards mailing lists 409 * @throws SystemException if a system exception occurred 410 */ 411 public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findByActive( 412 boolean active, int start, int end, 413 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 414 throws com.liferay.portal.kernel.exception.SystemException { 415 return getPersistence() 416 .findByActive(active, start, end, orderByComparator); 417 } 418 419 /** 420 * Finds the first message boards mailing list in the ordered set where active = ?. 421 * 422 * <p> 423 * 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. 424 * </p> 425 * 426 * @param active the active to search with 427 * @param orderByComparator the comparator to order the set by 428 * @return the first matching message boards mailing list 429 * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found 430 * @throws SystemException if a system exception occurred 431 */ 432 public static com.liferay.portlet.messageboards.model.MBMailingList findByActive_First( 433 boolean active, 434 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 435 throws com.liferay.portal.kernel.exception.SystemException, 436 com.liferay.portlet.messageboards.NoSuchMailingListException { 437 return getPersistence().findByActive_First(active, orderByComparator); 438 } 439 440 /** 441 * Finds the last message boards mailing list in the ordered set where active = ?. 442 * 443 * <p> 444 * 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. 445 * </p> 446 * 447 * @param active the active to search with 448 * @param orderByComparator the comparator to order the set by 449 * @return the last matching message boards mailing list 450 * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found 451 * @throws SystemException if a system exception occurred 452 */ 453 public static com.liferay.portlet.messageboards.model.MBMailingList findByActive_Last( 454 boolean active, 455 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 456 throws com.liferay.portal.kernel.exception.SystemException, 457 com.liferay.portlet.messageboards.NoSuchMailingListException { 458 return getPersistence().findByActive_Last(active, orderByComparator); 459 } 460 461 /** 462 * Finds the message boards mailing lists before and after the current message boards mailing list in the ordered set where active = ?. 463 * 464 * <p> 465 * 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. 466 * </p> 467 * 468 * @param mailingListId the primary key of the current message boards mailing list 469 * @param active the active to search with 470 * @param orderByComparator the comparator to order the set by 471 * @return the previous, current, and next message boards mailing list 472 * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a message boards mailing list with the primary key could not be found 473 * @throws SystemException if a system exception occurred 474 */ 475 public static com.liferay.portlet.messageboards.model.MBMailingList[] findByActive_PrevAndNext( 476 long mailingListId, boolean active, 477 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 478 throws com.liferay.portal.kernel.exception.SystemException, 479 com.liferay.portlet.messageboards.NoSuchMailingListException { 480 return getPersistence() 481 .findByActive_PrevAndNext(mailingListId, active, 482 orderByComparator); 483 } 484 485 /** 486 * Finds the message boards mailing list where groupId = ? and categoryId = ? or throws a {@link com.liferay.portlet.messageboards.NoSuchMailingListException} if it could not be found. 487 * 488 * @param groupId the group ID to search with 489 * @param categoryId the category ID to search with 490 * @return the matching message boards mailing list 491 * @throws com.liferay.portlet.messageboards.NoSuchMailingListException if a matching message boards mailing list could not be found 492 * @throws SystemException if a system exception occurred 493 */ 494 public static com.liferay.portlet.messageboards.model.MBMailingList findByG_C( 495 long groupId, long categoryId) 496 throws com.liferay.portal.kernel.exception.SystemException, 497 com.liferay.portlet.messageboards.NoSuchMailingListException { 498 return getPersistence().findByG_C(groupId, categoryId); 499 } 500 501 /** 502 * Finds the message boards mailing list where groupId = ? and categoryId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 503 * 504 * @param groupId the group ID to search with 505 * @param categoryId the category ID to search with 506 * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 507 * @throws SystemException if a system exception occurred 508 */ 509 public static com.liferay.portlet.messageboards.model.MBMailingList fetchByG_C( 510 long groupId, long categoryId) 511 throws com.liferay.portal.kernel.exception.SystemException { 512 return getPersistence().fetchByG_C(groupId, categoryId); 513 } 514 515 /** 516 * Finds 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. 517 * 518 * @param groupId the group ID to search with 519 * @param categoryId the category ID to search with 520 * @return the matching message boards mailing list, or <code>null</code> if a matching message boards mailing list could not be found 521 * @throws SystemException if a system exception occurred 522 */ 523 public static com.liferay.portlet.messageboards.model.MBMailingList fetchByG_C( 524 long groupId, long categoryId, boolean retrieveFromCache) 525 throws com.liferay.portal.kernel.exception.SystemException { 526 return getPersistence() 527 .fetchByG_C(groupId, categoryId, retrieveFromCache); 528 } 529 530 /** 531 * Finds all the message boards mailing lists. 532 * 533 * @return the message boards mailing lists 534 * @throws SystemException if a system exception occurred 535 */ 536 public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll() 537 throws com.liferay.portal.kernel.exception.SystemException { 538 return getPersistence().findAll(); 539 } 540 541 /** 542 * Finds a range of all the message boards mailing lists. 543 * 544 * <p> 545 * 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. 546 * </p> 547 * 548 * @param start the lower bound of the range of message boards mailing lists to return 549 * @param end the upper bound of the range of message boards mailing lists to return (not inclusive) 550 * @return the range of message boards mailing lists 551 * @throws SystemException if a system exception occurred 552 */ 553 public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll( 554 int start, int end) 555 throws com.liferay.portal.kernel.exception.SystemException { 556 return getPersistence().findAll(start, end); 557 } 558 559 /** 560 * Finds an ordered range of all the message boards mailing lists. 561 * 562 * <p> 563 * 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. 564 * </p> 565 * 566 * @param start the lower bound of the range of message boards mailing lists to return 567 * @param end the upper bound of the range of message boards mailing lists to return (not inclusive) 568 * @param orderByComparator the comparator to order the results by 569 * @return the ordered range of message boards mailing lists 570 * @throws SystemException if a system exception occurred 571 */ 572 public static java.util.List<com.liferay.portlet.messageboards.model.MBMailingList> findAll( 573 int start, int end, 574 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 575 throws com.liferay.portal.kernel.exception.SystemException { 576 return getPersistence().findAll(start, end, orderByComparator); 577 } 578 579 /** 580 * Removes all the message boards mailing lists where uuid = ? from the database. 581 * 582 * @param uuid the uuid to search with 583 * @throws SystemException if a system exception occurred 584 */ 585 public static void removeByUuid(java.lang.String uuid) 586 throws com.liferay.portal.kernel.exception.SystemException { 587 getPersistence().removeByUuid(uuid); 588 } 589 590 /** 591 * Removes the message boards mailing list where uuid = ? and groupId = ? from the database. 592 * 593 * @param uuid the uuid to search with 594 * @param groupId the group ID to search with 595 * @throws SystemException if a system exception occurred 596 */ 597 public static void removeByUUID_G(java.lang.String uuid, long groupId) 598 throws com.liferay.portal.kernel.exception.SystemException, 599 com.liferay.portlet.messageboards.NoSuchMailingListException { 600 getPersistence().removeByUUID_G(uuid, groupId); 601 } 602 603 /** 604 * Removes all the message boards mailing lists where active = ? from the database. 605 * 606 * @param active the active to search with 607 * @throws SystemException if a system exception occurred 608 */ 609 public static void removeByActive(boolean active) 610 throws com.liferay.portal.kernel.exception.SystemException { 611 getPersistence().removeByActive(active); 612 } 613 614 /** 615 * Removes the message boards mailing list where groupId = ? and categoryId = ? from the database. 616 * 617 * @param groupId the group ID to search with 618 * @param categoryId the category ID to search with 619 * @throws SystemException if a system exception occurred 620 */ 621 public static void removeByG_C(long groupId, long categoryId) 622 throws com.liferay.portal.kernel.exception.SystemException, 623 com.liferay.portlet.messageboards.NoSuchMailingListException { 624 getPersistence().removeByG_C(groupId, categoryId); 625 } 626 627 /** 628 * Removes all the message boards mailing lists from the database. 629 * 630 * @throws SystemException if a system exception occurred 631 */ 632 public static void removeAll() 633 throws com.liferay.portal.kernel.exception.SystemException { 634 getPersistence().removeAll(); 635 } 636 637 /** 638 * Counts all the message boards mailing lists where uuid = ?. 639 * 640 * @param uuid the uuid to search with 641 * @return the number of matching message boards mailing lists 642 * @throws SystemException if a system exception occurred 643 */ 644 public static int countByUuid(java.lang.String uuid) 645 throws com.liferay.portal.kernel.exception.SystemException { 646 return getPersistence().countByUuid(uuid); 647 } 648 649 /** 650 * Counts all the message boards mailing lists where uuid = ? and groupId = ?. 651 * 652 * @param uuid the uuid to search with 653 * @param groupId the group ID to search with 654 * @return the number of matching message boards mailing lists 655 * @throws SystemException if a system exception occurred 656 */ 657 public static int countByUUID_G(java.lang.String uuid, long groupId) 658 throws com.liferay.portal.kernel.exception.SystemException { 659 return getPersistence().countByUUID_G(uuid, groupId); 660 } 661 662 /** 663 * Counts all the message boards mailing lists where active = ?. 664 * 665 * @param active the active to search with 666 * @return the number of matching message boards mailing lists 667 * @throws SystemException if a system exception occurred 668 */ 669 public static int countByActive(boolean active) 670 throws com.liferay.portal.kernel.exception.SystemException { 671 return getPersistence().countByActive(active); 672 } 673 674 /** 675 * Counts all the message boards mailing lists where groupId = ? and categoryId = ?. 676 * 677 * @param groupId the group ID to search with 678 * @param categoryId the category ID to search with 679 * @return the number of matching message boards mailing lists 680 * @throws SystemException if a system exception occurred 681 */ 682 public static int countByG_C(long groupId, long categoryId) 683 throws com.liferay.portal.kernel.exception.SystemException { 684 return getPersistence().countByG_C(groupId, categoryId); 685 } 686 687 /** 688 * Counts all the message boards mailing lists. 689 * 690 * @return the number of message boards mailing lists 691 * @throws SystemException if a system exception occurred 692 */ 693 public static int countAll() 694 throws com.liferay.portal.kernel.exception.SystemException { 695 return getPersistence().countAll(); 696 } 697 698 public static MBMailingListPersistence getPersistence() { 699 if (_persistence == null) { 700 _persistence = (MBMailingListPersistence)PortalBeanLocatorUtil.locate(MBMailingListPersistence.class.getName()); 701 702 ReferenceRegistry.registerReference(MBMailingListUtil.class, 703 "_persistence"); 704 } 705 706 return _persistence; 707 } 708 709 public void setPersistence(MBMailingListPersistence persistence) { 710 _persistence = persistence; 711 712 ReferenceRegistry.registerReference(MBMailingListUtil.class, 713 "_persistence"); 714 } 715 716 private static MBMailingListPersistence _persistence; 717 }