|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.oreodata.metadata.Field
abstract base class for objects that represent the metadata relating to a record field. This object knows how to set itself up from a DOM element.
| Field Summary | |
protected java.lang.String |
defaultValueString
|
protected boolean |
intern
|
protected java.util.Properties |
properties
|
protected java.lang.String |
sqlType
|
| Constructor Summary | |
Field()
|
|
| Method Summary | |
void |
checkValidValue(Record rec,
java.lang.Object o)
Check whether this object is a valid value for this field of the given record. |
java.lang.Object |
convertFromJDBC(java.lang.Object o)
Method to support slurping records from a JDBC result set. |
java.lang.Object |
convertToJDBC(java.lang.Object o)
Method to support persisting records to a JDBC record set. |
HierarchicalHandler |
createSAXHandler(HierarchicalHandler parent,
Record rec)
|
java.lang.Object |
defaultValue()
returns this field's "default value". |
java.lang.Object |
getCopy(java.lang.Object o)
Used when encapsulation requires Record::get() to return a clone of an object. |
java.lang.Class |
getJavaType()
The kind of java object that can live in this record field. |
java.lang.String |
getLocalizedName(java.util.Locale locale)
|
java.lang.String |
getName()
A unique name that identifies the field |
java.lang.String |
getProperty(java.lang.String propertyName)
a hook so that implementors can add other properties |
java.lang.String |
getSQLType()
|
int |
hashCode()
|
protected void |
init(org.w3c.dom.Element element)
|
protected java.lang.Object |
intern(java.lang.Object o)
|
boolean |
isFieldOf(Record rec)
Does this FieldDescriptor describe a field of the Record? Useful for sanity checks. |
boolean |
isRequired()
Used in the core validity checks. |
boolean |
isSetExternally()
|
java.lang.String |
normalize(java.lang.String s)
"normalize" the string passed in. |
protected void |
processDefaultValue()
|
protected void |
processNormalization(org.w3c.dom.Element elem)
|
protected void |
processProperties()
|
protected void |
setDefaultValue(java.lang.Object o)
|
java.lang.String |
toString()
|
java.lang.String |
valueToString(java.lang.Object val)
returns the preferred String representation of the object in question. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.oreodata.FieldDescriptor |
getObjectFromString |
| Field Detail |
protected java.lang.String sqlType
protected java.lang.String defaultValueString
protected java.util.Properties properties
protected boolean intern
| Constructor Detail |
public Field()
| Method Detail |
protected void init(org.w3c.dom.Element element)
throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void processDefaultValue()
throws java.io.IOException
java.io.IOException
protected void processProperties()
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionprotected void processNormalization(org.w3c.dom.Element elem)
public java.lang.Object getCopy(java.lang.Object o)
FieldDescriptor
getCopy in interface FieldDescriptorpublic final java.lang.String getName()
FieldDescriptor
getName in interface FieldDescriptorpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isRequired()
FieldDescriptor
isRequired in interface FieldDescriptorpublic java.lang.String valueToString(java.lang.Object val)
FieldDescriptor
valueToString in interface FieldDescriptorpublic java.lang.Class getJavaType()
FieldDescriptor
getJavaType in interface FieldDescriptorpublic java.lang.String getSQLType()
getSQLType in interface FieldDescriptor
public void checkValidValue(Record rec,
java.lang.Object o)
throws DataException
FieldDescriptor
checkValidValue in interface FieldDescriptorDataExceptionpublic final boolean isFieldOf(Record rec)
FieldDescriptor
isFieldOf in interface FieldDescriptorpublic java.lang.Object defaultValue()
FieldDescriptor
defaultValue in interface FieldDescriptorpublic java.lang.String getLocalizedName(java.util.Locale locale)
getLocalizedName in interface FieldDescriptorprotected void setDefaultValue(java.lang.Object o)
public java.lang.String normalize(java.lang.String s)
FieldDescriptor
normalize in interface FieldDescriptorpublic java.lang.Object convertFromJDBC(java.lang.Object o)
FieldDescriptor
convertFromJDBC in interface FieldDescriptorpublic java.lang.Object convertToJDBC(java.lang.Object o)
FieldDescriptor
convertToJDBC in interface FieldDescriptorpublic java.lang.String getProperty(java.lang.String propertyName)
FieldDescriptor
getProperty in interface FieldDescriptor
public HierarchicalHandler createSAXHandler(HierarchicalHandler parent,
Record rec)
createSAXHandler in interface FieldDescriptorpublic boolean isSetExternally()
isSetExternally in interface FieldDescriptorprotected java.lang.Object intern(java.lang.Object o)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||