Package db

Class DatabaseUtils


  • public class DatabaseUtils
    extends java.lang.Object
    DatabaseUtils provides a collection of database related utilities.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void moveRecords​(Table table, long oldStart, long newStart, long size)
      Reassign the long key assigned to a contiguous group of records within a table.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • moveRecords

        public static void moveRecords​(Table table,
                                       long oldStart,
                                       long newStart,
                                       long size)
                                throws java.io.IOException
        Reassign the long key assigned to a contiguous group of records within a table. A shift in the key value is computed as the difference of oldStart and newStart. Existing records whoose keys lie within the new range will be removed prior to moving the target set of records.
        Parameters:
        table - table within which records should be moved.
        oldStart - old key value for start of range
        newStart - new key value for start of range
        size - determines the range of keys to be moved (oldStart to oldStart+size-1, inclusive)
        Throws:
        java.io.IOException