|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.sqlunit.test.Dictionary
public class Dictionary
This class implements a simple dictionary of name value pairs which can be populated and serialized to the database as a BLOB value. This can then be retrieved using SQLUnit and converted to its String representation automatically. This is a demo of storing smart Java objects in a relational database.
Constructor Summary | |
---|---|
Dictionary()
Default Constructor. |
Method Summary | |
---|---|
java.lang.String |
getEntry(java.lang.String key)
Returns the value associated with the given key. |
java.util.Iterator |
getKeys()
Returns an Iterator on a sorted list of keys in this Dictionary. |
void |
setEntry(java.lang.String key,
java.lang.String value)
Sets the value for a given key. |
java.lang.String |
toString()
Render this object with its values as a String. |
void |
writeTo(java.lang.String fileName)
Convenience method to write to a named file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Dictionary()
Method Detail |
---|
public final java.util.Iterator getKeys()
public final void setEntry(java.lang.String key, java.lang.String value)
key
- the key into the Dictionary.value
- the value associated with the key.public final java.lang.String getEntry(java.lang.String key)
key
- the key into the Dictionary.
public final java.lang.String toString()
toString
in class java.lang.Object
public final void writeTo(java.lang.String fileName)
fileName
- A file name to write to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |