public BasicExecutor(HqlSqlWalker walker, Queryable persister) {
this.factory = walker.getSessionFactoryHelper().getFactory();
this.persister = persister;
try {
SqlGenerator gen = new SqlGenerator( factory );
gen.statement( walker.getAST() );
sql = gen.getSQL();
gen.getParseErrorHandler().throwQueryException();
parameterSpecifications = gen.getCollectedParameters();
}
catch ( RecognitionException e ) {
throw QuerySyntaxException.convert( e );
}
}