org.codehaus.modello.generator.database.type

Class 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

Constructor Summary

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

Method Summary

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
String
getName()
Returns the JBDC name of the type
String
getSQLName()
Returns the SQL type name
String
getSQLType(Column column)
Returns the SQL type for a column
long
getSize()
Returns the maximum size (length or precision) of the type
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
String
toString()
Helper to return a stringified version of the object, for debug purposes

Constructor Details

TypeMapping

public TypeMapping()
Construct a new TypeMapping

TypeMapping

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

Method Details

getFormat

public String getFormat()
Returns the format of the type

getMapping

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

getMaximumScale

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

getMinimumScale

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

getName

public String getName()
Returns the JBDC name of the type

getSQLName

public String getSQLName()
Returns the SQL type name

getSQLType

public String getSQLType(Column column)
Returns the SQL type for a column
Parameters:
column - the column
Returns:
the SQL type of column

getSize

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

getType

public Type getType()
Returns the SQL type

setMapping

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

setType

public void setType(Type type)
Sets the SQL type

toString

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