use of org.hibernate.query.sqm.internal.QuerySqmImpl in project hibernate-orm by hibernate.
the class AbstractSharedSessionContract method createQuery.
@Override
public <T> QueryImplementor<T> createQuery(String queryString, Class<T> resultClass) {
checkOpen();
pulseTransactionCoordinator();
delayedAfterCompletion();
try {
final QueryEngine queryEngine = getFactory().getQueryEngine();
final QueryInterpretationCache interpretationCache = queryEngine.getInterpretationCache();
final QuerySqmImpl<T> query = new QuerySqmImpl<>(queryString, interpretationCache.resolveHqlInterpretation(queryString, s -> queryEngine.getHqlTranslator().translate(queryString)), resultClass, this);
applyQuerySettingsAndHints(query);
query.setComment(queryString);
return query;
} catch (RuntimeException e) {
markForRollbackOnly();
throw getExceptionConverter().convert(e);
}
}
Aggregations