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

java.lang.Object
  extended by org.openstreetmap.osmosis.core.apidb.v0_6.impl.DbFeature<T>
      extended by org.openstreetmap.osmosis.core.apidb.v0_6.impl.DbOrderedFeature<T>
Type Parameters:
T - The feature type to be encapsulated.
All Implemented Interfaces:
Storeable

public class DbOrderedFeature<T extends Storeable>
extends DbFeature<T>

A data class for representing a way node database record. This extends a way node with fields relating it to the owning way.

Author:
Brett Henderson

Constructor Summary
DbOrderedFeature(long entityId, T feature, int sequenceId)
          Creates a new instance.
DbOrderedFeature(StoreReader sr, StoreClassRegister scr)
          Creates a new instance.
 
Method Summary
 int getSequenceId()
           
 void store(StoreWriter sw, StoreClassRegister scr)
          Stores all state to the specified store writer.
 
Methods inherited from class org.openstreetmap.osmosis.core.apidb.v0_6.impl.DbFeature
getEntityId, getFeature
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbOrderedFeature

public DbOrderedFeature(long entityId,
                        T feature,
                        int sequenceId)
Creates a new instance.

Parameters:
entityId - The owning entity id.
feature - The feature being referenced.
sequenceId - The order of this feature within the entity.

DbOrderedFeature

public DbOrderedFeature(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
Overrides:
store in class DbFeature<T extends Storeable>
Parameters:
sw - The writer that persists data to an underlying store.
scr - Maintains the mapping between classes and their identifiers within the store.

getSequenceId

public int getSequenceId()
Returns:
The sequence id.