org.jcoderz.phoenix.sqlparser
Class CreateTableStatement

java.lang.Object
  extended by org.jcoderz.phoenix.sqlparser.SqlStatement
      extended by org.jcoderz.phoenix.sqlparser.CreateTableStatement

public class CreateTableStatement
extends SqlStatement

Author:
Albrecht Messner

Constructor Summary
CreateTableStatement(String tableName)
           
 
Method Summary
 void addColumn(ColumnSpec column)
          Adds a column definition to this table.
 void addFkConstraint(FkConstraint constraint)
           
 void addIndex(CreateIndexStatement stmt)
           
 String getAdditionalJavadoc()
           
 String getBeanName()
           
 ColumnSpec getColumnByName(String colName)
          Retrieves a column by its name.
 List getColumns()
          Returns all columns of this table.
 List getFkConstraints()
           
 List getIndexes()
           
 String getTableName()
          Returns the name of this table.
 boolean isOptimisticVersionCount()
           
 boolean isSkipAppserverSupport()
           
 void setAdditionalJavadoc(String additionalJavadoc)
           
 void setBeanName(String beanName)
           
 void setOptimisticVersionCount(boolean b)
           
 void setSkipAppserverSupport(boolean b)
           
 String toString()
          Returns a readable string representation.
 
Methods inherited from class org.jcoderz.phoenix.sqlparser.SqlStatement
getAnnotation, setAnnotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateTableStatement

public CreateTableStatement(String tableName)
Method Detail

getColumns

public final List getColumns()
Returns all columns of this table.

Returns:
a list of ColumnSpec objects describing the columns of this table

getTableName

public final String getTableName()
Returns the name of this table.

Returns:
the name of this table

addColumn

public final void addColumn(ColumnSpec column)
Adds a column definition to this table.

Parameters:
column - a column definition

getColumnByName

public final ColumnSpec getColumnByName(String colName)
Retrieves a column by its name.

Parameters:
colName - the name of the column
Returns:
the column specification, or null if no column by that name is found

toString

public final String toString()
Returns a readable string representation.

Overrides:
toString in class Object
Returns:
a readable string representation

getBeanName

public String getBeanName()
Returns:
Returns the beanName.

setBeanName

public void setBeanName(String beanName)
Parameters:
beanName - The beanName to set.

getIndexes

public List getIndexes()

addIndex

public void addIndex(CreateIndexStatement stmt)

addFkConstraint

public void addFkConstraint(FkConstraint constraint)

getFkConstraints

public List getFkConstraints()

getAdditionalJavadoc

public String getAdditionalJavadoc()
Returns:
Returns the additionalJavadoc.

setAdditionalJavadoc

public void setAdditionalJavadoc(String additionalJavadoc)
Parameters:
additionalJavadoc - The additionalJavadoc to set.

setOptimisticVersionCount

public void setOptimisticVersionCount(boolean b)

isOptimisticVersionCount

public boolean isOptimisticVersionCount()

setSkipAppserverSupport

public void setSkipAppserverSupport(boolean b)
Parameters:
b -

isSkipAppserverSupport

public boolean isSkipAppserverSupport()
Returns:
Returns the skipAppserverSupport.


Copyright 2007 The jCoderZ Project.