com.xavax.xstore
Class AbstractTypeMap

Object
  extended byAbstractTypeMap
Direct Known Subclasses:
MSSTypeMap, MySQLTypeMap, OracleTypeMap

public abstract class AbstractTypeMap
extends Object

AbstractTypeMap uses a TreeMap to map internal JType values to the corresponding SQL data type for a specific database. TreeMap is used because it is guaranteed log2(O) performance and the type maps never change after they are created.


Method Summary
 void clear()
          Remove all type mappings.
 TypeMapEntry mapEntry(short type)
          Returns the type map entry for a canonical SQL type.
 String name(short type)
          Returns the database specific type name matching the specified canonical SQL type.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clear

public void clear()
Remove all type mappings.


mapEntry

public TypeMapEntry mapEntry(short type)
Returns the type map entry for a canonical SQL type.

Parameters:
type - the canonical SQL type.
Returns:
the type map entry for a canonical SQL type.

name

public String name(short type)
Returns the database specific type name matching the specified canonical SQL type.

Parameters:
type - the canonical SQL type.
Returns:
the typename matching the canonical SQL type.