Class DatabaseTableUtils


  • public class DatabaseTableUtils
    extends java.lang.Object
    Collection of static functions for upgrading various database tables.
    • Constructor Detail

      • DatabaseTableUtils

        public DatabaseTableUtils()
    • Method Detail

      • updateIndexedAddressField

        public static void updateIndexedAddressField​(Table table,
                                                     int addrCol,
                                                     AddressMap addrMap,
                                                     Address fromAddr,
                                                     Address toAddr,
                                                     long length,
                                                     RecordFilter filter,
                                                     TaskMonitor monitor)
                                              throws java.io.IOException,
                                                     CancelledException
        Updates an indexed address field for when a block is moved.
        Parameters:
        table - the database table
        addrCol - the address column in the table
        addrMap - the address map
        fromAddr - the from address of the block being moved
        toAddr - the address to where the block is being moved.
        length - the size of the block being moved.
        monitor - the task monitor
        Throws:
        java.io.IOException - thrown if a database io error occurs.
        CancelledException - thrown if the user cancels the move operation.
      • updateAddressKey

        public static void updateAddressKey​(Table table,
                                            AddressMap addrMap,
                                            Address fromAddr,
                                            Address toAddr,
                                            long length,
                                            TaskMonitor monitor)
                                     throws java.io.IOException,
                                            CancelledException
        Handles redoing a table whose key is address based when a ranges of addresses is moved.
        Parameters:
        table - the database table.
        addrMap - the address map.
        fromAddr - the from address of the block being moved.
        toAddr - the destination address of the block being moved.
        length - the size of the block being moved.
        monitor - the taskmonitor
        Throws:
        java.io.IOException - thrown if a database io error occurs.
        CancelledException - thrown if the user cancels the move operation.
      • updateAddressKey

        public static void updateAddressKey​(Table table,
                                            AddressMap addrMap,
                                            Address fromAddr,
                                            Address endAddr,
                                            Address toAddr,
                                            TaskMonitor monitor)
                                     throws java.io.IOException,
                                            CancelledException
        Handles redoing a table whose key is address based when a ranges of addresses is moved.
        Parameters:
        table - the database table.
        addrMap - the address map.
        fromAddr - the first address of the block being moved.
        endAddr - the last address of the block being moved.
        toAddr - the destination address of the block being moved.
        monitor - the task monitor
        Throws:
        java.io.IOException - thrown if a database io error occurs.
        CancelledException - thrown if the user cancels the move operation.