1 package com.daffodilwoods.rmi.server; 2 3 import java.io.*; 4 5 class ColumnInfo implements Externalizable { 6 String catalogName; 7 String schemaName; 8 String tableName; 9 String name; 10 int type; 11 int size; 12 int precision; 13 int scale; 14 int nullable; 15 String columnLabel; 16 String qualifiedTableName; 17 boolean isColumnUpdatable; 18 boolean isAutoIncrement; 19 20 private static final long serialVersionUID = -1204197512041975L; 21 22 public ColumnInfo() { 23 } 24 25 public ColumnInfo(String tableName0, String catalogName0, String schemaName0, String name0, 26 int type0, int size0, int precision0, int scale0, int nullable0, String columnLabel0, String qualifiedTableName0, boolean isAutoIncrement0) { 27 tableName = tableName0; 28 catalogName = catalogName0; 29 schemaName = schemaName0; 30 name = name0; 31 type = type0; 32 size = size0; 33 precision = precision0; 34 scale = scale0; 35 nullable = nullable0; 36 columnLabel = columnLabel0; 37 qualifiedTableName = qualifiedTableName0; 38 isAutoIncrement = isAutoIncrement0; 39 } 40 41 public void writeExternal(ObjectOutput oo) throws IOException { 42 oo.writeObject(catalogName); 43 oo.writeObject(schemaName); 44 oo.writeObject(tableName); 45 oo.writeObject(name); 46 oo.writeInt(type); 47 oo.writeInt(size); 48 oo.writeInt(precision); 49 oo.writeInt(scale); 50 oo.writeInt(nullable); 51 oo.writeObject(columnLabel); 52 oo.writeObject(qualifiedTableName); 53 oo.writeBoolean(isColumnUpdatable); 54 oo.writeBoolean(isAutoIncrement); 55 } 56 57 public void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException { 58 catalogName = (String ) oi.readObject(); 59 schemaName = (String ) oi.readObject(); 60 tableName = (String ) oi.readObject(); 61 name = (String ) oi.readObject(); 62 type = oi.readInt(); 63 size = oi.readInt(); 64 precision = oi.readInt(); 65 scale = oi.readInt(); 66 nullable = oi.readInt(); 67 columnLabel = (String ) oi.readObject(); 68 qualifiedTableName = (String ) oi.readObject(); 69 isColumnUpdatable = oi.readBoolean(); 70 isAutoIncrement = oi.readBoolean(); 71 } 72 } 73 | Popular Tags |