| 1 package com.quadcap.sql; 2 3 40 41 import java.io.ByteArrayOutputStream ; 42 import java.io.Externalizable ; 43 import java.io.IOException ; 44 import java.io.ObjectInput ; 45 import java.io.ObjectOutput ; 46 47 import java.util.Vector ; 48 49 import java.sql.ResultSet ; 50 import java.sql.SQLException ; 51 52 import com.quadcap.sql.index.Btree; 53 54 import com.quadcap.sql.file.BlockFile; 55 import com.quadcap.sql.file.ByteUtil; 56 57 import com.quadcap.util.Debug; 58 59 67 public class DefaultTableConstraint extends IndexConstraint 68 implements Externalizable  69 { 70 73 public DefaultTableConstraint() { 74 this.useComparator = false; 75 } 76 77 80 public void readExternal(ObjectInput in) 81 throws IOException , ClassNotFoundException  82 { 83 super.readExternal(in); 84 } 85 86 89 public void writeExternal(ObjectOutput out) throws IOException { 90 super.writeExternal(out); 91 } 92 93 97 public byte[] makeKey(Session session, Row row, long rowId) { 98 byte[] key = new byte[8]; 99 ByteUtil.putLong(key, 0, rowId); 100 return key; 101 } 102 103 107 public String toString() { 108 return getName(); 109 } 110 112 public String constraintType() { return "default table constraint"; } 113 } 114 | Popular Tags |