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

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

public class RelationManager
extends java.lang.Object
implements EntityManager<Relation>

Provides access to relations within a dataset store.

Author:
Brett Henderson

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

RelationManager

public RelationManager(RelationStorageContainer storageContainer)
Creates a new instance.

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

addEntity

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

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

getEntity

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

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

iterate

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

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

modifyEntity

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

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