schemacrawler.utility
Class TestDatabase

java.lang.Object
  extended by schemacrawler.utility.TestDatabase

public class TestDatabase
extends Object

Sets up a database schema for tests and examples.

Author:
sfatehi

Constructor Summary
TestDatabase()
           
 
Method Summary
 void createMemoryDatabase()
          Create database in memory.
 Catalog getCatalog(SchemaCrawlerOptions schemaCrawlerOptions)
           
 Connection getConnection()
          Gets the connection.
 Database getDatabase(SchemaCrawlerOptions schemaCrawlerOptions)
           
 DatabaseConnectionOptions getDatabaseConnectionOptions()
           
 Schema getSchema(SchemaCrawlerOptions schemaCrawlerOptions, String schemaName)
           
static void initializeApplicationLogging()
           
static void main(String[] args)
          Starts up a test database in server mode.
 void shutdownDatabase()
          Shuts down the database server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestDatabase

public TestDatabase()
Method Detail

initializeApplicationLogging

public static void initializeApplicationLogging()

main

public static void main(String[] args)
                 throws Exception
Starts up a test database in server mode.

Parameters:
args - Command line arguments
Throws:
Exception - Exception

createMemoryDatabase

public void createMemoryDatabase()
                          throws SchemaCrawlerException
Create database in memory.

Throws:
SchemaCrawlerException

getCatalog

public Catalog getCatalog(SchemaCrawlerOptions schemaCrawlerOptions)
                   throws SchemaCrawlerException,
                          SQLException
Throws:
SchemaCrawlerException
SQLException

getConnection

public Connection getConnection()
                         throws SchemaCrawlerException
Gets the connection.

Returns:
Connection
Throws:
SQLException
SchemaCrawlerException

getDatabase

public Database getDatabase(SchemaCrawlerOptions schemaCrawlerOptions)
                     throws SchemaCrawlerException,
                            SQLException
Throws:
SchemaCrawlerException
SQLException

getDatabaseConnectionOptions

public DatabaseConnectionOptions getDatabaseConnectionOptions()

getSchema

public Schema getSchema(SchemaCrawlerOptions schemaCrawlerOptions,
                        String schemaName)
                 throws SchemaCrawlerException,
                        SQLException
Throws:
SchemaCrawlerException
SQLException

shutdownDatabase

public void shutdownDatabase()
Shuts down the database server.



Copyright © 2003-2009 Sualeh Fatehi. All Rights Reserved.