org.oreodata.metadata
Class BooleanField

java.lang.Object
  |
  +--org.oreodata.metadata.Field
        |
        +--org.oreodata.metadata.BooleanField
All Implemented Interfaces:
FieldDescriptor, java.io.Serializable

public class BooleanField
extends Field

A FieldDescriptor that describes a field with a boolean true/false value.

Author:
Jonathan Revusky
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.oreodata.metadata.Field
defaultValueString, intern, properties, sqlType
 
Constructor Summary
BooleanField()
           
 
Method Summary
 java.lang.Object convertFromJDBC(java.lang.Object o)
          Method to support slurping records from a JDBC result 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.
protected  void init(org.w3c.dom.Element element)
           
 
Methods inherited from class org.oreodata.metadata.Field
checkValidValue, convertToJDBC, createSAXHandler, defaultValue, getCopy, getLocalizedName, getName, getProperty, getSQLType, hashCode, intern, isFieldOf, isRequired, isSetExternally, normalize, processDefaultValue, processNormalization, processProperties, setDefaultValue, toString, valueToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BooleanField

public BooleanField()
Method Detail

init

protected void init(org.w3c.dom.Element element)
             throws org.xml.sax.SAXException
Overrides:
init in class Field
org.xml.sax.SAXException

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 o)
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