Class DroppedTableBackupper300

java.lang.Object
edu.ucsb.nceas.metacat.admin.upgrade.DroppedTableBackupper300

public class DroppedTableBackupper300 extends Object
The class to back up dropped tables to the csv files during the upgrade process to 3.0.0
Author:
tao
  • Constructor Details

    • DroppedTableBackupper300

      public DroppedTableBackupper300(String backupPath) throws AdminException
      Constructor
      Parameters:
      backupPath - the path where the csv backup files will be stored
      Throws:
      AdminException
  • Method Details

    • backup

      public void backup() throws AdminException
      This method will backup those tables: xml_replication, xml_revisions and xml_documents
      Throws:
      AdminException
    • backupNodesTable

      public void backupNodesTable(DroppedTableBackupper300.NodeTableName table, List<Long> rootNodeIds) throws AdminException
      Backup the records whose root node ids are in the list and in the given table
      Parameters:
      table - the table the records locate at
      rootNodeIds - the list of root node id which the records have
      Throws:
      AdminException
    • runQuery

      protected ResultSet runQuery(String query) throws SQLException
      Get the ResultSet object after running the given query
      Parameters:
      query - the query will be run
      Returns:
      the ResultSet object
      Throws:
      SQLException
    • getBackupPath

      public String getBackupPath()
      Get the backup path
      Returns:
      the backup path