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 TypeMethodDescriptionint
Returns the alias to use in the HTML <OPTION> element.Returns the visible name to use in the HTML <OPTION> element.getName()
int
int
getVotes()
int
hashCode()
void
setOptionID
(int id) Sets the option ID.void
setVotes
(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:ComboAlias
Returns the visible name to use in the HTML <OPTION> element.- Specified by:
getComboName
in interfaceComboAlias
- Returns:
- The visible name for this entry
-
getComboAlias
Description copied from interface:ComboAlias
Returns the alias to use in the HTML <OPTION> element.- Specified by:
getComboAlias
in 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:
compareTo
in interfaceComparable<Object>
- Overrides:
compareTo
in classDatabaseBean
-
hashCode
public int hashCode()- Overrides:
hashCode
in classDatabaseBean
-
toString
-