void setNameSpace(DINameSpace ns) throws HsqlException {

    Trace.doAssert(ns != null, "name space is null");

    nameSpace = ns;

    Class c;
    Integer type;

    // can only speed up test significantly for java.lang.Object,
    // final classes, primitive types and hierachy parents.
    // Must still check later if assignable from candidate classes, where
    // hierarchy parent is not final.
    // ARRAY
    try {
      c = nameSpace.classForName("org.hsqldb.jdbcArray");

      typeMap.put(c, ValuePool.getInt(Types.ARRAY));
    } catch (Exception e) {
    }

    // BIGINT
    type = ValuePool.getInt(Types.BIGINT);

    typeMap.put(Long.TYPE, type);
    typeMap.put(Long.class, type);

    // BIT
    type = ValuePool.getInt(Types.BIT);

    typeMap.put(Boolean.TYPE, type);
    typeMap.put(Boolean.class, type);

    // BLOB
    type = ValuePool.getInt(Types.BLOB);

    try {
      c = nameSpace.classForName("org.hsqldb.jdbcBlob");

      typeMap.put(c, type);
    } catch (Exception e) {
    }

    // CHAR
    type = ValuePool.getInt(Types.CHAR);

    typeMap.put(Character.TYPE, type);
    typeMap.put(Character.class, type);
    typeMap.put(Character[].class, type);
    typeMap.put(char[].class, type);

    // CLOB
    type = ValuePool.getInt(Types.CLOB);

    try {
      c = nameSpace.classForName("org.hsqldb.jdbcClob");

      typeMap.put(c, type);
    } catch (Exception e) {
    }

    // DATALINK
    type = ValuePool.getInt(Types.DATALINK);

    typeMap.put(java.net.URL.class, type);

    // DATE
    type = ValuePool.getInt(Types.DATE);

    typeMap.put(java.util.Date.class, type);
    typeMap.put(java.sql.Date.class, type);

    // DECIMAL
    type = ValuePool.getInt(Types.DECIMAL);

    try {
      c = nameSpace.classForName("java.math.BigDecimal");

      typeMap.put(c, type);
    } catch (Exception e) {
    }

    // DISTINCT
    try {
      c = nameSpace.classForName("org.hsqldb.jdbcDistinct");

      typeMap.put(c, ValuePool.getInt(Types.DISTINCT));
    } catch (Exception e) {
    }

    // DOUBLE
    type = ValuePool.getInt(Types.DOUBLE);

    typeMap.put(Double.TYPE, type);
    typeMap.put(Double.class, type);

    // FLOAT : Not actually a legal IN parameter type yet
    type = ValuePool.getInt(Types.FLOAT);

    typeMap.put(Float.TYPE, type);
    typeMap.put(Float.class, type);

    // INTEGER
    type = ValuePool.getInt(Types.INTEGER);

    typeMap.put(Integer.TYPE, type);
    typeMap.put(Integer.class, type);

    // JAVA_OBJECT
    type = ValuePool.getInt(Types.JAVA_OBJECT);

    typeMap.put(Object.class, type);

    // LONGVARBINARY
    type = ValuePool.getInt(Types.LONGVARBINARY);

    typeMap.put(byte[].class, type);
    typeMap.put(Binary.class, type);

    // LONGVARCHAR
    type = ValuePool.getInt(Types.LONGVARCHAR);

    typeMap.put(String.class, type);

    // NULL
    type = ValuePool.getInt(Types.NULL);

    typeMap.put(Void.TYPE, type);
    typeMap.put(Void.class, type);

    // REF
    type = ValuePool.getInt(Types.REF);

    try {
      c = nameSpace.classForName("org.hsqldb.jdbcRef");

      typeMap.put(c, type);
    } catch (Exception e) {
    }

    // SMALLINT : Not actually a legal IN parameter type yet
    type = ValuePool.getInt(Types.SMALLINT);

    typeMap.put(Short.TYPE, type);
    typeMap.put(Short.class, type);

    // STRUCT :
    type = ValuePool.getInt(Types.STRUCT);

    try {
      c = nameSpace.classForName("org.hsqldb.jdbcStruct");

      typeMap.put(c, type);
    } catch (Exception e) {
    }

    // TIME
    type = ValuePool.getInt(Types.TIME);

    typeMap.put(java.sql.Time.class, type);

    // TIMESTAMP
    type = ValuePool.getInt(Types.TIMESTAMP);

    typeMap.put(java.sql.Timestamp.class, type);

    // TINYINT : Not actually a legal IN parameter type yet
    type = ValuePool.getInt(Types.TINYINT);

    typeMap.put(Byte.TYPE, type);
    typeMap.put(Byte.class, type);

    // XML : Not actually a legal IN parameter type yet
    type = ValuePool.getInt(Types.XML);

    try {
      c = nameSpace.classForName("org.w3c.dom.Document");

      typeMap.put(c, type);

      c = nameSpace.classForName("org.w3c.dom.DocumentFragment");

      typeMap.put(c, type);
    } catch (Exception e) {
    }
  }
 HsqlArrayList getAliases() {
   return (HsqlArrayList) nameSpace.getInverseAliasMap().get(getFQN());
 }
 String getOrigin(String srcType) {
   return (nameSpace.isBuiltin(clazz) ? "BUILTIN " : "USER DEFINED ") + srcType;
 }