public void generateByTable(String tableName,String className) throws Exception {
Generator g = createGeneratorForDbTable();
Table table = DbTableFactory.getInstance().getTable(tableName);
table.setClassName(className);
g.generateByModelProvider(new DbTableGeneratorModelProvider(table));
}