001package io.ebeaninternal.dbmigration.ddlgeneration;
002
003import io.ebeaninternal.dbmigration.migration.AddColumn;
004import io.ebeaninternal.dbmigration.migration.AddHistoryTable;
005import io.ebeaninternal.dbmigration.migration.AddTableComment;
006import io.ebeaninternal.dbmigration.migration.AddUniqueConstraint;
007import io.ebeaninternal.dbmigration.migration.AlterColumn;
008import io.ebeaninternal.dbmigration.migration.AlterForeignKey;
009import io.ebeaninternal.dbmigration.migration.ChangeSet;
010import io.ebeaninternal.dbmigration.migration.CreateIndex;
011import io.ebeaninternal.dbmigration.migration.CreateTable;
012import io.ebeaninternal.dbmigration.migration.DropColumn;
013import io.ebeaninternal.dbmigration.migration.DropHistoryTable;
014import io.ebeaninternal.dbmigration.migration.DropIndex;
015import io.ebeaninternal.dbmigration.migration.DropTable;
016
017import java.io.IOException;
018
019/**
020 * DDL generation interface.
021 */
022public interface DdlHandler {
023
024  void generate(DdlWrite writer, ChangeSet changeSet) throws IOException;
025
026  void generate(DdlWrite writer, CreateTable createTable) throws IOException;
027
028  void generate(DdlWrite writer, DropTable dropTable) throws IOException;
029
030  void generate(DdlWrite writer, AddTableComment addTableComment) throws IOException;
031
032  void generate(DdlWrite writer, AddColumn addColumn) throws IOException;
033
034  void generate(DdlWrite writer, DropColumn dropColumn) throws IOException;
035
036  void generate(DdlWrite writer, AlterColumn alterColumn) throws IOException;
037
038  void generate(DdlWrite writer, AddHistoryTable addHistoryTable) throws IOException;
039
040  void generate(DdlWrite writer, DropHistoryTable dropHistoryTable) throws IOException;
041
042  void generate(DdlWrite writer, CreateIndex createIndex) throws IOException;
043
044  void generate(DdlWrite writer, DropIndex dropIndex) throws IOException;
045
046  void generate(DdlWrite writer, AddUniqueConstraint constraint) throws IOException;
047
048  void generate(DdlWrite writer, AlterForeignKey alterForeignKey) throws IOException;
049
050  void generateProlog(DdlWrite write) throws IOException;
051
052  void generateEpilog(DdlWrite write) throws IOException;
053}