|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.HashtableFormat
This is an special formatter used by the database services. When formatting the data within an operation context, it returns a Hashtable, not a String. In the resulting Hashtable, the key is the name of the DataField and the value is the result of formatting the DataField value using the formatter specificied in the "HashtableFormat" external definition.
Field Summary | |
---|---|
java.lang.String |
dataElementName
Keeps the name of the data element the formatter is managing. |
Constructor Summary | |
---|---|
HashtableFormat()
|
Method Summary | |
---|---|
HashtableFormat |
add(java.lang.Object aFormatElement)
Adds a format element in the HashtableFormat vector of elements. |
HashtableFormat |
addElementAt(java.lang.Object aFormatElement,
int i)
Adds a format element in the HashtableFormat vector of elements at the specified index. |
HashtableFormat |
addFirst(java.lang.Object aFormatElement)
Adds a format element to the first position of the HashtableFormat vector of elements. |
java.lang.Object |
at(int anIndex)
Returns the format element in the HashtableFormat vector of elements at the given position. |
Externalizer |
externalizer()
Returns the Externalizer assigned to the FormatElement class. |
Hashtable |
format(Context aContext)
Performs the formatting process getting the data from the context aContext. |
Hashtable |
format(KeyedCollection aKeyedCollection)
Formats the data element aKeyedCollection. |
java.lang.String |
getDataElementName()
Returns the value of the dataElementName attribute. |
Vector |
getElements()
Returns a Vector containing all of the format elements. |
java.lang.String |
getName()
Returns the name of the class. |
java.lang.String |
getTagName()
Returns the tag associated with the name of the class. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes the hashtable with the Tag attributes. |
boolean |
isCacheable()
This method finds out if THIS particular object can be cached. |
protected java.lang.Object |
obtainDataElement(FormatElement aFormatElement,
Context aContext)
Returns the DataElement in the context aContext which will format aFormatElement. |
protected DataElement |
obtainDataElement(FormatElement aFormatElement,
KeyedCollection aKeyedCollection)
Returns the DataElement within the keyed collection aKeyedCollection which will format aFormatElement. |
protected java.lang.Object |
obtainDataElement(ObjectFormat anObjectFormat,
Context aContext)
Returns the DataElement in the context aContext which will format anObjectFormat. |
protected DataElement |
obtainDataElement(ObjectFormat anObjectFormat,
KeyedCollection aKeyedCollection)
Returns the DataElement in the keyed collection aKeyedCollection which will format anObjectFormat. |
void |
readExternal()
This method will find the tag that corresponds to the name of THIS entity. |
void |
readExternal(java.io.ObjectInput s)
Invokes the object creation from an ObjectInput. |
void |
reinitialize()
This method will reinitialize THIS object. |
void |
removeAll()
Removes all elements from the vector of format elements. |
java.lang.Object |
removeAt(int anIndex)
Removes the format element from the given index in HashtableFormat vector of elements. |
void |
removeExternal()
Removes the object's tags from the XML file in which it is externalized. |
void |
setDataElementName(java.lang.String aString)
Sets the dataElementName attribute value to aString. |
void |
setElements(Vector v)
Sets the value of the elements attribute to v. |
void |
setName(java.lang.String aName)
Sets the HashtableFormat instance name to aName. |
int |
size()
Returns the size of the vector of format elements. |
java.lang.String |
toString()
Returns an XML representation of the format element instance. |
Vector |
toStrings()
Returns a Vector containing XML representations of the format elements. |
Vector |
toTags()
Returns a Vector with the HashtableFormat instance represented as a Tag. |
DataElement |
unformat(Hashtable aHashtable,
Context aContext)
Unformats the Hashtable aHashtable and updates the context aContext with the resulting data. |
DataElement |
unformat(Hashtable aHashtable,
KeyedCollection aKeyedCollection)
Unformats the Hashtable aHashtable and updates the keyed collection aKeyedCollection with the resulting data. |
void |
writeExternal()
Writes the HashtableFormat instance converted to tags to its XML file. |
void |
writeExternal(java.io.ObjectOutput s)
Provides concrete serialization handling for HashtableFormat. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public java.lang.String dataElementName
Constructor Detail |
public HashtableFormat()
Method Detail |
public HashtableFormat add(java.lang.Object aFormatElement)
aFormatElement
- Object
public HashtableFormat addElementAt(java.lang.Object aFormatElement, int i)
aFormatElement
- java.lang.Object
public HashtableFormat addFirst(java.lang.Object aFormatElement)
aFormatElement
- java.lang.Object
public java.lang.Object at(int anIndex)
anIndex
- int
public Externalizer externalizer() throws java.io.IOException
externalizer
in interface Externalizable
java.io.IOException
public Hashtable format(Context aContext) throws DSEInvalidRequestException, DSEInvalidClassException, DSEInvalidArgumentException
aContext
- com.ibm.btt.base.Context
DSEInvalidRequestException
DSEInvalidClassException
DSEInvalidArgumentException
public Hashtable format(KeyedCollection aKeyedCollection) throws DSEInvalidRequestException, DSEInvalidClassException, DSEInvalidArgumentException
aKeyedCollection
- com.ibm.btt.base.KeyedCollection
DSEInvalidRequestException
DSEInvalidClassException
DSEInvalidArgumentException
public java.lang.String getDataElementName()
public Vector getElements()
public java.lang.String getName()
getName
in interface Externalizable
public java.lang.String getTagName()
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
initializeFrom
in interface Externalizable
aTag
- Tag
java.io.IOException
DSEException
public boolean isCacheable()
isCacheable
in interface Cacheable
protected java.lang.Object obtainDataElement(FormatElement aFormatElement, Context aContext) throws DSEInvalidRequestException
aFormatElement
- com.ibm.btt.base.FormatElementaContext
- com.ibm.btt.base.Context
com.ibm.btt.base.DSEInvalidRequestException.
DSEInvalidRequestException
protected DataElement obtainDataElement(FormatElement aFormatElement, KeyedCollection aKeyedCollection) throws DSEInvalidRequestException
aFormatElement
- com.ibm.btt.base.FormatElementaKeyedCollection
- com.ibm.btt.base.KeyedCollection
DSEInvalidRequestException
protected java.lang.Object obtainDataElement(ObjectFormat anObjectFormat, Context aContext) throws DSEInvalidRequestException
anObjectFormat
- com.ibm.btt.base.ObjectFormataContext
- com.ibm.btt.base.Context
com.ibm.btt.base.DSEInvalidRequestException.
DSEInvalidRequestException
protected DataElement obtainDataElement(ObjectFormat anObjectFormat, KeyedCollection aKeyedCollection) throws DSEInvalidRequestException
anObjectFormat
- com.ibm.btt.base.ObjectFormataKeyedCollection
- com.ibm.btt.base.KeyedCollection
DSEInvalidRequestException
public void readExternal() throws java.io.IOException
readExternal
in interface Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput s) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
s
- java.io.ObjectInput
java.io.IOException
java.lang.ClassNotFoundException
public void reinitialize()
reinitialize
in interface Cacheable
public void removeAll()
public java.lang.Object removeAt(int anIndex)
anIndex
- int
public void removeExternal() throws java.io.IOException
removeExternal
in interface Externalizable
java.io.IOException
public void setDataElementName(java.lang.String aString)
aString
- java.lang.Stringpublic void setElements(Vector v)
v
- com.ibm.btt.base.Vectorpublic void setName(java.lang.String aName)
setName
in interface Externalizable
aName
- java.lang.Stringpublic int size()
public java.lang.String toString()
public Vector toStrings()
toStrings
in interface Externalizable
public Vector toTags() throws java.io.IOException
toTags
in interface Externalizable
java.io.IOException
public DataElement unformat(Hashtable aHashtable, Context aContext) throws DSEInvalidArgumentException, DSEInvalidRequestException
aHashtable
- com.ibm.btt.base.HashtableaContext
- com.ibm.btt.base.Context
com.ibm.btt.base.DSEInvalidArgumentException.
com.ibm.btt.base.DSEInvalidRequestException.
DSEInvalidArgumentException
DSEInvalidRequestException
public DataElement unformat(Hashtable aHashtable, KeyedCollection aKeyedCollection) throws DSEInvalidRequestException, DSEInvalidArgumentException
aHashtable
- com.ibm.btt.base.HashtableaKeyedCollection
- com.ibm.btt.base.KeyedCollection
DSEInvalidRequestException
DSEInvalidArgumentException
public void writeExternal() throws java.io.IOException
writeExternal
in interface Externalizable
java.io.IOException
public void writeExternal(java.io.ObjectOutput s) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
s
- java.io.ObjectOutput
java.io.IOException
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |