org.codehaus.modello.generator.database.sql
Class AxionBuilder

java.lang.Object
  extended by org.codehaus.modello.generator.database.sql.SqlBuilder
      extended by org.codehaus.modello.generator.database.sql.AxionBuilder

public class AxionBuilder
extends SqlBuilder

An SQL Builder for the Axion JDBC database.

Version:
$Revision: 149 $
Author:
James Strachan

Constructor Summary
AxionBuilder()
           
 
Method Summary
 void createColumn(Table table, Column column)
          Outputs the DDL to add a column to a table.
protected  java.lang.String getNativeType(Column column)
           
protected  java.lang.String getSqlType(Column column)
           
protected  void printAutoIncrementColumn(Table table, Column column)
          Outputs the fact that this column is an auto increment column.
protected  void printNotNullable()
          Prints that a column is not nullable
protected  void printNullable()
          Prints that a column is nullable
protected  void writeForeignKeys(Table table)
          Writes the foreign key constraints inside a create table () clause.
protected  void writePrimaryKeys(Table table)
          Writes the primary key constraints inside a create table () clause.
 
Methods inherited from class org.codehaus.modello.generator.database.sql.SqlBuilder
alterColumn, columnsDiffer, createDatabase, createDatabase, createTable, dropColumn, dropDatabase, dropIndex, dropTable, getIndent, getWriter, isForeignKeyConstraintsNamed, isForeignKeysEmbedded, isIndexesEmbedded, isPrimaryKeyEmbedded, print, printComment, printEndOfStatement, printIndent, println, println, setAlterTableForDrop, setForeignKeyConstraintsNamed, setForeignKeysEmbedded, setIndent, setIndexesEmbedded, setPrimaryKeyEmbedded, setWriter, shouldGeneratePrimaryKeys, tableComment, useAlterTableForDrop, writeAlterHeader, writeColumnTypes, writeEmbeddedIndexes, writeForeignKeyAlterTable, writeForeignKeysAlterTable, writeForeignReferences, writeIndex, writeIndexes, writeLocalReferences, writePrimaryKeysAlterTable, writePrimaryKeyStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxionBuilder

public AxionBuilder()
Method Detail

getSqlType

protected java.lang.String getSqlType(Column column)
Overrides:
getSqlType in class SqlBuilder
Returns:
the full SQL type string including the size

writePrimaryKeys

protected void writePrimaryKeys(Table table)
                         throws java.io.IOException
Description copied from class: SqlBuilder
Writes the primary key constraints inside a create table () clause.

Overrides:
writePrimaryKeys in class SqlBuilder
Throws:
java.io.IOException

writeForeignKeys

protected void writeForeignKeys(Table table)
                         throws java.io.IOException
Description copied from class: SqlBuilder
Writes the foreign key constraints inside a create table () clause.

Overrides:
writeForeignKeys in class SqlBuilder
Throws:
java.io.IOException

printAutoIncrementColumn

protected void printAutoIncrementColumn(Table table,
                                        Column column)
                                 throws java.io.IOException
Description copied from class: SqlBuilder
Outputs the fact that this column is an auto increment column.

Overrides:
printAutoIncrementColumn in class SqlBuilder
Throws:
java.io.IOException

printNotNullable

protected void printNotNullable()
                         throws java.io.IOException
Description copied from class: SqlBuilder
Prints that a column is not nullable

Overrides:
printNotNullable in class SqlBuilder
Throws:
java.io.IOException

printNullable

protected void printNullable()
                      throws java.io.IOException
Description copied from class: SqlBuilder
Prints that a column is nullable

Overrides:
printNullable in class SqlBuilder
Throws:
java.io.IOException

getNativeType

protected java.lang.String getNativeType(Column column)
Overrides:
getNativeType in class SqlBuilder

createColumn

public void createColumn(Table table,
                         Column column)
                  throws java.io.IOException
Outputs the DDL to add a column to a table. Axion does not support default values so we are removing default from the Axion column builder.

Overrides:
createColumn in class SqlBuilder
Throws:
java.io.IOException


Copyright © 2001-2007 Codehaus. All Rights Reserved.