package simpledb;

/** 
 * A RecordID is a reference to a specific tuple on a specific page of a
 * specific table.
 */
public class RecordID {

    PageId pid; 
    int tupleno;
    
    /** Constructor.
     * @param tableid the table that this record is in
     * @param pageno the page of tableid that this record is in
     * @param tupleno the tuple number within the page.
     */
    public RecordID(PageId pid, int tupleno) {
	this.pid = pid;
	this.tupleno = tupleno;
    }

    /**
     * @return the tuple number this RecordId references.
     */
    public int tupleno() {
	return tupleno;
    }

    /**
     * @return the table id this RecordId references.
     */
    public PageId pageid() {
	return pid;
    }
}
