1 65 66 67 package org.hsqldb; 68 69 74 87 class PointerNode extends BaseMemoryNode { 88 89 int iData = NO_POS; 90 private Table tTable; 91 private Node nPrimary; 93 PointerNode(CachedRow r, int id) { 94 95 tTable = r.getTable(); 96 iData = r.iPos; 97 nPrimary = r.nPrimaryNode == null ? this 98 : r.nPrimaryNode; 99 } 100 101 void delete() { 102 103 super.delete(); 104 105 nPrimary = null; 106 tTable = null; 107 } 108 109 int getKey() { 110 return iData; 111 } 112 113 Row getRow() throws HsqlException { 114 115 if (iData == NO_POS) { 116 return null; 117 } 118 119 CachedRow r = tTable.getRow(iData, nPrimary); 120 121 return r; 122 } 123 124 Object [] getData() throws HsqlException { 125 126 if (Trace.DOASSERT) { 127 Trace.doAssert(iBalance != -2); 128 } 129 130 return getRow().getData(); 131 } 132 } 133 | Popular Tags |