org.codehaus.modello.generator.database.type
Class TypeMapping

java.lang.Object
  extended byorg.codehaus.modello.generator.database.type.TypeMapping

public class TypeMapping
extends java.lang.Object

Associates an SQL type with its JDBC mapping

Version:
1.1 2003/02/05 08:08:37
Author:
Tim Anderson

Field Summary
private  Mapping mapping
          The JDBC type mapping
private  Type type
          The SQL type
 
Constructor Summary
TypeMapping()
          Construct a new TypeMapping
TypeMapping(Type type, Mapping mapping)
          Construct a new TypeMapping
 
Method Summary
 java.lang.String getFormat()
          Returns the format of the type
 Mapping getMapping()
          Returns the JDBC mapping of the type
 short getMaximumScale()
          Returns the maximum scale of the type
 short getMinimumScale()
          Returns the minimum scale of the type
 java.lang.String getName()
          Returns the JBDC name of the type
 long getSize()
          Returns the maximum size (length or precision) of the type
 java.lang.String getSQLName()
          Returns the SQL type name
 java.lang.String getSQLType(Column column)
          Returns the SQL type for a column
 Type getType()
          Returns the SQL type
 void setMapping(Mapping mapping)
          Sets the JDBC mapping of the type
 void setType(Type type)
          Sets the SQL type
 java.lang.String toString()
          Helper to return a stringified version of the object, for debug purposes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

private Type type
The SQL type


mapping

private Mapping mapping
The JDBC type mapping

Constructor Detail

TypeMapping

public TypeMapping()
Construct a new TypeMapping


TypeMapping

public TypeMapping(Type type,
                   Mapping mapping)
Construct a new TypeMapping

Method Detail

getType

public Type getType()
Returns the SQL type


setType

public void setType(Type type)
Sets the SQL type


getMapping

public Mapping getMapping()
Returns the JDBC mapping of the type


setMapping

public void setMapping(Mapping mapping)
Sets the JDBC mapping of the type


getName

public java.lang.String getName()
Returns the JBDC name of the type


getSQLName

public java.lang.String getSQLName()
Returns the SQL type name


getSize

public long getSize()
Returns the maximum size (length or precision) of the type


getMinimumScale

public short getMinimumScale()
Returns the minimum scale of the type


getMaximumScale

public short getMaximumScale()
Returns the maximum scale of the type


getFormat

public java.lang.String getFormat()
Returns the format of the type


getSQLType

public java.lang.String getSQLType(Column column)
Returns the SQL type for a column

Parameters:
column - the column
Returns:
the SQL type of column

toString

public java.lang.String toString()
Helper to return a stringified version of the object, for debug purposes