fedora.server.utilities.rebuild
Class SQLRebuilder

java.lang.Object
  extended by fedora.server.utilities.rebuild.SQLRebuilder
All Implemented Interfaces:
Rebuilder

public class SQLRebuilder
extends java.lang.Object
implements Rebuilder

A Rebuilder for the SQL database.


Constructor Summary
SQLRebuilder()
           
 
Method Summary
 void addObject(DigitalObject obj)
          Add the data of interest for the given object.
 void executeSql(java.sql.Connection connection, java.lang.String sql)
           
 void finish()
          Free up any system resources associated with rebuilding.
 java.lang.String getAction()
          Get a short phrase describing what the user can do with this rebuilder.
static java.util.List getExistingTables(java.sql.Connection conn)
           
 java.util.Map init(java.io.File serverDir, ServerConfiguration serverConfig)
          Initialize the rebuilder, given the server configuration.
 boolean shouldStopServer()
          Returns true is the server _must_ be shut down for this rebuilder to safely operate.
 void start(java.util.Map options)
          Validate the provided options and perform any necessary startup tasks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLRebuilder

public SQLRebuilder()
Method Detail

getAction

public java.lang.String getAction()
Get a short phrase describing what the user can do with this rebuilder.

Specified by:
getAction in interface Rebuilder

shouldStopServer

public boolean shouldStopServer()
Returns true is the server _must_ be shut down for this rebuilder to safely operate.

Specified by:
shouldStopServer in interface Rebuilder

init

public java.util.Map init(java.io.File serverDir,
                          ServerConfiguration serverConfig)
Initialize the rebuilder, given the server configuration.

Specified by:
init in interface Rebuilder

start

public void start(java.util.Map options)
           throws java.lang.Exception
Validate the provided options and perform any necessary startup tasks.

Specified by:
start in interface Rebuilder
Throws:
java.lang.Exception

getExistingTables

public static java.util.List getExistingTables(java.sql.Connection conn)
                                        throws java.sql.SQLException
Throws:
java.sql.SQLException

executeSql

public void executeSql(java.sql.Connection connection,
                       java.lang.String sql)
                throws LowlevelStorageException
Throws:
LowlevelStorageException

addObject

public void addObject(DigitalObject obj)
Add the data of interest for the given object.

Specified by:
addObject in interface Rebuilder

finish

public void finish()
Free up any system resources associated with rebuilding.

Specified by:
finish in interface Rebuilder