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 Object


Constructor Summary
DefaultDDLFactory()
           
 
Method Summary
 String createCheckConstraint(Schema schema, Table table, Check check)
           
 String createForeignKeyConstraint(Schema schema, Table table, Fk fk, Table toTable)
           
 String createIndex(Schema schema, Table table, Index index)
           
 String createSequence(Schema schema, Table table)
           
 String createTable(Schema schema, Table table)
           
 String createUniqueConstraint(Schema schema, Table table, Unique unique)
           
 String dropCheckConstraint(Schema schema, Table table, Check check)
           
 String dropForeignKeyConstraint(Schema schema, Table table, Fk fk, Table toTable)
           
 String dropIndex(Schema schema, Table table, Index index)
           
 String dropSequence(Schema schema, Table table)
           
 String dropTable(Schema schema, Table table)
           
 String dropUniqueConstraint(Schema schema, Table table, Unique unique)
           
 String enableCheckConstraint(Schema schema, Table table, Check check, boolean enable)
           
 String enableForeignKeyConstraint(Schema schema, Table table, Fk fk, Table toTable, boolean enable)
           
 String enableUniqueConstraint(Schema schema, Table table, Unique unique, boolean enable)
           
abstract  String getType(Table table, Column column)
           
protected  boolean isPk(Table table, Column column)
           
 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 String getType(Table table,
                               Column column)

createTable

public String createTable(Schema schema,
                          Table table)

isPk

protected boolean isPk(Table table,
                       Column column)

dropTable

public String dropTable(Schema schema,
                        Table table)

truncateTable

public String truncateTable(Schema schema,
                            Table table)

createSequence

public String createSequence(Schema schema,
                             Table table)

dropSequence

public String dropSequence(Schema schema,
                           Table table)

createIndex

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

dropIndex

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

createCheckConstraint

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

dropCheckConstraint

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

enableCheckConstraint

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

createUniqueConstraint

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

dropUniqueConstraint

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

enableUniqueConstraint

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

createForeignKeyConstraint

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

dropForeignKeyConstraint

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

enableForeignKeyConstraint

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


Copyright © 2014. All rights reserved.