Package db

Class DatabaseUtils

java.lang.Object
db.DatabaseUtils

public class DatabaseUtils extends Object
DatabaseUtils provides a collection of database related utilities.
  • Method Details

    • moveRecords

      public static void moveRecords(Table table, long oldStart, long newStart, long size) throws 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 whose 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:
      IOException - if there is an error moving the records