Improve command chaining in migrator tool

This commit is contained in:
James Agnew 2019-02-15 12:54:41 -05:00
parent 514ace5981
commit 4a6345d7c4
1 changed files with 3 additions and 1 deletions

View File

@ -335,16 +335,18 @@ public class BaseMigrationTasks<T extends Enum> {
}
}
public class BuilderAddTableByColumns implements IAcceptsTasks {
public class BuilderAddTableByColumns extends BuilderWithTableName implements IAcceptsTasks {
private final AddTableByColumnTask myTask;
public BuilderAddTableByColumns(IAcceptsTasks theSink, String theTableName, String thePkColumnName) {
super(theSink, theTableName);
myTask = new AddTableByColumnTask();
myTask.setTableName(theTableName);
myTask.setPkColumn(thePkColumnName);
theSink.addTask(myTask);
}
@Override
public BuilderWithTableName.BuilderAddColumnWithName addColumn(String theColumnName) {
return new BuilderWithTableName.BuilderAddColumnWithName(theColumnName, this);
}