1 package net.jaekl.cfb.db;
5 CHAR, INTEGER, TIMESTAMP, TIMESTAMPTZ, VARCHAR
16 public Column(String name, Type type, int width, Null canBeNull)
24 public String getName() { return m_name; }
25 public Type getType() { return m_type; }
26 public int getWidth() { return m_width; }
27 public Null getNull() { return m_null; }
29 // Create a column based on an array of Objects
30 // Input format: { name, type, width, can_be_null }
31 public static Column construct(Object[] spec) {
33 assert(4 == spec.length);
34 assert(spec[0] instanceof String);
35 assert(spec[1] instanceof Type);
36 assert(spec[2] instanceof Number);
37 assert(spec[3] instanceof Null);
39 String name = (String)(spec[0]);
40 Type type = (Type)(spec[1]);
41 Number width = (Number)(spec[2]);
42 Null canBeNull = (Null)(spec[3]);
44 return new Column(name, type, width.intValue(), canBeNull);