com.niggle.data.metadata
Class HashtableField

java.lang.Object
  |
  +--com.niggle.data.metadata.Field
        |
        +--com.niggle.data.metadata.HashtableField
All Implemented Interfaces:
FieldDescriptor, java.io.Serializable

public class HashtableField
extends Field

A descriptor for a field that represents a Hashtable. It is not meant to be human-readable. It is serialized and then URLEncoded.

Author:
Paul Murphy
See Also:
Serialized Form

Fields inherited from class com.niggle.data.metadata.Field
defaultValueString, sqlType
 
Constructor Summary
HashtableField()
           
 
Method Summary
 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.
 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, checkValidValue, defaultValue, getLocalizedName, getName, getSQLType, hashCode, init, isFieldOf, isRequired, normalize, processDefaultValue, setDefaultValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HashtableField

public HashtableField()
Method Detail

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

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