net.sf.colle.sql.schema
Class Column

java.lang.Object
  extended bynet.sf.colle.sql.schema.Column

public class Column
extends Object

Model abstraction of a column in a relational table. Created: 21 Feb 2001

Version:
$Revision: 1.6 $, $Date: 2004/01/05 21:55:33 $
Author:
Dwayne Schultz

Constructor Summary
(package private) Column(org.jdom.Element pxData, Table pxTable)
          Constructs a column in a relational table from a node in a DOM tree.
 
Method Summary
 String getCompoundName()
          Returns the compound name of the column.
 String getCreateSQL()
          Returns a string that would best define this column in 'create table' SQL statement.
 int getLength()
          Returns the length of the column.
 String getName()
          Returns the name of the column.
 String getType()
          Returns the type of the column.
 boolean isNullable()
          Returns true if the column is nullable.
 boolean isSequence()
          Returns true if the column is a sequence counter.
 void sequence(Connection pxConnection)
          Creates and initializes the sequence in the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Column

Column(org.jdom.Element pxData,
       Table pxTable)
Constructs a column in a relational table from a node in a DOM tree.

Method Detail

getName

public String getName()
Returns the name of the column.


getCompoundName

public String getCompoundName()
Returns the compound name of the column. For tables this is used to rename columns at runtime. The column name in the database will be the compound name while the column name at runtime will be the regular name.


getType

public String getType()
Returns the type of the column.


getLength

public int getLength()
Returns the length of the column.


isNullable

public boolean isNullable()
Returns true if the column is nullable.


isSequence

public boolean isSequence()
Returns true if the column is a sequence counter.


sequence

public void sequence(Connection pxConnection)
Creates and initializes the sequence in the database.


getCreateSQL

public String getCreateSQL()
Returns a string that would best define this column in 'create table' SQL statement.