HHH-16954 Change name of method parameterList to listParameter

This commit is contained in:
Christian Beikov 2024-10-07 15:38:55 +02:00
parent 71fefc7220
commit c92c2f5f21
5 changed files with 11 additions and 11 deletions

View File

@ -644,7 +644,7 @@ public interface HibernateCriteriaBuilder extends CriteriaBuilder {
* @param <T> the type of each argument to the parameter
* @since 7.0
*/
<T> JpaParameterExpression<List<T>> parameterList(Class<T> paramClass);
<T> JpaParameterExpression<List<T>> listParameter(Class<T> paramClass);
/**
* Create a multivalued parameter accepting multiple arguments
@ -654,7 +654,7 @@ public interface HibernateCriteriaBuilder extends CriteriaBuilder {
* @param <T> the type of each argument to the parameter
* @since 7.0
*/
<T> JpaParameterExpression<List<T>> parameterList(Class<T> paramClass, String name);
<T> JpaParameterExpression<List<T>> listParameter(Class<T> paramClass, String name);
@Override
JpaExpression<String> concat(Expression<String> x, Expression<String> y);

View File

@ -682,13 +682,13 @@ public class HibernateCriteriaBuilderDelegate implements HibernateCriteriaBuilde
}
@Override
public <T> JpaParameterExpression<List<T>> parameterList(Class<T> paramClass) {
return criteriaBuilder.parameterList( paramClass );
public <T> JpaParameterExpression<List<T>> listParameter(Class<T> paramClass) {
return criteriaBuilder.listParameter( paramClass );
}
@Override
public <T> JpaParameterExpression<List<T>> parameterList(Class<T> paramClass, String name) {
return criteriaBuilder.parameterList( paramClass, name );
public <T> JpaParameterExpression<List<T>> listParameter(Class<T> paramClass, String name) {
return criteriaBuilder.listParameter( paramClass, name );
}
@Override

View File

@ -1665,12 +1665,12 @@ public class SqmCriteriaNodeBuilder implements NodeBuilder, Serializable {
}
@Override
public <T> JpaParameterExpression<List<T>> parameterList(Class<T> paramClass) {
return parameterList( paramClass, null );
public <T> JpaParameterExpression<List<T>> listParameter(Class<T> paramClass) {
return listParameter( paramClass, null );
}
@Override
public <T> JpaParameterExpression<List<T>> parameterList(Class<T> paramClass, String name) {
public <T> JpaParameterExpression<List<T>> listParameter(Class<T> paramClass, String name) {
final BindableType<List<T>> parameterType = new MultiValueParameterType<>( (Class<List<T>>) (Class) List.class );
return new JpaCriteriaParameter<>( name, parameterType, true, this );
}

View File

@ -502,7 +502,7 @@ public class CteTests {
scope.inTransaction(
session -> {
final HibernateCriteriaBuilder cb = session.getCriteriaBuilder();
final JpaParameterExpression<List<Integer>> param = cb.parameterList( Integer.class );
final JpaParameterExpression<List<Integer>> param = cb.listParameter( Integer.class );
final JpaCriteriaQuery<Tuple> cq = cb.createTupleQuery();
final JpaCriteriaQuery<Tuple> baseQuery = cb.createTupleQuery();

View File

@ -521,7 +521,7 @@ public class CriteriaBuilderNonStandardFunctionsTest {
HibernateCriteriaBuilder cb = session.getCriteriaBuilder();
CriteriaQuery<Tuple> query = cb.createTupleQuery();
Root<EntityOfBasics> from = query.from(EntityOfBasics.class);
ParameterExpression<List<Integer>> ids = cb.parameterList(Integer.class);
ParameterExpression<List<Integer>> ids = cb.listParameter(Integer.class);
query.where( from.get("id").in(ids));
assertEquals(3,
session.createQuery( query )