|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portlet.ratings.service.persistence.RatingsEntryUtil
@ProviderType public class RatingsEntryUtil
The persistence utility for the ratings entry service. This utility wraps 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 Summary | |
---|---|
RatingsEntryUtil()
|
Method Summary | |
---|---|
static void |
cacheResult(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 List<RatingsEntry> |
findAll()
Returns all the ratings entries. |
static List<RatingsEntry> |
findAll(int start,
int end)
Returns a range of all the ratings entries. |
static 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 List<RatingsEntry> |
findByC_C_S(long classNameId,
long classPK,
double score)
Returns all the ratings entries where classNameId = ? and classPK = ? and score = ?. |
static 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 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 List<RatingsEntry> |
findByC_C(long classNameId,
long classPK)
Returns all the ratings entries where classNameId = ? and classPK = ?. |
static 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 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 List<RatingsEntry> |
findWithDynamicQuery(DynamicQuery dynamicQuery)
|
static List<RatingsEntry> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
|
static 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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RatingsEntryUtil()
Method Detail |
---|
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(RatingsEntry ratingsEntry)
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static List<RatingsEntry> findWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static List<RatingsEntry> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static List<RatingsEntry> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static RatingsEntry update(RatingsEntry ratingsEntry) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel)
public static RatingsEntry update(RatingsEntry ratingsEntry, ServiceContext serviceContext) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, ServiceContext)
public static List<RatingsEntry> findByC_C(long classNameId, long classPK) throws SystemException
classNameId
- the class name IDclassPK
- the class p k
SystemException
- if a system exception occurredpublic static 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 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 found
SystemException
- 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 found
SystemException
- 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 found
SystemException
- 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 found
SystemException
- 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 found
SystemException
- if a system exception occurredpublic static void removeByC_C(long classNameId, long classPK) throws SystemException
classNameId
- the class name IDclassPK
- the class p k
SystemException
- if a system exception occurredpublic static int countByC_C(long classNameId, long classPK) throws SystemException
classNameId
- the class name IDclassPK
- the class p k
SystemException
- 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 k
NoSuchEntryException
- if a matching ratings entry could not be found
SystemException
- 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 k
null
if a matching ratings entry could not be found
SystemException
- 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 cache
null
if a matching ratings entry could not be found
SystemException
- 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 k
SystemException
- if a system exception occurred
NoSuchEntryException
public static int countByU_C_C(long userId, long classNameId, long classPK) throws SystemException
userId
- the user IDclassNameId
- the class name IDclassPK
- the class p k
SystemException
- if a system exception occurredpublic static List<RatingsEntry> findByC_C_S(long classNameId, long classPK, double score) throws SystemException
classNameId
- the class name IDclassPK
- the class p kscore
- the score
SystemException
- if a system exception occurredpublic static 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 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 found
SystemException
- 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 found
SystemException
- 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 found
SystemException
- 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 found
SystemException
- 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 found
SystemException
- 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 score
SystemException
- 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 score
SystemException
- if a system exception occurredpublic static void cacheResult(RatingsEntry ratingsEntry)
ratingsEntry
- the ratings entrypublic static void cacheResult(List<RatingsEntry> ratingsEntries)
ratingsEntries
- the ratings entriespublic static RatingsEntry create(long entryId)
entryId
- the primary key for the new ratings entry
public static RatingsEntry remove(long entryId) throws SystemException, NoSuchEntryException
entryId
- the primary key of the ratings entry
NoSuchEntryException
- if a ratings entry with the primary key could not be found
SystemException
- if a system exception occurredpublic static RatingsEntry updateImpl(RatingsEntry ratingsEntry) throws SystemException
SystemException
public static RatingsEntry findByPrimaryKey(long entryId) throws SystemException, NoSuchEntryException
NoSuchEntryException
if it could not be found.
entryId
- the primary key of the ratings entry
NoSuchEntryException
- if a ratings entry with the primary key could not be found
SystemException
- 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 entry
null
if a ratings entry with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<RatingsEntry> findAll() throws SystemException
SystemException
- if a system exception occurredpublic static 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 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)
|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |