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.MBThreadFlag; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the message boards thread flag service. This utility wraps {@link MBThreadFlagPersistenceImpl} 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 MBThreadFlagPersistence 037 * @see MBThreadFlagPersistenceImpl 038 * @generated 039 */ 040 public class MBThreadFlagUtil { 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(MBThreadFlag mbThreadFlag) { 058 getPersistence().clearCache(mbThreadFlag); 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<MBThreadFlag> 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<MBThreadFlag> 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<MBThreadFlag> 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 MBThreadFlag remove(MBThreadFlag mbThreadFlag) 101 throws SystemException { 102 return getPersistence().remove(mbThreadFlag); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 107 */ 108 public static MBThreadFlag update(MBThreadFlag mbThreadFlag, boolean merge) 109 throws SystemException { 110 return getPersistence().update(mbThreadFlag, merge); 111 } 112 113 /** 114 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 115 */ 116 public static MBThreadFlag update(MBThreadFlag mbThreadFlag, boolean merge, 117 ServiceContext serviceContext) throws SystemException { 118 return getPersistence().update(mbThreadFlag, merge, serviceContext); 119 } 120 121 /** 122 * Caches the message boards thread flag in the entity cache if it is enabled. 123 * 124 * @param mbThreadFlag the message boards thread flag 125 */ 126 public static void cacheResult( 127 com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag) { 128 getPersistence().cacheResult(mbThreadFlag); 129 } 130 131 /** 132 * Caches the message boards thread flags in the entity cache if it is enabled. 133 * 134 * @param mbThreadFlags the message boards thread flags 135 */ 136 public static void cacheResult( 137 java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> mbThreadFlags) { 138 getPersistence().cacheResult(mbThreadFlags); 139 } 140 141 /** 142 * Creates a new message boards thread flag with the primary key. Does not add the message boards thread flag to the database. 143 * 144 * @param threadFlagId the primary key for the new message boards thread flag 145 * @return the new message boards thread flag 146 */ 147 public static com.liferay.portlet.messageboards.model.MBThreadFlag create( 148 long threadFlagId) { 149 return getPersistence().create(threadFlagId); 150 } 151 152 /** 153 * Removes the message boards thread flag with the primary key from the database. Also notifies the appropriate model listeners. 154 * 155 * @param threadFlagId the primary key of the message boards thread flag 156 * @return the message boards thread flag that was removed 157 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag 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.MBThreadFlag remove( 161 long threadFlagId) 162 throws com.liferay.portal.kernel.exception.SystemException, 163 com.liferay.portlet.messageboards.NoSuchThreadFlagException { 164 return getPersistence().remove(threadFlagId); 165 } 166 167 public static com.liferay.portlet.messageboards.model.MBThreadFlag updateImpl( 168 com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag, 169 boolean merge) 170 throws com.liferay.portal.kernel.exception.SystemException { 171 return getPersistence().updateImpl(mbThreadFlag, merge); 172 } 173 174 /** 175 * Returns the message boards thread flag with the primary key or throws a {@link com.liferay.portlet.messageboards.NoSuchThreadFlagException} if it could not be found. 176 * 177 * @param threadFlagId the primary key of the message boards thread flag 178 * @return the message boards thread flag 179 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag 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.MBThreadFlag findByPrimaryKey( 183 long threadFlagId) 184 throws com.liferay.portal.kernel.exception.SystemException, 185 com.liferay.portlet.messageboards.NoSuchThreadFlagException { 186 return getPersistence().findByPrimaryKey(threadFlagId); 187 } 188 189 /** 190 * Returns the message boards thread flag with the primary key or returns <code>null</code> if it could not be found. 191 * 192 * @param threadFlagId the primary key of the message boards thread flag 193 * @return the message boards thread flag, or <code>null</code> if a message boards thread flag 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.MBThreadFlag fetchByPrimaryKey( 197 long threadFlagId) 198 throws com.liferay.portal.kernel.exception.SystemException { 199 return getPersistence().fetchByPrimaryKey(threadFlagId); 200 } 201 202 /** 203 * Returns all the message boards thread flags where userId = ?. 204 * 205 * @param userId the user ID 206 * @return the matching message boards thread flags 207 * @throws SystemException if a system exception occurred 208 */ 209 public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId( 210 long userId) throws com.liferay.portal.kernel.exception.SystemException { 211 return getPersistence().findByUserId(userId); 212 } 213 214 /** 215 * Returns a range of all the message boards thread flags where userId = ?. 216 * 217 * <p> 218 * 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. 219 * </p> 220 * 221 * @param userId the user ID 222 * @param start the lower bound of the range of message boards thread flags 223 * @param end the upper bound of the range of message boards thread flags (not inclusive) 224 * @return the range of matching message boards thread flags 225 * @throws SystemException if a system exception occurred 226 */ 227 public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId( 228 long userId, int start, int end) 229 throws com.liferay.portal.kernel.exception.SystemException { 230 return getPersistence().findByUserId(userId, start, end); 231 } 232 233 /** 234 * Returns an ordered range of all the message boards thread flags where userId = ?. 235 * 236 * <p> 237 * 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. 238 * </p> 239 * 240 * @param userId the user ID 241 * @param start the lower bound of the range of message boards thread flags 242 * @param end the upper bound of the range of message boards thread flags (not inclusive) 243 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 244 * @return the ordered range of matching message boards thread flags 245 * @throws SystemException if a system exception occurred 246 */ 247 public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId( 248 long userId, int start, int end, 249 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 250 throws com.liferay.portal.kernel.exception.SystemException { 251 return getPersistence() 252 .findByUserId(userId, start, end, orderByComparator); 253 } 254 255 /** 256 * Returns the first message boards thread flag in the ordered set where userId = ?. 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 userId the user ID 263 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 264 * @return the first matching message boards thread flag 265 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 266 * @throws SystemException if a system exception occurred 267 */ 268 public static com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_First( 269 long userId, 270 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 271 throws com.liferay.portal.kernel.exception.SystemException, 272 com.liferay.portlet.messageboards.NoSuchThreadFlagException { 273 return getPersistence().findByUserId_First(userId, orderByComparator); 274 } 275 276 /** 277 * Returns the last message boards thread flag in the ordered set where userId = ?. 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 userId the user ID 284 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 285 * @return the last matching message boards thread flag 286 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 287 * @throws SystemException if a system exception occurred 288 */ 289 public static com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_Last( 290 long userId, 291 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 292 throws com.liferay.portal.kernel.exception.SystemException, 293 com.liferay.portlet.messageboards.NoSuchThreadFlagException { 294 return getPersistence().findByUserId_Last(userId, orderByComparator); 295 } 296 297 /** 298 * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where userId = ?. 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 threadFlagId the primary key of the current message boards thread flag 305 * @param userId the user ID 306 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 307 * @return the previous, current, and next message boards thread flag 308 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag 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.MBThreadFlag[] findByUserId_PrevAndNext( 312 long threadFlagId, long userId, 313 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 314 throws com.liferay.portal.kernel.exception.SystemException, 315 com.liferay.portlet.messageboards.NoSuchThreadFlagException { 316 return getPersistence() 317 .findByUserId_PrevAndNext(threadFlagId, userId, 318 orderByComparator); 319 } 320 321 /** 322 * Returns all the message boards thread flags where threadId = ?. 323 * 324 * @param threadId the thread ID 325 * @return the matching message boards thread flags 326 * @throws SystemException if a system exception occurred 327 */ 328 public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId( 329 long threadId) 330 throws com.liferay.portal.kernel.exception.SystemException { 331 return getPersistence().findByThreadId(threadId); 332 } 333 334 /** 335 * Returns a range of all the message boards thread flags where threadId = ?. 336 * 337 * <p> 338 * 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. 339 * </p> 340 * 341 * @param threadId the thread ID 342 * @param start the lower bound of the range of message boards thread flags 343 * @param end the upper bound of the range of message boards thread flags (not inclusive) 344 * @return the range of matching message boards thread flags 345 * @throws SystemException if a system exception occurred 346 */ 347 public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId( 348 long threadId, int start, int end) 349 throws com.liferay.portal.kernel.exception.SystemException { 350 return getPersistence().findByThreadId(threadId, start, end); 351 } 352 353 /** 354 * Returns an ordered range of all the message boards thread flags where threadId = ?. 355 * 356 * <p> 357 * 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. 358 * </p> 359 * 360 * @param threadId the thread ID 361 * @param start the lower bound of the range of message boards thread flags 362 * @param end the upper bound of the range of message boards thread flags (not inclusive) 363 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 364 * @return the ordered range of matching message boards thread flags 365 * @throws SystemException if a system exception occurred 366 */ 367 public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId( 368 long threadId, int start, int end, 369 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 370 throws com.liferay.portal.kernel.exception.SystemException { 371 return getPersistence() 372 .findByThreadId(threadId, start, end, orderByComparator); 373 } 374 375 /** 376 * Returns the first message boards thread flag in the ordered set where threadId = ?. 377 * 378 * <p> 379 * 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. 380 * </p> 381 * 382 * @param threadId the thread ID 383 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 384 * @return the first matching message boards thread flag 385 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 386 * @throws SystemException if a system exception occurred 387 */ 388 public static com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_First( 389 long threadId, 390 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 391 throws com.liferay.portal.kernel.exception.SystemException, 392 com.liferay.portlet.messageboards.NoSuchThreadFlagException { 393 return getPersistence().findByThreadId_First(threadId, orderByComparator); 394 } 395 396 /** 397 * Returns the last message boards thread flag in the ordered set where threadId = ?. 398 * 399 * <p> 400 * 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. 401 * </p> 402 * 403 * @param threadId the thread ID 404 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 405 * @return the last matching message boards thread flag 406 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 407 * @throws SystemException if a system exception occurred 408 */ 409 public static com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_Last( 410 long threadId, 411 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 412 throws com.liferay.portal.kernel.exception.SystemException, 413 com.liferay.portlet.messageboards.NoSuchThreadFlagException { 414 return getPersistence().findByThreadId_Last(threadId, orderByComparator); 415 } 416 417 /** 418 * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where threadId = ?. 419 * 420 * <p> 421 * 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. 422 * </p> 423 * 424 * @param threadFlagId the primary key of the current message boards thread flag 425 * @param threadId the thread ID 426 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 427 * @return the previous, current, and next message boards thread flag 428 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found 429 * @throws SystemException if a system exception occurred 430 */ 431 public static com.liferay.portlet.messageboards.model.MBThreadFlag[] findByThreadId_PrevAndNext( 432 long threadFlagId, long threadId, 433 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 434 throws com.liferay.portal.kernel.exception.SystemException, 435 com.liferay.portlet.messageboards.NoSuchThreadFlagException { 436 return getPersistence() 437 .findByThreadId_PrevAndNext(threadFlagId, threadId, 438 orderByComparator); 439 } 440 441 /** 442 * Returns the message boards thread flag where userId = ? and threadId = ? or throws a {@link com.liferay.portlet.messageboards.NoSuchThreadFlagException} if it could not be found. 443 * 444 * @param userId the user ID 445 * @param threadId the thread ID 446 * @return the matching message boards thread flag 447 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 448 * @throws SystemException if a system exception occurred 449 */ 450 public static com.liferay.portlet.messageboards.model.MBThreadFlag findByU_T( 451 long userId, long threadId) 452 throws com.liferay.portal.kernel.exception.SystemException, 453 com.liferay.portlet.messageboards.NoSuchThreadFlagException { 454 return getPersistence().findByU_T(userId, threadId); 455 } 456 457 /** 458 * Returns the message boards thread flag where userId = ? and threadId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 459 * 460 * @param userId the user ID 461 * @param threadId the thread ID 462 * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found 463 * @throws SystemException if a system exception occurred 464 */ 465 public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T( 466 long userId, long threadId) 467 throws com.liferay.portal.kernel.exception.SystemException { 468 return getPersistence().fetchByU_T(userId, threadId); 469 } 470 471 /** 472 * Returns the message boards thread flag where userId = ? and threadId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 473 * 474 * @param userId the user ID 475 * @param threadId the thread ID 476 * @param retrieveFromCache whether to use the finder cache 477 * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found 478 * @throws SystemException if a system exception occurred 479 */ 480 public static com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T( 481 long userId, long threadId, boolean retrieveFromCache) 482 throws com.liferay.portal.kernel.exception.SystemException { 483 return getPersistence().fetchByU_T(userId, threadId, retrieveFromCache); 484 } 485 486 /** 487 * Returns all the message boards thread flags. 488 * 489 * @return the message boards thread flags 490 * @throws SystemException if a system exception occurred 491 */ 492 public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll() 493 throws com.liferay.portal.kernel.exception.SystemException { 494 return getPersistence().findAll(); 495 } 496 497 /** 498 * Returns a range of all the message boards thread flags. 499 * 500 * <p> 501 * 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. 502 * </p> 503 * 504 * @param start the lower bound of the range of message boards thread flags 505 * @param end the upper bound of the range of message boards thread flags (not inclusive) 506 * @return the range of message boards thread flags 507 * @throws SystemException if a system exception occurred 508 */ 509 public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll( 510 int start, int end) 511 throws com.liferay.portal.kernel.exception.SystemException { 512 return getPersistence().findAll(start, end); 513 } 514 515 /** 516 * Returns an ordered range of all the message boards thread flags. 517 * 518 * <p> 519 * 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. 520 * </p> 521 * 522 * @param start the lower bound of the range of message boards thread flags 523 * @param end the upper bound of the range of message boards thread flags (not inclusive) 524 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 525 * @return the ordered range of message boards thread flags 526 * @throws SystemException if a system exception occurred 527 */ 528 public static java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll( 529 int start, int end, 530 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 531 throws com.liferay.portal.kernel.exception.SystemException { 532 return getPersistence().findAll(start, end, orderByComparator); 533 } 534 535 /** 536 * Removes all the message boards thread flags where userId = ? from the database. 537 * 538 * @param userId the user ID 539 * @throws SystemException if a system exception occurred 540 */ 541 public static void removeByUserId(long userId) 542 throws com.liferay.portal.kernel.exception.SystemException { 543 getPersistence().removeByUserId(userId); 544 } 545 546 /** 547 * Removes all the message boards thread flags where threadId = ? from the database. 548 * 549 * @param threadId the thread ID 550 * @throws SystemException if a system exception occurred 551 */ 552 public static void removeByThreadId(long threadId) 553 throws com.liferay.portal.kernel.exception.SystemException { 554 getPersistence().removeByThreadId(threadId); 555 } 556 557 /** 558 * Removes the message boards thread flag where userId = ? and threadId = ? from the database. 559 * 560 * @param userId the user ID 561 * @param threadId the thread ID 562 * @throws SystemException if a system exception occurred 563 */ 564 public static void removeByU_T(long userId, long threadId) 565 throws com.liferay.portal.kernel.exception.SystemException, 566 com.liferay.portlet.messageboards.NoSuchThreadFlagException { 567 getPersistence().removeByU_T(userId, threadId); 568 } 569 570 /** 571 * Removes all the message boards thread flags from the database. 572 * 573 * @throws SystemException if a system exception occurred 574 */ 575 public static void removeAll() 576 throws com.liferay.portal.kernel.exception.SystemException { 577 getPersistence().removeAll(); 578 } 579 580 /** 581 * Returns the number of message boards thread flags where userId = ?. 582 * 583 * @param userId the user ID 584 * @return the number of matching message boards thread flags 585 * @throws SystemException if a system exception occurred 586 */ 587 public static int countByUserId(long userId) 588 throws com.liferay.portal.kernel.exception.SystemException { 589 return getPersistence().countByUserId(userId); 590 } 591 592 /** 593 * Returns the number of message boards thread flags where threadId = ?. 594 * 595 * @param threadId the thread ID 596 * @return the number of matching message boards thread flags 597 * @throws SystemException if a system exception occurred 598 */ 599 public static int countByThreadId(long threadId) 600 throws com.liferay.portal.kernel.exception.SystemException { 601 return getPersistence().countByThreadId(threadId); 602 } 603 604 /** 605 * Returns the number of message boards thread flags where userId = ? and threadId = ?. 606 * 607 * @param userId the user ID 608 * @param threadId the thread ID 609 * @return the number of matching message boards thread flags 610 * @throws SystemException if a system exception occurred 611 */ 612 public static int countByU_T(long userId, long threadId) 613 throws com.liferay.portal.kernel.exception.SystemException { 614 return getPersistence().countByU_T(userId, threadId); 615 } 616 617 /** 618 * Returns the number of message boards thread flags. 619 * 620 * @return the number of message boards thread flags 621 * @throws SystemException if a system exception occurred 622 */ 623 public static int countAll() 624 throws com.liferay.portal.kernel.exception.SystemException { 625 return getPersistence().countAll(); 626 } 627 628 public static MBThreadFlagPersistence getPersistence() { 629 if (_persistence == null) { 630 _persistence = (MBThreadFlagPersistence)PortalBeanLocatorUtil.locate(MBThreadFlagPersistence.class.getName()); 631 632 ReferenceRegistry.registerReference(MBThreadFlagUtil.class, 633 "_persistence"); 634 } 635 636 return _persistence; 637 } 638 639 public void setPersistence(MBThreadFlagPersistence persistence) { 640 _persistence = persistence; 641 642 ReferenceRegistry.registerReference(MBThreadFlagUtil.class, 643 "_persistence"); 644 } 645 646 private static MBThreadFlagPersistence _persistence; 647 }