2.17.2: 2011-06-17

net.sf.basedb.core
Class TimestampParameterType

java.lang.Object
  extended by net.sf.basedb.core.ParameterType<Date>
      extended by net.sf.basedb.core.TimestampParameterType

public class TimestampParameterType
extends ParameterType<Date>

This class represent a parameter type that is a timestamp.

Since:
2.16
Author:
Nicklas
Last modified
$Date $

Constructor Summary
TimestampParameterType()
          Create a new timestamp parameter type, allowing null values.
TimestampParameterType(Date defaultValue, boolean notNull)
          Create a new timestamp parameter type.
TimestampParameterType(Date defaultValue, boolean notNull, int multiplicity, int width, int height, List<Date> items)
          Creates a new TimestampParameterType
 
Method Summary
(package private)  TimestampParameterValueData newParameterValueData()
          Create a new TimestampParameterValueData object.
 String 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, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimestampParameterType

public TimestampParameterType()
Create a new timestamp parameter type, allowing null values.


TimestampParameterType

public TimestampParameterType(Date defaultValue,
                              boolean notNull)
Create a new timestamp parameter type.

Parameters:
defaultValue - Value to use as default. Null is allowed.
notNull - FALSE if nulls values are allowed, TRUE otherwise

TimestampParameterType

public TimestampParameterType(Date defaultValue,
                              boolean notNull,
                              int multiplicity,
                              int width,
                              int height,
                              List<Date> items)
Creates a new TimestampParameterType

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 Detail

toString

public String toString()
Overrides:
toString in class Object

validateValue

void validateValue(String name,
                   Date value)
             throws InvalidDataException
Always validate.

Specified by:
validateValue in class ParameterType<Date>
Parameters:
name - The name of the parameter, use the name if there is need to throw an exception
value - The value
Throws:
InvalidDataException - If the value is not valid

newParameterValueData

TimestampParameterValueData newParameterValueData()
Create a new TimestampParameterValueData object.

Specified by:
newParameterValueData in class ParameterType<Date>

2.17.2: 2011-06-17