@ProviderType
public class RatingsEntryUtil
extends java.lang.Object
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.
Caching information and settings can be found in portal.properties
RatingsEntryPersistence,
RatingsEntryPersistenceImpl| Constructor and Description |
|---|
RatingsEntryUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cacheResult(java.util.List<RatingsEntry> ratingsEntries)
Caches the ratings entries in the entity cache if it is enabled.
|
static void |
cacheResult(RatingsEntry ratingsEntry)
Caches the ratings entry in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(RatingsEntry ratingsEntry) |
static int |
countAll()
Returns the number of ratings entries.
|
static int |
countByC_C_S(long classNameId,
long classPK,
double score)
Returns the number of ratings entries where classNameId = ? and classPK = ? and score = ?.
|
static int |
countByC_C(long classNameId,
long classPK)
Returns the number of ratings entries where classNameId = ? and classPK = ?.
|
static int |
countByU_C_C(long userId,
long classNameId,
long classPK)
Returns the number of ratings entries where userId = ? and classNameId = ? and classPK = ?.
|
static long |
countWithDynamicQuery(DynamicQuery dynamicQuery) |
static RatingsEntry |
create(long entryId)
Creates a new ratings entry with the primary key.
|
static RatingsEntry |
fetchByC_C_First(long classNameId,
long classPK,
OrderByComparator orderByComparator)
Returns the first ratings entry in the ordered set where classNameId = ? and classPK = ?.
|
static RatingsEntry |
fetchByC_C_Last(long classNameId,
long classPK,
OrderByComparator orderByComparator)
Returns the last ratings entry in the ordered set where classNameId = ? and classPK = ?.
|
static RatingsEntry |
fetchByC_C_S_First(long classNameId,
long classPK,
double score,
OrderByComparator orderByComparator)
Returns the first ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?.
|
static RatingsEntry |
fetchByC_C_S_Last(long classNameId,
long classPK,
double score,
OrderByComparator orderByComparator)
Returns the last ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?.
|
static RatingsEntry |
fetchByPrimaryKey(long entryId)
Returns the ratings entry with the primary key or returns
null if it could not be found. |
static RatingsEntry |
fetchByU_C_C(long userId,
long classNameId,
long classPK)
Returns the ratings entry where userId = ? and classNameId = ? and classPK = ? or returns
null if it could not be found. |
static RatingsEntry |
fetchByU_C_C(long userId,
long classNameId,
long classPK,
boolean retrieveFromCache)
Returns the ratings entry where userId = ? and classNameId = ? and classPK = ? or returns
null if it could not be found, optionally using the finder cache. |
static java.util.List<RatingsEntry> |
findAll()
Returns all the ratings entries.
|
static java.util.List<RatingsEntry> |
findAll(int start,
int end)
Returns a range of all the ratings entries.
|
static java.util.List<RatingsEntry> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the ratings entries.
|
static RatingsEntry |
findByC_C_First(long classNameId,
long classPK,
OrderByComparator orderByComparator)
Returns the first ratings entry in the ordered set where classNameId = ? and classPK = ?.
|
static RatingsEntry |
findByC_C_Last(long classNameId,
long classPK,
OrderByComparator orderByComparator)
Returns the last ratings entry in the ordered set where classNameId = ? and classPK = ?.
|
static RatingsEntry[] |
findByC_C_PrevAndNext(long entryId,
long classNameId,
long classPK,
OrderByComparator orderByComparator)
Returns the ratings entries before and after the current ratings entry in the ordered set where classNameId = ? and classPK = ?.
|
static RatingsEntry |
findByC_C_S_First(long classNameId,
long classPK,
double score,
OrderByComparator orderByComparator)
Returns the first ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?.
|
static RatingsEntry |
findByC_C_S_Last(long classNameId,
long classPK,
double score,
OrderByComparator orderByComparator)
Returns the last ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?.
|
static RatingsEntry[] |
findByC_C_S_PrevAndNext(long entryId,
long classNameId,
long classPK,
double score,
OrderByComparator orderByComparator)
Returns the ratings entries before and after the current ratings entry in the ordered set where classNameId = ? and classPK = ? and score = ?.
|
static java.util.List<RatingsEntry> |
findByC_C_S(long classNameId,
long classPK,
double score)
Returns all the ratings entries where classNameId = ? and classPK = ? and score = ?.
|
static java.util.List<RatingsEntry> |
findByC_C_S(long classNameId,
long classPK,
double score,
int start,
int end)
Returns a range of all the ratings entries where classNameId = ? and classPK = ? and score = ?.
|
static java.util.List<RatingsEntry> |
findByC_C_S(long classNameId,
long classPK,
double score,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the ratings entries where classNameId = ? and classPK = ? and score = ?.
|
static java.util.List<RatingsEntry> |
findByC_C(long classNameId,
long classPK)
Returns all the ratings entries where classNameId = ? and classPK = ?.
|
static java.util.List<RatingsEntry> |
findByC_C(long classNameId,
long classPK,
int start,
int end)
Returns a range of all the ratings entries where classNameId = ? and classPK = ?.
|
static java.util.List<RatingsEntry> |
findByC_C(long classNameId,
long classPK,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the ratings entries where classNameId = ? and classPK = ?.
|
static RatingsEntry |
findByPrimaryKey(long entryId)
Returns the ratings entry with the primary key or throws a
NoSuchEntryException if it could not be found. |
static RatingsEntry |
findByU_C_C(long userId,
long classNameId,
long classPK)
Returns the ratings entry where userId = ? and classNameId = ? and classPK = ? or throws a
NoSuchEntryException if it could not be found. |
static java.util.List<RatingsEntry> |
findWithDynamicQuery(DynamicQuery dynamicQuery) |
static java.util.List<RatingsEntry> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<RatingsEntry> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator) |
static RatingsEntryPersistence |
getPersistence() |
static RatingsEntry |
remove(long entryId)
Removes the ratings entry with the primary key from the database.
|
static void |
removeAll()
Removes all the ratings entries from the database.
|
static void |
removeByC_C_S(long classNameId,
long classPK,
double score)
Removes all the ratings entries where classNameId = ? and classPK = ? and score = ? from the database.
|
static void |
removeByC_C(long classNameId,
long classPK)
Removes all the ratings entries where classNameId = ? and classPK = ? from the database.
|
static RatingsEntry |
removeByU_C_C(long userId,
long classNameId,
long classPK)
Removes the ratings entry where userId = ? and classNameId = ? and classPK = ? from the database.
|
void |
setPersistence(RatingsEntryPersistence persistence)
Deprecated.
As of 6.2.0
|
static RatingsEntry |
update(RatingsEntry ratingsEntry) |
static RatingsEntry |
update(RatingsEntry ratingsEntry,
ServiceContext serviceContext) |
static RatingsEntry |
updateImpl(RatingsEntry ratingsEntry) |
public static void clearCache()
BasePersistence.clearCache()public static void clearCache(RatingsEntry ratingsEntry)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemExceptionBasePersistence.countWithDynamicQuery(DynamicQuery)public static java.util.List<RatingsEntry> findWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemExceptionBasePersistence.findWithDynamicQuery(DynamicQuery)public static java.util.List<RatingsEntry> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException
public static java.util.List<RatingsEntry> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException
public static RatingsEntry update(RatingsEntry ratingsEntry) throws SystemException
public static RatingsEntry update(RatingsEntry ratingsEntry, ServiceContext serviceContext) throws SystemException
public static java.util.List<RatingsEntry> findByC_C(long classNameId, long classPK) throws SystemException
classNameId - the class name IDclassPK - the class p kSystemException - if a system exception occurredpublic static java.util.List<RatingsEntry> findByC_C(long classNameId, long classPK, int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from RatingsEntryModelImpl. If both orderByComparator 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.
classNameId - the class name IDclassPK - the class p kstart - the lower bound of the range of ratings entriesend - the upper bound of the range of ratings entries (not inclusive)SystemException - if a system exception occurredpublic static java.util.List<RatingsEntry> findByC_C(long classNameId, long classPK, int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from RatingsEntryModelImpl. If both orderByComparator 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.
classNameId - the class name IDclassPK - the class p kstart - the lower bound of the range of ratings entriesend - the upper bound of the range of ratings entries (not inclusive)orderByComparator - the comparator to order the results by (optionally null)SystemException - if a system exception occurredpublic static RatingsEntry findByC_C_First(long classNameId, long classPK, OrderByComparator orderByComparator) throws SystemException, NoSuchEntryException
classNameId - the class name IDclassPK - the class p korderByComparator - the comparator to order the set by (optionally null)NoSuchEntryException - if a matching ratings entry could not be foundSystemException - if a system exception occurredpublic static RatingsEntry fetchByC_C_First(long classNameId, long classPK, OrderByComparator orderByComparator) throws SystemException
classNameId - the class name IDclassPK - the class p korderByComparator - the comparator to order the set by (optionally null)null if a matching ratings entry could not be foundSystemException - if a system exception occurredpublic static RatingsEntry findByC_C_Last(long classNameId, long classPK, OrderByComparator orderByComparator) throws SystemException, NoSuchEntryException
classNameId - the class name IDclassPK - the class p korderByComparator - the comparator to order the set by (optionally null)NoSuchEntryException - if a matching ratings entry could not be foundSystemException - if a system exception occurredpublic static RatingsEntry fetchByC_C_Last(long classNameId, long classPK, OrderByComparator orderByComparator) throws SystemException
classNameId - the class name IDclassPK - the class p korderByComparator - the comparator to order the set by (optionally null)null if a matching ratings entry could not be foundSystemException - if a system exception occurredpublic static RatingsEntry[] findByC_C_PrevAndNext(long entryId, long classNameId, long classPK, OrderByComparator orderByComparator) throws SystemException, NoSuchEntryException
entryId - the primary key of the current ratings entryclassNameId - the class name IDclassPK - the class p korderByComparator - the comparator to order the set by (optionally null)NoSuchEntryException - if a ratings entry with the primary key could not be foundSystemException - if a system exception occurredpublic static void removeByC_C(long classNameId,
long classPK)
throws SystemException
classNameId - the class name IDclassPK - the class p kSystemException - if a system exception occurredpublic static int countByC_C(long classNameId,
long classPK)
throws SystemException
classNameId - the class name IDclassPK - the class p kSystemException - if a system exception occurredpublic static RatingsEntry findByU_C_C(long userId, long classNameId, long classPK) throws SystemException, NoSuchEntryException
NoSuchEntryException if it could not be found.userId - the user IDclassNameId - the class name IDclassPK - the class p kNoSuchEntryException - if a matching ratings entry could not be foundSystemException - if a system exception occurredpublic static RatingsEntry fetchByU_C_C(long userId, long classNameId, long classPK) throws SystemException
null if it could not be found. Uses the finder cache.userId - the user IDclassNameId - the class name IDclassPK - the class p knull if a matching ratings entry could not be foundSystemException - if a system exception occurredpublic static RatingsEntry fetchByU_C_C(long userId, long classNameId, long classPK, boolean retrieveFromCache) throws SystemException
null if it could not be found, optionally using the finder cache.userId - the user IDclassNameId - the class name IDclassPK - the class p kretrieveFromCache - whether to use the finder cachenull if a matching ratings entry could not be foundSystemException - if a system exception occurredpublic static RatingsEntry removeByU_C_C(long userId, long classNameId, long classPK) throws SystemException, NoSuchEntryException
userId - the user IDclassNameId - the class name IDclassPK - the class p kSystemException - if a system exception occurredNoSuchEntryExceptionpublic static int countByU_C_C(long userId,
long classNameId,
long classPK)
throws SystemException
userId - the user IDclassNameId - the class name IDclassPK - the class p kSystemException - if a system exception occurredpublic static java.util.List<RatingsEntry> findByC_C_S(long classNameId, long classPK, double score) throws SystemException
classNameId - the class name IDclassPK - the class p kscore - the scoreSystemException - if a system exception occurredpublic static java.util.List<RatingsEntry> findByC_C_S(long classNameId, long classPK, double score, int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from RatingsEntryModelImpl. If both orderByComparator 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.
classNameId - the class name IDclassPK - the class p kscore - the scorestart - the lower bound of the range of ratings entriesend - the upper bound of the range of ratings entries (not inclusive)SystemException - if a system exception occurredpublic static java.util.List<RatingsEntry> findByC_C_S(long classNameId, long classPK, double score, int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from RatingsEntryModelImpl. If both orderByComparator 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.
classNameId - the class name IDclassPK - the class p kscore - the scorestart - the lower bound of the range of ratings entriesend - the upper bound of the range of ratings entries (not inclusive)orderByComparator - the comparator to order the results by (optionally null)SystemException - if a system exception occurredpublic static RatingsEntry findByC_C_S_First(long classNameId, long classPK, double score, OrderByComparator orderByComparator) throws SystemException, NoSuchEntryException
classNameId - the class name IDclassPK - the class p kscore - the scoreorderByComparator - the comparator to order the set by (optionally null)NoSuchEntryException - if a matching ratings entry could not be foundSystemException - if a system exception occurredpublic static RatingsEntry fetchByC_C_S_First(long classNameId, long classPK, double score, OrderByComparator orderByComparator) throws SystemException
classNameId - the class name IDclassPK - the class p kscore - the scoreorderByComparator - the comparator to order the set by (optionally null)null if a matching ratings entry could not be foundSystemException - if a system exception occurredpublic static RatingsEntry findByC_C_S_Last(long classNameId, long classPK, double score, OrderByComparator orderByComparator) throws SystemException, NoSuchEntryException
classNameId - the class name IDclassPK - the class p kscore - the scoreorderByComparator - the comparator to order the set by (optionally null)NoSuchEntryException - if a matching ratings entry could not be foundSystemException - if a system exception occurredpublic static RatingsEntry fetchByC_C_S_Last(long classNameId, long classPK, double score, OrderByComparator orderByComparator) throws SystemException
classNameId - the class name IDclassPK - the class p kscore - the scoreorderByComparator - the comparator to order the set by (optionally null)null if a matching ratings entry could not be foundSystemException - if a system exception occurredpublic static RatingsEntry[] findByC_C_S_PrevAndNext(long entryId, long classNameId, long classPK, double score, OrderByComparator orderByComparator) throws SystemException, NoSuchEntryException
entryId - the primary key of the current ratings entryclassNameId - the class name IDclassPK - the class p kscore - the scoreorderByComparator - the comparator to order the set by (optionally null)NoSuchEntryException - if a ratings entry with the primary key could not be foundSystemException - if a system exception occurredpublic static void removeByC_C_S(long classNameId,
long classPK,
double score)
throws SystemException
classNameId - the class name IDclassPK - the class p kscore - the scoreSystemException - if a system exception occurredpublic static int countByC_C_S(long classNameId,
long classPK,
double score)
throws SystemException
classNameId - the class name IDclassPK - the class p kscore - the scoreSystemException - if a system exception occurredpublic static void cacheResult(RatingsEntry ratingsEntry)
ratingsEntry - the ratings entrypublic static void cacheResult(java.util.List<RatingsEntry> ratingsEntries)
ratingsEntries - the ratings entriespublic static RatingsEntry create(long entryId)
entryId - the primary key for the new ratings entrypublic static RatingsEntry remove(long entryId) throws SystemException, NoSuchEntryException
entryId - the primary key of the ratings entryNoSuchEntryException - if a ratings entry with the primary key could not be foundSystemException - if a system exception occurredpublic static RatingsEntry updateImpl(RatingsEntry ratingsEntry) throws SystemException
SystemExceptionpublic static RatingsEntry findByPrimaryKey(long entryId) throws SystemException, NoSuchEntryException
NoSuchEntryException if it could not be found.entryId - the primary key of the ratings entryNoSuchEntryException - if a ratings entry with the primary key could not be foundSystemException - if a system exception occurredpublic static RatingsEntry fetchByPrimaryKey(long entryId) throws SystemException
null if it could not be found.entryId - the primary key of the ratings entrynull if a ratings entry with the primary key could not be foundSystemException - if a system exception occurredpublic static java.util.List<RatingsEntry> findAll() throws SystemException
SystemException - if a system exception occurredpublic static java.util.List<RatingsEntry> findAll(int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from RatingsEntryModelImpl. If both orderByComparator 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.
start - the lower bound of the range of ratings entriesend - the upper bound of the range of ratings entries (not inclusive)SystemException - if a system exception occurredpublic static java.util.List<RatingsEntry> findAll(int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from RatingsEntryModelImpl. If both orderByComparator 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.
start - the lower bound of the range of ratings entriesend - the upper bound of the range of ratings entries (not inclusive)orderByComparator - the comparator to order the results by (optionally null)SystemException - if a system exception occurredpublic static void removeAll()
throws SystemException
SystemException - if a system exception occurredpublic static int countAll()
throws SystemException
SystemException - if a system exception occurredpublic static RatingsEntryPersistence getPersistence()
public void setPersistence(RatingsEntryPersistence persistence)