public class HeapRecordId
extends java.lang.Object
| Constructor and Description |
|---|
HeapRecordId(int pgno,
short indx)
Construct a new record id, given a page number and index.
|
| Modifier and Type | Method and Description |
|---|---|
static HeapRecordId |
fromArray(byte[] data)
Construct a HeapRecordId from a byte array, typically from
a
DatabaseEntry. |
static HeapRecordId |
fromArray(byte[] data,
java.nio.ByteOrder order)
Construct a HeapRecordId from a byte array, typically from
a
DatabaseEntry. |
short |
getIndex()
Get the index in the offset table where the record can be found.
|
int |
getPageNumber()
Get the database page number where the record is stored.
|
void |
setIndex(short indx)
Set the index in the offset table where the record can be found.
|
void |
setPageNumber(int pgno)
Set the database page number where the record is stored.
|
byte[] |
toArray()
Return a byte array representing this record id.
|
byte[] |
toArray(java.nio.ByteOrder order)
Return a byte array representing this record id.
|
public HeapRecordId(int pgno,
short indx)
pgno - The database page number where the record is stored.
indx - Index in the offset table where the record can be found.public static HeapRecordId fromArray(byte[] data) throws java.lang.IllegalArgumentException
DatabaseEntry.
data - The array representing the record id.
java.lang.IllegalArgumentExceptionpublic static HeapRecordId fromArray(byte[] data, java.nio.ByteOrder order) throws java.lang.IllegalArgumentException
DatabaseEntry.
data - The array representing the record id.
order - The byte order of data stored in the array.
java.lang.IllegalArgumentExceptionpublic byte[] toArray()
public byte[] toArray(java.nio.ByteOrder order)
order - The byte order to use when constructing the array.
public int getPageNumber()
public void setPageNumber(int pgno)
pgno - the database page numberpublic short getIndex()
public void setIndex(short indx)
indx - the index in the offset tableCopyright (c) 1996, 2017 Oracle and/or its affiliates. All rights reserved.