K
- key type (usually Integer or String)V
- value type (usually String)public abstract class DBOptionList<K,V> extends java.lang.Object implements OptionProvider<K,V>
Modifier and Type | Field and Description |
---|---|
protected DBFunctions |
db
Database row.
|
Constructor and Description |
---|
DBOptionList(DBFunctions db)
Database query to build the list of options upon.
|
Modifier and Type | Method and Description |
---|---|
protected abstract K |
getKey(DBFunctions dbRow)
Get the key of this option.
|
java.util.Collection<Option<K,V>> |
getOptions()
Get the collection of options.
|
protected abstract V |
getValue(DBFunctions dbRow)
Get the value of this option
|
protected final DBFunctions db
public DBOptionList(DBFunctions db)
db
- protected abstract K getKey(DBFunctions dbRow)
dbRow
- database rowprotected abstract V getValue(DBFunctions dbRow)
dbRow
- database rowpublic java.util.Collection<Option<K,V>> getOptions()
OptionProvider
getOptions
in interface OptionProvider<K,V>