com.bretth.osmosis.core.pgsql.v0_6.impl
Class WayDao

java.lang.Object
  extended by com.bretth.osmosis.core.pgsql.common.BaseDao
      extended by com.bretth.osmosis.core.pgsql.v0_6.impl.EntityDao<Way>
          extended by com.bretth.osmosis.core.pgsql.v0_6.impl.WayDao
All Implemented Interfaces:
Releasable

public class WayDao
extends EntityDao<Way>

Performs all way-specific db operations.

Author:
Brett Henderson

Constructor Summary
WayDao(DatabaseContext dbCtx, ActionDao actionDao)
          Creates a new instance.
 
Method Summary
 void addEntity(Way entity)
          Adds the specified entity to the database.
 Way getEntity(long entityId)
          Loads the specified entity from the database.
 ReleasableIterator<Way> iterate()
          Returns an iterator providing access to all entities in the database.
 void modifyEntity(Way entity)
          Updates the specified entity details in the database.
 void removeEntity(long entityId)
          Removes the specified entity from the database.
 
Methods inherited from class com.bretth.osmosis.core.pgsql.v0_6.impl.EntityDao
exists
 
Methods inherited from class com.bretth.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

WayDao

public WayDao(DatabaseContext dbCtx,
              ActionDao actionDao)
Creates a new instance.

Parameters:
dbCtx - The database context to use for accessing the database.
actionDao - The dao to use for adding action records to the database.
Method Detail

getEntity

public Way getEntity(long entityId)
Loads the specified entity from the database.

Overrides:
getEntity in class EntityDao<Way>
Parameters:
entityId - The unique identifier of the entity.
Returns:
The loaded entity.

addEntity

public void addEntity(Way entity)
Adds the specified entity to the database.

Overrides:
addEntity in class EntityDao<Way>
Parameters:
entity - The entity to add.

modifyEntity

public void modifyEntity(Way entity)
Updates the specified entity details in the database.

Overrides:
modifyEntity in class EntityDao<Way>
Parameters:
entity - The entity to update.

removeEntity

public void removeEntity(long entityId)
Removes the specified entity from the database.

Overrides:
removeEntity in class EntityDao<Way>
Parameters:
entityId - The id of the entity to remove.

iterate

public ReleasableIterator<Way> iterate()
Returns an iterator providing access to all entities in the database.

Specified by:
iterate in class EntityDao<Way>
Returns:
The entity iterator.