org.openstreetmap.osmosis.core.pgsql.v0_6.impl
Class EntityFeatureTableReader<Tef extends Storeable,Tdb extends DbFeature<Tef>>
java.lang.Object
org.openstreetmap.osmosis.core.pgsql.common.BaseTableReader<Tdb>
org.openstreetmap.osmosis.core.pgsql.v0_6.impl.EntityFeatureTableReader<Tef,Tdb>
- Type Parameters:
Tef
- The entity feature type to be read.Tdb
- The entity feature database wrapper type to be used.
- All Implemented Interfaces:
- java.util.Iterator<Tdb>, Releasable, ReleasableIterator<Tdb>
public class EntityFeatureTableReader<Tef extends Storeable,Tdb extends DbFeature<Tef>>
- extends BaseTableReader<Tdb>
Reads all features of a particular type for an entity from a feature table
ordered by the entity identifier.
- Author:
- Brett Henderson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityFeatureTableReader
public EntityFeatureTableReader(DatabaseContext dbCtx,
EntityFeatureMapper<Tdb> entityFeatureBuilder)
- Creates a new instance.
- Parameters:
dbCtx
- The active connection to use for reading from the database.entityFeatureBuilder
- Provides entity feature jdbc bindings.
EntityFeatureTableReader
public EntityFeatureTableReader(DatabaseContext dbCtx,
EntityFeatureMapper<Tdb> entityFeatureBuilder,
java.lang.String constraintTable)
- Creates a new instance.
- Parameters:
dbCtx
- The active connection to use for reading from the database.entityFeatureBuilder
- Provides entity feature jdbc bindings.constraintTable
- The table containing a column named id defining the list of
entities to be returned.
createResultSet
protected java.sql.ResultSet createResultSet(DatabaseContext queryDbCtx)
- Builds the result set that the reader will iterate over.
- Specified by:
createResultSet
in class BaseTableReader<Tdb extends DbFeature<Tef>>
- Parameters:
queryDbCtx
- The database context to query against.
- Returns:
- A result set positioned before the first record.
createNextValue
protected BaseTableReader.ReadResult<Tdb> createNextValue(java.sql.ResultSet resultSet)
- Builds an entity object from the current recordset row.
- Specified by:
createNextValue
in class BaseTableReader<Tdb extends DbFeature<Tef>>
- Parameters:
resultSet
- The record set to retrieve the data from.
- Returns:
- The result of the read.