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