1 21 22 package org.apache.derby.catalog.types; 23 24 import org.apache.derby.iapi.services.io.Formatable; 25 import org.apache.derby.iapi.services.io.StoredFormatIds; 26 import org.apache.derby.catalog.AliasInfo; 27 import java.io.IOException ; 28 import java.io.ObjectInput ; 29 import java.io.ObjectOutput ; 30 31 36 public class SynonymAliasInfo implements AliasInfo, Formatable 37 { 38 private String schemaName = null; 39 private String tableName = null; 40 41 public SynonymAliasInfo() { 42 } 43 44 47 public SynonymAliasInfo(String schemaName, String tableName) 48 { 49 this.schemaName = schemaName; 50 this.tableName = tableName; 51 } 52 53 public String getSynonymTable() { 54 return tableName; 55 } 56 57 public String getSynonymSchema() { 58 return schemaName; 59 } 60 61 63 71 public void readExternal( ObjectInput in ) 72 throws IOException , ClassNotFoundException 73 { 74 schemaName = (String ) in.readObject(); 75 tableName = (String ) in.readObject(); 76 } 77 78 85 public void writeExternal( ObjectOutput out ) 86 throws IOException 87 { 88 out.writeObject(schemaName); 89 out.writeObject(tableName); 90 } 91 92 97 public int getTypeFormatId() { return StoredFormatIds.SYNONYM_INFO_V01_ID; } 98 99 public String toString() { 100 return "\"" + schemaName + "\".\"" + tableName + "\""; 101 } 102 103 public String getMethodName() 104 { 105 return null; 106 } 107 } 108 109 | Popular Tags |