|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdowney.ErrorStore
downey.SimpleDB
downey.ReadOnlyDB
This class allows for read access to a simple database. It is in a package named downey
The database is stored as a HashMap, so it can store any object. There are some helper functions to assist for changing a String[] to an ArrayList and from an ArrayList to a String[].
| Field Summary |
| Fields inherited from class downey.SimpleDB |
isOpen, m_database, m_fileName |
| Fields inherited from class downey.ErrorStore |
m_strError |
| Constructor Summary | |
ReadOnlyDB()
|
|
| Method Summary | |
void |
eraseDatabase()
Erasing is disabled in this class. |
void |
updateRecord(java.lang.String key,
java.lang.Object obj)
Update is disabled in this class. |
| Methods inherited from class downey.SimpleDB |
getFileName, init, init, isError, keyIterator, makeArray, makeList, openDatabase, readRecord, saveDatabase, setFileName, valueIterator |
| Methods inherited from class downey.ErrorStore |
addError, clearError, getError, setError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ReadOnlyDB()
| Method Detail |
public void updateRecord(java.lang.String key,
java.lang.Object obj)
updateRecord in class SimpleDBkey - The string used to access that databaseobj - The object to be added to the database
It is not necessary to cast the parameter to any type, since all objects are derived from Object.
m_database.updateRecord("fred", record);
public void eraseDatabase()
eraseDatabase in class SimpleDB
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||