org.codehaus.modello.generator.database.type

Class TypeMapping

public class TypeMapping extends 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
StringgetFormat()
Returns the format of the type
MappinggetMapping()
Returns the JDBC mapping of the type
shortgetMaximumScale()
Returns the maximum scale of the type
shortgetMinimumScale()
Returns the minimum scale of the type
StringgetName()
Returns the JBDC name of the type
longgetSize()
Returns the maximum size (length or precision) of the type
StringgetSQLName()
Returns the SQL type name
StringgetSQLType(Column column)
Returns the SQL type for a column
TypegetType()
Returns the SQL type
voidsetMapping(Mapping mapping)
Sets the JDBC mapping of the type
voidsetType(Type type)
Sets the SQL type
StringtoString()
Helper to return a stringified version of the object, for debug purposes

Constructor Detail

TypeMapping

public TypeMapping()
Construct a new TypeMapping

TypeMapping

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

Method Detail

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

getSize

public long getSize()
Returns the maximum size (length or precision) 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

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
Copyright © 2001-2007 Codehaus. All Rights Reserved.