org.openstreetmap.osmosis.core.mysql.v0_5.impl
Class EntityTagHistoryReader
java.lang.Object
org.openstreetmap.osmosis.core.mysql.common.BaseTableReader<EntityHistory<DBEntityTag>>
org.openstreetmap.osmosis.core.mysql.v0_5.impl.EntityTagHistoryReader
- All Implemented Interfaces:
- java.util.Iterator<EntityHistory<DBEntityTag>>, Releasable, ReleasableIterator<EntityHistory<DBEntityTag>>
public class EntityTagHistoryReader
- extends BaseTableReader<EntityHistory<DBEntityTag>>
Reads the most recent set of tags from a database for entities that have been
modified within a time interval.
- Author:
- Brett Henderson
Constructor Summary |
EntityTagHistoryReader(DatabaseLoginCredentials loginCredentials,
java.lang.String parentTableName,
java.lang.String tagTableName,
java.util.Date intervalBegin,
java.util.Date intervalEnd)
Creates a new instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityTagHistoryReader
public EntityTagHistoryReader(DatabaseLoginCredentials loginCredentials,
java.lang.String parentTableName,
java.lang.String tagTableName,
java.util.Date intervalBegin,
java.util.Date intervalEnd)
- Creates a new instance.
- Parameters:
loginCredentials
- Contains all information required to connect to the database.parentTableName
- The name of the table containing the parent entity.tagTableName
- The name of the table containing the entity tags.intervalBegin
- Marks the beginning (inclusive) of the time interval to be
checked.intervalEnd
- Marks the end (exclusive) of the time interval to be checked.
createResultSet
protected java.sql.ResultSet createResultSet(DatabaseContext queryDbCtx)
- Builds the result set that the reader will iterate over.
- Specified by:
createResultSet
in class BaseTableReader<EntityHistory<DBEntityTag>>
- Parameters:
queryDbCtx
- The database context to query against.
- Returns:
- A result set positioned before the first record.
createNextValue
protected BaseTableReader.ReadResult<EntityHistory<DBEntityTag>> createNextValue(java.sql.ResultSet resultSet)
- Builds an entity object from the current recordset row.
- Specified by:
createNextValue
in class BaseTableReader<EntityHistory<DBEntityTag>>
- Parameters:
resultSet
- The record set to retrieve the data from.
- Returns:
- The result of the read.