コード例 #1
0
 public void processByClass(Class clazz, boolean isDelete)
     throws Exception, FileNotFoundException {
   Generator g = getGenerator();
   GeneratorModel m = GeneratorModelUtils.newGeneratorModel("clazz", new JavaClass(clazz));
   PrintUtils.printBeginProcess("JavaClass:" + clazz.getSimpleName(), isDelete);
   processByGeneratorModel(isDelete, g, m);
 }
コード例 #2
0
    public void processByGeneratorModel(GeneratorModel model, boolean isDelete)
        throws Exception, FileNotFoundException {
      Generator g = getGenerator();

      GeneratorModel targetModel = GeneratorModelUtils.newDefaultGeneratorModel();
      targetModel.filePathModel.putAll(model.filePathModel);
      targetModel.templateModel.putAll(model.templateModel);
      processByGeneratorModel(isDelete, g, targetModel);
    }
コード例 #3
0
 public void processByTable(Generator g, Table table, boolean isDelete) throws Exception {
   GeneratorModel m = GeneratorModelUtils.newGeneratorModel("table", table);
   PrintUtils.printBeginProcess(table.getSqlName() + " => " + table.getClassName(), isDelete);
   if (isDelete) g.deleteBy(m.templateModel, m.filePathModel);
   else g.generateBy(m.templateModel, m.filePathModel);
 }
コード例 #4
0
 public void processBySql(Sql sql, boolean isDelete) throws Exception {
   Generator g = getGenerator();
   GeneratorModel m = GeneratorModelUtils.newGeneratorModel("sql", sql);
   PrintUtils.printBeginProcess("sql:" + sql.getSourceSql(), isDelete);
   processByGeneratorModel(isDelete, g, m);
 }
コード例 #5
0
 public void processByMap(Map params, boolean isDelete) throws Exception, FileNotFoundException {
   Generator g = getGenerator();
   GeneratorModel m = GeneratorModelUtils.newFromMap(params);
   processByGeneratorModel(isDelete, g, m);
 }