One member's vote on a post, comment or forum reply, recording who voted, when, and by how much. A voter has at most one vote row per post; voting again updates the existing row rather than adding another. The count is normally plus one for an up vote and minus one for a down vote, and the sum of the counts for a post is cached on that post as its votes total.

Group: Database Entities

Implements: Relational, Serializable


Properties

PropertyReturnsDescription
countintWeight of this vote, normally plus one for an up vote and minus one for a down vote. The votes total cached on the post is the sum of the counts of all its votes.
idlongUnique database identifier for this vote.
postPostPost the vote was cast on. This may be a comment, a forum topic or a forum reply, since all of them are posts. Never null.
voteDateDateWhen the vote was cast, or last changed. Re-voting overwrites this with the newer time.
voterProfileProfileProfile of the member who cast the vote. Never null, so votes are always attributable and a member can only hold one vote per post.
websiteWebsiteWebsite the vote was cast on, copied onto the vote so that votes can be counted per website or per organisation without joining through the post. Never null.

Methods

getId()

Returns: long

Unique database identifier for this vote.

getPost()

Returns: Post

Post the vote was cast on. This may be a comment, a forum topic or a forum reply, since all of them are posts. Never null.

getWebsite()

Returns: Website

Website the vote was cast on, copied onto the vote so that votes can be counted per website or per organisation without joining through the post. Never null.

getVoterProfile()

Returns: Profile

Profile of the member who cast the vote. Never null, so votes are always attributable and a member can only hold one vote per post.

getVoteDate()

Returns: Date

When the vote was cast, or last changed. Re-voting overwrites this with the newer time.

getCount()

Returns: int

Weight of this vote, normally plus one for an up vote and minus one for a down vote. The votes total cached on the post is the sum of the counts of all its votes.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.