org.codehaus.modello.generator.database.type

Class Type


public class Type
extends java.lang.Object

Describes an SQL type
Version:
1.1 2003/02/05 08:08:37
Author:
Tim Anderson

Constructor Summary

Type()
Construct a new Type
Type(String sqlName, long size, short minScale, short maxScale)
Construct a new Type

Method Summary

short
getMaximumScale()
Returns the maximum scale of the type
short
getMinimumScale()
Returns the minimum scale of the type
String
getSQLName()
Returns the SQL name of the type
long
getSize()
Returns the maximum size (or precision) of the type
void
setMaximumScale(short scale)
Sets the maximum scale of the type
void
setMinimumScale(short scale)
Sets the minimum scale of the type
void
setSQLName(String name)
Sets the SQL name of the type
void
setSize(long size)
Sets the maximum size (or precision) of the type
String
toString()
Helper to return a stringified version of the type, for debug purposes

Constructor Details

Type

public Type()
Construct a new Type

Type

public Type(String sqlName,
            long size,
            short minScale,
            short maxScale)
Construct a new Type
Parameters:
sqlName - the SQL name of the type
size - the maximum size/precision of the type
minScale - the minimum scale supported by the type
maxScale - the maximum scale supported by the type

Method Details

getMaximumScale

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

getMinimumScale

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

getSQLName

public String getSQLName()
Returns the SQL name of the type

getSize

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

setMaximumScale

public void setMaximumScale(short scale)
Sets the maximum scale of the type

setMinimumScale

public void setMinimumScale(short scale)
Sets the minimum scale of the type

setSQLName

public void setSQLName(String name)
Sets the SQL name of the type

setSize

public void setSize(long size)
Sets the maximum size (or precision) of the type

toString

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