Class PollOption
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.cooler.PollOption
- All Implemented Interfaces:
Serializable,Comparable<Object>,ComboAlias,IDBean,Cacheable
A bean to store Water Cooler poll options.
- Since:
- 1.0
- Version:
- 8.0
- Author:
- Luke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPollOption(int threadID, String name) Creates a new Water Cooler poll option. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the alias to use in the HTML <OPTION> element.Returns the visible name to use in the HTML <OPTION> element.getName()intintgetVotes()inthashCode()voidsetOptionID(int id) Sets the option ID.voidsetVotes(int voteCount) Updates the number of votes.toString()Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, equals, getHexID, getID, setID, validateID, validateID
-
Constructor Details
-
PollOption
Creates a new Water Cooler poll option.- Parameters:
threadID- the Message Thread database IDname- the option name- Throws:
IllegalArgumentException- if thread ID is zero or negativeNullPointerException- if name is null
-
-
Method Details
-
getName
-
getOptionID
public int getOptionID() -
getVotes
public int getVotes() -
getComboName
Description copied from interface:ComboAliasReturns the visible name to use in the HTML <OPTION> element.- Specified by:
getComboNamein interfaceComboAlias- Returns:
- The visible name for this entry
-
getComboAlias
Description copied from interface:ComboAliasReturns the alias to use in the HTML <OPTION> element.- Specified by:
getComboAliasin interfaceComboAlias- Returns:
- The alias for this entry
-
setOptionID
public void setOptionID(int id) Sets the option ID.- Parameters:
id- the new option ID- Throws:
IllegalArgumentException- if id is zero or negative- See Also:
-
setVotes
public void setVotes(int voteCount) Updates the number of votes.- Parameters:
voteCount- the number of votes- See Also:
-
compareTo
- Specified by:
compareToin interfaceComparable<Object>- Overrides:
compareToin classDatabaseBean
-
hashCode
public int hashCode()- Overrides:
hashCodein classDatabaseBean
-
toString
-