edu.uoc.pfc.j2ee.jalonsod.mtp.request
Class BooleanParameterInstance

java.lang.Object
  extended by edu.uoc.pfc.j2ee.jalonsod.mtp.request.ParameterInstance
      extended by edu.uoc.pfc.j2ee.jalonsod.mtp.request.BooleanParameterInstance

public class BooleanParameterInstance
extends ParameterInstance

File: BooleanParameterInstance.java Created: 2012-05-01 Holds a request parameter value of type Boolean.

Author:
José Alonso de Motta
See Also:
BooleanParameter

Field Summary
(package private)  java.lang.Boolean value
          The value of the request parameter.
 
Fields inherited from class edu.uoc.pfc.j2ee.jalonsod.mtp.request.ParameterInstance
parameter, VALIDATION_DATATYPE_CONVERSION_ERROR, VALIDATION_FUNCTION_ERROR, VALIDATION_NOT_VALIDATED, VALIDATION_OK, VALIDATION_REQUIRED_VALUE_IS_NULL, validationStatus
 
Constructor Summary
BooleanParameterInstance(Parameter parameter)
           
 
Method Summary
 java.lang.Boolean getDefaultValue()
          Returns the default value of the parameterInstance with appropriate datatype.
 java.lang.Boolean getValue()
          Returns the value of the parameterInstance.
 void setStringValue(java.lang.String value)
          Sets the value of the parameterInstance received in a string and converted to appropriate datatype.
 void setValue(java.lang.Boolean value)
          The setter of the value received as same datatype as the parameterInstance.
 void setValue(java.lang.Object value)
          Sets the value of the parameterInstance.
 java.lang.String toString()
           
 
Methods inherited from class edu.uoc.pfc.j2ee.jalonsod.mtp.request.ParameterInstance
createParameterInstance, getParameter, getValidationStatus, setParameter, setValidationStatus, setValueAsDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

java.lang.Boolean value
The value of the request parameter.

Constructor Detail

BooleanParameterInstance

public BooleanParameterInstance(Parameter parameter)
Method Detail

getValue

public java.lang.Boolean getValue()
Description copied from class: ParameterInstance
Returns the value of the parameterInstance.

Specified by:
getValue in class ParameterInstance
Returns:
the value of the parameterInstance. The datatype varies according to parameter subtype from configuration.

setValue

public void setValue(java.lang.Object value)
Description copied from class: ParameterInstance
Sets the value of the parameterInstance.

Specified by:
setValue in class ParameterInstance
Parameters:
value - the value of the parameterInstance. The datatype must be appropiate according datatype of parameter metadata from configuration.

setValue

public void setValue(java.lang.Boolean value)
The setter of the value received as same datatype as the parameterInstance.

Parameters:
value - the value to set.

getDefaultValue

public java.lang.Boolean getDefaultValue()
Description copied from class: ParameterInstance
Returns the default value of the parameterInstance with appropriate datatype.

Specified by:
getDefaultValue in class ParameterInstance
Returns:
the default value of the parameterInstance.

setStringValue

public void setStringValue(java.lang.String value)
                    throws MTPException
Description copied from class: ParameterInstance
Sets the value of the parameterInstance received in a string and converted to appropriate datatype.

Specified by:
setStringValue in class ParameterInstance
Parameters:
value - the string with the value to convert.
Throws:
MTPException - throws when the value cannot be converted to appropriate datatype.

toString

public java.lang.String toString()
Specified by:
toString in class ParameterInstance