com.revusky.niggle.data.metadata
Class TimeZoneField

java.lang.Object
  |
  +--com.revusky.niggle.data.metadata.Field
        |
        +--com.revusky.niggle.data.metadata.TimeZoneField
All Implemented Interfaces:
FieldDescriptor, java.io.Serializable

public class TimeZoneField
extends Field

A descriptor for a field that holds a time zone

Author:
Jonathan Revusky
See Also:
Serialized Form

Fields inherited from class com.revusky.niggle.data.metadata.Field
defaultValueString, sqlType
 
Constructor Summary
TimeZoneField()
           
 
Method Summary
 java.lang.Class getJavaType()
          The kind of java object that can live in this record field.
 java.lang.Object getObjectFromString(Record rec, java.lang.String value)
          Given the string representation of a field, return its internal java object representation.
 java.lang.String valueToString(java.lang.Object value)
          returns the preferred the String representation of the object in question.
 
Methods inherited from class com.revusky.niggle.data.metadata.Field
capitalizeFirstLetter, checkValidValue, convertFromJDBC, defaultValue, getCopy, getLocalizedName, getName, getSQLType, hashCode, init, isFieldOf, isRequired, normalize, processDefaultValue, setDefaultValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeZoneField

public TimeZoneField()
Method Detail

getJavaType

public java.lang.Class getJavaType()
Description copied from interface: FieldDescriptor
The kind of java object that can live in this record field.
Overrides:
getJavaType in class Field

getObjectFromString

public java.lang.Object getObjectFromString(Record rec,
                                            java.lang.String value)
                                     throws MangledDataException
Description copied from interface: FieldDescriptor
Given the string representation of a field, return its internal java object representation. Used in deserializing from a flat file.
Parameters:
The - id of the timezone or full name. Given the way the java.util.TimeZone code works, this will just get massaged into plain GMT if you pass in a nonsense value. MAYBE REVISIT.

valueToString

public java.lang.String valueToString(java.lang.Object value)
Description copied from interface: FieldDescriptor
returns the preferred the String representation of the object in question. Used to persist to a flat file.
Overrides:
valueToString in class Field