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.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#remove(com.liferay.portal.model.BaseModel) 099 */ 100 public static RatingsEntry remove(RatingsEntry ratingsEntry) 101 throws SystemException { 102 return getPersistence().remove(ratingsEntry); 103 } 104 105 /** 106 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 107 */ 108 public static RatingsEntry update(RatingsEntry ratingsEntry, boolean merge) 109 throws SystemException { 110 return getPersistence().update(ratingsEntry, merge); 111 } 112 113 /** 114 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 115 */ 116 public static RatingsEntry update(RatingsEntry ratingsEntry, boolean merge, 117 ServiceContext serviceContext) throws SystemException { 118 return getPersistence().update(ratingsEntry, merge, serviceContext); 119 } 120 121 /** 122 * Caches the ratings entry in the entity cache if it is enabled. 123 * 124 * @param ratingsEntry the ratings entry 125 */ 126 public static void cacheResult( 127 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry) { 128 getPersistence().cacheResult(ratingsEntry); 129 } 130 131 /** 132 * Caches the ratings entries in the entity cache if it is enabled. 133 * 134 * @param ratingsEntries the ratings entries 135 */ 136 public static void cacheResult( 137 java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> ratingsEntries) { 138 getPersistence().cacheResult(ratingsEntries); 139 } 140 141 /** 142 * Creates a new ratings entry with the primary key. Does not add the ratings entry to the database. 143 * 144 * @param entryId the primary key for the new ratings entry 145 * @return the new ratings entry 146 */ 147 public static com.liferay.portlet.ratings.model.RatingsEntry create( 148 long entryId) { 149 return getPersistence().create(entryId); 150 } 151 152 /** 153 * Removes the ratings entry with the primary key from the database. Also notifies the appropriate model listeners. 154 * 155 * @param entryId the primary key of the ratings entry 156 * @return the ratings entry that was removed 157 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found 158 * @throws SystemException if a system exception occurred 159 */ 160 public static com.liferay.portlet.ratings.model.RatingsEntry remove( 161 long entryId) 162 throws com.liferay.portal.kernel.exception.SystemException, 163 com.liferay.portlet.ratings.NoSuchEntryException { 164 return getPersistence().remove(entryId); 165 } 166 167 public static com.liferay.portlet.ratings.model.RatingsEntry updateImpl( 168 com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry, 169 boolean merge) 170 throws com.liferay.portal.kernel.exception.SystemException { 171 return getPersistence().updateImpl(ratingsEntry, merge); 172 } 173 174 /** 175 * Returns the ratings entry with the primary key or throws a {@link com.liferay.portlet.ratings.NoSuchEntryException} if it could not be found. 176 * 177 * @param entryId the primary key of the ratings entry 178 * @return the ratings entry 179 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found 180 * @throws SystemException if a system exception occurred 181 */ 182 public static com.liferay.portlet.ratings.model.RatingsEntry findByPrimaryKey( 183 long entryId) 184 throws com.liferay.portal.kernel.exception.SystemException, 185 com.liferay.portlet.ratings.NoSuchEntryException { 186 return getPersistence().findByPrimaryKey(entryId); 187 } 188 189 /** 190 * Returns the ratings entry with the primary key or returns <code>null</code> if it could not be found. 191 * 192 * @param entryId the primary key of the ratings entry 193 * @return the ratings entry, or <code>null</code> if a ratings entry with the primary key could not be found 194 * @throws SystemException if a system exception occurred 195 */ 196 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByPrimaryKey( 197 long entryId) 198 throws com.liferay.portal.kernel.exception.SystemException { 199 return getPersistence().fetchByPrimaryKey(entryId); 200 } 201 202 /** 203 * Returns all the ratings entries where classNameId = ? and classPK = ?. 204 * 205 * @param classNameId the class name ID 206 * @param classPK the class p k 207 * @return the matching ratings entries 208 * @throws SystemException if a system exception occurred 209 */ 210 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C( 211 long classNameId, long classPK) 212 throws com.liferay.portal.kernel.exception.SystemException { 213 return getPersistence().findByC_C(classNameId, classPK); 214 } 215 216 /** 217 * Returns a range of all the ratings entries where classNameId = ? and classPK = ?. 218 * 219 * <p> 220 * 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. 221 * </p> 222 * 223 * @param classNameId the class name ID 224 * @param classPK the class p k 225 * @param start the lower bound of the range of ratings entries 226 * @param end the upper bound of the range of ratings entries (not inclusive) 227 * @return the range of matching ratings entries 228 * @throws SystemException if a system exception occurred 229 */ 230 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C( 231 long classNameId, long classPK, int start, int end) 232 throws com.liferay.portal.kernel.exception.SystemException { 233 return getPersistence().findByC_C(classNameId, classPK, start, end); 234 } 235 236 /** 237 * Returns an ordered range of all the ratings entries where classNameId = ? and classPK = ?. 238 * 239 * <p> 240 * 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. 241 * </p> 242 * 243 * @param classNameId the class name ID 244 * @param classPK the class p k 245 * @param start the lower bound of the range of ratings entries 246 * @param end the upper bound of the range of ratings entries (not inclusive) 247 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 248 * @return the ordered range of matching ratings entries 249 * @throws SystemException if a system exception occurred 250 */ 251 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C( 252 long classNameId, long classPK, int start, int end, 253 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 254 throws com.liferay.portal.kernel.exception.SystemException { 255 return getPersistence() 256 .findByC_C(classNameId, classPK, start, end, 257 orderByComparator); 258 } 259 260 /** 261 * Returns the first ratings entry in the ordered set where classNameId = ? and classPK = ?. 262 * 263 * <p> 264 * 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. 265 * </p> 266 * 267 * @param classNameId the class name ID 268 * @param classPK the class p k 269 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 270 * @return the first matching ratings entry 271 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found 272 * @throws SystemException if a system exception occurred 273 */ 274 public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_First( 275 long classNameId, long classPK, 276 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 277 throws com.liferay.portal.kernel.exception.SystemException, 278 com.liferay.portlet.ratings.NoSuchEntryException { 279 return getPersistence() 280 .findByC_C_First(classNameId, classPK, orderByComparator); 281 } 282 283 /** 284 * Returns the last ratings entry in the ordered set where classNameId = ? and classPK = ?. 285 * 286 * <p> 287 * 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. 288 * </p> 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 ratings entries before and after the current ratings entry in the ordered set where classNameId = ? and classPK = ?. 308 * 309 * <p> 310 * 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. 311 * </p> 312 * 313 * @param entryId the primary key of the current ratings entry 314 * @param classNameId the class name ID 315 * @param classPK the class p k 316 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 317 * @return the previous, current, and next ratings entry 318 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found 319 * @throws SystemException if a system exception occurred 320 */ 321 public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_PrevAndNext( 322 long entryId, long classNameId, long classPK, 323 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 324 throws com.liferay.portal.kernel.exception.SystemException, 325 com.liferay.portlet.ratings.NoSuchEntryException { 326 return getPersistence() 327 .findByC_C_PrevAndNext(entryId, classNameId, classPK, 328 orderByComparator); 329 } 330 331 /** 332 * 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. 333 * 334 * @param userId the user ID 335 * @param classNameId the class name ID 336 * @param classPK the class p k 337 * @return the matching ratings entry 338 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found 339 * @throws SystemException if a system exception occurred 340 */ 341 public static com.liferay.portlet.ratings.model.RatingsEntry findByU_C_C( 342 long userId, long classNameId, long classPK) 343 throws com.liferay.portal.kernel.exception.SystemException, 344 com.liferay.portlet.ratings.NoSuchEntryException { 345 return getPersistence().findByU_C_C(userId, classNameId, classPK); 346 } 347 348 /** 349 * 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. 350 * 351 * @param userId the user ID 352 * @param classNameId the class name ID 353 * @param classPK the class p k 354 * @return the matching ratings entry, or <code>null</code> if a matching ratings entry could not be found 355 * @throws SystemException if a system exception occurred 356 */ 357 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C( 358 long userId, long classNameId, long classPK) 359 throws com.liferay.portal.kernel.exception.SystemException { 360 return getPersistence().fetchByU_C_C(userId, classNameId, classPK); 361 } 362 363 /** 364 * 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. 365 * 366 * @param userId the user ID 367 * @param classNameId the class name ID 368 * @param classPK the class p k 369 * @param retrieveFromCache whether to use the finder cache 370 * @return the matching ratings entry, or <code>null</code> if a matching ratings entry could not be found 371 * @throws SystemException if a system exception occurred 372 */ 373 public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C( 374 long userId, long classNameId, long classPK, boolean retrieveFromCache) 375 throws com.liferay.portal.kernel.exception.SystemException { 376 return getPersistence() 377 .fetchByU_C_C(userId, classNameId, classPK, retrieveFromCache); 378 } 379 380 /** 381 * Returns all the ratings entries where classNameId = ? and classPK = ? and score = ?. 382 * 383 * @param classNameId the class name ID 384 * @param classPK the class p k 385 * @param score the score 386 * @return the matching ratings entries 387 * @throws SystemException if a system exception occurred 388 */ 389 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S( 390 long classNameId, long classPK, double score) 391 throws com.liferay.portal.kernel.exception.SystemException { 392 return getPersistence().findByC_C_S(classNameId, classPK, score); 393 } 394 395 /** 396 * Returns a range of all the ratings entries where classNameId = ? and classPK = ? and score = ?. 397 * 398 * <p> 399 * 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. 400 * </p> 401 * 402 * @param classNameId the class name ID 403 * @param classPK the class p k 404 * @param score the score 405 * @param start the lower bound of the range of ratings entries 406 * @param end the upper bound of the range of ratings entries (not inclusive) 407 * @return the range of matching ratings entries 408 * @throws SystemException if a system exception occurred 409 */ 410 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S( 411 long classNameId, long classPK, double score, int start, int end) 412 throws com.liferay.portal.kernel.exception.SystemException { 413 return getPersistence() 414 .findByC_C_S(classNameId, classPK, score, start, end); 415 } 416 417 /** 418 * Returns an ordered range of all the ratings entries where classNameId = ? and classPK = ? and score = ?. 419 * 420 * <p> 421 * 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. 422 * </p> 423 * 424 * @param classNameId the class name ID 425 * @param classPK the class p k 426 * @param score the score 427 * @param start the lower bound of the range of ratings entries 428 * @param end the upper bound of the range of ratings entries (not inclusive) 429 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 430 * @return the ordered range of matching ratings entries 431 * @throws SystemException if a system exception occurred 432 */ 433 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findByC_C_S( 434 long classNameId, long classPK, double score, int start, int end, 435 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 436 throws com.liferay.portal.kernel.exception.SystemException { 437 return getPersistence() 438 .findByC_C_S(classNameId, classPK, score, start, end, 439 orderByComparator); 440 } 441 442 /** 443 * Returns the first ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?. 444 * 445 * <p> 446 * 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. 447 * </p> 448 * 449 * @param classNameId the class name ID 450 * @param classPK the class p k 451 * @param score the score 452 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 453 * @return the first matching ratings entry 454 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found 455 * @throws SystemException if a system exception occurred 456 */ 457 public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_S_First( 458 long classNameId, long classPK, double score, 459 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 460 throws com.liferay.portal.kernel.exception.SystemException, 461 com.liferay.portlet.ratings.NoSuchEntryException { 462 return getPersistence() 463 .findByC_C_S_First(classNameId, classPK, score, 464 orderByComparator); 465 } 466 467 /** 468 * Returns the last ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?. 469 * 470 * <p> 471 * 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. 472 * </p> 473 * 474 * @param classNameId the class name ID 475 * @param classPK the class p k 476 * @param score the score 477 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 478 * @return the last matching ratings entry 479 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a matching ratings entry could not be found 480 * @throws SystemException if a system exception occurred 481 */ 482 public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_S_Last( 483 long classNameId, long classPK, double score, 484 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 485 throws com.liferay.portal.kernel.exception.SystemException, 486 com.liferay.portlet.ratings.NoSuchEntryException { 487 return getPersistence() 488 .findByC_C_S_Last(classNameId, classPK, score, 489 orderByComparator); 490 } 491 492 /** 493 * Returns the ratings entries before and after the current ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?. 494 * 495 * <p> 496 * 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. 497 * </p> 498 * 499 * @param entryId the primary key of the current ratings entry 500 * @param classNameId the class name ID 501 * @param classPK the class p k 502 * @param score the score 503 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 504 * @return the previous, current, and next ratings entry 505 * @throws com.liferay.portlet.ratings.NoSuchEntryException if a ratings entry with the primary key could not be found 506 * @throws SystemException if a system exception occurred 507 */ 508 public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_S_PrevAndNext( 509 long entryId, long classNameId, long classPK, double score, 510 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 511 throws com.liferay.portal.kernel.exception.SystemException, 512 com.liferay.portlet.ratings.NoSuchEntryException { 513 return getPersistence() 514 .findByC_C_S_PrevAndNext(entryId, classNameId, classPK, 515 score, orderByComparator); 516 } 517 518 /** 519 * Returns all the ratings entries. 520 * 521 * @return the ratings entries 522 * @throws SystemException if a system exception occurred 523 */ 524 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll() 525 throws com.liferay.portal.kernel.exception.SystemException { 526 return getPersistence().findAll(); 527 } 528 529 /** 530 * Returns a range of all the ratings entries. 531 * 532 * <p> 533 * 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. 534 * </p> 535 * 536 * @param start the lower bound of the range of ratings entries 537 * @param end the upper bound of the range of ratings entries (not inclusive) 538 * @return the range of ratings entries 539 * @throws SystemException if a system exception occurred 540 */ 541 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll( 542 int start, int end) 543 throws com.liferay.portal.kernel.exception.SystemException { 544 return getPersistence().findAll(start, end); 545 } 546 547 /** 548 * Returns an ordered range of all the ratings entries. 549 * 550 * <p> 551 * 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. 552 * </p> 553 * 554 * @param start the lower bound of the range of ratings entries 555 * @param end the upper bound of the range of ratings entries (not inclusive) 556 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 557 * @return the ordered range of ratings entries 558 * @throws SystemException if a system exception occurred 559 */ 560 public static java.util.List<com.liferay.portlet.ratings.model.RatingsEntry> findAll( 561 int start, int end, 562 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 563 throws com.liferay.portal.kernel.exception.SystemException { 564 return getPersistence().findAll(start, end, orderByComparator); 565 } 566 567 /** 568 * Removes all the ratings entries where classNameId = ? and classPK = ? from the database. 569 * 570 * @param classNameId the class name ID 571 * @param classPK the class p k 572 * @throws SystemException if a system exception occurred 573 */ 574 public static void removeByC_C(long classNameId, long classPK) 575 throws com.liferay.portal.kernel.exception.SystemException { 576 getPersistence().removeByC_C(classNameId, classPK); 577 } 578 579 /** 580 * Removes the ratings entry where userId = ? and classNameId = ? and classPK = ? from the database. 581 * 582 * @param userId the user ID 583 * @param classNameId the class name ID 584 * @param classPK the class p k 585 * @throws SystemException if a system exception occurred 586 */ 587 public static void removeByU_C_C(long userId, long classNameId, long classPK) 588 throws com.liferay.portal.kernel.exception.SystemException, 589 com.liferay.portlet.ratings.NoSuchEntryException { 590 getPersistence().removeByU_C_C(userId, classNameId, classPK); 591 } 592 593 /** 594 * Removes all the ratings entries where classNameId = ? and classPK = ? and score = ? from the database. 595 * 596 * @param classNameId the class name ID 597 * @param classPK the class p k 598 * @param score the score 599 * @throws SystemException if a system exception occurred 600 */ 601 public static void removeByC_C_S(long classNameId, long classPK, 602 double score) 603 throws com.liferay.portal.kernel.exception.SystemException { 604 getPersistence().removeByC_C_S(classNameId, classPK, score); 605 } 606 607 /** 608 * Removes all the ratings entries from the database. 609 * 610 * @throws SystemException if a system exception occurred 611 */ 612 public static void removeAll() 613 throws com.liferay.portal.kernel.exception.SystemException { 614 getPersistence().removeAll(); 615 } 616 617 /** 618 * Returns the number of ratings entries where classNameId = ? and classPK = ?. 619 * 620 * @param classNameId the class name ID 621 * @param classPK the class p k 622 * @return the number of matching ratings entries 623 * @throws SystemException if a system exception occurred 624 */ 625 public static int countByC_C(long classNameId, long classPK) 626 throws com.liferay.portal.kernel.exception.SystemException { 627 return getPersistence().countByC_C(classNameId, classPK); 628 } 629 630 /** 631 * Returns the number of ratings entries where userId = ? and classNameId = ? and classPK = ?. 632 * 633 * @param userId the user ID 634 * @param classNameId the class name ID 635 * @param classPK the class p k 636 * @return the number of matching ratings entries 637 * @throws SystemException if a system exception occurred 638 */ 639 public static int countByU_C_C(long userId, long classNameId, long classPK) 640 throws com.liferay.portal.kernel.exception.SystemException { 641 return getPersistence().countByU_C_C(userId, classNameId, classPK); 642 } 643 644 /** 645 * Returns the number of ratings entries where classNameId = ? and classPK = ? and score = ?. 646 * 647 * @param classNameId the class name ID 648 * @param classPK the class p k 649 * @param score the score 650 * @return the number of matching ratings entries 651 * @throws SystemException if a system exception occurred 652 */ 653 public static int countByC_C_S(long classNameId, long classPK, double score) 654 throws com.liferay.portal.kernel.exception.SystemException { 655 return getPersistence().countByC_C_S(classNameId, classPK, score); 656 } 657 658 /** 659 * Returns the number of ratings entries. 660 * 661 * @return the number of ratings entries 662 * @throws SystemException if a system exception occurred 663 */ 664 public static int countAll() 665 throws com.liferay.portal.kernel.exception.SystemException { 666 return getPersistence().countAll(); 667 } 668 669 public static RatingsEntryPersistence getPersistence() { 670 if (_persistence == null) { 671 _persistence = (RatingsEntryPersistence)PortalBeanLocatorUtil.locate(RatingsEntryPersistence.class.getName()); 672 673 ReferenceRegistry.registerReference(RatingsEntryUtil.class, 674 "_persistence"); 675 } 676 677 return _persistence; 678 } 679 680 public void setPersistence(RatingsEntryPersistence persistence) { 681 _persistence = persistence; 682 683 ReferenceRegistry.registerReference(RatingsEntryUtil.class, 684 "_persistence"); 685 } 686 687 private static RatingsEntryPersistence _persistence; 688 }