HHH-14679 - Deprecate ResultSetWrapper and friends

This commit is contained in:
Steve Ebersole 2021-06-11 11:52:01 -05:00 committed by Sanne Grinovero
parent e2f24c5436
commit f91fe03352
7 changed files with 20 additions and 1 deletions

View File

@ -1273,6 +1273,7 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions {
this.scrollableResultSetsEnabled = enabled; this.scrollableResultSetsEnabled = enabled;
} }
@Deprecated
public void enableResultSetWrappingSupport(boolean enabled) { public void enableResultSetWrappingSupport(boolean enabled) {
this.wrapResultSetsEnabled = enabled; this.wrapResultSetsEnabled = enabled;
} }

View File

@ -219,6 +219,10 @@ public interface SessionFactoryOptions {
boolean isScrollableResultSetsEnabled(); boolean isScrollableResultSetsEnabled();
/**
* @deprecated (since 5.5) Scheduled for removal in 6.0 as ResultSet wrapping is no longer needed
*/
@Deprecated
boolean isWrapResultSetsEnabled(); boolean isWrapResultSetsEnabled();
boolean isGetGeneratedKeysEnabled(); boolean isGetGeneratedKeysEnabled();

View File

@ -1114,7 +1114,10 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
/** /**
* Enable wrapping of JDBC result sets in order to speed up column name lookups for * Enable wrapping of JDBC result sets in order to speed up column name lookups for
* broken JDBC drivers * broken JDBC drivers
*
* @deprecated (since 5.5) Scheduled for removal in 6.0 as ResultSet wrapping is no longer needed
*/ */
@Deprecated
String WRAP_RESULT_SETS = "hibernate.jdbc.wrap_result_sets"; String WRAP_RESULT_SETS = "hibernate.jdbc.wrap_result_sets";
/** /**

View File

@ -13,8 +13,11 @@ import java.util.concurrent.ConcurrentHashMap;
/** /**
* Cache of column-name -> column-index resolutions * Cache of column-name -> column-index resolutions
* *
* @deprecated (since 5.5) Scheduled for removal in 6.0 as ResultSet wrapping is no longer needed
*
* @author Steve Ebersole * @author Steve Ebersole
*/ */
@Deprecated
public final class ColumnNameCache { public final class ColumnNameCache {
private static final float LOAD_FACTOR = .75f; private static final float LOAD_FACTOR = .75f;

View File

@ -27,9 +27,12 @@ import org.hibernate.service.ServiceRegistry;
* A proxy for a ResultSet delegate, responsible for locally caching the columnName-to-columnIndex resolution that * A proxy for a ResultSet delegate, responsible for locally caching the columnName-to-columnIndex resolution that
* has been found to be inefficient in a few vendor's drivers (i.e., Oracle and Postgres). * has been found to be inefficient in a few vendor's drivers (i.e., Oracle and Postgres).
* *
* @deprecated (since 5.5) Scheduled for removal in 6.0 as ResultSet wrapping is no longer needed
*
* @author Steve Ebersole * @author Steve Ebersole
* @author Gail Badner * @author Gail Badner
*/ */
@Deprecated
public class ResultSetWrapperProxy implements InvocationHandler { public class ResultSetWrapperProxy implements InvocationHandler {
private static final CoreMessageLogger LOG = messageLogger( ResultSetWrapperProxy.class ); private static final CoreMessageLogger LOG = messageLogger( ResultSetWrapperProxy.class );

View File

@ -8,7 +8,6 @@ package org.hibernate.engine.jdbc.internal;
import java.sql.ResultSet; import java.sql.ResultSet;
import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import org.hibernate.engine.jdbc.ColumnNameCache; import org.hibernate.engine.jdbc.ColumnNameCache;
import org.hibernate.engine.jdbc.ResultSetWrapperProxy; import org.hibernate.engine.jdbc.ResultSetWrapperProxy;
import org.hibernate.engine.jdbc.spi.ResultSetWrapper; import org.hibernate.engine.jdbc.spi.ResultSetWrapper;
@ -18,9 +17,12 @@ import org.hibernate.service.ServiceRegistry;
* Standard Hibernate implementation for wrapping a {@link ResultSet} in a * Standard Hibernate implementation for wrapping a {@link ResultSet} in a
" column name cache" wrapper. " column name cache" wrapper.
* *
* @deprecated (since 5.5) Scheduled for removal in 6.0 as ResultSet wrapping is no longer needed
*
* @author Steve Ebersole * @author Steve Ebersole
* @author Gail Badner * @author Gail Badner
*/ */
@Deprecated
public class ResultSetWrapperImpl implements ResultSetWrapper { public class ResultSetWrapperImpl implements ResultSetWrapper {
private final ServiceRegistry serviceRegistry; private final ServiceRegistry serviceRegistry;

View File

@ -13,8 +13,11 @@ import org.hibernate.engine.jdbc.ColumnNameCache;
/** /**
* Contract for wrapping a {@link ResultSet} in a "column name cache" wrapper. * Contract for wrapping a {@link ResultSet} in a "column name cache" wrapper.
* *
* @deprecated (since 5.5) Scheduled for removal in 6.0 as ResultSet wrapping is no longer needed
*
* @author Gail Badner * @author Gail Badner
*/ */
@Deprecated
public interface ResultSetWrapper { public interface ResultSetWrapper {
/** /**
* Wrap a result set in a "column name cache" wrapper. * Wrap a result set in a "column name cache" wrapper.