org.castor.ddlgen
Class AbstractTypeMapper

java.lang.Object
  extended by 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 java.lang.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 Summary
protected AbstractTypeMapper(DDLGenConfiguration conf)
          Construct an abstract TypeMapper using given configuration to get default parameters for parameterized types.
 
Method Summary
protected  void add(TypeInfo type)
          Add TypeInfo to map of known types.
 TypeInfo getType(java.lang.String jdcbType)
          Get TypeInfo for given JDBC type.
protected abstract  void initialize(DDLGenConfiguration conf)
          Initialize map of known types using given configuration to get default parameters for parameterized types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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(java.lang.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.


Copyright © 2011. All Rights Reserved.