From c92c2f5f21fa57e9924c763f2ca7f7931c70c03d Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Mon, 7 Oct 2024 15:38:55 +0200 Subject: [PATCH] HHH-16954 Change name of method parameterList to listParameter --- .../query/criteria/HibernateCriteriaBuilder.java | 4 ++-- .../criteria/spi/HibernateCriteriaBuilderDelegate.java | 8 ++++---- .../query/sqm/internal/SqmCriteriaNodeBuilder.java | 6 +++--- .../test/java/org/hibernate/orm/test/query/CteTests.java | 2 +- .../criteria/CriteriaBuilderNonStandardFunctionsTest.java | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/query/criteria/HibernateCriteriaBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/criteria/HibernateCriteriaBuilder.java index 62219014c9..7b0d2030d4 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/criteria/HibernateCriteriaBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/criteria/HibernateCriteriaBuilder.java @@ -644,7 +644,7 @@ public interface HibernateCriteriaBuilder extends CriteriaBuilder { * @param the type of each argument to the parameter * @since 7.0 */ - JpaParameterExpression> parameterList(Class paramClass); + JpaParameterExpression> listParameter(Class paramClass); /** * Create a multivalued parameter accepting multiple arguments @@ -654,7 +654,7 @@ public interface HibernateCriteriaBuilder extends CriteriaBuilder { * @param the type of each argument to the parameter * @since 7.0 */ - JpaParameterExpression> parameterList(Class paramClass, String name); + JpaParameterExpression> listParameter(Class paramClass, String name); @Override JpaExpression concat(Expression x, Expression y); diff --git a/hibernate-core/src/main/java/org/hibernate/query/criteria/spi/HibernateCriteriaBuilderDelegate.java b/hibernate-core/src/main/java/org/hibernate/query/criteria/spi/HibernateCriteriaBuilderDelegate.java index 00c00aea00..67d738ff11 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/criteria/spi/HibernateCriteriaBuilderDelegate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/criteria/spi/HibernateCriteriaBuilderDelegate.java @@ -682,13 +682,13 @@ public class HibernateCriteriaBuilderDelegate implements HibernateCriteriaBuilde } @Override - public JpaParameterExpression> parameterList(Class paramClass) { - return criteriaBuilder.parameterList( paramClass ); + public JpaParameterExpression> listParameter(Class paramClass) { + return criteriaBuilder.listParameter( paramClass ); } @Override - public JpaParameterExpression> parameterList(Class paramClass, String name) { - return criteriaBuilder.parameterList( paramClass, name ); + public JpaParameterExpression> listParameter(Class paramClass, String name) { + return criteriaBuilder.listParameter( paramClass, name ); } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java index 78730ff618..7223bdc6b9 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java @@ -1665,12 +1665,12 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, Serializable { } @Override - public JpaParameterExpression> parameterList(Class paramClass) { - return parameterList( paramClass, null ); + public JpaParameterExpression> listParameter(Class paramClass) { + return listParameter( paramClass, null ); } @Override - public JpaParameterExpression> parameterList(Class paramClass, String name) { + public JpaParameterExpression> listParameter(Class paramClass, String name) { final BindableType> parameterType = new MultiValueParameterType<>( (Class>) (Class) List.class ); return new JpaCriteriaParameter<>( name, parameterType, true, this ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/CteTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/CteTests.java index 6a0ce612eb..6aab25bc07 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/CteTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/CteTests.java @@ -502,7 +502,7 @@ public class CteTests { scope.inTransaction( session -> { final HibernateCriteriaBuilder cb = session.getCriteriaBuilder(); - final JpaParameterExpression> param = cb.parameterList( Integer.class ); + final JpaParameterExpression> param = cb.listParameter( Integer.class ); final JpaCriteriaQuery cq = cb.createTupleQuery(); final JpaCriteriaQuery baseQuery = cb.createTupleQuery(); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaBuilderNonStandardFunctionsTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaBuilderNonStandardFunctionsTest.java index a570429ac6..c969f58d03 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaBuilderNonStandardFunctionsTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaBuilderNonStandardFunctionsTest.java @@ -521,7 +521,7 @@ public class CriteriaBuilderNonStandardFunctionsTest { HibernateCriteriaBuilder cb = session.getCriteriaBuilder(); CriteriaQuery query = cb.createTupleQuery(); Root from = query.from(EntityOfBasics.class); - ParameterExpression> ids = cb.parameterList(Integer.class); + ParameterExpression> ids = cb.listParameter(Integer.class); query.where( from.get("id").in(ids)); assertEquals(3, session.createQuery( query )