1 21 22 package org.apache.derbyTesting.unitTests.store; 23 24 import org.apache.derby.impl.store.access.conglomerate.*; 25 26 import org.apache.derby.iapi.services.sanity.SanityManager; 27 28 import org.apache.derby.iapi.services.io.Storable; 29 30 import org.apache.derby.iapi.error.StandardException; 31 32 import org.apache.derby.iapi.types.DataValueDescriptor; 33 34 import org.apache.derby.iapi.types.RowLocation; 35 36 37 72 73 public class T_SecondaryIndexRow 74 { 75 76 DataValueDescriptor[] row; 77 RowLocation init_rowlocation = null; 78 79 80 public T_SecondaryIndexRow(){} 81 82 83 84 85 92 99 100 115 public void init( 116 DataValueDescriptor[] template, 117 RowLocation rowlocation, 118 int numkeys) 119 throws StandardException 120 { 121 if (SanityManager.DEBUG) 122 { 123 if (numkeys != (template.length + 1)) 124 SanityManager.THROWASSERT( 125 "numkeys = " + numkeys + 126 " template.length = " + template.length); 127 } 128 129 init_rowlocation = rowlocation; 130 131 134 row = new DataValueDescriptor[numkeys]; 135 136 System.arraycopy(template, 0, row, 0, template.length); 137 138 139 row[row.length - 1] = rowlocation; 140 } 141 142 151 public DataValueDescriptor[] getRow() 152 { 153 return(this.row); 154 } 155 156 public String toString() 157 { 158 String s = "{ "; 159 for (int colid = 0; colid < row.length; colid++) 160 { 161 s += row[colid]; 162 if (colid < (row.length - 1)) 163 s += ", "; 164 } 165 s += " }"; 166 return s; 167 } 168 } 169 | Popular Tags |