|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.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. |
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 |
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 SGML 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 SGML representation of the format element instance. |
Vector |
toStrings()
Returns a Vector containing SGML 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 SGML 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
- Objectpublic HashtableFormat addElementAt(java.lang.Object aFormatElement, int i)
aFormatElement
- java.lang.Objectpublic HashtableFormat addFirst(java.lang.Object aFormatElement)
aFormatElement
- java.lang.Objectpublic java.lang.Object at(int anIndex)
anIndex
- intpublic Externalizer externalizer() throws java.io.IOException
public Hashtable format(Context aContext) throws DSEInvalidRequestException, DSEInvalidClassException, DSEInvalidArgumentException
aContext
- com.ibm.dse.base.Contextpublic Hashtable format(KeyedCollection aKeyedCollection) throws DSEInvalidRequestException, DSEInvalidClassException, DSEInvalidArgumentException
aDataElement
- com.ibm.dse.base.DataElementpublic java.lang.String getDataElementName()
public Vector getElements()
public java.lang.String getName()
public java.lang.String getTagName()
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
aTag
- Tagprotected java.lang.Object obtainDataElement(FormatElement aFormatElement, Context aContext) throws DSEInvalidRequestException
aFormatElement
- com.ibm.dse.base.FormatElementaContext
- com.ibm.dse.base.Contextprotected DataElement obtainDataElement(FormatElement aFormatElement, KeyedCollection aKeyedCollection) throws DSEInvalidRequestException
aFormatElement
- com.ibm.dse.base.FormatElementaKeyedCollection
- com.ibm.dse.base.KeyedCollectionprotected java.lang.Object obtainDataElement(ObjectFormat anObjectFormat, Context aContext) throws DSEInvalidRequestException
anObjectFormat
- com.ibm.dse.base.ObjectFormataContext
- com.ibm.dse.base.Contextprotected DataElement obtainDataElement(ObjectFormat anObjectFormat, KeyedCollection aKeyedCollection) throws DSEInvalidRequestException
anObjectFormat
- com.ibm.dse.base.ObjectFormataKeyedCollection
- com.ibm.dse.base.KeyedCollectionpublic void readExternal() throws java.io.IOException
public void readExternal(java.io.ObjectInput s) throws java.io.IOException, java.lang.ClassNotFoundException
s
- java.io.ObjectInputpublic void removeAll()
public java.lang.Object removeAt(int anIndex)
anIndex
- intpublic void removeExternal() throws java.io.IOException
public void setDataElementName(java.lang.String aString)
aString
- java.lang.Stringpublic void setElements(Vector v)
v
- com.ibm.dse.base.Vectorpublic void setName(java.lang.String aName)
aName
- java.lang.Stringpublic int size()
public java.lang.String toString()
public Vector toStrings()
public Vector toTags() throws java.io.IOException
public DataElement unformat(Hashtable aHashtable, Context aContext) throws DSEInvalidArgumentException, DSEInvalidRequestException
aHashtable
- com.ibm.dse.base.HashtableaContext
- com.ibm.dse.base.Contextpublic DataElement unformat(Hashtable aHashtable, KeyedCollection aKeyedCollection) throws DSEInvalidRequestException, DSEInvalidArgumentException
aHashtable
- com.ibm.dse.base.HashtableaKeyedCollection
- com.ibm.dse.base.KeyedCollectionpublic void writeExternal() throws java.io.IOException
public void writeExternal(java.io.ObjectOutput s) throws java.io.IOException
s
- java.io.ObjectOutput
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |