TableGenerator tableGenerator = (TableGenerator) ig;
Table table = new Table().setName(tableGenerator.getTableName());
Column pkColumn = new Column();
pkColumn.setName(tableGenerator.getSegmentColumnName());
DataType pkDataType = new DataType(PK_DATA_TYPE);
pkDataType.setColumnSize(tableGenerator.getSegmentValueLength());
pkColumn.setType(pkDataType);
pkColumn.setCertainDataType(false);
pkColumn.setRelation(table);
table.getColumns().add(pkColumn);
PrimaryKey primaryKey = new PrimaryKey();
primaryKey.setName(tableGenerator.getTableName() + "PK");
primaryKey.addColumn(0, new Column(pkColumn.getName()).setRelation(table));
primaryKey.setTable(table);
table.setPrimaryKey(primaryKey);
Column valueColumn = new Column();
valueColumn.setName(tableGenerator.getValueColumnName());
valueColumn.setType(new DataType(VALUE_DATA_TYPE));
valueColumn.setNullable(false);
valueColumn.setCertainDataType(false);
valueColumn.setRelation(table);
table.getColumns().add(valueColumn);