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