|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsimpledb.record.RecordPage
public class RecordPage
Manages the placement and access of records in a block.
| Field Summary | |
|---|---|
static int |
EMPTY
|
static int |
INUSE
|
| Constructor Summary | |
|---|---|
RecordPage(Block blk,
TableInfo ti,
Transaction tx)
Creates the record manager for the specified block. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the manager, by unpinning the block. |
int |
currentId()
Returns the ID of the current record. |
void |
delete()
Deletes the current record. |
int |
getInt(java.lang.String fldname)
Returns the integer value stored for the specified field of the current record. |
java.lang.String |
getString(java.lang.String fldname)
Returns the string value stored for the specified field of the current record. |
boolean |
insert()
Inserts a new, blank record somewhere in the page. |
void |
moveToId(int id)
Sets the current record to be the record having the specified ID. |
boolean |
next()
Moves to the next record in the block. |
void |
setInt(java.lang.String fldname,
int val)
Stores an integer at the specified field of the current record. |
void |
setString(java.lang.String fldname,
java.lang.String val)
Stores a string at the specified field of the current record. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int EMPTY
public static final int INUSE
| Constructor Detail |
|---|
public RecordPage(Block blk,
TableInfo ti,
Transaction tx)
blk - a reference to the disk blockti - the table's metadatatx - the transaction performing the operations| Method Detail |
|---|
public void close()
public boolean next()
public int getInt(java.lang.String fldname)
fldname - the name of the field.
public java.lang.String getString(java.lang.String fldname)
fldname - the name of the field.
public void setInt(java.lang.String fldname,
int val)
fldname - the name of the fieldval - the integer value stored in that field
public void setString(java.lang.String fldname,
java.lang.String val)
fldname - the name of the fieldval - the string value stored in that fieldpublic void delete()
public boolean insert()
public void moveToId(int id)
id - the ID of the record within the page.public int currentId()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||