|
|||||||||||
| 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.DBKeyPropertyMap
A special property map backed by a RDBMS table.
This class uses a table with three 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. The difference to the DBPropertyMap makes a extra column named "key". The purpose is to have a special index on key, so that it can hold e.x. a username. Be aware, that this key is only 50 chars long! Additionally the "like" is uses in some methods, to retrieve hierarchical keys like desktop.window.* to fetch all window properties stored.
| 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 |
extraKeyCol
The column name for the extra keys used for e.x. username. |
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 | |
DBKeyPropertyMap(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". |
|
DBKeyPropertyMap(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". |
|
DBKeyPropertyMap(DB db,
java.lang.String tableName,
java.lang.String eKey,
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. |
|
DBKeyPropertyMap(DB db,
java.lang.String tableName,
java.lang.String eKeyCol,
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. |
java.lang.String |
getEValue()
|
java.util.Map |
getRightTruncated(java.lang.String key)
|
java.lang.String |
getUserId()
|
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. |
void |
setEValue(java.lang.String value)
|
void |
setUserId(java.lang.String value)
|
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 extraKeyCol
protected java.lang.String keyCol
protected java.lang.String valueCol
| Constructor Detail |
public DBKeyPropertyMap(DB db,
java.lang.String tableName)
db - DB used by this settableName - name of the table used by this set
public DBKeyPropertyMap(DB db,
java.lang.String tableName,
java.lang.String eKeyCol,
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 DBKeyPropertyMap(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 DBKeyPropertyMap(DB db,
java.lang.String tableName,
java.lang.String eKey,
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 removedpublic java.lang.String getUserId()
public void setUserId(java.lang.String value)
value - The eValue to set.public java.lang.String getEValue()
public void setEValue(java.lang.String value)
value - The eValue to set.public java.util.Map getRightTruncated(java.lang.String key)
key -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||