org.oreodata.metadata
Class TimeZoneField

java.lang.Object
  |
  +--org.oreodata.metadata.Field
        |
        +--org.oreodata.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

Field Summary
 
Fields inherited from class org.oreodata.metadata.Field
defaultValueString, intern, properties, sqlType
 
Constructor Summary
TimeZoneField()
           
 
Method Summary
 java.lang.Object convertFromJDBC(java.lang.Object obj)
          Method to support slurping records from a JDBC result set.
 java.lang.Object convertToJDBC(java.lang.Object obj)
          Method to support persisting records to a JDBC record set.
 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 String representation of the object in question.
 
Methods inherited from class org.oreodata.metadata.Field
checkValidValue, createSAXHandler, defaultValue, getCopy, getLocalizedName, getName, getProperty, getSQLType, hashCode, init, intern, isFieldOf, isRequired, isSetExternally, normalize, processDefaultValue, processNormalization, processProperties, 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.

Specified by:
getJavaType in interface FieldDescriptor
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.

MangledDataException

convertFromJDBC

public java.lang.Object convertFromJDBC(java.lang.Object obj)
Description copied from interface: FieldDescriptor
Method to support slurping records from a JDBC result set. Takes the result of a ResultSet.getObject() and converts it to the JavaObject type we use. In many cases, for strings and numbers, we should get away with this just being a pass-through.

Specified by:
convertFromJDBC in interface FieldDescriptor
Overrides:
convertFromJDBC in class Field

convertToJDBC

public java.lang.Object convertToJDBC(java.lang.Object obj)
Description copied from interface: FieldDescriptor
Method to support persisting records to a JDBC record set. Takes the result returned by this method and passes it to PreparedStatement.setObject(). In many cases, for strings and numbers, we should get away with this just being a pass-through.

Specified by:
convertToJDBC in interface FieldDescriptor
Overrides:
convertToJDBC in class Field

valueToString

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

Specified by:
valueToString in interface FieldDescriptor
Overrides:
valueToString in class Field