Package net.sf.basedb.core
Class DateParameterType
This class represent a parameter type that is a date.
- Version:
- 2.0
- Author:
- Samuel, Nicklas
- Last modified
- $Date: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
Constructor Summary
ConstructorDescriptionCreate a new date parameter type, allowing null values.DateParameterType
(Date defaultValue, boolean notNull) Create a new date parameter type.DateParameterType
(Date defaultValue, boolean notNull, int multiplicity, int width, int height, List<Date> items) Creates a new DateParameterType -
Method Summary
Modifier and TypeMethodDescription(package private) DateParameterValueData
Create a newDateParameterValueData
object.toString()
(package private) void
validateValue
(String name, Date 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
-
DateParameterType
public DateParameterType()Create a new date parameter type, allowing null values. -
DateParameterType
Create a new date parameter type.- Parameters:
defaultValue
- Value to use as default. Null is allowed.notNull
- FALSE if nulls values are allowed, TRUE otherwise
-
DateParameterType
public DateParameterType(Date defaultValue, boolean notNull, int multiplicity, int width, int height, List<Date> items) Creates a new DateParameterType- Parameters:
defaultValue
- The default value for this parameter type.notNull
- FALSE if this parameter type is allowed to be null, otherwise TRUE.multiplicity
- How many values that can be tied to this parameter.width
- Width of the input field for this parameter type in the GUI.height
- Height of the input field for this parameter type in the GUI.items
- A list of allowed items for this parameter type.
-
-
Method Details
-
toString
-
validateValue
Always validate.- Specified by:
validateValue
in classParameterType<Date>
- 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
DateParameterValueData newParameterValueData()Create a newDateParameterValueData
object.- Specified by:
newParameterValueData
in classParameterType<Date>
-