public class HibernateRatingDAO extends HibernatePersistentObjectDAO<Rating> implements RatingDAO
RatingDAO
entityClass, log, sessionFactory
Constructor and Description |
---|
HibernateRatingDAO() |
Modifier and Type | Method and Description |
---|---|
boolean |
findByDocIdAndUserId(long docId,
long userId)
Find the rating for the given user id and the given document id.
|
Rating |
findVotesByDocId(long docId)
Returns a rating that contains count and average of vote on the given
document.
|
bulkUpdate, delete, deleteAll, evict, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, flush, getConnection, getCurrentSession, getDbms, getSessionFactory, initialize, isHsql, isMySQL, isOracle, isSqlServer, jdbcUpdate, jdbcUpdate, merge, prepareQuery, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSet, refresh, saveOrUpdate, setSessionFactory, store
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bulkUpdate, delete, deleteAll, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSet, store
public Rating findVotesByDocId(long docId)
RatingDAO
findVotesByDocId
in interface RatingDAO
docId
- ID of the document.public boolean findByDocIdAndUserId(long docId, long userId)
RatingDAO
findByDocIdAndUserId
in interface RatingDAO
docId
- ID of the document.userId
- ID of the user.Copyright © 2008-2014 Logical Objects. All Rights Reserved.