Package net.sf.basedb.core
Class ItemParameterType<T extends BasicItem>
java.lang.Object
net.sf.basedb.core.ParameterType<T>
net.sf.basedb.core.ItemParameterType<T>
This class represent a parameter type that is an object derived from
BasicData
.
It will have a list of BasicItem
derived objects of the same type
to choose from.- Version:
- 2.0
- Author:
- Samuel, Nicklas
- Last modified
- $Date: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ItemParameterValueData
Create a newItemParameterValueData
object.toString()
(package private) void
validateValue
(String name, T value) Check if the value is in the list of allowed values.Methods inherited from class net.sf.basedb.core.ParameterType
getDefaultValue, getEnumeration, getHeight, getItems, getMultiplicity, getNotNull, getParameterClass, getValueType, getWidth, isEnumeration, isMasked, validate, validate
-
Constructor Details
-
ItemParameterType
Create a new item parameter type, allowing null values.- Parameters:
clazz
- The class object of the type of items that are accepteditems
- List of items to choose from.
-
ItemParameterType
-
-
Method Details
-
toString
-
validateValue
Check if the value is in the list of allowed values.- Specified by:
validateValue
in classParameterType<T extends BasicItem>
- 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
ItemParameterValueData newParameterValueData()Create a newItemParameterValueData
object.- Specified by:
newParameterValueData
in classParameterType<T extends BasicItem>
-