1 package com.daffodilwoods.daffodildb.server.datadictionarysystem.information; 2 3 import com.daffodilwoods.daffodildb.server.datadictionarysystem.*; 4 import com.daffodilwoods.database.resource.*; 5 import java.util.ArrayList ; 6 import java.io.*; 7 import com.daffodilwoods.daffodildb.server.sql99.utils._Reference; 8 9 public class IndexInformation implements _IndexInformation { 10 11 private _IndexInfo[] indexInfo; 12 13 public IndexInformation(_IndexInfo[] indexInfo) { 14 this.indexInfo = indexInfo; 15 } 16 17 public IndexInformation() { 18 } 19 20 21 public _IndexInfo getIndexInfo(int index) { 22 return indexInfo[index]; 23 } 24 25 ArrayList getAllIndexes(){ 26 ArrayList indexesList = new ArrayList (); 27 for(int i =0 ;i<indexInfo.length;i++) 28 indexesList.add(indexInfo[i].getName()); 29 return indexesList; 30 } 31 32 public void readExternal(ObjectInput objectInput)throws IOException, ClassNotFoundException { 33 indexInfo = (_IndexInfo[])objectInput.readObject(); 34 } 35 36 public void writeExternal(ObjectOutput objectOutput) throws IOException { 37 objectOutput.writeObject(indexInfo); 38 } 39 40 41 } 42 | Popular Tags |