1 33 package smallsql.database; 34 35 import java.sql.*; 36 37 45 class StoreNull extends Store { 46 47 private final long nextPagePos; 48 49 50 StoreNull(){ 51 this(-1); 52 } 53 54 55 StoreNull(long nextPos){ 56 nextPagePos = nextPos; 57 } 58 59 60 final boolean isNull(int offset) { 61 return true; 62 } 63 64 final boolean getBoolean(int offset, int dataType) throws Exception { 65 return false; 66 } 67 68 final byte[] getBytes(int offset, int dataType) throws Exception { 69 return null; 70 } 71 72 73 final double getDouble(int offset, int dataType) throws Exception { 74 return 0; 75 } 76 77 78 final float getFloat(int offset, int dataType) throws Exception { 79 return 0; 80 } 81 82 83 final int getInt(int offset, int dataType) throws Exception { 84 return 0; 85 } 86 87 88 final long getLong(int offset, int dataType) throws Exception { 89 return 0; 90 } 91 92 93 final long getMoney(int offset, int dataType) throws Exception { 94 return 0; 95 } 96 97 98 final MutableNumeric getNumeric(int offset, int dataType) throws Exception { 99 return null; 100 } 101 102 103 final Object getObject(int offset, int dataType) throws Exception { 104 return null; 105 } 106 107 108 final String getString(int offset, int dataType) throws Exception { 109 return null; 110 } 111 112 113 114 final void scanObjectOffsets(int[] offsets, int[] dataTypes) {} 115 116 117 final int getUsedSize() { 118 return 0; 119 } 120 121 final long getNextPagePos(){ 122 return nextPagePos; 123 } 124 125 final void deleteRow(SSConnection con) throws SQLException{ 126 if(nextPagePos >= 0){ 127 throw Utils.createSQLException("Row already deleted."); 128 } 129 throw new Error (); 131 } 132 } 133 | Popular Tags |