|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.util.entity.AbstractBasicEntity
org.torweg.pulse.component.survey.model.AbstractQuestion
org.torweg.pulse.component.survey.model.SelectQuestion
@Entity public class SelectQuestion
Is a question providing multiple values to select.
| Constructor Summary | |
|---|---|
protected |
SelectQuestion()
Default constructor. |
|
SelectQuestion(java.util.Collection<java.lang.String> values,
java.lang.Boolean isAllowBlank,
java.lang.Integer noSelects,
java.lang.Boolean selectExact,
java.lang.Boolean customVal)
Creates a new SelectQuestion with the given value for
isAllowBlank. |
| Method Summary | |
|---|---|
AbstractTypedAnswer<?> |
getAnswer(ServiceRequest request)
Tries to extract the answer to the SelectQuestion from the
given ServiceRequest. |
int |
getNoOfSelects()
Returns the noOfSelects. |
java.util.Collection<java.lang.String> |
getSelectValues()
Returns the selectValues. |
boolean |
isCustomValue()
Returns the customValue. |
boolean |
isSelectExactNoOfSelects()
Returns the selectExactNoOfSelects. |
boolean |
isValid(AbstractTypedAnswer<?> answer)
Checks the given {@code AbstractTypedAnswer |
void |
setCustomValue(boolean customVal)
Sets the customValue. |
void |
setNoOfSelects(int noSelects)
Sets the noOfSelects. |
void |
setSelectExactNoOfSelects(boolean selectExact)
Sets the selectExactNoOfSelects. |
void |
setSelectValues(java.util.Collection<java.lang.String> values)
Sets the selectValues. |
| Methods inherited from class org.torweg.pulse.component.survey.model.AbstractQuestion |
|---|
getQuestionText, isAllowBlank, setIsAllowBlank, setQuestionText |
| Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity |
|---|
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SelectQuestion()
public SelectQuestion(java.util.Collection<java.lang.String> values,
java.lang.Boolean isAllowBlank,
java.lang.Integer noSelects,
java.lang.Boolean selectExact,
java.lang.Boolean customVal)
SelectQuestion with the given value for
isAllowBlank.
values - the valuesisAllowBlank - the value for isAllowBlank to setnoSelects - the number of allowed selectsselectExact - indicates if the noOfSelects is exactly required NOTE:
will be ignored if noSelects is null or
0 (zero)customVal - indicates whether to use a custom value also| Method Detail |
|---|
public final void setSelectValues(java.util.Collection<java.lang.String> values)
values - the selectValues to setpublic final java.util.Collection<java.lang.String> getSelectValues()
public final void setNoOfSelects(int noSelects)
noSelects - the noOfSelects to setpublic final int getNoOfSelects()
public final void setSelectExactNoOfSelects(boolean selectExact)
selectExact - the selectExactNoOfSelects to setpublic final boolean isSelectExactNoOfSelects()
public final void setCustomValue(boolean customVal)
customVal - the customValue to setpublic final boolean isCustomValue()
public final AbstractTypedAnswer<?> getAnswer(ServiceRequest request)
SelectQuestion from the
given ServiceRequest.
getAnswer in class AbstractQuestionrequest - the ServiceRequest
AbstractTypedAnswer<?>; precisely a
SelectQuestionAnswer(org.torweg.pulse.service.request.ServiceRequest)public final boolean isValid(AbstractTypedAnswer<?> answer)
AbstractTypedAnswer<?> for validity.
isValid in class AbstractQuestionanswer - the AbstractTypedAnswer<?> to validate
true if the
AbstractTypedAnswer<?> is valid,
false otherwise(org.torweg.pulse.component.survey.model.answer.AbstractTypedAnswer)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||