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

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

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

A data class representing a history record for an entity feature.

Author:
Brett Henderson

Constructor Summary
DbFeatureHistory(StoreReader sr, StoreClassRegister scr)
          Creates a new instance.
DbFeatureHistory(T feature, int version)
          Creates a new instance.
 
Method Summary
 T getFeature()
          Gets the contained feature.
 int getVersion()
          Gets the version value.
 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

DbFeatureHistory

public DbFeatureHistory(T feature,
                        int version)
Creates a new instance.

Parameters:
feature - The contained feature.
version - The version field.

DbFeatureHistory

public DbFeatureHistory(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.

getFeature

public T getFeature()
Gets the contained feature.

Returns:
The feature.

getVersion

public int getVersion()
Gets the version value.

Returns:
The version value.