Package net.sf.basedb.core
Class BooleanParameterType
- java.lang.Object
-
- net.sf.basedb.core.ParameterType<Boolean>
-
- net.sf.basedb.core.BooleanParameterType
-
public class BooleanParameterType extends ParameterType<Boolean>
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
Constructors Constructor Description BooleanParameterType()
Create 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) BooleanParameterValueData
newParameterValueData()
Create a newBooleanParameterValueData
object.String
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 Detail
-
BooleanParameterType
public BooleanParameterType()
Create a new boolean parameter type, allowing null values.
-
BooleanParameterType
public BooleanParameterType(Boolean defaultValue, boolean notNull)
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 Detail
-
validateValue
void validateValue(String name, Boolean value) throws InvalidDataException
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>
-
-