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

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

public class NodeManager
extends java.lang.Object
implements EntityManager<Node>

Provides access to nodes within a dataset store.

Author:
Brett Henderson

Constructor Summary
NodeManager(NodeStorageContainer storageContainer)
          Creates a new instance.
 
Method Summary
 void addEntity(Node entity)
          Adds the specified entity to the database.
 boolean exists(long id)
          Indicates if the specified entity exists in the database.
 Node getEntity(long id)
          Retrieves an entity by its identifier.
 ReleasableIterator<Node> iterate()
          Returns an iterator providing access to all entities in the database.
 void modifyEntity(Node 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

NodeManager

public NodeManager(NodeStorageContainer storageContainer)
Creates a new instance.

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

addEntity

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

Specified by:
addEntity in interface EntityManager<Node>
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<Node>
Parameters:
id - The id of the entity.
Returns:
True if the entity exists, false otherwise.

getEntity

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

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

iterate

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

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

modifyEntity

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

Specified by:
modifyEntity in interface EntityManager<Node>
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<Node>
Parameters:
entityId - The id of the entity to remove.