org.codehaus.modello.generator.database.sql

Class OracleBuilder


public class OracleBuilder
extends SqlBuilder

An SQL Builder for Oracle
Version:
$Revision: 149 $
Author:
James Strachan

Constructor Summary

OracleBuilder()

Method Summary

protected void
createSequence(Table table, Column column)
Creates a sequence so that values can be auto incremented
protected void
createSequenceTrigger(Table table, Column column)
Creates a trigger to auto-increment values
void
createTable(Table table)
Outputs the DDL to create the table along with any constraints
void
dropTable(Table table)
Outputs the DDL to drop the table
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
printComment(String text)
Prints an SQL comment to the current stream

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

OracleBuilder

public OracleBuilder()

Method Details

createSequence

protected void createSequence(Table table,
                              Column column)
            throws IOException
Creates a sequence so that values can be auto incremented

createSequenceTrigger

protected void createSequenceTrigger(Table table,
                                     Column column)
            throws IOException
Creates a trigger to auto-increment values

createTable

public void createTable(Table table)
            throws IOException
Outputs the DDL to create the table along with any constraints
Overrides:
createTable in interface SqlBuilder

dropTable

public void dropTable(Table table)
            throws IOException
Outputs the DDL to drop the table
Overrides:
dropTable in interface SqlBuilder

getSqlType

protected String getSqlType(Column column)
Overrides:
getSqlType in interface SqlBuilder
Returns:
the full SQL type string, including size where appropriate. Where necessary, translate for Oracle specific DDL requirements.

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

printComment

protected void printComment(String text)
            throws IOException
Prints an SQL comment to the current stream
Overrides:
printComment in interface SqlBuilder