org.codehaus.modello.generator.database.model

Class Column


public class Column
extends java.lang.Object

Constructor Summary

Column()
Column(String name, String type, int size, boolean required, boolean primaryKey, boolean autoIncrement, String defaultValue)
Column(String name, int typeCode, int size, boolean required, boolean primaryKey, boolean autoIncrement, String defaultValue)
Column(String name, int typeCode, int size, boolean required, boolean primaryKey, boolean autoIncrement, String defaultValue, int scale)

Method Summary

String
getDefaultValue()
String
getName()
int
getOrdinalPosition()
int
getPrecisionRadix()
int
getScale()
int
getSize()
String
getType()
int
getTypeCode()
boolean
isAutoIncrement()
boolean
isPrimaryKey()
boolean
isRequired()
void
setAutoIncrement(boolean autoIncrement)
void
setDefaultValue(String defaultValue)
void
setName(String name)
void
setOrdinalPosition(int ordinalPosition)
void
setPrecisionRadix(int precisionRadix)
void
setPrimaryKey(boolean primaryKey)
void
setRequired(boolean required)
void
setScale(int scale)
void
setSize(int size)
void
setType(String type)
Set this columns type by name
void
setTypeCode(int typeCode)
String
toString()
String
toStringAll()

Constructor Details

Column

public Column()

Column

public Column(String name,
              String type,
              int size,
              boolean required,
              boolean primaryKey,
              boolean autoIncrement,
              String defaultValue)

Column

public Column(String name,
              int typeCode,
              int size,
              boolean required,
              boolean primaryKey,
              boolean autoIncrement,
              String defaultValue)

Column

public Column(String name,
              int typeCode,
              int size,
              boolean required,
              boolean primaryKey,
              boolean autoIncrement,
              String defaultValue,
              int scale)

Method Details

getDefaultValue

public String getDefaultValue()

getName

public String getName()

getOrdinalPosition

public int getOrdinalPosition()

getPrecisionRadix

public int getPrecisionRadix()

getScale

public int getScale()

getSize

public int getSize()

getType

public String getType()

getTypeCode

public int getTypeCode()

isAutoIncrement

public boolean isAutoIncrement()

isPrimaryKey

public boolean isPrimaryKey()

isRequired

public boolean isRequired()

setAutoIncrement

public void setAutoIncrement(boolean autoIncrement)

setDefaultValue

public void setDefaultValue(String defaultValue)

setName

public void setName(String name)

setOrdinalPosition

public void setOrdinalPosition(int ordinalPosition)

setPrecisionRadix

public void setPrecisionRadix(int precisionRadix)

setPrimaryKey

public void setPrimaryKey(boolean primaryKey)

setRequired

public void setRequired(boolean required)

setScale

public void setScale(int scale)

setSize

public void setSize(int size)

setType

public void setType(String type)
Set this columns type by name

setTypeCode

public void setTypeCode(int typeCode)

toString

public String toString()

toStringAll

public String toStringAll()