fedora.utilities.install
Class Database

java.lang.Object
  extended by fedora.utilities.install.Database

public class Database
extends java.lang.Object


Constructor Summary
Database(Distribution dist, InstallOptions opts)
           
 
Method Summary
 void close()
          Closes any underlying connection with the database if necessary.
protected  java.io.File getDriver()
           
 void install()
           
static void main(java.lang.String[] args)
           
protected  void test()
          Simple sanity check of user-supplied database options.
protected  boolean usesDOTable()
          Determines whether or not the database has a table named "do".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Database

public Database(Distribution dist,
                InstallOptions opts)
Method Detail

install

public void install()
             throws InstallationFailedException
Throws:
InstallationFailedException

getDriver

protected java.io.File getDriver()
                          throws java.io.IOException
Throws:
java.io.IOException

test

protected void test()
             throws java.lang.Exception
Simple sanity check of user-supplied database options. Tries to establish a database connection and issue a Connection.getMetaData() using the supplied InstallOptions values for DATABASE_DRIVER, DATABASE_DRIVERCLASS, DATABASE_JDBCURL, DATABASE_USERNAME, and DATABASE_PASSWORD.

Throws:
java.lang.Exception

usesDOTable

protected boolean usesDOTable()
                       throws java.lang.Exception
Determines whether or not the database has a table named "do".

Returns:
true if the database contains a table with the name "do".
Throws:
java.lang.Exception

close

public void close()
           throws java.sql.SQLException
Closes any underlying connection with the database if necessary.

Throws:
java.sql.SQLException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception