org.openstreetmap.osmosis.core.customdb.v0_6.impl
Class WayManager

java.lang.Object
  extended by org.openstreetmap.osmosis.core.customdb.v0_6.impl.WayManager
All Implemented Interfaces:
EntityManager<Way>

public class WayManager
extends java.lang.Object
implements EntityManager<Way>

Provides access to ways within a dataset store.

Author:
Brett Henderson

Constructor Summary
WayManager(WayStorageContainer storageContainer)
          Creates a new instance.
 
Method Summary
 void addEntity(Way entity)
          Adds the specified entity to the database.
 boolean exists(long id)
          Indicates if the specified entity exists in the database.
 Way getEntity(long id)
          Retrieves an entity by its identifier.
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WayManager

public WayManager(WayStorageContainer storageContainer)
Creates a new instance.

Parameters:
storageContainer - The storage container containing the entities.
Method Detail

addEntity

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

Specified by:
addEntity in interface EntityManager<Way>
Parameters:
entity - The entity to add.

exists

public boolean exists(long id)
Indicates if the specified entity exists in the database.

Specified by:
exists in interface EntityManager<Way>
Parameters:
id - The id of the entity.
Returns:
True if the entity exists, false otherwise.

getEntity

public Way getEntity(long id)
Retrieves an entity by its identifier.

Specified by:
getEntity in interface EntityManager<Way>
Parameters:
id - The id of the entity.
Returns:
The entity.

iterate

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

Specified by:
iterate in interface EntityManager<Way>
Returns:
The entity iterator.

modifyEntity

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

Specified by:
modifyEntity in interface EntityManager<Way>
Parameters:
entity - The entity to update.

removeEntity

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

Specified by:
removeEntity in interface EntityManager<Way>
Parameters:
entityId - The id of the entity to remove.