SessionFactoryImplementor factory = getSessionFactoryImplementor();
return createNewQueryTranslator( hql, replacements, scalar, factory );
}
private QueryTranslatorImpl createNewQueryTranslator(String hql, Map replacements, boolean scalar, SessionFactoryImplementor factory) {
QueryTranslatorFactory ast = new ASTQueryTranslatorFactory();
QueryTranslatorImpl newQueryTranslator = ( QueryTranslatorImpl ) ast.createQueryTranslator( hql, hql, Collections.EMPTY_MAP, factory );
newQueryTranslator.compile( replacements, scalar );
return newQueryTranslator;
}