org.plasma.text.ddl
Class DefaultDDLFactory

java.lang.Object
  extended by org.plasma.text.ddl.DefaultDDLFactory
Direct Known Subclasses:
MySQLFactory, OracleFactory

public abstract class DefaultDDLFactory
extends java.lang.Object


Constructor Summary
DefaultDDLFactory()
           
 
Method Summary
 java.lang.String createCheckConstraint(Schema schema, Table table, Check check)
           
 java.lang.String createForeignKeyConstraint(Schema schema, Table table, Fk fk, Table toTable)
           
 java.lang.String createIndex(Schema schema, Table table, Index index)
           
 java.lang.String createSequence(Schema schema, Table table)
           
 java.lang.String createTable(Schema schema, Table table)
           
 java.lang.String createUniqueConstraint(Schema schema, Table table, Unique unique)
           
 java.lang.String dropCheckConstraint(Schema schema, Table table, Check check)
           
 java.lang.String dropForeignKeyConstraint(Schema schema, Table table, Fk fk, Table toTable)
           
 java.lang.String dropIndex(Schema schema, Table table, Index index)
           
 java.lang.String dropSequence(Schema schema, Table table)
           
 java.lang.String dropTable(Schema schema, Table table)
           
 java.lang.String dropUniqueConstraint(Schema schema, Table table, Unique unique)
           
 java.lang.String enableCheckConstraint(Schema schema, Table table, Check check, boolean enable)
           
 java.lang.String enableForeignKeyConstraint(Schema schema, Table table, Fk fk, Table toTable, boolean enable)
           
 java.lang.String enableUniqueConstraint(Schema schema, Table table, Unique unique, boolean enable)
           
abstract  java.lang.String getType(Table table, Column column)
           
protected  boolean isPk(Table table, Column column)
           
 java.lang.String truncateTable(Schema schema, Table table)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDDLFactory

public DefaultDDLFactory()
Method Detail

getType

public abstract java.lang.String getType(Table table,
                                         Column column)

createTable

public java.lang.String createTable(Schema schema,
                                    Table table)

isPk

protected boolean isPk(Table table,
                       Column column)

dropTable

public java.lang.String dropTable(Schema schema,
                                  Table table)

truncateTable

public java.lang.String truncateTable(Schema schema,
                                      Table table)

createSequence

public java.lang.String createSequence(Schema schema,
                                       Table table)

dropSequence

public java.lang.String dropSequence(Schema schema,
                                     Table table)

createIndex

public java.lang.String createIndex(Schema schema,
                                    Table table,
                                    Index index)

dropIndex

public java.lang.String dropIndex(Schema schema,
                                  Table table,
                                  Index index)

createCheckConstraint

public java.lang.String createCheckConstraint(Schema schema,
                                              Table table,
                                              Check check)

dropCheckConstraint

public java.lang.String dropCheckConstraint(Schema schema,
                                            Table table,
                                            Check check)

enableCheckConstraint

public java.lang.String enableCheckConstraint(Schema schema,
                                              Table table,
                                              Check check,
                                              boolean enable)

createUniqueConstraint

public java.lang.String createUniqueConstraint(Schema schema,
                                               Table table,
                                               Unique unique)

dropUniqueConstraint

public java.lang.String dropUniqueConstraint(Schema schema,
                                             Table table,
                                             Unique unique)

enableUniqueConstraint

public java.lang.String enableUniqueConstraint(Schema schema,
                                               Table table,
                                               Unique unique,
                                               boolean enable)

createForeignKeyConstraint

public java.lang.String createForeignKeyConstraint(Schema schema,
                                                   Table table,
                                                   Fk fk,
                                                   Table toTable)

dropForeignKeyConstraint

public java.lang.String dropForeignKeyConstraint(Schema schema,
                                                 Table table,
                                                 Fk fk,
                                                 Table toTable)

enableForeignKeyConstraint

public java.lang.String enableForeignKeyConstraint(Schema schema,
                                                   Table table,
                                                   Fk fk,
                                                   Table toTable,
                                                   boolean enable)


Copyright © 2013. All Rights Reserved.