KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > rmi > server > ColumnInfo


1 package com.daffodilwoods.rmi.server;
2
3 import java.io.*;
4
5 class ColumnInfo implements Externalizable {
6    String JavaDoc catalogName;
7    String JavaDoc schemaName;
8    String JavaDoc tableName;
9    String JavaDoc name;
10    int type;
11    int size;
12    int precision;
13    int scale;
14    int nullable;
15    String JavaDoc columnLabel;
16    String JavaDoc 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 JavaDoc tableName0, String JavaDoc catalogName0, String JavaDoc schemaName0, String JavaDoc name0,
26                      int type0, int size0, int precision0, int scale0, int nullable0, String JavaDoc columnLabel0, String JavaDoc 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 JavaDoc {
58       catalogName = (String JavaDoc) oi.readObject();
59       schemaName = (String JavaDoc) oi.readObject();
60       tableName = (String JavaDoc) oi.readObject();
61       name = (String JavaDoc) 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 JavaDoc) oi.readObject();
68       qualifiedTableName = (String JavaDoc) oi.readObject();
69       isColumnUpdatable = oi.readBoolean();
70       isAutoIncrement = oi.readBoolean();
71    }
72 }
73
Popular Tags