delete two unused classes

This commit is contained in:
Gavin 2022-12-28 12:36:26 +01:00 committed by Gavin King
parent 3d14d1b25f
commit b3625a34e4
3 changed files with 6 additions and 87 deletions

View File

@ -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 <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
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<T> implements QueryParameter<T> {
private BindableType<T> expectedType;
public AbstractQueryParameterImpl(BindableType<T> expectedType) {
this.expectedType = expectedType;
}
@Override
public BindableType<T> getHibernateType() {
return expectedType;
}
public void setHibernateType(BindableType<?> expectedType) {
//noinspection unchecked
this.expectedType = (BindableType<T>) expectedType;
}
@Override
public Class<T> getParameterType() {
if ( expectedType == null ) {
return null;
}
return expectedType.getBindableJavaType();
}
}

View File

@ -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.
* <p>
* 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
}

View File

@ -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.
* <p>
* 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
*/