1 21 22 package org.apache.derby.impl.sql.catalog; 23 24 import org.apache.derby.iapi.services.sanity.SanityManager; 25 26 import org.apache.derby.iapi.sql.dictionary.CatalogRowFactory; 27 import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor; 28 import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator; 29 30 import org.apache.derby.catalog.UUID; 31 32 38 class IndexInfoImpl 39 { 40 private IndexRowGenerator irg; 41 42 private long conglomerateNumber; 43 44 private final CatalogRowFactory crf; 45 private final int indexNumber; 46 47 53 IndexInfoImpl(int indexNumber, CatalogRowFactory crf) 54 { 55 this.crf = crf; 56 this.indexNumber = indexNumber; 57 this.conglomerateNumber = -1; 58 } 59 60 65 long getConglomerateNumber() 66 { 67 return conglomerateNumber; 68 } 69 70 75 void setConglomerateNumber(long conglomerateNumber) 76 { 77 this.conglomerateNumber = conglomerateNumber; 78 } 79 80 85 String getIndexName() 86 { 87 return crf.getIndexName(indexNumber); 88 } 89 90 95 int getColumnCount() 96 { 97 return crf.getIndexColumnCount(indexNumber); 98 } 99 100 105 IndexRowGenerator getIndexRowGenerator() 106 { 107 return irg; 108 } 109 110 115 void setIndexRowGenerator(IndexRowGenerator irg) 116 { 117 this.irg = irg; 118 } 119 120 128 int getBaseColumnPosition(int colNumber) 129 { 130 return crf.getIndexColumnPositions(indexNumber)[colNumber]; 131 } 132 133 138 boolean isIndexUnique() 139 { 140 return crf.isIndexUnique(indexNumber); 141 } 142 } 143 | Popular Tags |