Package net.sf.basedb.core
Class BooleanParameterType
This class represent a parameter type that is a boolean.
- Version:
- 2.0
- Author:
- Nicklas
- Last modified
- $Date: 2013-12-06 11:52:11 +0100 (fr, 06 dec 2013) $
-
Constructor Summary
ConstructorDescriptionCreate a new boolean parameter type, allowing null values.BooleanParameterType
(Boolean defaultValue, boolean notNull) Create a new boolean parameter type.BooleanParameterType
(Boolean defaultValue, boolean notNull, int multiplicity, Enumeration<Boolean, String> items) -
Method Summary
Modifier and TypeMethodDescription(package private) BooleanParameterValueData
Create a newBooleanParameterValueData
object.toString()
(package private) void
validateValue
(String name, Boolean value) Always validate.Methods inherited from class net.sf.basedb.core.ParameterType
getDefaultValue, getEnumeration, getHeight, getItems, getMultiplicity, getNotNull, getParameterClass, getValueType, getWidth, isEnumeration, isMasked, validate, validate
-
Constructor Details
-
BooleanParameterType
public BooleanParameterType()Create a new boolean parameter type, allowing null values. -
BooleanParameterType
Create a new boolean parameter type.- Parameters:
defaultValue
- Default value to use. Null is allowed.notNull
- FALSE if nulls values are allowed, TRUE otherwise
-
BooleanParameterType
public BooleanParameterType(Boolean defaultValue, boolean notNull, int multiplicity, Enumeration<Boolean, String> items)
-
-
Method Details
-
toString
-
validateValue
Always validate.- Specified by:
validateValue
in classParameterType<Boolean>
- Parameters:
name
- The name of the parameter, use the name if there is need to throw an exceptionvalue
- The value- Throws:
InvalidDataException
- If the value is not valid
-
newParameterValueData
BooleanParameterValueData newParameterValueData()Create a newBooleanParameterValueData
object.- Specified by:
newParameterValueData
in classParameterType<Boolean>
-