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.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.service.ServiceContext; 023 024 import com.liferay.portlet.ratings.model.RatingsEntry; 025 026 import java.util.List; 027 028 /** 029 * The persistence utility for the ratings entry service. This utility wraps {@link RatingsEntryPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 030 * 031 * <p> 032 * Caching information and settings can be found in <code>portal.properties</code> 033 * </p> 034 * 035 * @author Brian Wing Shun Chan 036 * @see RatingsEntryPersistence 037 * @see RatingsEntryPersistenceImpl 038 * @generated 039 */ 040 public class RatingsEntryUtil { 041 /* 042 * NOTE FOR DEVELOPERS: 043 * 044 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 045 */ 046 047 /** 048 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 049 */ 050 public static void clearCache() { 051 getPersistence().clearCache(); 052 } 053 054 /** 055 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 056 */ 057 public static void clearCache(RatingsEntry ratingsEntry) { 058 getPersistence().clearCache(ratingsEntry); 059 } 060 061 /** 062 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 063 */ 064 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 065 throws SystemException { 066 return getPersistence().countWithDynamicQuery(dynamicQuery); 067 } 068 069 /** 070 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 071 */ 072 public static List<RatingsEntry> findWithDynamicQuery( 073 DynamicQuery dynamicQuery) throws SystemException { 074 return getPersistence().findWithDynamicQuery(dynamicQuery); 075 } 076 077 /** 078 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 079 */ 080 public static List<RatingsEntry> findWithDynamicQuery( 081 DynamicQuery dynamicQuery, int start, int end) 082 throws SystemException { 083 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 084 } 085 086 /** 087 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 088 */ 089 public static List<RatingsEntry> findWithDynamicQuery( 090 DynamicQuery dynamicQuery, int start, int end, 091 OrderByComparator orderByComparator) throws SystemException { 092 return getPersistence() 093 .findWithDynamicQuery(dynamicQuery, start, end, 094 orderByComparator); 095 } 096 097 /** 098 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 099 */ 100 public static RatingsEntry update(RatingsEntry ratingsEntry) 101 throws SystemException { 102 return getPersistence().update(ratingsEntry); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 107 */ 108 public static RatingsEntry update(RatingsEntry ratingsEntry, 109 ServiceContext serviceContext) throws SystemException { 110 return getPersistence().update(ratingsEntry, serviceContext); 111 } 112 113 /** 114 * Caches the ratings entry in the entity cache if it is enabled. 115 * 116 * @param ratingsEntry the ratings entry 117 */ 118 public static void cacheResult( 119 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) { 120 getPersistence().cacheResult(ratingsEntry); 121 } 122 123 /** 124 * Caches the ratings entries in the entity cache if it is enabled. 125 * 126 * @param ratingsEntries the ratings entries 127 */ 128 public static void cacheResult( 129 java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> ratingsEntries) { 130 getPersistence().cacheResult(ratingsEntries); 131 } 132 133 /** 134 * Creates a new ratings entry with the primary key. Does not add the ratings entry to the database. 135 * 136 * @param entryId the primary key for the new ratings entry 137 * @return the new ratings entry 138 */ 139 public static com.liferay.portlet.ratings.model.RatingsEntry create( 140 long entryId) { 141 return getPersistence().create(entryId); 142 } 143 144 /** 145 * Removes the ratings entry with the primary key from the database. Also notifies the appropriate model listeners. 146 * 147 * @param entryId the primary key of the ratings entry 148 * @return the ratings entry that was removed 149 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 public static com.liferay.portlet.ratings.model.RatingsEntry remove( 153 long entryId) 154 throws com.liferay.portal.kernel.exception.SystemException, 155 com.liferay.portlet.ratings.NoSuchEntryException { 156 return getPersistence().remove(entryId); 157 } 158 159 public static com.liferay.portlet.ratings.model.RatingsEntry updateImpl( 160 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) 161 throws com.liferay.portal.kernel.exception.SystemException { 162 return getPersistence().updateImpl(ratingsEntry); 163 } 164 165 /** 166 * Returns the ratings entry with the primary key or throws a {@link com.liferay.portlet.ratings.NoSuchEntryException} if it could not be found. 167 * 168 * @param entryId the primary key of the ratings entry 169 * @return the ratings entry 170 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found 171 * @throws SystemException if a system exception occurred 172 */ 173 public static com.liferay.portlet.ratings.model.RatingsEntry findByPrimaryKey( 174 long entryId) 175 throws com.liferay.portal.kernel.exception.SystemException, 176 com.liferay.portlet.ratings.NoSuchEntryException { 177 return getPersistence().findByPrimaryKey(entryId); 178 } 179 180 /** 181 * Returns the ratings entry with the primary key or returns <code>null</code> if it could not be found. 182 * 183 * @param entryId the primary key of the ratings entry 184 * @return the ratings entry, or <code>null</code> if a ratings entry with the primary key could not be found 185 * @throws SystemException if a system exception occurred 186 */ 187 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByPrimaryKey( 188 long entryId) 189 throws com.liferay.portal.kernel.exception.SystemException { 190 return getPersistence().fetchByPrimaryKey(entryId); 191 } 192 193 /** 194 * Returns all the ratings entries where classNameId = ? and classPK = ?. 195 * 196 * @param classNameId the class name ID 197 * @param classPK the class p k 198 * @return the matching ratings entries 199 * @throws SystemException if a system exception occurred 200 */ 201 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C( 202 long classNameId, long classPK) 203 throws com.liferay.portal.kernel.exception.SystemException { 204 return getPersistence().findByC_C(classNameId, classPK); 205 } 206 207 /** 208 * Returns a range of all the ratings entries where classNameId = ? and classPK = ?. 209 * 210 * <p> 211 * 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. 212 * </p> 213 * 214 * @param classNameId the class name ID 215 * @param classPK the class p k 216 * @param start the lower bound of the range of ratings entries 217 * @param end the upper bound of the range of ratings entries (not inclusive) 218 * @return the range of matching ratings entries 219 * @throws SystemException if a system exception occurred 220 */ 221 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C( 222 long classNameId, long classPK, int start, int end) 223 throws com.liferay.portal.kernel.exception.SystemException { 224 return getPersistence().findByC_C(classNameId, classPK, start, end); 225 } 226 227 /** 228 * Returns an ordered range of all the ratings entries where classNameId = ? and classPK = ?. 229 * 230 * <p> 231 * 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. 232 * </p> 233 * 234 * @param classNameId the class name ID 235 * @param classPK the class p k 236 * @param start the lower bound of the range of ratings entries 237 * @param end the upper bound of the range of ratings entries (not inclusive) 238 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 239 * @return the ordered range of matching ratings entries 240 * @throws SystemException if a system exception occurred 241 */ 242 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C( 243 long classNameId, long classPK, int start, int end, 244 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 245 throws com.liferay.portal.kernel.exception.SystemException { 246 return getPersistence() 247 .findByC_C(classNameId, classPK, start, end, 248 orderByComparator); 249 } 250 251 /** 252 * Returns the first ratings entry in the ordered set where classNameId = ? and classPK = ?. 253 * 254 * @param classNameId the class name ID 255 * @param classPK the class p k 256 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 257 * @return the first matching ratings entry 258 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found 259 * @throws SystemException if a system exception occurred 260 */ 261 public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_First( 262 long classNameId, long classPK, 263 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 264 throws com.liferay.portal.kernel.exception.SystemException, 265 com.liferay.portlet.ratings.NoSuchEntryException { 266 return getPersistence() 267 .findByC_C_First(classNameId, classPK, orderByComparator); 268 } 269 270 /** 271 * Returns the first ratings entry in the ordered set where classNameId = ? and classPK = ?. 272 * 273 * @param classNameId the class name ID 274 * @param classPK the class p k 275 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 276 * @return the first matching ratings entry, or <code>null</code> if a matching ratings entry could not be found 277 * @throws SystemException if a system exception occurred 278 */ 279 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByC_C_First( 280 long classNameId, long classPK, 281 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 282 throws com.liferay.portal.kernel.exception.SystemException { 283 return getPersistence() 284 .fetchByC_C_First(classNameId, classPK, orderByComparator); 285 } 286 287 /** 288 * Returns the last ratings entry in the ordered set where classNameId = ? and classPK = ?. 289 * 290 * @param classNameId the class name ID 291 * @param classPK the class p k 292 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 293 * @return the last matching ratings entry 294 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found 295 * @throws SystemException if a system exception occurred 296 */ 297 public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_Last( 298 long classNameId, long classPK, 299 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 300 throws com.liferay.portal.kernel.exception.SystemException, 301 com.liferay.portlet.ratings.NoSuchEntryException { 302 return getPersistence() 303 .findByC_C_Last(classNameId, classPK, orderByComparator); 304 } 305 306 /** 307 * Returns the last ratings entry in the ordered set where classNameId = ? and classPK = ?. 308 * 309 * @param classNameId the class name ID 310 * @param classPK the class p k 311 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 312 * @return the last matching ratings entry, or <code>null</code> if a matching ratings entry could not be found 313 * @throws SystemException if a system exception occurred 314 */ 315 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByC_C_Last( 316 long classNameId, long classPK, 317 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 318 throws com.liferay.portal.kernel.exception.SystemException { 319 return getPersistence() 320 .fetchByC_C_Last(classNameId, classPK, orderByComparator); 321 } 322 323 /** 324 * Returns the ratings entries before and after the current ratings entry in the ordered set where classNameId = ? and classPK = ?. 325 * 326 * @param entryId the primary key of the current ratings entry 327 * @param classNameId the class name ID 328 * @param classPK the class p k 329 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 330 * @return the previous, current, and next ratings entry 331 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found 332 * @throws SystemException if a system exception occurred 333 */ 334 public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_PrevAndNext( 335 long entryId, long classNameId, long classPK, 336 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 337 throws com.liferay.portal.kernel.exception.SystemException, 338 com.liferay.portlet.ratings.NoSuchEntryException { 339 return getPersistence() 340 .findByC_C_PrevAndNext(entryId, classNameId, classPK, 341 orderByComparator); 342 } 343 344 /** 345 * 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. 346 * 347 * @param userId the user ID 348 * @param classNameId the class name ID 349 * @param classPK the class p k 350 * @return the matching ratings entry 351 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found 352 * @throws SystemException if a system exception occurred 353 */ 354 public static com.liferay.portlet.ratings.model.RatingsEntry findByU_C_C( 355 long userId, long classNameId, long classPK) 356 throws com.liferay.portal.kernel.exception.SystemException, 357 com.liferay.portlet.ratings.NoSuchEntryException { 358 return getPersistence().findByU_C_C(userId, classNameId, classPK); 359 } 360 361 /** 362 * 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. 363 * 364 * @param userId the user ID 365 * @param classNameId the class name ID 366 * @param classPK the class p k 367 * @return the matching ratings entry, or <code>null</code> if a matching ratings entry could not be found 368 * @throws SystemException if a system exception occurred 369 */ 370 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C( 371 long userId, long classNameId, long classPK) 372 throws com.liferay.portal.kernel.exception.SystemException { 373 return getPersistence().fetchByU_C_C(userId, classNameId, classPK); 374 } 375 376 /** 377 * 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. 378 * 379 * @param userId the user ID 380 * @param classNameId the class name ID 381 * @param classPK the class p k 382 * @param retrieveFromCache whether to use the finder cache 383 * @return the matching ratings entry, or <code>null</code> if a matching ratings entry could not be found 384 * @throws SystemException if a system exception occurred 385 */ 386 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C( 387 long userId, long classNameId, long classPK, boolean retrieveFromCache) 388 throws com.liferay.portal.kernel.exception.SystemException { 389 return getPersistence() 390 .fetchByU_C_C(userId, classNameId, classPK, retrieveFromCache); 391 } 392 393 /** 394 * Returns all the ratings entries where classNameId = ? and classPK = ? and score = ?. 395 * 396 * @param classNameId the class name ID 397 * @param classPK the class p k 398 * @param score the score 399 * @return the matching ratings entries 400 * @throws SystemException if a system exception occurred 401 */ 402 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S( 403 long classNameId, long classPK, double score) 404 throws com.liferay.portal.kernel.exception.SystemException { 405 return getPersistence().findByC_C_S(classNameId, classPK, score); 406 } 407 408 /** 409 * Returns a range of all the ratings entries where classNameId = ? and classPK = ? and score = ?. 410 * 411 * <p> 412 * 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. 413 * </p> 414 * 415 * @param classNameId the class name ID 416 * @param classPK the class p k 417 * @param score the score 418 * @param start the lower bound of the range of ratings entries 419 * @param end the upper bound of the range of ratings entries (not inclusive) 420 * @return the range of matching ratings entries 421 * @throws SystemException if a system exception occurred 422 */ 423 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S( 424 long classNameId, long classPK, double score, int start, int end) 425 throws com.liferay.portal.kernel.exception.SystemException { 426 return getPersistence() 427 .findByC_C_S(classNameId, classPK, score, start, end); 428 } 429 430 /** 431 * Returns an ordered range of all the ratings entries where classNameId = ? and classPK = ? and score = ?. 432 * 433 * <p> 434 * 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. 435 * </p> 436 * 437 * @param classNameId the class name ID 438 * @param classPK the class p k 439 * @param score the score 440 * @param start the lower bound of the range of ratings entries 441 * @param end the upper bound of the range of ratings entries (not inclusive) 442 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 443 * @return the ordered range of matching ratings entries 444 * @throws SystemException if a system exception occurred 445 */ 446 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S( 447 long classNameId, long classPK, double score, int start, int end, 448 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 449 throws com.liferay.portal.kernel.exception.SystemException { 450 return getPersistence() 451 .findByC_C_S(classNameId, classPK, score, start, end, 452 orderByComparator); 453 } 454 455 /** 456 * Returns the first ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?. 457 * 458 * @param classNameId the class name ID 459 * @param classPK the class p k 460 * @param score the score 461 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 462 * @return the first matching ratings entry 463 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found 464 * @throws SystemException if a system exception occurred 465 */ 466 public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_S_First( 467 long classNameId, long classPK, double score, 468 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 469 throws com.liferay.portal.kernel.exception.SystemException, 470 com.liferay.portlet.ratings.NoSuchEntryException { 471 return getPersistence() 472 .findByC_C_S_First(classNameId, classPK, score, 473 orderByComparator); 474 } 475 476 /** 477 * Returns the first ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?. 478 * 479 * @param classNameId the class name ID 480 * @param classPK the class p k 481 * @param score the score 482 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 483 * @return the first matching ratings entry, or <code>null</code> if a matching ratings entry could not be found 484 * @throws SystemException if a system exception occurred 485 */ 486 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByC_C_S_First( 487 long classNameId, long classPK, double score, 488 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 489 throws com.liferay.portal.kernel.exception.SystemException { 490 return getPersistence() 491 .fetchByC_C_S_First(classNameId, classPK, score, 492 orderByComparator); 493 } 494 495 /** 496 * Returns the last ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?. 497 * 498 * @param classNameId the class name ID 499 * @param classPK the class p k 500 * @param score the score 501 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 502 * @return the last matching ratings entry 503 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found 504 * @throws SystemException if a system exception occurred 505 */ 506 public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_S_Last( 507 long classNameId, long classPK, double score, 508 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 509 throws com.liferay.portal.kernel.exception.SystemException, 510 com.liferay.portlet.ratings.NoSuchEntryException { 511 return getPersistence() 512 .findByC_C_S_Last(classNameId, classPK, score, 513 orderByComparator); 514 } 515 516 /** 517 * Returns the last ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?. 518 * 519 * @param classNameId the class name ID 520 * @param classPK the class p k 521 * @param score the score 522 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 523 * @return the last matching ratings entry, or <code>null</code> if a matching ratings entry could not be found 524 * @throws SystemException if a system exception occurred 525 */ 526 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByC_C_S_Last( 527 long classNameId, long classPK, double score, 528 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 529 throws com.liferay.portal.kernel.exception.SystemException { 530 return getPersistence() 531 .fetchByC_C_S_Last(classNameId, classPK, score, 532 orderByComparator); 533 } 534 535 /** 536 * Returns the ratings entries before and after the current ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?. 537 * 538 * @param entryId the primary key of the current ratings entry 539 * @param classNameId the class name ID 540 * @param classPK the class p k 541 * @param score the score 542 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 543 * @return the previous, current, and next ratings entry 544 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found 545 * @throws SystemException if a system exception occurred 546 */ 547 public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_S_PrevAndNext( 548 long entryId, long classNameId, long classPK, double score, 549 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 550 throws com.liferay.portal.kernel.exception.SystemException, 551 com.liferay.portlet.ratings.NoSuchEntryException { 552 return getPersistence() 553 .findByC_C_S_PrevAndNext(entryId, classNameId, classPK, 554 score, orderByComparator); 555 } 556 557 /** 558 * Returns all the ratings entries. 559 * 560 * @return the ratings entries 561 * @throws SystemException if a system exception occurred 562 */ 563 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll() 564 throws com.liferay.portal.kernel.exception.SystemException { 565 return getPersistence().findAll(); 566 } 567 568 /** 569 * Returns a range of all the ratings entries. 570 * 571 * <p> 572 * 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. 573 * </p> 574 * 575 * @param start the lower bound of the range of ratings entries 576 * @param end the upper bound of the range of ratings entries (not inclusive) 577 * @return the range of ratings entries 578 * @throws SystemException if a system exception occurred 579 */ 580 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll( 581 int start, int end) 582 throws com.liferay.portal.kernel.exception.SystemException { 583 return getPersistence().findAll(start, end); 584 } 585 586 /** 587 * Returns an ordered range of all the ratings entries. 588 * 589 * <p> 590 * 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. 591 * </p> 592 * 593 * @param start the lower bound of the range of ratings entries 594 * @param end the upper bound of the range of ratings entries (not inclusive) 595 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 596 * @return the ordered range of ratings entries 597 * @throws SystemException if a system exception occurred 598 */ 599 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll( 600 int start, int end, 601 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 602 throws com.liferay.portal.kernel.exception.SystemException { 603 return getPersistence().findAll(start, end, orderByComparator); 604 } 605 606 /** 607 * Removes all the ratings entries where classNameId = ? and classPK = ? from the database. 608 * 609 * @param classNameId the class name ID 610 * @param classPK the class p k 611 * @throws SystemException if a system exception occurred 612 */ 613 public static void removeByC_C(long classNameId, long classPK) 614 throws com.liferay.portal.kernel.exception.SystemException { 615 getPersistence().removeByC_C(classNameId, classPK); 616 } 617 618 /** 619 * Removes the ratings entry where userId = ? and classNameId = ? and classPK = ? from the database. 620 * 621 * @param userId the user ID 622 * @param classNameId the class name ID 623 * @param classPK the class p k 624 * @return the ratings entry that was removed 625 * @throws SystemException if a system exception occurred 626 */ 627 public static com.liferay.portlet.ratings.model.RatingsEntry removeByU_C_C( 628 long userId, long classNameId, long classPK) 629 throws com.liferay.portal.kernel.exception.SystemException, 630 com.liferay.portlet.ratings.NoSuchEntryException { 631 return getPersistence().removeByU_C_C(userId, classNameId, classPK); 632 } 633 634 /** 635 * Removes all the ratings entries where classNameId = ? and classPK = ? and score = ? from the database. 636 * 637 * @param classNameId the class name ID 638 * @param classPK the class p k 639 * @param score the score 640 * @throws SystemException if a system exception occurred 641 */ 642 public static void removeByC_C_S(long classNameId, long classPK, 643 double score) 644 throws com.liferay.portal.kernel.exception.SystemException { 645 getPersistence().removeByC_C_S(classNameId, classPK, score); 646 } 647 648 /** 649 * Removes all the ratings entries from the database. 650 * 651 * @throws SystemException if a system exception occurred 652 */ 653 public static void removeAll() 654 throws com.liferay.portal.kernel.exception.SystemException { 655 getPersistence().removeAll(); 656 } 657 658 /** 659 * Returns the number of ratings entries where classNameId = ? and classPK = ?. 660 * 661 * @param classNameId the class name ID 662 * @param classPK the class p k 663 * @return the number of matching ratings entries 664 * @throws SystemException if a system exception occurred 665 */ 666 public static int countByC_C(long classNameId, long classPK) 667 throws com.liferay.portal.kernel.exception.SystemException { 668 return getPersistence().countByC_C(classNameId, classPK); 669 } 670 671 /** 672 * Returns the number of ratings entries where userId = ? and classNameId = ? and classPK = ?. 673 * 674 * @param userId the user ID 675 * @param classNameId the class name ID 676 * @param classPK the class p k 677 * @return the number of matching ratings entries 678 * @throws SystemException if a system exception occurred 679 */ 680 public static int countByU_C_C(long userId, long classNameId, long classPK) 681 throws com.liferay.portal.kernel.exception.SystemException { 682 return getPersistence().countByU_C_C(userId, classNameId, classPK); 683 } 684 685 /** 686 * Returns the number of ratings entries where classNameId = ? and classPK = ? and score = ?. 687 * 688 * @param classNameId the class name ID 689 * @param classPK the class p k 690 * @param score the score 691 * @return the number of matching ratings entries 692 * @throws SystemException if a system exception occurred 693 */ 694 public static int countByC_C_S(long classNameId, long classPK, double score) 695 throws com.liferay.portal.kernel.exception.SystemException { 696 return getPersistence().countByC_C_S(classNameId, classPK, score); 697 } 698 699 /** 700 * Returns the number of ratings entries. 701 * 702 * @return the number of ratings entries 703 * @throws SystemException if a system exception occurred 704 */ 705 public static int countAll() 706 throws com.liferay.portal.kernel.exception.SystemException { 707 return getPersistence().countAll(); 708 } 709 710 public static RatingsEntryPersistence getPersistence() { 711 if (_persistence == null) { 712 _persistence = (RatingsEntryPersistence)PortalBeanLocatorUtil.locate(RatingsEntryPersistence.class.getName()); 713 714 ReferenceRegistry.registerReference(RatingsEntryUtil.class, 715 "_persistence"); 716 } 717 718 return _persistence; 719 } 720 721 /** 722 * @deprecated 723 */ 724 public void setPersistence(RatingsEntryPersistence persistence) { 725 } 726 727 private static RatingsEntryPersistence _persistence; 728 }