|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.pgsql.common.BaseDao
org.openstreetmap.osmosis.core.pgsql.v0_6.impl.EntityDao<T>
T
- The entity type to be supported.public abstract class EntityDao<T extends Entity>
Provides functionality common to all top level entity daos.
Constructor Summary | |
---|---|
protected |
EntityDao(DatabaseContext dbCtx,
EntityMapper<T> entityMapper,
ActionDao actionDao)
Creates a new instance. |
Method Summary | |
---|---|
void |
addEntity(T entity)
Adds the specified entity to the database. |
boolean |
exists(long entityId)
Checks if the specified entity exists in the database. |
T |
getEntity(long entityId)
Loads the specified entity from the database. |
abstract ReleasableIterator<T> |
iterate()
Returns an iterator providing access to all entities in the database. |
protected abstract void |
loadFeatures(long entityId,
T entity)
Adds the type specific features to the entity. |
void |
modifyEntity(T entity)
Updates the specified entity details in the database. |
void |
removeEntity(long entityId)
Removes the specified entity from the database. |
Methods inherited from class org.openstreetmap.osmosis.core.pgsql.common.BaseDao |
---|
getDatabaseContext, prepareStatement, release |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected EntityDao(DatabaseContext dbCtx, EntityMapper<T> entityMapper, ActionDao actionDao)
dbCtx
- The database context to use for accessing the database.entityMapper
- Provides entity type specific JDBC support.actionDao
- The dao to use for adding action records to the database.Method Detail |
---|
public boolean exists(long entityId)
entityId
- The unique identifier of the entity.
public T getEntity(long entityId)
entityId
- The unique identifier of the entity.
protected abstract void loadFeatures(long entityId, T entity)
entityId
- The entity id.entity
- The entity requiring features to be added.public void addEntity(T entity)
entity
- The entity to add.public void modifyEntity(T entity)
entity
- The entity to update.public void removeEntity(long entityId)
entityId
- The id of the entity to remove.public abstract ReleasableIterator<T> iterate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |