|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.mysql.common.BaseTableReader<T>
T
- The type of entity to retrieved.public abstract class BaseTableReader<T>
Provides the base implementation of all database table readers.
Nested Class Summary | |
---|---|
protected static class |
BaseTableReader.ReadResult<T>
Represents the result of an entity read from the result set at the current position. |
Constructor Summary | |
---|---|
BaseTableReader(DatabaseLoginCredentials loginCredentials)
Creates a new instance. |
Method Summary | |
---|---|
protected BaseTableReader.ReadResult<T> |
createLastValue()
If the implementation requires multiple rows to build an entity object, this method allows the implementation to return an entity based on the fact that no more rows are available. |
protected abstract BaseTableReader.ReadResult<T> |
createNextValue(java.sql.ResultSet activeResultSet)
Builds an entity object from the current recordset row. |
protected abstract java.sql.ResultSet |
createResultSet(DatabaseContext queryDbCtx)
Builds the result set that the reader will iterate over. |
boolean |
hasNext()
|
T |
next()
|
void |
release()
Performs resource cleanup tasks such as closing files, or database connections. |
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseTableReader(DatabaseLoginCredentials loginCredentials)
loginCredentials
- Contains all information required to connect to the database.Method Detail |
---|
protected abstract java.sql.ResultSet createResultSet(DatabaseContext queryDbCtx)
queryDbCtx
- The database context to query against.
protected abstract BaseTableReader.ReadResult<T> createNextValue(java.sql.ResultSet activeResultSet)
activeResultSet
- The record set to retrieve the data from.
protected BaseTableReader.ReadResult<T> createLastValue()
public boolean hasNext()
hasNext
in interface java.util.Iterator<T>
public T next()
next
in interface java.util.Iterator<T>
public void release()
release
in interface Releasable
public void remove()
remove
in interface java.util.Iterator<T>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |