2.8.3: 2008-10-15

net.sf.basedb.clients.migrate
Class Migrater

java.lang.Object
  extended by net.sf.basedb.clients.migrate.Manager
      extended by net.sf.basedb.clients.migrate.Migrater

public class Migrater
extends Manager

Migrates data from BASE 1 to BASE 2.

Version:
2.0
Author:
Gregory, Martin
Last modified
$Date: 2008-09-05 17:15:54 +0200 (Fri, 05 Sep 2008) $

Field Summary
(package private)  Connection BASE2
          BASE 2 connection, initiated by connect()
(package private)  Connection FROM
          BASE 1 connection, initiated by connect()
private static Logger log
          The logger
protected  Properties migrateProperties
          Holds properties defined in migrate.properties
(package private)  SessionControl sessionControl
          BASE 2 connection, used for impersonating users
static Set<String> supportedBase1Versions
           
(package private)  SessionControl TO
          BASE 2 connection, initiated by connect()
 
Constructor Summary
Migrater()
           
 
Method Summary
protected  void configure()
          Loads migration properties from migration.properties file.
protected  void connect()
          Creates connections to BASE 1 and BASE 2 Connection properties are found in the migrate.properties file which are loaded with configure().
private  void createResumePoint(Transfer... transfers)
           
protected  String getProperty(String key)
           
static void main(String[] args)
           
private  void prepareStatementsFromFile()
           
private  void removeResumePoint()
           
 void resume()
           
 void run()
           
private  void startTransfer(Transfer transfer, String property)
           
private  void verifySchemaVersion()
           
static void waitForEnter()
           
 
Methods inherited from class net.sf.basedb.clients.migrate.Manager
getPreparedStatements, prepareStatementFromFile, print, printDate, setPreparedStatements, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

supportedBase1Versions

public static Set<String> supportedBase1Versions

migrateProperties

protected Properties migrateProperties
Holds properties defined in migrate.properties


FROM

Connection FROM
BASE 1 connection, initiated by connect()


TO

SessionControl TO
BASE 2 connection, initiated by connect()


sessionControl

SessionControl sessionControl
BASE 2 connection, used for impersonating users


BASE2

Connection BASE2
BASE 2 connection, initiated by connect()


log

private static final Logger log
The logger

Constructor Detail

Migrater

public Migrater()
Method Detail

run

public void run()

resume

public void resume()

createResumePoint

private void createResumePoint(Transfer... transfers)
                        throws IOException
Throws:
IOException

removeResumePoint

private void removeResumePoint()

startTransfer

private void startTransfer(Transfer transfer,
                           String property)

connect

protected void connect()
Creates connections to BASE 1 and BASE 2 Connection properties are found in the migrate.properties file which are loaded with configure().


configure

protected void configure()
Loads migration properties from migration.properties file.


prepareStatementsFromFile

private void prepareStatementsFromFile()

getProperty

protected String getProperty(String key)

verifySchemaVersion

private void verifySchemaVersion()

main

public static void main(String[] args)

waitForEnter

public static void waitForEnter()

2.8.3: 2008-10-15