HHH-14153 Make buildAppropriateStatementExecutor() protected

Hibernate Reactive might ultimately need to override
this method, though it doesn't right now.

Relates to HHH-14153.
This commit is contained in:
Gavin King 2020-08-24 16:47:09 +02:00 committed by Andrea Boriero
parent 5173071322
commit 5daf440a6c
1 changed files with 3 additions and 6 deletions

View File

@ -594,10 +594,9 @@ public class QueryTranslatorImpl implements FilterTranslator {
}
}
private StatementExecutor buildAppropriateStatementExecutor(HqlSqlWalker walker) {
protected StatementExecutor buildAppropriateStatementExecutor(HqlSqlWalker walker) {
if ( walker.getStatementType() == HqlSqlTokenTypes.DELETE ) {
final FromElement fromElement = walker.getFinalFromClause().getFromElement();
final Queryable persister = fromElement.getQueryable();
final Queryable persister = walker.getFinalFromClause().getFromElement().getQueryable();
if ( persister.isMultiTable() ) {
return new MultiTableDeleteExecutor( walker );
}
@ -606,9 +605,7 @@ public class QueryTranslatorImpl implements FilterTranslator {
}
}
else if ( walker.getStatementType() == HqlSqlTokenTypes.UPDATE ) {
final FromElement fromElement = walker.getFinalFromClause().getFromElement();
final Queryable persister = fromElement.getQueryable();
final Queryable persister = walker.getFinalFromClause().getFromElement().getQueryable();
if ( persister.isMultiTable() && affectsExtraTables( walker, persister ) ) {
return new MultiTableUpdateExecutor( walker );
}