|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectindex.DataEntry
class DataEntry
Records stored in an index file; using the textbook's "Alternative 2" (see page 276) to allow for multiple indexes. Duplicate keys result in duplicate DataEntry instances.
| Field Summary | |
|---|---|
SearchKey |
key
The search key (i.e. |
RID |
rid
The data record (i.e. |
| Constructor Summary | |
|---|---|
DataEntry(byte[] data,
short offset)
Constructs a DataEntry stored in the given data buffer. |
|
DataEntry(SearchKey key,
RID rid)
Constructs a DataEntry from the given values. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
True if obj is a DataEntry with the same values; false otherwise. |
short |
getLength()
Gets the total length of the data entry (in bytes). |
void |
writeData(byte[] data,
short offset)
Writes the DataEntry into the given data buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public SearchKey key
public RID rid
| Constructor Detail |
|---|
public DataEntry(SearchKey key,
RID rid)
public DataEntry(byte[] data,
short offset)
| Method Detail |
|---|
public void writeData(byte[] data,
short offset)
public short getLength()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||