org.codehaus.modello.generator.database.sql

Class 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 String
getNativeType(Column column)
protected 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, createColumn, createDatabase, createDatabase, createTable, dropColumn, dropDatabase, dropIndex, dropTable, getIndent, getNativeType, getSqlType, getWriter, isForeignKeyConstraintsNamed, isForeignKeysEmbedded, isIndexesEmbedded, isPrimaryKeyEmbedded, print, printAutoIncrementColumn, printComment, printEndOfStatement, printIndent, printNotNullable, printNullable, println, println, setAlterTableForDrop, setForeignKeyConstraintsNamed, setForeignKeysEmbedded, setIndent, setIndexesEmbedded, setPrimaryKeyEmbedded, setWriter, shouldGeneratePrimaryKeys, tableComment, useAlterTableForDrop, writeAlterHeader, writeColumnTypes, writeEmbeddedIndexes, writeForeignKeyAlterTable, writeForeignKeys, writeForeignKeysAlterTable, writeForeignReferences, writeIndex, writeIndexes, writeLocalReferences, writePrimaryKeyStatement, writePrimaryKeys, writePrimaryKeysAlterTable

Constructor Details

AxionBuilder

public AxionBuilder()

Method Details

createColumn

public void createColumn(Table table,
                         Column column)
            throws 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 interface SqlBuilder

getNativeType

protected String getNativeType(Column column)
Overrides:
getNativeType in interface SqlBuilder

getSqlType

protected String getSqlType(Column column)
Overrides:
getSqlType in interface SqlBuilder
Returns:
the full SQL type string including the size

printAutoIncrementColumn

protected void printAutoIncrementColumn(Table table,
                                        Column column)
            throws IOException
Outputs the fact that this column is an auto increment column.
Overrides:
printAutoIncrementColumn in interface SqlBuilder

printNotNullable

protected void printNotNullable()
            throws IOException
Prints that a column is not nullable
Overrides:
printNotNullable in interface SqlBuilder

printNullable

protected void printNullable()
            throws IOException
Prints that a column is nullable
Overrides:
printNullable in interface SqlBuilder

writeForeignKeys

protected void writeForeignKeys(Table table)
            throws IOException
Writes the foreign key constraints inside a create table () clause.
Overrides:
writeForeignKeys in interface SqlBuilder

writePrimaryKeys

protected void writePrimaryKeys(Table table)
            throws IOException
Writes the primary key constraints inside a create table () clause.
Overrides:
writePrimaryKeys in interface SqlBuilder