|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.unidu.is.util.PropertyMap
de.unidu.is.util.DBPropertyMap
A property map backed by a RDBMS table.
This class uses a table with two columns (the default names are "propkey" and "propvalue", but these can be changed) with the SQL type "text" for storing the property map. This means that this set can only be used with strings, or with objects for which the string representation is sufficient.
| Nested Class Summary |
| Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
| Field Summary | |
protected DB |
db
The DB which is used for backing this map. |
protected java.lang.String |
keyCol
The column name for the keys used for this map. |
protected java.lang.String |
tableName
The table used for backing this map. |
protected java.lang.String |
valueCol
The column name for the values used for this map. |
| Fields inherited from class de.unidu.is.util.PropertyMap |
multipleValues |
| Constructor Summary | |
DBPropertyMap(DB db,
java.lang.String tableName)
Creates a new instance (and the corresponding table, if it does not exists), and sets the columns to "propkey" and "propvalue". |
|
DBPropertyMap(DB db,
java.lang.String tableName,
boolean multiple)
Creates a new instance (and the corresponding table, if it does not exists), and sets the columns to "propkey" and "propvalue". |
|
DBPropertyMap(DB db,
java.lang.String tableName,
java.lang.String keyCol,
java.lang.String valueCol)
Creates a new instance (and the corresponding table, if it does not exists), and sets the column names. |
|
DBPropertyMap(DB db,
java.lang.String tableName,
java.lang.String keyCol,
java.lang.String valueCol,
boolean multiple)
Creates a new instance (and the corresponding table, if it does not exists), and sets the column names. |
|
| Method Summary | |
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
void |
delete()
Deletes the corresponding table. |
java.util.Set |
entrySet()
|
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
get(java.lang.Object key)
|
java.util.List |
getAll(java.lang.Object key)
Returns a list with all values stored for the specified key. |
int |
hashCode()
|
boolean |
isEmpty()
|
java.util.Set |
keySet()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
putAll(java.util.Map t)
|
java.lang.Object |
remove(java.lang.Object key)
|
void |
remove(java.lang.Object key,
java.lang.Object value)
Removes the specified value for the specified key. |
int |
size()
|
java.lang.String |
toString()
|
java.util.Collection |
values()
|
| Methods inherited from class de.unidu.is.util.PropertyMap |
addDouble, addDouble, addDouble, addInt, addInt, addInt, apply, convertString, divDouble, divDouble, divDouble, divInt, divInt, divInt, getBoolean, getDouble, getInt, getLength, getLong, getMaxDouble, getMaxKey, getMinDouble, getString, getString, getSum, hasMultipleValues, inc, initDouble, isMultipleValues, multDouble, multDouble, multDouble, multDouble, multInt, multInt, multInt, normalizeLength, removeCloseToZero, removeZero, set, setBoolean, setDouble, setInt, setLong, setMultipleValues, setString, subDouble, subDouble, subDouble, subInt, subInt, subInt |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected DB db
protected java.lang.String tableName
protected java.lang.String keyCol
protected java.lang.String valueCol
| Constructor Detail |
public DBPropertyMap(DB db,
java.lang.String tableName)
db - DB used by this settableName - name of the table used by this set
public DBPropertyMap(DB db,
java.lang.String tableName,
java.lang.String keyCol,
java.lang.String valueCol,
boolean multiple)
db - DB used by this settableName - name of the table used by this setkeyCol - column name for keysvalueCol - column name for valuesmultiple - values if true, multiple values can be hold for a key
public DBPropertyMap(DB db,
java.lang.String tableName,
boolean multiple)
db - DB used by this settableName - name of the table used by this setmultiple - values if true, multiple values can be hold for a key
public DBPropertyMap(DB db,
java.lang.String tableName,
java.lang.String keyCol,
java.lang.String valueCol)
db - DB used by this settableName - name of the table used by this setkeyCol - column name for keysvalueCol - column name for values| Method Detail |
public void clear()
public void delete()
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public java.util.Set entrySet()
public java.lang.Object get(java.lang.Object key)
public boolean isEmpty()
public java.util.Set keySet()
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
public void putAll(java.util.Map t)
public java.lang.Object remove(java.lang.Object key)
public int size()
public java.util.Collection values()
public boolean equals(java.lang.Object obj)
public int hashCode()
public java.lang.String toString()
public java.util.List getAll(java.lang.Object key)
PropertyMap
getAll in class PropertyMapkey - property key
public void remove(java.lang.Object key,
java.lang.Object value)
PropertyMap
remove in class PropertyMapkey - property keyvalue - value to be removed
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||