diff --git a/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/DatabaseSnapshotExecutor.java b/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/DatabaseSnapshotExecutor.java index 54aa69aff7..c838e24555 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/DatabaseSnapshotExecutor.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/DatabaseSnapshotExecutor.java @@ -100,7 +100,7 @@ class DatabaseSnapshotExecutor { final NavigablePath idPath = rootPath.append( EntityIdentifierMapping.ROLE_LOCAL_NAME ); entityDescriptor.getIdentifierMapping().visitColumns( - (col, tab, jdbcMapping) -> { + (tab, col, jdbcMapping) -> { final TableReference tableReference = rootTableGroup.resolveTableReference( tab ); final JdbcParameter jdbcParameter = new JdbcParameterImpl( jdbcMapping ); @@ -146,7 +146,7 @@ class DatabaseSnapshotExecutor { contributorMapping -> { rootPath.append( contributorMapping.getAttributeName() ); contributorMapping.visitColumns( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { final TableReference tableReference = rootTableGroup.resolveTableReference( containingTableExpression ); diff --git a/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/LoaderSelectBuilder.java b/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/LoaderSelectBuilder.java index c8d0a1ff09..48d6651c1a 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/LoaderSelectBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/ast/internal/LoaderSelectBuilder.java @@ -319,7 +319,7 @@ public class LoaderSelectBuilder { final List columnReferences = new ArrayList<>( numberOfKeyColumns ); keyPart.visitColumns( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { final TableReference tableReference = rootTableGroup.resolveTableReference( containingTableExpression ); columnReferences.add( (ColumnReference) sqlExpressionResolver.resolveSqlExpression( diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java index f6f1142f1f..529df6ce18 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicEntityIdentifierMappingImpl.java @@ -126,7 +126,7 @@ public class BasicEntityIdentifierMappingImpl implements BasicEntityIdentifierMa @Override public void visitColumns(ColumnConsumer consumer) { - consumer.accept( getMappedColumnExpression(), getContainingTableExpression(), getJdbcMapping() ); + consumer.accept( getContainingTableExpression(), getMappedColumnExpression(), getJdbcMapping() ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicValuedSingularAttributeMapping.java b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicValuedSingularAttributeMapping.java index 5558526704..0bc88be66f 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicValuedSingularAttributeMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/BasicValuedSingularAttributeMapping.java @@ -232,6 +232,6 @@ public class BasicValuedSingularAttributeMapping extends AbstractSingularAttribu @Override public void visitColumns(ColumnConsumer consumer) { - consumer.accept( mappedColumnExpression, tableExpression, jdbcMapping ); + consumer.accept( tableExpression, mappedColumnExpression, jdbcMapping ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java index aaed4cfb96..e66baafebe 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/JoinedSubclassEntityPersister.java @@ -1245,7 +1245,7 @@ public class JoinedSubclassEntityPersister extends AbstractEntityPersister { () -> columnConsumer -> { final String[] keyColumnNames = constraintOrderedKeyColumnNames[tablePosition]; for ( String column : keyColumnNames ) { - columnConsumer.accept( column, tableName, null ); + columnConsumer.accept( tableName, column, null ); } } ); diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java index 3aecfbcc42..a69757794b 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/SingleTableEntityPersister.java @@ -949,7 +949,7 @@ public class SingleTableEntityPersister extends AbstractEntityPersister { () -> columnConsumer -> { final String[] keyColumnNames = constraintOrderedKeyColumnNames[tablePosition]; for ( String column : keyColumnNames ) { - columnConsumer.accept( column, tableName, null ); + columnConsumer.accept( tableName, column, null ); } } ); diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/UnionSubclassEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/UnionSubclassEntityPersister.java index ca8d66b358..6cf0d8388c 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/UnionSubclassEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/UnionSubclassEntityPersister.java @@ -383,7 +383,7 @@ public class UnionSubclassEntityPersister extends AbstractEntityPersister { () -> columnConsumer -> { final String[] keyColumnNames = constraintOrderedKeyColumnNames[tablePosition]; for ( String column : keyColumnNames ) { - columnConsumer.accept( column, tableName, null ); + columnConsumer.accept( tableName, column, null ); } } ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MatchingIdSelectionHelper.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MatchingIdSelectionHelper.java index c8c0def5ae..712db9eb4a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MatchingIdSelectionHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/MatchingIdSelectionHelper.java @@ -75,7 +75,7 @@ public class MatchingIdSelectionHelper { final List domainResults = new ArrayList<>(); final AtomicInteger i = new AtomicInteger(); targetEntityDescriptor.getIdentifierMapping().visitColumns( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { final int position = i.getAndIncrement(); final TableReference tableReference = mutatingTableGroup.resolveTableReference( containingTableExpression ); final Expression expression = sqmConverter.getSqlExpressionResolver().resolveSqlExpression( @@ -132,7 +132,7 @@ public class MatchingIdSelectionHelper { final AtomicInteger i = new AtomicInteger(); targetEntityDescriptor.getIdentifierMapping().visitColumns( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { final int position = i.getAndIncrement(); final TableReference tableReference = mutatingTableGroup.resolveTableReference( containingTableExpression ); final Expression expression = sqmConverter.getSqlExpressionResolver().resolveSqlExpression( diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteDeleteHandler.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteDeleteHandler.java index 7bfc7ce901..aeeecbe474 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteDeleteHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteDeleteHandler.java @@ -221,7 +221,7 @@ public class CteDeleteHandler extends AbstractCteMutationHandler implements Dele final List columnsToMatchReferences = new ArrayList<>(); columnsToMatchVisitationSupplier.get().accept( - (columnExpression, containingTableExpression, jdbcMapping) -> columnsToMatchReferences.add( + (containingTableExpression, columnExpression, jdbcMapping) -> columnsToMatchReferences.add( new ColumnReference( targetTableReference, columnExpression, diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/ExecuteWithIdTableHelper.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/ExecuteWithIdTableHelper.java index 4975d613df..cb672778c7 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/ExecuteWithIdTableHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/ExecuteWithIdTableHelper.java @@ -89,7 +89,7 @@ public final class ExecuteWithIdTableHelper { final AtomicInteger positionWrapper = new AtomicInteger(); mutatingEntityDescriptor.getIdentifierMapping().visitColumns( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { final int jdbcPosition = positionWrapper.getAndIncrement(); final TableReference tableReference = mutatingTableGroup.resolveTableReference( containingTableExpression ); matchingIdSelection.getSelectClause().addSqlSelection( diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/ExecuteWithoutIdTableHelper.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/ExecuteWithoutIdTableHelper.java index a1b1da62db..d42da9cc42 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/ExecuteWithoutIdTableHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/ExecuteWithoutIdTableHelper.java @@ -53,7 +53,7 @@ public final class ExecuteWithoutIdTableHelper { matchingIdSelect.getFromClause().addRoot( matchingIdSelectTableGroup ); rootEntityPersister.getIdentifierMapping().visitColumns( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { final ColumnReference columnReference = (ColumnReference) sqlExpressionResolver.resolveSqlExpression( SqlExpressionResolver.createColumnReferenceKey( rootTableReference, columnExpression ), sqlAstProcessingState -> new ColumnReference( diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/IdTable.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/IdTable.java index 92a41cde12..92970784dd 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/IdTable.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/IdTable.java @@ -34,7 +34,7 @@ public class IdTable implements Exportable { ); entityDescriptor.getIdentifierMapping().visitColumns( - (columnExpression, containingTableExpression, jdbcMapping) -> columns.add( + (containingTableExpression, columnExpression, jdbcMapping) -> columns.add( new IdTableColumn( this, columnExpression, diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/RestrictedDeleteExecutionDelegate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/RestrictedDeleteExecutionDelegate.java index 282e71c230..29ba95962a 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/RestrictedDeleteExecutionDelegate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/RestrictedDeleteExecutionDelegate.java @@ -269,7 +269,7 @@ public class RestrictedDeleteExecutionDelegate implements TableBasedDeleteHandle */ final List deletingTableColumnRefs = new ArrayList<>(); tableKeyColumnVisitationSupplier.get().accept( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { assert targetTableReference.getTableExpression().equals( containingTableExpression ); final Expression expression = sqlExpressionResolver.resolveSqlExpression( @@ -439,7 +439,7 @@ public class RestrictedDeleteExecutionDelegate implements TableBasedDeleteHandle final TableKeyExpressionCollector keyColumnCollector = new TableKeyExpressionCollector( entityDescriptor ); tableKeyColumnVisitationSupplier.get().accept( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { assert containingTableExpression.equals( tableExpression ); keyColumnCollector.apply( new ColumnReference( diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/UpdateExecutionDelegate.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/UpdateExecutionDelegate.java index 8d1a5b57fb..e8c5d7e1bf 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/UpdateExecutionDelegate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/idtable/UpdateExecutionDelegate.java @@ -236,7 +236,7 @@ public class UpdateExecutionDelegate implements TableBasedUpdateHandler.Executio final TableKeyExpressionCollector keyColumnCollector = new TableKeyExpressionCollector( entityDescriptor ); tableKeyColumnVisitationSupplier.get().accept( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { assert containingTableExpression.equals( tableExpression ); keyColumnCollector.apply( new ColumnReference( diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/inline/DisjunctionRestrictionProducer.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/inline/DisjunctionRestrictionProducer.java index 5699529275..1411978558 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/inline/DisjunctionRestrictionProducer.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/inline/DisjunctionRestrictionProducer.java @@ -88,7 +88,7 @@ public class DisjunctionRestrictionProducer implements MatchingIdRestrictionProd final List columnReferences = new ArrayList<>( idColumnCount ); final List jdbcMappings = new ArrayList<>( idColumnCount ); identifierMapping.visitColumns( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { columnReferences.add( new ColumnReference( mutatingTableReference, columnExpression, jdbcMapping, sessionFactory ) ); jdbcMappings.add( jdbcMapping ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/inline/InPredicateRestrictionProducer.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/inline/InPredicateRestrictionProducer.java index d00d2a037f..3e004fe3c7 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/inline/InPredicateRestrictionProducer.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/inline/InPredicateRestrictionProducer.java @@ -83,7 +83,7 @@ public class InPredicateRestrictionProducer implements MatchingIdRestrictionProd final List columnReferences = new ArrayList<>( idColumnCount ); final List jdbcMappings = new ArrayList<>( idColumnCount ); identifierMapping.visitColumns( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { columnReferences.add( new ColumnReference( mutatingTableReference, columnExpression, jdbcMapping, sessionFactory ) ); jdbcMappings.add( jdbcMapping ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/StandardSqmUpdateTranslator.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/StandardSqmUpdateTranslator.java index c5a26ca74a..7ac3e53927 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/StandardSqmUpdateTranslator.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/internal/StandardSqmUpdateTranslator.java @@ -225,7 +225,7 @@ public class StandardSqmUpdateTranslator // create one JdbcParameter for each column in the assigned path assignedPathInterpretation.getExpressionType().visitColumns( - (columnExpression, containingTableExpression, jdbcMapping) -> { + (containingTableExpression, columnExpression, jdbcMapping) -> { final JdbcParameter jdbcParameter = new JdbcParameterImpl( jdbcMapping ); jdbcParametersForSqm.add( jdbcParameter ); assignments.add( diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/cte/CteTable.java b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/cte/CteTable.java index b0966e7485..5fc46cb7d4 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/cte/CteTable.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/cte/CteTable.java @@ -46,7 +46,7 @@ public class CteTable { final int numberOfColumns = entityDescriptor.getIdentifierMapping().getJdbcTypeCount( sessionFactory.getTypeConfiguration() ); cteColumns = new ArrayList<>( numberOfColumns ); entityDescriptor.getIdentifierMapping().visitColumns( - (columnExpression, containingTableExpression, jdbcMapping) -> cteColumns.add( + (containingTableExpression, columnExpression, jdbcMapping) -> cteColumns.add( new CteColumn( "cte_" + columnExpression, jdbcMapping