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