1 21 22 package org.apache.derby.impl.store.access.btree.index; 23 24 import org.apache.derby.iapi.services.io.ArrayInputStream; 25 26 import org.apache.derby.iapi.services.monitor.Monitor; 27 28 import org.apache.derby.iapi.services.io.FormatIdUtil; 29 import org.apache.derby.iapi.services.io.StoredFormatIds; 30 31 import org.apache.derby.iapi.error.StandardException; 32 33 import org.apache.derby.iapi.store.access.conglomerate.Conglomerate; 34 35 import org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo; 36 import org.apache.derby.iapi.store.access.TransactionController; 37 38 import org.apache.derby.iapi.types.DataValueDescriptor; 39 40 41 import java.io.IOException ; 42 import java.io.ObjectInput ; 43 import java.io.ObjectOutput ; 44 45 55 56 public class B2IStaticCompiledInfo implements StaticCompiledOpenConglomInfo 57 { 58 59 63 64 67 B2I b2i; 68 69 72 StaticCompiledOpenConglomInfo base_table_static_info; 73 74 78 79 82 public B2IStaticCompiledInfo() 83 { 84 } 85 86 91 B2IStaticCompiledInfo( 92 TransactionController tc, 93 B2I b2i) 94 throws StandardException 95 { 96 this.b2i = b2i; 97 98 this.base_table_static_info = 99 tc.getStaticCompiledConglomInfo(b2i.baseConglomerateId); 100 } 101 102 106 107 111 112 116 117 125 public DataValueDescriptor getConglom() 126 { 127 return(b2i); 128 } 129 130 135 136 137 143 public boolean isNull() 144 { 145 return(b2i == null); 146 } 147 148 155 public void restoreToNull() 156 { 157 b2i = null; 158 } 159 160 165 public int getTypeFormatId() 166 { 167 return StoredFormatIds.ACCESS_B2I_STATIC_COMPILED_V1_ID; 168 } 169 170 181 public void readExternal(ObjectInput in) 182 throws IOException , ClassNotFoundException 183 { 184 b2i = new B2I(); 186 b2i.readExternal(in); 187 188 base_table_static_info = 190 (StaticCompiledOpenConglomInfo) in.readObject(); 191 } 192 public void readExternalFromArray(ArrayInputStream in) 193 throws IOException , ClassNotFoundException 194 { 195 b2i = new B2I(); 197 b2i.readExternal(in); 198 199 base_table_static_info = 201 (StaticCompiledOpenConglomInfo) in.readObject(); 202 } 203 204 212 public void writeExternal(ObjectOutput out) 213 throws IOException 214 { 215 b2i.writeExternal(out); 217 218 out.writeObject(base_table_static_info); 220 } 221 } 222 | Popular Tags |