org.openstreetmap.osmosis.core.apidb.v0_6.impl
Class EntityHistory<T extends Storeable>

java.lang.Object
  extended by org.openstreetmap.osmosis.core.apidb.v0_6.impl.EntityHistory<T>
Type Parameters:
T - The type of entity that this class stores history for.
All Implemented Interfaces:
Storeable

public class EntityHistory<T extends Storeable>
extends java.lang.Object
implements Storeable

A data class representing a history record.

Author:
Brett Henderson

Constructor Summary
EntityHistory(StoreReader sr, StoreClassRegister scr)
          Creates a new instance.
EntityHistory(T entity, boolean visible)
          Creates a new instance.
 
Method Summary
 T getEntity()
          Gets the contained entity.
 boolean isVisible()
          Gets the visible flag.
 void store(StoreWriter sw, StoreClassRegister scr)
          Stores all state to the specified store writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityHistory

public EntityHistory(T entity,
                     boolean visible)
Creates a new instance.

Parameters:
entity - The contained entity.
visible - The visible field.

EntityHistory

public EntityHistory(StoreReader sr,
                     StoreClassRegister scr)
Creates a new instance.

Parameters:
sr - The store to read state from.
scr - Maintains the mapping between classes and their identifiers within the store.
Method Detail

store

public void store(StoreWriter sw,
                  StoreClassRegister scr)
Stores all state to the specified store writer.

Specified by:
store in interface Storeable
Parameters:
sw - The writer that persists data to an underlying store.
scr - Maintains the mapping between classes and their identifiers within the store.

getEntity

public T getEntity()
Gets the contained entity.

Returns:
The entity.

isVisible

public boolean isVisible()
Gets the visible flag.

Returns:
The visible flag.