if ( replacements == null ) {
replacements = new HashMap();
}
// steve -> note that the empty maps here represent the currently enabled filters...
QueryTranslator oldQueryTranslator = null;
Exception oldException = null;
try {
System.out.println("Compiling with classic QueryTranslator...");
QueryTranslatorFactory classic = new ClassicQueryTranslatorFactory();
oldQueryTranslator = classic.createQueryTranslator( hql, hql, Collections.EMPTY_MAP, factory );
oldQueryTranslator.compile( replacements, scalar );
}
catch ( QueryException e ) {
oldException = e;
}
catch ( MappingException e ) {
oldException = e;
}
QueryTranslator newQueryTranslator = null;
Exception newException = null;
try {
System.out.println("Compiling with AST QueryTranslator...");
newQueryTranslator = createNewQueryTranslator( hql, replacements, scalar );
}