org.openstreetmap.osmosis.core.pgsql.v0_5
Class PostgreSqlDatasetTruncator

java.lang.Object
  extended by org.openstreetmap.osmosis.core.pgsql.v0_5.PostgreSqlDatasetTruncator
All Implemented Interfaces:
java.lang.Runnable, RunnableTask, Task

public class PostgreSqlDatasetTruncator
extends java.lang.Object
implements RunnableTask

A standalone OSM task with no inputs or outputs that truncates tables in a mysql database. This is used for removing all existing data from tables.

Author:
Brett Henderson

Constructor Summary
PostgreSqlDatasetTruncator(DatabaseLoginCredentials loginCredentials, DatabasePreferences preferences)
          Creates a new instance.
 
Method Summary
 void run()
          Truncates all data from the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgreSqlDatasetTruncator

public PostgreSqlDatasetTruncator(DatabaseLoginCredentials loginCredentials,
                                  DatabasePreferences preferences)
Creates a new instance.

Parameters:
loginCredentials - Contains all information required to connect to the database.
preferences - Contains preferences configuring database behaviour.
Method Detail

run

public void run()
Truncates all data from the database.

Specified by:
run in interface java.lang.Runnable