Package db
Class DatabaseUtils
- java.lang.Object
-
- db.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.
-
-
-
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 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 rangenewStart
- new key value for start of rangesize
- determines the range of keys to be moved (oldStart to oldStart+size-1, inclusive)- Throws:
java.io.IOException
- if there is an error moving the records
-
-