Class AbstractTypeMapper

java.lang.Object
org.castor.ddlgen.AbstractTypeMapper
All Implemented Interfaces:
TypeMapper
Direct Known Subclasses:
Db2TypeMapper, DerbyTypeMapper, HsqlTypeMapper, MssqlTypeMapper, MysqlTypeMapper, OracleTypeMapper, PointBaseTypeMapper, PostgresqlTypeMapper, SapdbTypeMapper, SybaseTypeMapper

public abstract class AbstractTypeMapper extends Object implements TypeMapper
AbstractTypeMapper is the base class for mapping JDBC supported type and RDBMS data type.

The initialize(Configuration) is used to defined the mapping table in which the configuration is handled parameters for TypeInfo. Please refer to org.castor.ddl.typeinfo for TypeInfo definitions

Since:
1.1
Version:
$Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
Author:
Le Duc Bao, Ralf Joachim
  • Constructor Details

    • AbstractTypeMapper

      protected AbstractTypeMapper(DDLGenConfiguration conf)
      Construct an abstract TypeMapper using given configuration to get default parameters for parameterized types.
      Parameters:
      conf - The configuration to get default parameter values from.
  • Method Details

    • initialize

      protected abstract void initialize(DDLGenConfiguration conf)
      Initialize map of known types using given configuration to get default parameters for parameterized types.
      Parameters:
      conf - The configuration to get default parameter values from.
    • add

      protected final void add(TypeInfo type)
      Add TypeInfo to map of known types.
      Parameters:
      type - The TypeInfo to add.
    • getType

      public final TypeInfo getType(String jdcbType)
      Get TypeInfo for given JDBC type.
      Specified by:
      getType in interface TypeMapper
      Parameters:
      jdcbType - JDBC type to get TypeInfo for.
      Returns:
      TypeInfo for the given JDBC type.