import java.util.*; import java.io.*; public class RR extends RC implements Serializable { protected String Firstid; protected String Secondid; protected boolean Hasbp; protected boolean Singleton; protected Database Schema; protected RRtable Table; public void setFirstid(String value) { Firstid = value; } public String getFirstid() { return Firstid; } void setSecondid(String value) { Secondid = value; } public String getSecondid() { return Secondid; } void setHasbp(boolean value) { Hasbp = value; } public boolean getHasbp() { return Hasbp; } void setSingleton(boolean value) { Singleton = value; } public boolean getSingleton() { return Singleton; } public RRtable getTable() { return Table; } public void setTable(RRtable value) { Table = value; } public Database getSchema() { return Schema; } public void setSchema(Database value) { Schema = value; } RR(String rowbuffer, Database mySchema) { String buffer; StringTokenizer tokens = new StringTokenizer( rowbuffer ); buffer = tokens.nextToken(); pkid = new Key(buffer, mySchema); buffer = tokens.nextToken(); Firstid = buffer; buffer = tokens.nextToken(); Secondid = buffer; buffer = tokens.nextToken(); Hasbp = (Boolean.valueOf(buffer)).booleanValue(); buffer = tokens.nextToken(); Singleton = (Boolean.valueOf(buffer)).booleanValue(); if( tokens.hasMoreTokens() ) { System.err.println("Warning - extra tokens at end or row, ignored"); } Schema = mySchema; Table = mySchema.RRtab; } public void addRow() { Table.insertRow(this); linkRow(); } public void deleteRow() { Table.removeRow(this); unlinkRow(); } public void linkRow() { } public void unlinkRow() { } public RR() { } public void dumpRow(BufferedWriter output) throws IOException { output.write(this.toString()); output.newLine(); output.flush(); } public String toString() { return pkid + " " + Firstid + " " + Secondid + " " + Hasbp + " " + Singleton; } public static void main(String[] args) { } }