001 /** 002 * Copyright (c) 2000-2011 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 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.MBDiscussion; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the message boards discussion service. This utility wraps {@link MBDiscussionPersistenceImpl} 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 MBDiscussionPersistence 037 * @see MBDiscussionPersistenceImpl 038 * @generated 039 */ 040 public class MBDiscussionUtil { 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(MBDiscussion mbDiscussion) { 058 getPersistence().clearCache(mbDiscussion); 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<MBDiscussion> 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<MBDiscussion> 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<MBDiscussion> 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 MBDiscussion remove(MBDiscussion mbDiscussion) 101 throws SystemException { 102 return getPersistence().remove(mbDiscussion); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 107 */ 108 public static MBDiscussion update(MBDiscussion mbDiscussion, boolean merge) 109 throws SystemException { 110 return getPersistence().update(mbDiscussion, merge); 111 } 112 113 /** 114 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 115 */ 116 public static MBDiscussion update(MBDiscussion mbDiscussion, boolean merge, 117 ServiceContext serviceContext) throws SystemException { 118 return getPersistence().update(mbDiscussion, merge, serviceContext); 119 } 120 121 /** 122 * Caches the message boards discussion in the entity cache if it is enabled. 123 * 124 * @param mbDiscussion the message boards discussion 125 */ 126 public static void cacheResult( 127 com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion) { 128 getPersistence().cacheResult(mbDiscussion); 129 } 130 131 /** 132 * Caches the message boards discussions in the entity cache if it is enabled. 133 * 134 * @param mbDiscussions the message boards discussions 135 */ 136 public static void cacheResult( 137 java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> mbDiscussions) { 138 getPersistence().cacheResult(mbDiscussions); 139 } 140 141 /** 142 * Creates a new message boards discussion with the primary key. Does not add the message boards discussion to the database. 143 * 144 * @param discussionId the primary key for the new message boards discussion 145 * @return the new message boards discussion 146 */ 147 public static com.liferay.portlet.messageboards.model.MBDiscussion create( 148 long discussionId) { 149 return getPersistence().create(discussionId); 150 } 151 152 /** 153 * Removes the message boards discussion with the primary key from the database. Also notifies the appropriate model listeners. 154 * 155 * @param discussionId the primary key of the message boards discussion 156 * @return the message boards discussion that was removed 157 * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a message boards discussion 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.MBDiscussion remove( 161 long discussionId) 162 throws com.liferay.portal.kernel.exception.SystemException, 163 com.liferay.portlet.messageboards.NoSuchDiscussionException { 164 return getPersistence().remove(discussionId); 165 } 166 167 public static com.liferay.portlet.messageboards.model.MBDiscussion updateImpl( 168 com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion, 169 boolean merge) 170 throws com.liferay.portal.kernel.exception.SystemException { 171 return getPersistence().updateImpl(mbDiscussion, merge); 172 } 173 174 /** 175 * Returns the message boards discussion with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchDiscussionException} if it could not be found. 176 * 177 * @param discussionId the primary key of the message boards discussion 178 * @return the message boards discussion 179 * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a message boards discussion 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.MBDiscussion findByPrimaryKey( 183 long discussionId) 184 throws com.liferay.portal.kernel.exception.SystemException, 185 com.liferay.portlet.messageboards.NoSuchDiscussionException { 186 return getPersistence().findByPrimaryKey(discussionId); 187 } 188 189 /** 190 * Returns the message boards discussion with the primary key or returns <code>null</code> if it could not be found. 191 * 192 * @param discussionId the primary key of the message boards discussion 193 * @return the message boards discussion, or <code>null</code> if a message boards discussion 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.MBDiscussion fetchByPrimaryKey( 197 long discussionId) 198 throws com.liferay.portal.kernel.exception.SystemException { 199 return getPersistence().fetchByPrimaryKey(discussionId); 200 } 201 202 /** 203 * Returns all the message boards discussions where classNameId = ?. 204 * 205 * @param classNameId the class name ID 206 * @return the matching message boards discussions 207 * @throws SystemException if a system exception occurred 208 */ 209 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId( 210 long classNameId) 211 throws com.liferay.portal.kernel.exception.SystemException { 212 return getPersistence().findByClassNameId(classNameId); 213 } 214 215 /** 216 * Returns a range of all the message boards discussions where classNameId = ?. 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 classNameId the class name ID 223 * @param start the lower bound of the range of message boards discussions 224 * @param end the upper bound of the range of message boards discussions (not inclusive) 225 * @return the range of matching message boards discussions 226 * @throws SystemException if a system exception occurred 227 */ 228 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId( 229 long classNameId, int start, int end) 230 throws com.liferay.portal.kernel.exception.SystemException { 231 return getPersistence().findByClassNameId(classNameId, start, end); 232 } 233 234 /** 235 * Returns an ordered range of all the message boards discussions where classNameId = ?. 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 classNameId the class name ID 242 * @param start the lower bound of the range of message boards discussions 243 * @param end the upper bound of the range of message boards discussions (not inclusive) 244 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 245 * @return the ordered range of matching message boards discussions 246 * @throws SystemException if a system exception occurred 247 */ 248 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findByClassNameId( 249 long classNameId, int start, int end, 250 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 251 throws com.liferay.portal.kernel.exception.SystemException { 252 return getPersistence() 253 .findByClassNameId(classNameId, start, end, orderByComparator); 254 } 255 256 /** 257 * Returns the first message boards discussion in the ordered set where classNameId = ?. 258 * 259 * <p> 260 * 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. 261 * </p> 262 * 263 * @param classNameId the class name ID 264 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 265 * @return the first matching message boards discussion 266 * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found 267 * @throws SystemException if a system exception occurred 268 */ 269 public static com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_First( 270 long classNameId, 271 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 272 throws com.liferay.portal.kernel.exception.SystemException, 273 com.liferay.portlet.messageboards.NoSuchDiscussionException { 274 return getPersistence() 275 .findByClassNameId_First(classNameId, orderByComparator); 276 } 277 278 /** 279 * Returns the last message boards discussion in the ordered set where classNameId = ?. 280 * 281 * <p> 282 * 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. 283 * </p> 284 * 285 * @param classNameId the class name ID 286 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 287 * @return the last matching message boards discussion 288 * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found 289 * @throws SystemException if a system exception occurred 290 */ 291 public static com.liferay.portlet.messageboards.model.MBDiscussion findByClassNameId_Last( 292 long classNameId, 293 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 294 throws com.liferay.portal.kernel.exception.SystemException, 295 com.liferay.portlet.messageboards.NoSuchDiscussionException { 296 return getPersistence() 297 .findByClassNameId_Last(classNameId, orderByComparator); 298 } 299 300 /** 301 * Returns the message boards discussions before and after the current message boards discussion in the ordered set where classNameId = ?. 302 * 303 * <p> 304 * 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. 305 * </p> 306 * 307 * @param discussionId the primary key of the current message boards discussion 308 * @param classNameId the class name ID 309 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 310 * @return the previous, current, and next message boards discussion 311 * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a message boards discussion with the primary key could not be found 312 * @throws SystemException if a system exception occurred 313 */ 314 public static com.liferay.portlet.messageboards.model.MBDiscussion[] findByClassNameId_PrevAndNext( 315 long discussionId, long classNameId, 316 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 317 throws com.liferay.portal.kernel.exception.SystemException, 318 com.liferay.portlet.messageboards.NoSuchDiscussionException { 319 return getPersistence() 320 .findByClassNameId_PrevAndNext(discussionId, classNameId, 321 orderByComparator); 322 } 323 324 /** 325 * Returns the message boards discussion where threadId = ? or throws a {@link com.liferay.portlet.messageboards.NoSuchDiscussionException} if it could not be found. 326 * 327 * @param threadId the thread ID 328 * @return the matching message boards discussion 329 * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found 330 * @throws SystemException if a system exception occurred 331 */ 332 public static com.liferay.portlet.messageboards.model.MBDiscussion findByThreadId( 333 long threadId) 334 throws com.liferay.portal.kernel.exception.SystemException, 335 com.liferay.portlet.messageboards.NoSuchDiscussionException { 336 return getPersistence().findByThreadId(threadId); 337 } 338 339 /** 340 * Returns the message boards discussion where threadId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 341 * 342 * @param threadId the thread ID 343 * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 344 * @throws SystemException if a system exception occurred 345 */ 346 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId( 347 long threadId) 348 throws com.liferay.portal.kernel.exception.SystemException { 349 return getPersistence().fetchByThreadId(threadId); 350 } 351 352 /** 353 * Returns the message boards discussion where threadId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 354 * 355 * @param threadId the thread ID 356 * @param retrieveFromCache whether to use the finder cache 357 * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 358 * @throws SystemException if a system exception occurred 359 */ 360 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByThreadId( 361 long threadId, boolean retrieveFromCache) 362 throws com.liferay.portal.kernel.exception.SystemException { 363 return getPersistence().fetchByThreadId(threadId, retrieveFromCache); 364 } 365 366 /** 367 * Returns the message boards discussion where classNameId = ? and classPK = ? or throws a {@link com.liferay.portlet.messageboards.NoSuchDiscussionException} if it could not be found. 368 * 369 * @param classNameId the class name ID 370 * @param classPK the class p k 371 * @return the matching message boards discussion 372 * @throws com.liferay.portlet.messageboards.NoSuchDiscussionException if a matching message boards discussion could not be found 373 * @throws SystemException if a system exception occurred 374 */ 375 public static com.liferay.portlet.messageboards.model.MBDiscussion findByC_C( 376 long classNameId, long classPK) 377 throws com.liferay.portal.kernel.exception.SystemException, 378 com.liferay.portlet.messageboards.NoSuchDiscussionException { 379 return getPersistence().findByC_C(classNameId, classPK); 380 } 381 382 /** 383 * Returns the message boards discussion where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 384 * 385 * @param classNameId the class name ID 386 * @param classPK the class p k 387 * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 388 * @throws SystemException if a system exception occurred 389 */ 390 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C( 391 long classNameId, long classPK) 392 throws com.liferay.portal.kernel.exception.SystemException { 393 return getPersistence().fetchByC_C(classNameId, classPK); 394 } 395 396 /** 397 * Returns the message boards discussion where classNameId = ? and classPK = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 398 * 399 * @param classNameId the class name ID 400 * @param classPK the class p k 401 * @param retrieveFromCache whether to use the finder cache 402 * @return the matching message boards discussion, or <code>null</code> if a matching message boards discussion could not be found 403 * @throws SystemException if a system exception occurred 404 */ 405 public static com.liferay.portlet.messageboards.model.MBDiscussion fetchByC_C( 406 long classNameId, long classPK, boolean retrieveFromCache) 407 throws com.liferay.portal.kernel.exception.SystemException { 408 return getPersistence() 409 .fetchByC_C(classNameId, classPK, retrieveFromCache); 410 } 411 412 /** 413 * Returns all the message boards discussions. 414 * 415 * @return the message boards discussions 416 * @throws SystemException if a system exception occurred 417 */ 418 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll() 419 throws com.liferay.portal.kernel.exception.SystemException { 420 return getPersistence().findAll(); 421 } 422 423 /** 424 * Returns a range of all the message boards discussions. 425 * 426 * <p> 427 * 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. 428 * </p> 429 * 430 * @param start the lower bound of the range of message boards discussions 431 * @param end the upper bound of the range of message boards discussions (not inclusive) 432 * @return the range of message boards discussions 433 * @throws SystemException if a system exception occurred 434 */ 435 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll( 436 int start, int end) 437 throws com.liferay.portal.kernel.exception.SystemException { 438 return getPersistence().findAll(start, end); 439 } 440 441 /** 442 * Returns an ordered range of all the message boards discussions. 443 * 444 * <p> 445 * 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. 446 * </p> 447 * 448 * @param start the lower bound of the range of message boards discussions 449 * @param end the upper bound of the range of message boards discussions (not inclusive) 450 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 451 * @return the ordered range of message boards discussions 452 * @throws SystemException if a system exception occurred 453 */ 454 public static java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> findAll( 455 int start, int end, 456 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 457 throws com.liferay.portal.kernel.exception.SystemException { 458 return getPersistence().findAll(start, end, orderByComparator); 459 } 460 461 /** 462 * Removes all the message boards discussions where classNameId = ? from the database. 463 * 464 * @param classNameId the class name ID 465 * @throws SystemException if a system exception occurred 466 */ 467 public static void removeByClassNameId(long classNameId) 468 throws com.liferay.portal.kernel.exception.SystemException { 469 getPersistence().removeByClassNameId(classNameId); 470 } 471 472 /** 473 * Removes the message boards discussion where threadId = ? from the database. 474 * 475 * @param threadId the thread ID 476 * @throws SystemException if a system exception occurred 477 */ 478 public static void removeByThreadId(long threadId) 479 throws com.liferay.portal.kernel.exception.SystemException, 480 com.liferay.portlet.messageboards.NoSuchDiscussionException { 481 getPersistence().removeByThreadId(threadId); 482 } 483 484 /** 485 * Removes the message boards discussion where classNameId = ? and classPK = ? from the database. 486 * 487 * @param classNameId the class name ID 488 * @param classPK the class p k 489 * @throws SystemException if a system exception occurred 490 */ 491 public static void removeByC_C(long classNameId, long classPK) 492 throws com.liferay.portal.kernel.exception.SystemException, 493 com.liferay.portlet.messageboards.NoSuchDiscussionException { 494 getPersistence().removeByC_C(classNameId, classPK); 495 } 496 497 /** 498 * Removes all the message boards discussions from the database. 499 * 500 * @throws SystemException if a system exception occurred 501 */ 502 public static void removeAll() 503 throws com.liferay.portal.kernel.exception.SystemException { 504 getPersistence().removeAll(); 505 } 506 507 /** 508 * Returns the number of message boards discussions where classNameId = ?. 509 * 510 * @param classNameId the class name ID 511 * @return the number of matching message boards discussions 512 * @throws SystemException if a system exception occurred 513 */ 514 public static int countByClassNameId(long classNameId) 515 throws com.liferay.portal.kernel.exception.SystemException { 516 return getPersistence().countByClassNameId(classNameId); 517 } 518 519 /** 520 * Returns the number of message boards discussions where threadId = ?. 521 * 522 * @param threadId the thread ID 523 * @return the number of matching message boards discussions 524 * @throws SystemException if a system exception occurred 525 */ 526 public static int countByThreadId(long threadId) 527 throws com.liferay.portal.kernel.exception.SystemException { 528 return getPersistence().countByThreadId(threadId); 529 } 530 531 /** 532 * Returns the number of message boards discussions where classNameId = ? and classPK = ?. 533 * 534 * @param classNameId the class name ID 535 * @param classPK the class p k 536 * @return the number of matching message boards discussions 537 * @throws SystemException if a system exception occurred 538 */ 539 public static int countByC_C(long classNameId, long classPK) 540 throws com.liferay.portal.kernel.exception.SystemException { 541 return getPersistence().countByC_C(classNameId, classPK); 542 } 543 544 /** 545 * Returns the number of message boards discussions. 546 * 547 * @return the number of message boards discussions 548 * @throws SystemException if a system exception occurred 549 */ 550 public static int countAll() 551 throws com.liferay.portal.kernel.exception.SystemException { 552 return getPersistence().countAll(); 553 } 554 555 public static MBDiscussionPersistence getPersistence() { 556 if (_persistence == null) { 557 _persistence = (MBDiscussionPersistence)PortalBeanLocatorUtil.locate(MBDiscussionPersistence.class.getName()); 558 559 ReferenceRegistry.registerReference(MBDiscussionUtil.class, 560 "_persistence"); 561 } 562 563 return _persistence; 564 } 565 566 public void setPersistence(MBDiscussionPersistence persistence) { 567 _persistence = persistence; 568 569 ReferenceRegistry.registerReference(MBDiscussionUtil.class, 570 "_persistence"); 571 } 572 573 private static MBDiscussionPersistence _persistence; 574 }