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