net.sf.dewdrop.sqlml
Class Table

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

public class Table
extends SchemaComponent

Author:
Les Hazlewood

Field Summary
protected  boolean cached
           
protected  List columns
           
protected  boolean global
           
protected  List natives
           
protected  PrimaryKey primaryKey
           
protected  List repeatableTableConstraints
           
protected  boolean temporary
           
 
Fields inherited from class net.sf.dewdrop.sqlml.SchemaComponent
description, name
 
Fields inherited from class net.sf.dewdrop.sqlml.SqlmlComponent
indentLevel, logger
 
Constructor Summary
Table()
           
 
Method Summary
 void addColumn(Column column)
           
 void addNative(Native aNative)
           
 void addRepeatableTableConstraint(Constraint c)
           
 boolean containsColumn(String columnName)
           
 boolean equals(Object o)
           
 Column getColumn(String columnName)
          Returns the table with a name of columnName.
 List getColumns()
           
 List getNatives()
           
 PrimaryKey getPrimaryKey()
           
 List getRepeatableTableConstraints()
           
 boolean isCached()
           
 boolean isGlobal()
           
 boolean isTemporary()
           
 void onWriteSql(Writer out, Configuration cfg)
           
 boolean removeColumn(String name)
           
 void setCached(boolean cached)
           
 void setGlobal(boolean global)
           
 void setPrimaryKey(PrimaryKey primaryKey)
           
 void setTemporary(boolean temporary)
           
 
Methods inherited from class net.sf.dewdrop.sqlml.SchemaComponent
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

global

protected boolean global

cached

protected boolean cached

temporary

protected boolean temporary

primaryKey

protected PrimaryKey primaryKey

columns

protected List columns

repeatableTableConstraints

protected List repeatableTableConstraints

natives

protected List natives
Constructor Detail

Table

public Table()
Method Detail

isGlobal

public boolean isGlobal()

setGlobal

public void setGlobal(boolean global)

isCached

public boolean isCached()

setCached

public void setCached(boolean cached)

isTemporary

public boolean isTemporary()

setTemporary

public void setTemporary(boolean temporary)

getPrimaryKey

public PrimaryKey getPrimaryKey()

setPrimaryKey

public void setPrimaryKey(PrimaryKey primaryKey)

getColumns

public List getColumns()

addColumn

public void addColumn(Column column)

removeColumn

public boolean removeColumn(String name)

getRepeatableTableConstraints

public List getRepeatableTableConstraints()

addRepeatableTableConstraint

public void addRepeatableTableConstraint(Constraint c)

getNatives

public List getNatives()

addNative

public void addNative(Native aNative)

getColumn

public Column getColumn(String columnName)
Returns the table with a name of columnName. This method first checks the sysName attribute, and if it does not match, then the name attribute is checked. This method returns null if no column with either a sysName or name matches columnName attributes.

Parameters:
columnName - name to check against
Returns:
the column with sysName or name of 'columnName', or null if no column with such a name exists in the table.

containsColumn

public boolean containsColumn(String columnName)

equals

public boolean equals(Object o)
Overrides:
equals in class SchemaComponent

onWriteSql

public void onWriteSql(Writer out,
                       Configuration cfg)
Specified by:
onWriteSql in class SqlmlComponent
See Also:
SqlmlComponent.writeSql(java.io.Writer)