public class CSPollContent extends CSItemContent
CSPoll
object.
CSPoll
,
CSPollMultiple
,
CSPollContentAnswer
,
Serialized FormConstructor and Description |
---|
CSPollContent()
Creates an empty
CSPollContent object. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Determines whether the data contained in this
CSPollContent object is the same as that contained
within the one supplied. |
java.util.ArrayList |
getAnswers()
Gets the answers that are available for this poll.
|
boolean |
getArchive()
Indicates whether the poll can be archived or not.
|
int |
getAuthor()
Gets the poll's author.
|
boolean |
getDisplay()
Indicates whether the poll can be displayed on the website or not.
|
java.util.Date |
getEndDate()
Gets the poll's end date.
|
int |
getGroupID()
Get the ID of the immediate parent poll group.
|
java.lang.String |
getGroupName()
Get the name of the immediate parent poll group.
|
java.lang.String |
getName()
Gets the name of the poll.
|
int |
getPollID()
Gets the ID of the poll.
|
java.lang.String |
getQuestion()
Gets the poll's question.
|
java.util.Date |
getStartDate()
Gets the poll's start date.
|
int |
getTotalVotes()
Gets the total number of poll votes.
|
java.lang.String |
getType()
Gets the poll's type.
|
int |
getVotes(java.lang.String strTag)
Gets the number of votes for a particular answer.
|
void |
setAnswers(java.util.ArrayList arrAnswers)
Sets the answers available for the poll.
|
void |
setArchive(boolean bArchive)
Specifies whether the poll can be archived or not.
|
void |
setAuthor(int nAuthor)
Sets the author of the poll.
|
void |
setDisplay(boolean bDisplay)
Specifies whether the poll can be displayed on the website or not.
|
void |
setEndDate(java.util.Date objDate)
Sets the poll's end date, the date upon which the poll is to become inactive.
|
void |
setGroupID(int nGroupID)
Set the ID of the immediate parent poll group.
|
void |
setGroupName(java.lang.String strGroupName)
Set the Name of the immediate parent poll group.
|
void |
setName(java.lang.String strName)
Sets the name of the poll.
|
void |
setPollID(int nPollID)
Sets the ID of the poll.
|
void |
setQuestion(java.lang.String strQuestion)
Sets the poll's question text.
|
void |
setStartDate(java.util.Date objDate)
Sets the poll's start date, the date upon which the poll is to become active.
|
void |
setTotalVotes(int nTotalVotes)
Sets the total number of votes for the poll.
|
void |
setType(java.lang.String strType)
Sets the type of poll.
|
void |
setVotes(java.lang.String strTag,
int nVotes)
Sets the number of votes for a specific poll answer.
|
java.lang.String |
toString()
Outputs the contents of this
CSPollContent object to a String object in a
user-friendly format. |
clone, getID, setID, unset
public void setPollID(int nPollID)
nPollID
- the numeric identifier of the pollpublic int getPollID()
public void setName(java.lang.String strName)
strName
- The poll's namepublic java.lang.String getName()
public void setAuthor(int nAuthor)
nAuthor
- The numeric identifier of the poll's author. This should be the ID of one of the users set up via iCM
security.public int getAuthor()
public void setDisplay(boolean bDisplay)
false
,
the poll is not to be displayed on the website.
bDisplay
- true
if the poll can be displayed, false
otherwise.public boolean getDisplay()
true
if the poll can be displayed, false
otherwise.public void setArchive(boolean bArchive)
true
, the poll can be
archived.
bArchive
- true
if the poll can be archived, false
otherwise.public boolean getArchive()
true
if the poll can be archived, false
otherwise.public void setQuestion(java.lang.String strQuestion)
strQuestion
- The question to be asked by the pollpublic java.lang.String getQuestion()
public void setStartDate(java.util.Date objDate)
objDate
- The poll's start datepublic java.util.Date getStartDate()
public void setEndDate(java.util.Date objDate)
objDate
- The poll's end datepublic java.util.Date getEndDate()
public void setType(java.lang.String strType)
Sets the type of poll. Defined poll types are :
strType
- The poll typepublic java.lang.String getType()
public void setTotalVotes(int nTotalVotes)
nTotalVotes
- The total number of votespublic int getTotalVotes()
public void setVotes(java.lang.String strTag, int nVotes)
strTag
- The tag that identifies the answernVotes
- The number of votes for the specified answerpublic int getVotes(java.lang.String strTag)
strTag
- The tag that identifies the answerpublic void setAnswers(java.util.ArrayList arrAnswers)
ArrayList
must be a valid
CSPollContentAnswer
object.
arrAnswers
- An ArrayList
of CSPollContentAnswer
objectspublic java.util.ArrayList getAnswers()
ArrayList
will
be a CSPollContentAnswer
object.
ArrayList
of CSPollContentAnswer
objectspublic void setGroupID(int nGroupID)
nGroupID
- the ID of the parent poll group.public int getGroupID()
public void setGroupName(java.lang.String strGroupName)
strGroupName
- the name of the parent poll group.public java.lang.String getGroupName()
public java.lang.String toString()
CSPollContent
object to a String
object in a
user-friendly format.
toString
in class CSItemContent
String
containing the user-friendly outputpublic boolean equals(java.lang.Object obj)
CSPollContent
object is the same as that contained
within the one supplied. Note that the key data used for searching is not tested for equality.
equals
in class CSItemContent
obj
- The CSPollContent
object to be tested for equalitytrue
if the data matches, false
otherwise.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.