2.17.2: 2011-06-17

net.sf.basedb.core.data
Class DateParameterValueData

java.lang.Object
  extended by net.sf.basedb.core.data.BasicData
      extended by net.sf.basedb.core.data.ParameterValueData<Date>
          extended by net.sf.basedb.core.data.DateParameterValueData
All Implemented Interfaces:
IdentifiableData

public class DateParameterValueData
extends ParameterValueData<Date>

Date parameter value.

Version:
2.0
Author:
Samuel
See Also:
Parameters overview
Last modified
$Date: 2010-10-01 13:51:57 +0200 (Fri, 01 Oct 2010) $
Hibernate: subclass
discriminator-value="8"

Field Summary
private  List<Date> values
           
 
Fields inherited from class net.sf.basedb.core.data.ParameterValueData
MAX_DESCRIPTION_LENGTH, MAX_LABEL_LENGTH
 
Constructor Summary
DateParameterValueData()
           
DateParameterValueData(Date... values)
           
 
Method Summary
 List<Date> getValues()
          Get values of this parameter.
 int getValueType()
          Get the type of parameter values that are store in this parameter.
 void replaceValues(List<?> values)
          Overrides the parent method since we want to get rid of the time part of the date.
 void setSingleValue(Object value)
          Overrides the parent method since we want to get rid of the time part of the date.
(package private)  void setValues(List<Date> values)
          Set values of this parameter.
 String toString()
          The string will look like ClassName[id=55] or ClassName[new].
 
Methods inherited from class net.sf.basedb.core.data.ParameterValueData
getDescription, getLabel, setDescription, setLabel
 
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

values

private List<Date> values
Constructor Detail

DateParameterValueData

public DateParameterValueData()

DateParameterValueData

public DateParameterValueData(Date... values)
Method Detail

getValueType

public int getValueType()
Description copied from class: ParameterValueData
Get the type of parameter values that are store in this parameter. The value should correspond to one of the Type.getValue() values, or 0 if the parameter has no corresponding type.

Specified by:
getValueType in class ParameterValueData<Date>
Returns:
8 (Type.DATE)
Since:
2.16

getValues

public List<Date> getValues()
Description copied from class: ParameterValueData
Get values of this parameter. Hibernate mapped in each subclass to a bag containing all values for the parameter.

Specified by:
getValues in class ParameterValueData<Date>
Returns:
Collection of values.
Hibernate: collection-key
column="`id`"
Hibernate: collection-element
column="`value`" type="date" not-null="true"
Hibernate: bag
table="`DateValues`" lazy="true" cascade="all"

setValues

void setValues(List<Date> values)
Description copied from class: ParameterValueData
Set values of this parameter.

NOTE! Used by Hibernate to initialize the object. Do not call AnnotationData.setLastUpdate(java.util.Date)!

Specified by:
setValues in class ParameterValueData<Date>
Parameters:
values - Collection of values.

replaceValues

public void replaceValues(List<?> values)
Overrides the parent method since we want to get rid of the time part of the date.

Overrides:
replaceValues in class ParameterValueData<Date>

setSingleValue

public void setSingleValue(Object value)
Overrides the parent method since we want to get rid of the time part of the date.

Overrides:
setSingleValue in class ParameterValueData<Date>

toString

public String toString()
Description copied from class: BasicData
The string will look like ClassName[id=55] or ClassName[new].

Overrides:
toString in class BasicData

2.17.2: 2011-06-17