net.sf.dewdrop.sqlml
Class Column

java.lang.Object
  extended bynet.sf.dewdrop.sqlml.SqlmlComponent
      extended bynet.sf.dewdrop.sqlml.SchemaComponent
          extended bynet.sf.dewdrop.sqlml.Column

public class Column
extends SchemaComponent

Author:
Les Hazlewood

Field Summary
protected  List checkConstraints
           
protected  String defaultValue
           
protected  ColumnDirective directive
           
protected  Ref fkRef
           
protected  ForeignKey foreignKey
           
protected  NotNull innerNn
           
protected  PrimaryKey innerPk
           
protected  Unique innerUq
           
protected  int length
           
protected  int precision
           
protected  boolean primaryKey
           
protected  boolean required
           
protected  SqlDataType type
           
protected  boolean unique
           
 
Fields inherited from class net.sf.dewdrop.sqlml.SchemaComponent
description, name
 
Fields inherited from class net.sf.dewdrop.sqlml.SqlmlComponent
indentLevel, logger
 
Constructor Summary
Column()
           
 
Method Summary
 void addCheckConstraint(Check check)
           
 List getCheckConstraints()
           
 String getDefault()
           
 ColumnDirective getDirective()
           
 ForeignKey getForeignKey()
           
 NotNull getInnerNotNull()
           
 PrimaryKey getInnerPrimaryKey()
           
 Unique getInnnerUnique()
           
 int getLength()
           
 int getPrecision()
           
 Ref getRef()
           
 SqlDataType getType()
           
 boolean isPrimaryKey()
           
 boolean isRequired()
           
 boolean isUnique()
           
 void onWriteSql(Writer out, Configuration cfg)
           
 void setDefault(String defaultVal)
           
 void setDirective(ColumnDirective directive)
           
 void setForeignKey(ForeignKey fk)
           
 void setInnerNotNull(NotNull nn)
           
 void setInnerPrimaryKey(PrimaryKey inner)
           
 void setInnerUnique(Unique uq)
           
 void setLength(int length)
           
 void setPrecision(int precision)
           
 void setPrimaryKey(boolean primaryKey)
           
 void setRef(Ref fkRef)
           
 void setRequired(boolean required)
           
 void setType(SqlDataType type)
           
 void setUnique(boolean unique)
           
 
Methods inherited from class net.sf.dewdrop.sqlml.SchemaComponent
equals, getDescription, getName, setDescription, setName
 
Methods inherited from class net.sf.dewdrop.sqlml.SqlmlComponent
getIndentLevel, i18n, i18n, i18n, setIndentLevel, toSql, toSql, toSql, toString, writeSql, writeSql, writeSql
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

protected SqlDataType type

length

protected int length

precision

protected int precision

defaultValue

protected String defaultValue

primaryKey

protected boolean primaryKey

required

protected boolean required

unique

protected boolean unique

foreignKey

protected ForeignKey foreignKey

fkRef

protected Ref fkRef

innerPk

protected PrimaryKey innerPk

innerNn

protected NotNull innerNn

innerUq

protected Unique innerUq

checkConstraints

protected List checkConstraints

directive

protected ColumnDirective directive
Constructor Detail

Column

public Column()
Method Detail

getType

public SqlDataType getType()

setType

public void setType(SqlDataType type)

getLength

public int getLength()

setLength

public void setLength(int length)

getPrecision

public int getPrecision()

setPrecision

public void setPrecision(int precision)

getDefault

public String getDefault()

setDefault

public void setDefault(String defaultVal)

isRequired

public boolean isRequired()

setRequired

public void setRequired(boolean required)

getInnerNotNull

public NotNull getInnerNotNull()

setInnerNotNull

public void setInnerNotNull(NotNull nn)

isUnique

public boolean isUnique()

setUnique

public void setUnique(boolean unique)

getInnnerUnique

public Unique getInnnerUnique()

setInnerUnique

public void setInnerUnique(Unique uq)

isPrimaryKey

public boolean isPrimaryKey()

setPrimaryKey

public void setPrimaryKey(boolean primaryKey)

getForeignKey

public ForeignKey getForeignKey()

setForeignKey

public void setForeignKey(ForeignKey fk)

getRef

public Ref getRef()

setRef

public void setRef(Ref fkRef)

getInnerPrimaryKey

public PrimaryKey getInnerPrimaryKey()

setInnerPrimaryKey

public void setInnerPrimaryKey(PrimaryKey inner)

getCheckConstraints

public List getCheckConstraints()

addCheckConstraint

public void addCheckConstraint(Check check)

getDirective

public ColumnDirective getDirective()

setDirective

public void setDirective(ColumnDirective directive)

onWriteSql

public void onWriteSql(Writer out,
                       Configuration cfg)
Specified by:
onWriteSql in class SqlmlComponent