K
- key type (usually Integer)V
- value type (usually String)public abstract class DBTreeProvider<K,V> extends java.lang.Object implements TreeProvider<K,V>
TreeProvider
that takes a database query as argument.Modifier and Type | Field and Description |
---|---|
protected DBFunctions |
db
Database row.
|
Constructor and Description |
---|
DBTreeProvider(DBFunctions db)
Constructor based on a database query.
|
Modifier and Type | Method and Description |
---|---|
boolean |
moveNext()
Go to the next entry in the list.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKey, getParent, getValue
protected final DBFunctions db
public DBTreeProvider(DBFunctions db)
db
- public boolean moveNext()
TreeProvider
DBFunctions.moveNext()
to
implement this function because the first call is dummy on database rows while here it
is expected to actually do something from the first call. The easy way out is to do a
moveNext
on the database result after executing the query and before building
the tree from it.moveNext
in interface TreeProvider<K,V>
DBFunctions.moveNext()