|
||||||||||
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.SAXException
protected void processNormalization(org.w3c.dom.Element elem)
public java.lang.Object getCopy(java.lang.Object o)
FieldDescriptor
getCopy
in interface FieldDescriptor
public final java.lang.String getName()
FieldDescriptor
getName
in interface FieldDescriptor
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isRequired()
FieldDescriptor
isRequired
in interface FieldDescriptor
public java.lang.String valueToString(java.lang.Object val)
FieldDescriptor
valueToString
in interface FieldDescriptor
public java.lang.Class getJavaType()
FieldDescriptor
getJavaType
in interface FieldDescriptor
public java.lang.String getSQLType()
getSQLType
in interface FieldDescriptor
public void checkValidValue(Record rec, java.lang.Object o) throws DataException
FieldDescriptor
checkValidValue
in interface FieldDescriptor
DataException
public final boolean isFieldOf(Record rec)
FieldDescriptor
isFieldOf
in interface FieldDescriptor
public java.lang.Object defaultValue()
FieldDescriptor
defaultValue
in interface FieldDescriptor
public java.lang.String getLocalizedName(java.util.Locale locale)
getLocalizedName
in interface FieldDescriptor
protected void setDefaultValue(java.lang.Object o)
public java.lang.String normalize(java.lang.String s)
FieldDescriptor
normalize
in interface FieldDescriptor
public java.lang.Object convertFromJDBC(java.lang.Object o)
FieldDescriptor
convertFromJDBC
in interface FieldDescriptor
public java.lang.Object convertToJDBC(java.lang.Object o)
FieldDescriptor
convertToJDBC
in interface FieldDescriptor
public java.lang.String getProperty(java.lang.String propertyName)
FieldDescriptor
getProperty
in interface FieldDescriptor
public HierarchicalHandler createSAXHandler(HierarchicalHandler parent, Record rec)
createSAXHandler
in interface FieldDescriptor
public boolean isSetExternally()
isSetExternally
in interface FieldDescriptor
protected java.lang.Object intern(java.lang.Object o)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |