|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.pgsql.v0_6.impl.EntityReader<T>
T
- The entity type to be supported.public class EntityReader<T extends Entity>
Reads instances of an entity type from a database ordered by the identifier. It combines the output of the entity feature table readers to produce fully configured entity objects.
Constructor Summary | |
---|---|
EntityReader(DatabaseContext dbCtx,
EntityMapper<T> entityMapper)
Creates a new instance. |
|
EntityReader(DatabaseContext dbCtx,
EntityMapper<T> entityMapper,
java.lang.String constraintTable)
Creates a new instance. |
Method Summary | |
---|---|
boolean |
hasNext()
|
T |
next()
|
protected void |
populateEntityFeatures(T entity)
Populates the entity with the its features. |
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 EntityReader(DatabaseContext dbCtx, EntityMapper<T> entityMapper)
dbCtx
- The database context to use for accessing the database.entityMapper
- The database mapper for the entity type.public EntityReader(DatabaseContext dbCtx, EntityMapper<T> entityMapper, java.lang.String constraintTable)
dbCtx
- The database context to use for accessing the database.entityMapper
- The database mapper for the entity type.constraintTable
- The table containing a column named id defining the list of
entities to be returned.Method Detail |
---|
protected void populateEntityFeatures(T entity)
entity
- The entity to be populated.public boolean hasNext()
hasNext
in interface java.util.Iterator<T extends Entity>
public T next()
next
in interface java.util.Iterator<T extends Entity>
public void remove()
remove
in interface java.util.Iterator<T extends Entity>
public void release()
release
in interface Releasable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |