Package cn.org.rapid_framework.generator.util

Examples of cn.org.rapid_framework.generator.util.GeneratorException


   
    //生成 路径值,如 pkg=com.company.project 将生成 pkg_dir=com/company/project的值
    templateModel.putAll(GeneratorHelper.getDirValuesMap(templateModel));
    filePathModel.putAll(GeneratorHelper.getDirValuesMap(filePathModel));
   
    GeneratorException ge = new GeneratorException("generator occer error, Generator BeanInfo:"+BeanHelper.describe(this));
    List<File> processedTemplateRootDirs = processTemplateRootDirs();
   
    for(int i = 0; i < processedTemplateRootDirs.size(); i++) {
      File templateRootDir = (File)processedTemplateRootDirs.get(i);
      List<Exception> exceptions = scanTemplatesAndProcess(templateRootDir,processedTemplateRootDirs,templateModel,filePathModel,isDelete);
      ge.addAll(exceptions);
    }
    if(!ge.exceptions.isEmpty()) throw ge;
  }
View Full Code Here


          exceptions.addAll(ge.getExceptions());
        }
      }
      PrintUtils.printExceptionsSumary("",getGenerator().getOutRootDir(),exceptions);
      if(!exceptions.isEmpty()) {
        throw new GeneratorException("batch generate by all table occer error",exceptions);
      }
     
    }
View Full Code Here

   
 
  private void processTemplateRootDirs(Map templateModel,Map filePathModel,boolean isDelete) throws Exception {
      if(StringHelper.isBlank(getOutRootDir())) throw new IllegalStateException("'outRootDir' property must be not null.");
    if(templateRootDirs.size() == 0) throw new IllegalStateException("'templateRootDirs' cannot empty");
    GeneratorException ge = new GeneratorException("generator occer error, Generator BeanInfo:"+BeanHelper.describe(this));
    for(int i = 0; i < this.templateRootDirs.size(); i++) {
      File templateRootDir = (File)templateRootDirs.get(i);
      List<Exception> exceptions = scanTemplatesAndProcess(templateRootDir,templateModel,filePathModel,isDelete);
      ge.addAll(exceptions);
    }
    if(!ge.exceptions.isEmpty()) throw ge;
  }
View Full Code Here

TOP

Related Classes of cn.org.rapid_framework.generator.util.GeneratorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.