|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.revusky.niggle.data.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 java.lang.String |
sqlType
|
| Constructor Summary | |
Field()
|
|
| Method Summary | |
static java.lang.String |
capitalizeFirstLetter(java.lang.String s)
|
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 |
defaultValue()
returns this field's "default value". |
java.lang.Object |
getCopy(java.lang.Object o)
Used when encapsulation requires Record::getFieldValue() 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 |
getSQLType()
|
int |
hashCode()
|
protected void |
init(org.w3c.dom.Element element)
|
boolean |
isFieldOf(Record rec)
Does this FieldDescriptor describe a field of the Record? |
boolean |
isRequired()
Used in the core validity checks. |
java.lang.String |
normalize(java.lang.String s)
"normalize" the string passed in. |
protected void |
processDefaultValue()
|
protected void |
setDefaultValue(java.lang.Object o)
|
java.lang.String |
toString()
|
java.lang.String |
valueToString(java.lang.Object val)
returns the preferred the 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 com.revusky.niggle.data.FieldDescriptor |
getObjectFromString |
| Field Detail |
protected java.lang.String sqlType
protected java.lang.String defaultValueString
| Constructor Detail |
public Field()
| Method Detail |
protected void init(org.w3c.dom.Element element)
throws org.xml.sax.SAXException
protected void processDefaultValue()
throws java.io.IOException
public java.lang.Object getCopy(java.lang.Object o)
FieldDescriptorgetCopy in interface FieldDescriptorcom.revusky.niggle.data.FieldDescriptorpublic java.lang.String normalize(java.lang.String s)
FieldDescriptornormalize in interface FieldDescriptorcom.revusky.niggle.data.FieldDescriptorpublic final java.lang.String getName()
FieldDescriptorgetName in interface FieldDescriptorpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isRequired()
FieldDescriptorisRequired in interface FieldDescriptorpublic java.lang.String valueToString(java.lang.Object val)
FieldDescriptorvalueToString in interface FieldDescriptorpublic java.lang.Class getJavaType()
FieldDescriptorgetJavaType in interface FieldDescriptorpublic java.lang.String getSQLType()
getSQLType in interface FieldDescriptorcom.revusky.niggle.data.FieldDescriptorUnsupportedOperationException -
public void checkValidValue(Record rec,
java.lang.Object o)
throws java.io.IOException
FieldDescriptorcheckValidValue in interface FieldDescriptorcom.revusky.niggle.data.FieldDescriptorjava.io.IOException - Description of Exceptionpublic final boolean isFieldOf(Record rec)
FieldDescriptorisFieldOf in interface FieldDescriptorpublic java.lang.Object defaultValue()
FieldDescriptordefaultValue in interface FieldDescriptorpublic java.lang.String getLocalizedName(java.util.Locale locale)
getLocalizedName in interface FieldDescriptorcom.revusky.niggle.data.FieldDescriptorprotected void setDefaultValue(java.lang.Object o)
public static java.lang.String capitalizeFirstLetter(java.lang.String s)
public java.lang.Object convertFromJDBC(java.lang.Object o)
FieldDescriptorconvertFromJDBC in interface FieldDescriptor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||