org.oreodata.metadata
Class ForeignKeyField

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

public class ForeignKeyField
extends Field
implements ForeignKeyDescriptor

A subclass of Field that represents a foreign key field.

Author:
Serialized Form

Field Summary
 
Fields inherited from class org.oreodata.metadata.Field
defaultValueString, intern, properties, sqlType
 
Constructor Summary
ForeignKeyField()
           
 
Method Summary
 java.lang.String getDataSourceName()
          The lookup name of the data source where the record referred to is contained.
 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 s)
          Given the string representation of a field, return its internal java object representation.
 java.lang.String getRecordType()
          The type of record that is referred to.
protected  void init(org.w3c.dom.Element element)
           
 java.lang.String normalize(java.lang.String s)
          "normalize" the string passed in.
 
Methods inherited from class org.oreodata.metadata.Field
checkValidValue, convertFromJDBC, convertToJDBC, createSAXHandler, defaultValue, getCopy, getLocalizedName, getName, getProperty, getSQLType, hashCode, intern, isFieldOf, isRequired, isSetExternally, processDefaultValue, processNormalization, processProperties, setDefaultValue, toString, valueToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.oreodata.FieldDescriptor
checkValidValue, convertFromJDBC, convertToJDBC, createSAXHandler, defaultValue, getCopy, getLocalizedName, getName, getProperty, getSQLType, isFieldOf, isRequired, isSetExternally, valueToString
 

Constructor Detail

ForeignKeyField

public ForeignKeyField()
Method Detail

getDataSourceName

public java.lang.String getDataSourceName()
The lookup name of the data source where the record referred to is contained.

Specified by:
getDataSourceName in interface ForeignKeyDescriptor

getRecordType

public java.lang.String getRecordType()
The type of record that is referred to.

Specified by:
getRecordType in interface ForeignKeyDescriptor

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 s)
                                     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.

Specified by:
getObjectFromString in interface FieldDescriptor
MangledDataException

normalize

public java.lang.String normalize(java.lang.String s)
Description copied from interface: FieldDescriptor
"normalize" the string passed in. For example, with a case-insensitive string field, this method would return the lower case version of the string (or upper case if that is the "normal" form.)

Specified by:
normalize in interface FieldDescriptor
Overrides:
normalize in class Field
Returns:
the "normalized" string