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 boolean merge) 081 throws com.liferay.portal.kernel.exception.SystemException; 082 083 /** 084 * 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. 085 * 086 * @param threadFlagId the primary key of the message boards thread flag 087 * @return the message boards thread flag 088 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found 089 * @throws SystemException if a system exception occurred 090 */ 091 public com.liferay.portlet.messageboards.model.MBThreadFlag findByPrimaryKey( 092 long threadFlagId) 093 throws com.liferay.portal.kernel.exception.SystemException, 094 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 095 096 /** 097 * Returns the message boards thread flag with the primary key or returns <code>null</code> if it could not be found. 098 * 099 * @param threadFlagId the primary key of the message boards thread flag 100 * @return the message boards thread flag, or <code>null</code> if a message boards thread flag with the primary key could not be found 101 * @throws SystemException if a system exception occurred 102 */ 103 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByPrimaryKey( 104 long threadFlagId) 105 throws com.liferay.portal.kernel.exception.SystemException; 106 107 /** 108 * Returns all the message boards thread flags where userId = ?. 109 * 110 * @param userId the user ID 111 * @return the matching message boards thread flags 112 * @throws SystemException if a system exception occurred 113 */ 114 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId( 115 long userId) throws com.liferay.portal.kernel.exception.SystemException; 116 117 /** 118 * Returns a range of all the message boards thread flags where userId = ?. 119 * 120 * <p> 121 * 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. 122 * </p> 123 * 124 * @param userId the user ID 125 * @param start the lower bound of the range of message boards thread flags 126 * @param end the upper bound of the range of message boards thread flags (not inclusive) 127 * @return the range of matching message boards thread flags 128 * @throws SystemException if a system exception occurred 129 */ 130 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId( 131 long userId, int start, int end) 132 throws com.liferay.portal.kernel.exception.SystemException; 133 134 /** 135 * Returns an ordered range of all the message boards thread flags where userId = ?. 136 * 137 * <p> 138 * 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. 139 * </p> 140 * 141 * @param userId the user ID 142 * @param start the lower bound of the range of message boards thread flags 143 * @param end the upper bound of the range of message boards thread flags (not inclusive) 144 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 145 * @return the ordered range of matching message boards thread flags 146 * @throws SystemException if a system exception occurred 147 */ 148 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByUserId( 149 long userId, int start, int end, 150 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 151 throws com.liferay.portal.kernel.exception.SystemException; 152 153 /** 154 * Returns the first message boards thread flag in the ordered set where userId = ?. 155 * 156 * <p> 157 * 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. 158 * </p> 159 * 160 * @param userId the user ID 161 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 162 * @return the first matching message boards thread flag 163 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 164 * @throws SystemException if a system exception occurred 165 */ 166 public com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_First( 167 long userId, 168 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 169 throws com.liferay.portal.kernel.exception.SystemException, 170 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 171 172 /** 173 * Returns the last message boards thread flag in the ordered set where userId = ?. 174 * 175 * <p> 176 * 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. 177 * </p> 178 * 179 * @param userId the user ID 180 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 181 * @return the last matching message boards thread flag 182 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public com.liferay.portlet.messageboards.model.MBThreadFlag findByUserId_Last( 186 long userId, 187 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 188 throws com.liferay.portal.kernel.exception.SystemException, 189 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 190 191 /** 192 * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where userId = ?. 193 * 194 * <p> 195 * 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. 196 * </p> 197 * 198 * @param threadFlagId the primary key of the current message boards thread flag 199 * @param userId the user ID 200 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 201 * @return the previous, current, and next message boards thread flag 202 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found 203 * @throws SystemException if a system exception occurred 204 */ 205 public com.liferay.portlet.messageboards.model.MBThreadFlag[] findByUserId_PrevAndNext( 206 long threadFlagId, long userId, 207 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 208 throws com.liferay.portal.kernel.exception.SystemException, 209 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 210 211 /** 212 * Returns all the message boards thread flags where threadId = ?. 213 * 214 * @param threadId the thread ID 215 * @return the matching message boards thread flags 216 * @throws SystemException if a system exception occurred 217 */ 218 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId( 219 long threadId) 220 throws com.liferay.portal.kernel.exception.SystemException; 221 222 /** 223 * Returns a range of all the message boards thread flags where threadId = ?. 224 * 225 * <p> 226 * 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. 227 * </p> 228 * 229 * @param threadId the thread ID 230 * @param start the lower bound of the range of message boards thread flags 231 * @param end the upper bound of the range of message boards thread flags (not inclusive) 232 * @return the range of matching message boards thread flags 233 * @throws SystemException if a system exception occurred 234 */ 235 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId( 236 long threadId, int start, int end) 237 throws com.liferay.portal.kernel.exception.SystemException; 238 239 /** 240 * Returns an ordered range of all the message boards thread flags where threadId = ?. 241 * 242 * <p> 243 * 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. 244 * </p> 245 * 246 * @param threadId the thread ID 247 * @param start the lower bound of the range of message boards thread flags 248 * @param end the upper bound of the range of message boards thread flags (not inclusive) 249 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 250 * @return the ordered range of matching message boards thread flags 251 * @throws SystemException if a system exception occurred 252 */ 253 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findByThreadId( 254 long threadId, int start, int end, 255 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 256 throws com.liferay.portal.kernel.exception.SystemException; 257 258 /** 259 * Returns the first message boards thread flag in the ordered set where threadId = ?. 260 * 261 * <p> 262 * 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. 263 * </p> 264 * 265 * @param threadId the thread ID 266 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 267 * @return the first matching message boards thread flag 268 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 269 * @throws SystemException if a system exception occurred 270 */ 271 public com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_First( 272 long threadId, 273 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 274 throws com.liferay.portal.kernel.exception.SystemException, 275 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 276 277 /** 278 * Returns the last message boards thread flag in the ordered set where threadId = ?. 279 * 280 * <p> 281 * 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. 282 * </p> 283 * 284 * @param threadId the thread ID 285 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 286 * @return the last matching message boards thread flag 287 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 288 * @throws SystemException if a system exception occurred 289 */ 290 public com.liferay.portlet.messageboards.model.MBThreadFlag findByThreadId_Last( 291 long threadId, 292 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 293 throws com.liferay.portal.kernel.exception.SystemException, 294 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 295 296 /** 297 * Returns the message boards thread flags before and after the current message boards thread flag in the ordered set where threadId = ?. 298 * 299 * <p> 300 * 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. 301 * </p> 302 * 303 * @param threadFlagId the primary key of the current message boards thread flag 304 * @param threadId the thread ID 305 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 306 * @return the previous, current, and next message boards thread flag 307 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a message boards thread flag with the primary key could not be found 308 * @throws SystemException if a system exception occurred 309 */ 310 public com.liferay.portlet.messageboards.model.MBThreadFlag[] findByThreadId_PrevAndNext( 311 long threadFlagId, long threadId, 312 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 313 throws com.liferay.portal.kernel.exception.SystemException, 314 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 315 316 /** 317 * 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. 318 * 319 * @param userId the user ID 320 * @param threadId the thread ID 321 * @return the matching message boards thread flag 322 * @throws com.liferay.portlet.messageboards.NoSuchThreadFlagException if a matching message boards thread flag could not be found 323 * @throws SystemException if a system exception occurred 324 */ 325 public com.liferay.portlet.messageboards.model.MBThreadFlag findByU_T( 326 long userId, long threadId) 327 throws com.liferay.portal.kernel.exception.SystemException, 328 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 329 330 /** 331 * 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. 332 * 333 * @param userId the user ID 334 * @param threadId the thread ID 335 * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found 336 * @throws SystemException if a system exception occurred 337 */ 338 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T( 339 long userId, long threadId) 340 throws com.liferay.portal.kernel.exception.SystemException; 341 342 /** 343 * 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. 344 * 345 * @param userId the user ID 346 * @param threadId the thread ID 347 * @param retrieveFromCache whether to use the finder cache 348 * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found 349 * @throws SystemException if a system exception occurred 350 */ 351 public com.liferay.portlet.messageboards.model.MBThreadFlag fetchByU_T( 352 long userId, long threadId, boolean retrieveFromCache) 353 throws com.liferay.portal.kernel.exception.SystemException; 354 355 /** 356 * Returns all the message boards thread flags. 357 * 358 * @return the message boards thread flags 359 * @throws SystemException if a system exception occurred 360 */ 361 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll() 362 throws com.liferay.portal.kernel.exception.SystemException; 363 364 /** 365 * Returns a range of all the message boards thread flags. 366 * 367 * <p> 368 * 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. 369 * </p> 370 * 371 * @param start the lower bound of the range of message boards thread flags 372 * @param end the upper bound of the range of message boards thread flags (not inclusive) 373 * @return the range of message boards thread flags 374 * @throws SystemException if a system exception occurred 375 */ 376 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll( 377 int start, int end) 378 throws com.liferay.portal.kernel.exception.SystemException; 379 380 /** 381 * Returns an ordered range of all the message boards thread flags. 382 * 383 * <p> 384 * 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. 385 * </p> 386 * 387 * @param start the lower bound of the range of message boards thread flags 388 * @param end the upper bound of the range of message boards thread flags (not inclusive) 389 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 390 * @return the ordered range of message boards thread flags 391 * @throws SystemException if a system exception occurred 392 */ 393 public java.util.List<com.liferay.portlet.messageboards.model.MBThreadFlag> findAll( 394 int start, int end, 395 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 396 throws com.liferay.portal.kernel.exception.SystemException; 397 398 /** 399 * Removes all the message boards thread flags where userId = ? from the database. 400 * 401 * @param userId the user ID 402 * @throws SystemException if a system exception occurred 403 */ 404 public void removeByUserId(long userId) 405 throws com.liferay.portal.kernel.exception.SystemException; 406 407 /** 408 * Removes all the message boards thread flags where threadId = ? from the database. 409 * 410 * @param threadId the thread ID 411 * @throws SystemException if a system exception occurred 412 */ 413 public void removeByThreadId(long threadId) 414 throws com.liferay.portal.kernel.exception.SystemException; 415 416 /** 417 * Removes the message boards thread flag where userId = ? and threadId = ? from the database. 418 * 419 * @param userId the user ID 420 * @param threadId the thread ID 421 * @throws SystemException if a system exception occurred 422 */ 423 public void removeByU_T(long userId, long threadId) 424 throws com.liferay.portal.kernel.exception.SystemException, 425 com.liferay.portlet.messageboards.NoSuchThreadFlagException; 426 427 /** 428 * Removes all the message boards thread flags from the database. 429 * 430 * @throws SystemException if a system exception occurred 431 */ 432 public void removeAll() 433 throws com.liferay.portal.kernel.exception.SystemException; 434 435 /** 436 * Returns the number of message boards thread flags where userId = ?. 437 * 438 * @param userId the user ID 439 * @return the number of matching message boards thread flags 440 * @throws SystemException if a system exception occurred 441 */ 442 public int countByUserId(long userId) 443 throws com.liferay.portal.kernel.exception.SystemException; 444 445 /** 446 * Returns the number of message boards thread flags where threadId = ?. 447 * 448 * @param threadId the thread ID 449 * @return the number of matching message boards thread flags 450 * @throws SystemException if a system exception occurred 451 */ 452 public int countByThreadId(long threadId) 453 throws com.liferay.portal.kernel.exception.SystemException; 454 455 /** 456 * Returns the number of message boards thread flags where userId = ? and threadId = ?. 457 * 458 * @param userId the user ID 459 * @param threadId the thread ID 460 * @return the number of matching message boards thread flags 461 * @throws SystemException if a system exception occurred 462 */ 463 public int countByU_T(long userId, long threadId) 464 throws com.liferay.portal.kernel.exception.SystemException; 465 466 /** 467 * Returns the number of message boards thread flags. 468 * 469 * @return the number of message boards thread flags 470 * @throws SystemException if a system exception occurred 471 */ 472 public int countAll() 473 throws com.liferay.portal.kernel.exception.SystemException; 474 }