com.niggle.data.metadata
Class StringArrayField
java.lang.Object
|
+--com.niggle.data.metadata.Field
|
+--com.niggle.data.metadata.StringArrayField
- All Implemented Interfaces:
- FieldDescriptor, java.io.Serializable
- public class StringArrayField
- extends Field
A descriptor for a field that represents
an array of String values
- Author:
- Paul Murphy
- See Also:
- Serialized Form
Method Summary |
void |
checkValidValue(Record rec,
java.lang.Object value)
Check whether this object is a valid value
for this field of the given record. |
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.Object |
getObjectFromString(Record rec,
java.lang.String value)
Given the string representation of a field,
return its internal java object representation. |
void |
init(org.w3c.dom.Element element)
|
java.lang.String |
valueToString(java.lang.Object o)
returns the preferred the String representation
of the object in question. |
Methods inherited from class com.niggle.data.metadata.Field |
capitalizeFirstLetter, defaultValue, getLocalizedName, getName, getSQLType, hashCode, isFieldOf, isRequired, normalize, processDefaultValue, setDefaultValue, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
StringArrayField
public StringArrayField()
getJavaType
public java.lang.Class getJavaType()
- Description copied from interface:
FieldDescriptor
- The kind of java object that can live
in this record field.
- Overrides:
getJavaType
in class Field
init
public void init(org.w3c.dom.Element element)
throws org.xml.sax.SAXException
- Overrides:
init
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.
getCopy
public java.lang.Object getCopy(java.lang.Object o)
- Description copied from interface:
FieldDescriptor
- Used when encapsulation requires Record::getFieldValue()
to return a clone of an object. In the case of immutable
objects such as java.lang.String, getCopy() can just
return the object passed in as a parameter.
- Overrides:
getCopy
in class Field
- Following copied from interface:
com.niggle.data.FieldDescriptor
- Returns:
- a copy of the object in question.
valueToString
public java.lang.String valueToString(java.lang.Object o)
- Description copied from interface:
FieldDescriptor
- returns the preferred the String representation
of the object in question. Used to persist to
a flat file.
- Overrides:
valueToString
in class Field
checkValidValue
public void checkValidValue(Record rec,
java.lang.Object value)
throws java.io.IOException
- Description copied from interface:
FieldDescriptor
- Check whether this object is a valid value
for this field of the given record. Used in the
core validity checks.
- Overrides:
checkValidValue
in class Field
- Following copied from interface:
com.niggle.data.FieldDescriptor
- Throws:
java.io.IOException
- Description of Exception