org.apache.ddlutils.platform.oracle
Class Oracle8Builder

java.lang.Object
  extended byorg.apache.ddlutils.platform.SqlBuilder
      extended byorg.apache.ddlutils.platform.oracle.Oracle8Builder
Direct Known Subclasses:
Oracle10Builder

public class Oracle8Builder
extends SqlBuilder

The SQL Builder for Oracle.

Version:
$Revision: 378736 $
Author:
James Strachan, Thomas Dudziak

Field Summary
 
Fields inherited from class org.apache.ddlutils.platform.SqlBuilder
_log, SIZE_PLACEHOLDER
 
Constructor Summary
Oracle8Builder(PlatformInfo info)
          Creates a new builder instance.
 
Method Summary
 void createTable(Database database, Table table, Map parameters)
          Outputs the DDL to create the table along with any non-external constraints as well as with external primary keys and indices (but not foreign keys).
 void dropExternalForeignKeys(Table table)
          Creates external foreignkey drop statements.
 void dropTable(Table table)
          Outputs the DDL to drop the table.
protected  String getNativeDefaultValue(Column column)
          Returns the native default value for the column.
protected  void writeColumnAutoIncrementStmt(Table table, Column column)
          Prints that the column is an auto increment column.
protected  void writeColumnDefaultValue(Table table, Column column)
          Prints the default value of the column.
 
Methods inherited from class org.apache.ddlutils.platform.SqlBuilder
addEscapedCharSequence, alterDatabase, alterDatabase, alterDatabase, alterTable, columnsDiffer, createExternalForeignKeys, createExternalForeignKeys, createTable, createTables, createTables, createTables, dropTables, escapeStringValue, getColumnName, getConstraintName, getDefaultValueHelper, getDeleteSql, getDelimitedIdentifier, getForeignKeyName, getIndent, getIndexName, getInsertSql, getNativeType, getPlatformInfo, getSelectLastInsertId, getSqlType, getTableName, getUpdateSql, getValueAsString, getValueLocale, getWriter, print, printComment, printEndOfStatement, printIdentifier, printIndent, println, println, printlnIdentifier, printStartOfEmbeddedStatement, setIndent, setValueLocale, setWriter, shortenName, shouldGeneratePrimaryKeys, writeColumn, writeColumnAlterStmt, writeColumnDropStmt, writeColumnNotNullableStmt, writeColumnNullableStmt, writeColumns, writeEmbeddedForeignKeysStmt, writeEmbeddedIndexCreateStmt, writeEmbeddedIndicesStmt, writeEmbeddedPrimaryKeysStmt, writeExternalForeignKeyCreateStmt, writeExternalForeignKeyDropStmt, writeExternalIndexCreateStmt, writeExternalIndexDropStmt, writeExternalIndicesCreateStmt, writeExternalPrimaryKeysCreateStmt, writeForeignReferences, writeLocalReferences, writePrimaryKeyStmt, writeTableAlterStmt, writeTableComment, writeTableCreationStmtEnding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Oracle8Builder

public Oracle8Builder(PlatformInfo info)
Creates a new builder instance.

Parameters:
info - The platform info
Method Detail

dropTable

public void dropTable(Table table)
               throws IOException
Outputs the DDL to drop the table.

Overrides:
dropTable in class SqlBuilder
Parameters:
table - The table to drop
Throws:
IOException

dropExternalForeignKeys

public void dropExternalForeignKeys(Table table)
                             throws IOException
Creates external foreignkey drop statements.

Overrides:
dropExternalForeignKeys in class SqlBuilder
Parameters:
table - The table
Throws:
IOException

createTable

public void createTable(Database database,
                        Table table,
                        Map parameters)
                 throws IOException
Outputs the DDL to create the table along with any non-external constraints as well as with external primary keys and indices (but not foreign keys).

Overrides:
createTable in class SqlBuilder
Parameters:
database - The database model
table - The table
parameters - Additional platform-specific parameters for the table creation
Throws:
IOException

writeColumnDefaultValue

protected void writeColumnDefaultValue(Table table,
                                       Column column)
                                throws IOException
Prints the default value of the column.

Overrides:
writeColumnDefaultValue in class SqlBuilder
Parameters:
table - The table
column - The column
Throws:
IOException

getNativeDefaultValue

protected String getNativeDefaultValue(Column column)
Returns the native default value for the column.

Overrides:
getNativeDefaultValue in class SqlBuilder
Parameters:
column - The column
Returns:
The native default value

writeColumnAutoIncrementStmt

protected void writeColumnAutoIncrementStmt(Table table,
                                            Column column)
                                     throws IOException
Prints that the column is an auto increment column.

Overrides:
writeColumnAutoIncrementStmt in class SqlBuilder
Parameters:
table - The table
column - The column
Throws:
IOException


Copyright © 2005 Apache Software Foundation. All Rights Reserved.