From b3625a34e48a89f955f3acdcdce9d1e0c89801ab Mon Sep 17 00:00:00 2001 From: Gavin Date: Wed, 28 Dec 2022 12:36:26 +0100 Subject: [PATCH] delete two unused classes --- .../internal/AbstractQueryParameterImpl.java | 44 ------------------- .../sqm/ConstructorEntityArgumentMode.java | 37 ---------------- .../ManyToManyImplicitNamingTest.java | 12 ++--- 3 files changed, 6 insertions(+), 87 deletions(-) delete mode 100644 hibernate-core/src/main/java/org/hibernate/query/internal/AbstractQueryParameterImpl.java delete mode 100644 hibernate-core/src/main/java/org/hibernate/query/sqm/ConstructorEntityArgumentMode.java diff --git a/hibernate-core/src/main/java/org/hibernate/query/internal/AbstractQueryParameterImpl.java b/hibernate-core/src/main/java/org/hibernate/query/internal/AbstractQueryParameterImpl.java deleted file mode 100644 index 5e64fa49b2..0000000000 --- a/hibernate-core/src/main/java/org/hibernate/query/internal/AbstractQueryParameterImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . - */ -package org.hibernate.query.internal; - -import org.hibernate.query.BindableType; -import org.hibernate.query.QueryParameter; - -/** - * QueryParameter implementation. - * - * NOTE: Unfortunately we need to model named and positional parameters separately still until 6.0. For now - * this is simply the base abstract class for those specific impls - * - * @author Steve Ebersole - */ -public abstract class AbstractQueryParameterImpl implements QueryParameter { - private BindableType expectedType; - - public AbstractQueryParameterImpl(BindableType expectedType) { - this.expectedType = expectedType; - } - - @Override - public BindableType getHibernateType() { - return expectedType; - } - - public void setHibernateType(BindableType expectedType) { - //noinspection unchecked - this.expectedType = (BindableType) expectedType; - } - - @Override - public Class getParameterType() { - if ( expectedType == null ) { - return null; - } - return expectedType.getBindableJavaType(); - } -} diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/ConstructorEntityArgumentMode.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/ConstructorEntityArgumentMode.java deleted file mode 100644 index 9173b6d42c..0000000000 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/ConstructorEntityArgumentMode.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later - * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html - */ -package org.hibernate.query.sqm; - -/** - * Describes the allowable ways in which entity references - * can be handled as dynamic-instantiation (ctor result) argument. - *

- * NOTE that this only applies to Hibernate extension to JPA. JPA - * does not allow ctor-result arguments to be anything other than - * scalar values (column result). - * - * @author Steve Ebersole - */ -public enum ConstructorEntityArgumentMode { - /** - * The id of the entity will be used as the ctor arg. This - * is the legacy Hibernate behavior. - */ - SCALAR, - /** - * The entity reference will be passed as the ctor arg. Whether - * the entity ref is initialized or not depends on whether - * the entity is fetched in the query or is otherwise already - * part of the persistence context. - */ - ENTITY, - /** - * This mode says to chose based on what ctors are available on - * the target class. - */ - CHOOSE -} diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/defaults/ManyToManyImplicitNamingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/defaults/ManyToManyImplicitNamingTest.java index 88681e18c8..7859ee3161 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/defaults/ManyToManyImplicitNamingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytomany/defaults/ManyToManyImplicitNamingTest.java @@ -23,12 +23,12 @@ import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; /** - * Tests names generated for @JoinTable and @JoinColumn for unidirectional and bidirectional - * many-to-many associations using the "legacy JPA" naming strategy, which does not comply - * with JPA spec in all cases. See HHH-9390 for more information. - * - * NOTE: expected primary table names and join columns are explicit here to ensure that - * entity names/tables and PK columns are not changed (which would invalidate these test cases). + * Tests names generated for {@code @JoinTable} and {@code @JoinColumn} for unidirectional + * and bidirectional many-to-many associations using the "legacy JPA" naming strategy, which + * does not comply with JPA spec in all cases. See HHH-9390 for more information. + *

+ * Expected primary table names and join columns are explicit here to ensure that entity + * names/tables and PK columns are not changed (which would invalidate these test cases). * * @author Gail Badner */