|
||||||||||
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(String fldname)
Returns the integer value stored for the specified field of the current record. |
String |
getString(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(String fldname,
int val)
Stores an integer at the specified field of the current record. |
void |
setString(String fldname,
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 operationsMethod Detail |
---|
public void close()
public boolean next()
public int getInt(String fldname)
fldname
- the name of the field.
public String getString(String fldname)
fldname
- the name of the field.
public void setInt(String fldname, int val)
fldname
- the name of the fieldval
- the integer value stored in that fieldpublic void setString(String fldname, 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 |