org.openstreetmap.osmosis.core.mysql.v0_5.impl
Class ChangeWriter

java.lang.Object
  extended by org.openstreetmap.osmosis.core.mysql.v0_5.impl.ChangeWriter

public class ChangeWriter
extends java.lang.Object

Writes changes to a database.

Author:
Brett Henderson

Constructor Summary
ChangeWriter(DatabaseLoginCredentials loginCredentials, boolean populateCurrentTables)
          Creates a new instance.
 
Method Summary
 void complete()
          Flushes all changes to the database.
 void release()
          Releases all database resources.
 void write(Node node, ChangeAction action)
          Writes the specified node change to the database.
 void write(Relation relation, ChangeAction action)
          Writes the specified relation change to the database.
 void write(Way way, ChangeAction action)
          Writes the specified way change to the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeWriter

public ChangeWriter(DatabaseLoginCredentials loginCredentials,
                    boolean populateCurrentTables)
Creates a new instance.

Parameters:
loginCredentials - Contains all information required to connect to the database.
populateCurrentTables - If true, the current tables will be populated as well as history tables.
Method Detail

write

public void write(Node node,
                  ChangeAction action)
Writes the specified node change to the database.

Parameters:
node - The node to be written.
action - The change to be applied.

write

public void write(Way way,
                  ChangeAction action)
Writes the specified way change to the database.

Parameters:
way - The way to be written.
action - The change to be applied.

write

public void write(Relation relation,
                  ChangeAction action)
Writes the specified relation change to the database.

Parameters:
relation - The relation to be written.
action - The change to be applied.

complete

public void complete()
Flushes all changes to the database.


release

public void release()
Releases all database resources.