if(null != templateRegex) builder.setTemplateRegex(templateRegex);
if(null != templateValueConstraintRegex) builder.setTemplateValueConstraintRegex(templateValueConstraintRegex);
if(null != typeIdMapJson) builder.setTypeIdMap(parseTypeIdMap(typeIdMapJson));
if(null != templateFile) builder.setFreemarkerTemplate(FileUtils.readFileToString(templateFile, templateFileEncoding));
CodeGenerator cg = builder.build();
CountingOutputStream counter = new CountingOutputStream(openOutputStream(outFile));
outWriter = new OutputStreamWriter(counter, "UTF-8");
getLog().info("Generating queries wrapper for file: [" + queriesFile.getAbsolutePath() + "] " +
"into java file: [" + outFile.getAbsolutePath() + "]");
cg.generate(queries, fcn, queriesFile.getName(), outWriter);
getLog().info("Writing compete, bytes written: [" + counter.getCount() + "]");
} catch(IOException e) {
throw new MojoFailureException("IO error", e);
} catch (ClassNotFoundException e) {
throw new MojoFailureException("Type id map error", e);
} finally {