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.service.persistence.BasePersistence; 018 019 import com.liferay.portlet.messageboards.model.MBThreadFlag; 020 021 /** 022 * The persistence interface for the message boards thread flag service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see MBThreadFlagPersistenceImpl 030 * @see MBThreadFlagUtil 031 * @generated 032 */ 033 public interface MBThreadFlagPersistence extends BasePersistence<MBThreadFlag> { 034 /* 035 * NOTE FOR DEVELOPERS: 036 * 037 * Never modify or reference this interface directly. Always use {@link MBThreadFlagUtil} to access the message boards thread flag persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 038 */ 039 040 /** 041 * Caches the message boards thread flag in the entity cache if it is enabled. 042 * 043 * @param mbThreadFlag the message boards thread flag 044 */ 045 public void cacheResult( 046 com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag); 047 048 /** 049 * Caches the message boards thread flags in the entity cache if it is enabled. 050 * 051 * @param mbThreadFlags the message boards thread flags 052 */ 053 public void cacheResult( 054 java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> mbThreadFlags); 055 056 /** 057 * Creates a new message boards thread flag with the primary key. Does not add the message boards thread flag to the database. 058 * 059 * @param threadFlagId the primary key for the new message boards thread flag 060 * @return the new message boards thread flag 061 */ 062 public com.liferay.portlet.messageboards.model.MBThreadFlag create( 063 long threadFlagId); 064 065 /** 066 * Removes the message boards thread flag with the primary key from the database. Also notifies the appropriate model listeners. 067 * 068 * @param threadFlagId the primary key of the message boards thread flag 069 * @return the message boards thread flag that was removed 070 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found 071 * @throws SystemException if a system exception occurred 072 */ 073 public com.liferay.portlet.messageboards.model.MBThreadFlag remove( 074 long threadFlagId) 075 throws com.liferay.portal.kernel.exception.SystemException, 076 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 077 078 public com.liferay.portlet.messageboards.model.MBThreadFlag updateImpl( 079 com.liferay.portlet.messageboards.model.MBThreadFlag mbThreadFlag) 080 throws com.liferay.portal.kernel.exception.SystemException; 081 082 /** 083 * 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. 084 * 085 * @param threadFlagId the primary key of the message boards thread flag 086 * @return the message boards thread flag 087 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found 088 * @throws SystemException if a system exception occurred 089 */ 090 public com.liferay.portlet.messageboards.model.MBThreadFlag findByPrimaryKey( 091 long threadFlagId) 092 throws com.liferay.portal.kernel.exception.SystemException, 093 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 094 095 /** 096 * Returns the message boards thread flag with the primary key or returns <code>null</code> if it could not be found. 097 * 098 * @param threadFlagId the primary key of the message boards thread flag 099 * @return the message boards thread flag, or <code>null</code> if a message boards thread flag with the primary key could not be found 100 * @throws SystemException if a system exception occurred 101 */ 102 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByPrimaryKey( 103 long threadFlagId) 104 throws com.liferay.portal.kernel.exception.SystemException; 105 106 /** 107 * Returns all the message boards thread flags where userId = ?. 108 * 109 * @param userId the user ID 110 * @return the matching message boards thread flags 111 * @throws SystemException if a system exception occurred 112 */ 113 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId( 114 long userId) throws com.liferay.portal.kernel.exception.SystemException; 115 116 /** 117 * Returns a range of all the message boards thread flags where userId = ?. 118 * 119 * <p> 120 * 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. 121 * </p> 122 * 123 * @param userId the user ID 124 * @param start the lower bound of the range of message boards thread flags 125 * @param end the upper bound of the range of message boards thread flags (not inclusive) 126 * @return the range of matching message boards thread flags 127 * @throws SystemException if a system exception occurred 128 */ 129 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId( 130 long userId, int start, int end) 131 throws com.liferay.portal.kernel.exception.SystemException; 132 133 /** 134 * Returns an ordered range of all the message boards thread flags where userId = ?. 135 * 136 * <p> 137 * 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. 138 * </p> 139 * 140 * @param userId the user ID 141 * @param start the lower bound of the range of message boards thread flags 142 * @param end the upper bound of the range of message boards thread flags (not inclusive) 143 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 144 * @return the ordered range of matching message boards thread flags 145 * @throws SystemException if a system exception occurred 146 */ 147 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId( 148 long userId, int start, int end, 149 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 150 throws com.liferay.portal.kernel.exception.SystemException; 151 152 /** 153 * Returns the first message boards thread flag in the ordered set where userId = ?. 154 * 155 * @param userId the user ID 156 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 157 * @return the first matching message boards thread flag 158 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 159 * @throws SystemException if a system exception occurred 160 */ 161 public com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_First( 162 long userId, 163 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 164 throws com.liferay.portal.kernel.exception.SystemException, 165 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 166 167 /** 168 * Returns the first message boards thread flag in the ordered set where userId = ?. 169 * 170 * @param userId the user ID 171 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 172 * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found 173 * @throws SystemException if a system exception occurred 174 */ 175 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUserId_First( 176 long userId, 177 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 178 throws com.liferay.portal.kernel.exception.SystemException; 179 180 /** 181 * Returns the last message boards thread flag in the ordered set where userId = ?. 182 * 183 * @param userId the user ID 184 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 185 * @return the last matching message boards thread flag 186 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 187 * @throws SystemException if a system exception occurred 188 */ 189 public com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_Last( 190 long userId, 191 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 192 throws com.liferay.portal.kernel.exception.SystemException, 193 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 194 195 /** 196 * Returns the last message boards thread flag in the ordered set where userId = ?. 197 * 198 * @param userId the user ID 199 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 200 * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found 201 * @throws SystemException if a system exception occurred 202 */ 203 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByUserId_Last( 204 long userId, 205 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 206 throws com.liferay.portal.kernel.exception.SystemException; 207 208 /** 209 * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where userId = ?. 210 * 211 * @param threadFlagId the primary key of the current message boards thread flag 212 * @param userId the user ID 213 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 214 * @return the previous, current, and next message boards thread flag 215 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found 216 * @throws SystemException if a system exception occurred 217 */ 218 public com.liferay.portlet.messageboards.model.MBThreadFlag[] findByUserId_PrevAndNext( 219 long threadFlagId, long userId, 220 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 221 throws com.liferay.portal.kernel.exception.SystemException, 222 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 223 224 /** 225 * Returns all the message boards thread flags where threadId = ?. 226 * 227 * @param threadId the thread ID 228 * @return the matching message boards thread flags 229 * @throws SystemException if a system exception occurred 230 */ 231 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId( 232 long threadId) 233 throws com.liferay.portal.kernel.exception.SystemException; 234 235 /** 236 * Returns a range of all the message boards thread flags where threadId = ?. 237 * 238 * <p> 239 * 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. 240 * </p> 241 * 242 * @param threadId the thread ID 243 * @param start the lower bound of the range of message boards thread flags 244 * @param end the upper bound of the range of message boards thread flags (not inclusive) 245 * @return the range of matching message boards thread flags 246 * @throws SystemException if a system exception occurred 247 */ 248 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId( 249 long threadId, int start, int end) 250 throws com.liferay.portal.kernel.exception.SystemException; 251 252 /** 253 * Returns an ordered range of all the message boards thread flags where threadId = ?. 254 * 255 * <p> 256 * 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. 257 * </p> 258 * 259 * @param threadId the thread ID 260 * @param start the lower bound of the range of message boards thread flags 261 * @param end the upper bound of the range of message boards thread flags (not inclusive) 262 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 263 * @return the ordered range of matching message boards thread flags 264 * @throws SystemException if a system exception occurred 265 */ 266 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId( 267 long threadId, int start, int end, 268 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 269 throws com.liferay.portal.kernel.exception.SystemException; 270 271 /** 272 * Returns the first message boards thread flag in the ordered set where threadId = ?. 273 * 274 * @param threadId the thread ID 275 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 276 * @return the first matching message boards thread flag 277 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 278 * @throws SystemException if a system exception occurred 279 */ 280 public com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_First( 281 long threadId, 282 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 283 throws com.liferay.portal.kernel.exception.SystemException, 284 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 285 286 /** 287 * Returns the first message boards thread flag in the ordered set where threadId = ?. 288 * 289 * @param threadId the thread ID 290 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 291 * @return the first matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found 292 * @throws SystemException if a system exception occurred 293 */ 294 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByThreadId_First( 295 long threadId, 296 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 297 throws com.liferay.portal.kernel.exception.SystemException; 298 299 /** 300 * Returns the last message boards thread flag in the ordered set where threadId = ?. 301 * 302 * @param threadId the thread ID 303 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 304 * @return the last matching message boards thread flag 305 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 306 * @throws SystemException if a system exception occurred 307 */ 308 public com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_Last( 309 long threadId, 310 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 311 throws com.liferay.portal.kernel.exception.SystemException, 312 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 313 314 /** 315 * Returns the last message boards thread flag in the ordered set where threadId = ?. 316 * 317 * @param threadId the thread ID 318 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 319 * @return the last matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found 320 * @throws SystemException if a system exception occurred 321 */ 322 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByThreadId_Last( 323 long threadId, 324 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 325 throws com.liferay.portal.kernel.exception.SystemException; 326 327 /** 328 * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where threadId = ?. 329 * 330 * @param threadFlagId the primary key of the current message boards thread flag 331 * @param threadId the thread ID 332 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 333 * @return the previous, current, and next message boards thread flag 334 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found 335 * @throws SystemException if a system exception occurred 336 */ 337 public com.liferay.portlet.messageboards.model.MBThreadFlag[] findByThreadId_PrevAndNext( 338 long threadFlagId, long threadId, 339 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 340 throws com.liferay.portal.kernel.exception.SystemException, 341 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 342 343 /** 344 * 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. 345 * 346 * @param userId the user ID 347 * @param threadId the thread ID 348 * @return the matching message boards thread flag 349 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 350 * @throws SystemException if a system exception occurred 351 */ 352 public com.liferay.portlet.messageboards.model.MBThreadFlag findByU_T( 353 long userId, long threadId) 354 throws com.liferay.portal.kernel.exception.SystemException, 355 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 356 357 /** 358 * 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. 359 * 360 * @param userId the user ID 361 * @param threadId the thread ID 362 * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found 363 * @throws SystemException if a system exception occurred 364 */ 365 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T( 366 long userId, long threadId) 367 throws com.liferay.portal.kernel.exception.SystemException; 368 369 /** 370 * 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. 371 * 372 * @param userId the user ID 373 * @param threadId the thread ID 374 * @param retrieveFromCache whether to use the finder cache 375 * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found 376 * @throws SystemException if a system exception occurred 377 */ 378 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T( 379 long userId, long threadId, boolean retrieveFromCache) 380 throws com.liferay.portal.kernel.exception.SystemException; 381 382 /** 383 * Returns all the message boards thread flags. 384 * 385 * @return the message boards thread flags 386 * @throws SystemException if a system exception occurred 387 */ 388 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll() 389 throws com.liferay.portal.kernel.exception.SystemException; 390 391 /** 392 * Returns a range of all the message boards thread flags. 393 * 394 * <p> 395 * 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. 396 * </p> 397 * 398 * @param start the lower bound of the range of message boards thread flags 399 * @param end the upper bound of the range of message boards thread flags (not inclusive) 400 * @return the range of message boards thread flags 401 * @throws SystemException if a system exception occurred 402 */ 403 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll( 404 int start, int end) 405 throws com.liferay.portal.kernel.exception.SystemException; 406 407 /** 408 * Returns an ordered range of all the message boards thread flags. 409 * 410 * <p> 411 * 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. 412 * </p> 413 * 414 * @param start the lower bound of the range of message boards thread flags 415 * @param end the upper bound of the range of message boards thread flags (not inclusive) 416 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 417 * @return the ordered range of message boards thread flags 418 * @throws SystemException if a system exception occurred 419 */ 420 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll( 421 int start, int end, 422 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 423 throws com.liferay.portal.kernel.exception.SystemException; 424 425 /** 426 * Removes all the message boards thread flags where userId = ? from the database. 427 * 428 * @param userId the user ID 429 * @throws SystemException if a system exception occurred 430 */ 431 public void removeByUserId(long userId) 432 throws com.liferay.portal.kernel.exception.SystemException; 433 434 /** 435 * Removes all the message boards thread flags where threadId = ? from the database. 436 * 437 * @param threadId the thread ID 438 * @throws SystemException if a system exception occurred 439 */ 440 public void removeByThreadId(long threadId) 441 throws com.liferay.portal.kernel.exception.SystemException; 442 443 /** 444 * Removes the message boards thread flag where userId = ? and threadId = ? from the database. 445 * 446 * @param userId the user ID 447 * @param threadId the thread ID 448 * @return the message boards thread flag that was removed 449 * @throws SystemException if a system exception occurred 450 */ 451 public com.liferay.portlet.messageboards.model.MBThreadFlag removeByU_T( 452 long userId, long threadId) 453 throws com.liferay.portal.kernel.exception.SystemException, 454 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 455 456 /** 457 * Removes all the message boards thread flags from the database. 458 * 459 * @throws SystemException if a system exception occurred 460 */ 461 public void removeAll() 462 throws com.liferay.portal.kernel.exception.SystemException; 463 464 /** 465 * Returns the number of message boards thread flags where userId = ?. 466 * 467 * @param userId the user ID 468 * @return the number of matching message boards thread flags 469 * @throws SystemException if a system exception occurred 470 */ 471 public int countByUserId(long userId) 472 throws com.liferay.portal.kernel.exception.SystemException; 473 474 /** 475 * Returns the number of message boards thread flags where threadId = ?. 476 * 477 * @param threadId the thread ID 478 * @return the number of matching message boards thread flags 479 * @throws SystemException if a system exception occurred 480 */ 481 public int countByThreadId(long threadId) 482 throws com.liferay.portal.kernel.exception.SystemException; 483 484 /** 485 * Returns the number of message boards thread flags where userId = ? and threadId = ?. 486 * 487 * @param userId the user ID 488 * @param threadId the thread ID 489 * @return the number of matching message boards thread flags 490 * @throws SystemException if a system exception occurred 491 */ 492 public int countByU_T(long userId, long threadId) 493 throws com.liferay.portal.kernel.exception.SystemException; 494 495 /** 496 * Returns the number of message boards thread flags. 497 * 498 * @return the number of message boards thread flags 499 * @throws SystemException if a system exception occurred 500 */ 501 public int countAll() 502 throws com.liferay.portal.kernel.exception.SystemException; 503 }