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