Skip to content

Commit

Permalink
Deprecate LobHandler and SqlXmlHandler abstractions
Browse files Browse the repository at this point in the history
Including SqlLobValue and related support classes.

Closes gh-32179
  • Loading branch information
jhoeller committed Feb 15, 2024
1 parent 7e67da8 commit 7ad197e
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,9 @@
*
* @author Juergen Hoeller
* @since 1.0.2
* @deprecated as of 6.2 along with {@link org.springframework.jdbc.support.lob.LobHandler}
*/
@Deprecated(since = "6.2")
@SuppressWarnings("serial")
public class LobRetrievalFailureException extends DataRetrievalFailureException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
* @author Juergen Hoeller
* @since 1.0.2
* @see org.springframework.jdbc.support.lob.LobCreator
* @deprecated as of 6.2, in favor of {@link SqlBinaryValue} and {@link SqlCharacterValue}
*/
@Deprecated(since = "6.2")
public abstract class AbstractLobCreatingPreparedStatementCallback implements PreparedStatementCallback<Integer> {

private final LobHandler lobHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@
* @param <T> the result type
* @see org.springframework.jdbc.support.lob.LobHandler
* @see org.springframework.jdbc.LobRetrievalFailureException
* @deprecated as of 6.2 along with {@link org.springframework.jdbc.support.lob.LobHandler},
* in favor of {@link ResultSet#getBinaryStream}/{@link ResultSet#getCharacterStream} usage
*/
@Deprecated(since = "6.2")
public abstract class AbstractLobStreamingResultSetExtractor<T> implements ResultSetExtractor<T> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
* @see org.springframework.jdbc.core.JdbcTemplate#update(String, Object[], int[])
* @see org.springframework.jdbc.object.SqlUpdate#update(Object[])
* @see org.springframework.jdbc.object.StoredProcedure#execute(java.util.Map)
* @deprecated as of 6.2, in favor of {@link SqlBinaryValue} and {@link SqlCharacterValue}
*/
@Deprecated(since = "6.2")
public class SqlLobValue implements DisposableSqlTypeValue {

@Nullable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,7 +32,10 @@
* @author Juergen Hoeller
* @since 1.2
* @see java.sql.ResultSet#findColumn
* @deprecated as of 6.2, in favor of {@link org.springframework.jdbc.core.support.SqlBinaryValue}
* and {@link org.springframework.jdbc.core.support.SqlCharacterValue}
*/
@Deprecated(since = "6.2")
public abstract class AbstractLobHandler implements LobHandler {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,7 +80,10 @@
* @see java.sql.PreparedStatement#setString
* @see java.sql.PreparedStatement#setAsciiStream
* @see java.sql.PreparedStatement#setCharacterStream
* @deprecated as of 6.2, in favor of {@link org.springframework.jdbc.core.support.SqlBinaryValue}
* and {@link org.springframework.jdbc.core.support.SqlCharacterValue}
*/
@Deprecated(since = "6.2")
public class DefaultLobHandler extends AbstractLobHandler {

protected final Log logger = LogFactory.getLog(getClass());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -57,7 +57,10 @@
* @see java.sql.PreparedStatement#setString
* @see java.sql.PreparedStatement#setAsciiStream
* @see java.sql.PreparedStatement#setCharacterStream
* @deprecated as of 6.2, in favor of {@link org.springframework.jdbc.core.support.SqlBinaryValue}
* and {@link org.springframework.jdbc.core.support.SqlCharacterValue}
*/
@Deprecated(since = "6.2")
public interface LobCreator extends Closeable {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -72,7 +72,10 @@
* @see java.sql.ResultSet#getString
* @see java.sql.ResultSet#getAsciiStream
* @see java.sql.ResultSet#getCharacterStream
* @deprecated as of 6.2, in favor of {@link org.springframework.jdbc.core.support.SqlBinaryValue}
* and {@link org.springframework.jdbc.core.support.SqlCharacterValue}
*/
@Deprecated(since = "6.2")
public interface LobHandler {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,6 +31,7 @@
* @author Juergen Hoeller
* @since 2.5.3
*/
@Deprecated
class PassThroughBlob implements Blob {

@Nullable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,6 +38,7 @@
* @author Juergen Hoeller
* @since 2.5.3
*/
@Deprecated
class PassThroughClob implements Clob {

@Nullable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -46,7 +46,10 @@
* @see DefaultLobHandler#setCreateTemporaryLob
* @see java.sql.Connection#createBlob()
* @see java.sql.Connection#createClob()
* @deprecated as of 6.2, in favor of {@link org.springframework.jdbc.core.support.SqlBinaryValue}
* and {@link org.springframework.jdbc.core.support.SqlCharacterValue}
*/
@Deprecated(since = "6.2")
public class TemporaryLobCreator implements LobCreator {

protected static final Log logger = LogFactory.getLog(TemporaryLobCreator.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,6 +19,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
Expand Down Expand Up @@ -46,7 +47,11 @@
* @see java.sql.SQLXML
* @see java.sql.ResultSet#getSQLXML
* @see java.sql.PreparedStatement#setSQLXML
* @deprecated as of 6.2, in favor of direct {@link ResultSet#getSQLXML} and
* {@link Connection#createSQLXML()} usage, possibly in combination with a
* custom {@link org.springframework.jdbc.support.SqlValue} implementation
*/
@Deprecated(since = "6.2")
public class Jdbc4SqlXmlHandler implements SqlXmlHandler {

//-------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,9 @@

package org.springframework.jdbc.support.xml;

import java.sql.Connection;
import java.sql.ResultSet;

import org.springframework.dao.InvalidDataAccessApiUsageException;

/**
Expand All @@ -24,7 +27,11 @@
*
* @author Thomas Risberg
* @since 2.5.5
* @deprecated as of 6.2, in favor of direct {@link ResultSet#getSQLXML} and
* {@link Connection#createSQLXML()} usage, possibly in combination with a
* custom {@link org.springframework.jdbc.support.SqlValue} implementation
*/
@Deprecated(since = "6.2")
@SuppressWarnings("serial")
public class SqlXmlFeatureNotImplementedException extends InvalidDataAccessApiUsageException {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@

import java.io.InputStream;
import java.io.Reader;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;

Expand Down Expand Up @@ -45,7 +46,11 @@
* @see java.sql.SQLXML
* @see java.sql.ResultSet#getSQLXML
* @see java.sql.PreparedStatement#setSQLXML
* @deprecated as of 6.2, in favor of direct {@link ResultSet#getSQLXML} and
* {@link Connection#createSQLXML()} usage, possibly in combination with a
* custom {@link org.springframework.jdbc.support.SqlValue} implementation
*/
@Deprecated(since = "6.2")
public interface SqlXmlHandler {

//-------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
* @author Thomas Risberg
* @since 2.5.5
* @see org.springframework.jdbc.support.SqlValue
* @deprecated as of 6.2, in favor of a direct {@link SqlValue} implementation
*/
@Deprecated(since = "6.2")
public interface SqlXmlValue extends SqlValue {

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,9 @@
* @author Thomas Risberg
* @since 2.5.5
* @see java.io.OutputStream
* @deprecated as of 6.2, in favor of direct {@link java.sql.SQLXML} usage
*/
@Deprecated(since = "6.2")
public interface XmlBinaryStreamProvider {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,9 @@
* @author Thomas Risberg
* @since 2.5.5
* @see java.io.Writer
* @deprecated as of 6.2, in favor of direct {@link java.sql.SQLXML} usage
*/
@Deprecated(since = "6.2")
public interface XmlCharacterStreamProvider {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,9 @@
* @author Thomas Risberg
* @since 2.5.5
* @see javax.xml.transform.Result
* @deprecated as of 6.2, in favor of direct {@link java.sql.SQLXML} usage
*/
@Deprecated(since = "6.2")
public interface XmlResultProvider {

/**
Expand Down

0 comments on commit 7ad197e

Please sign in to comment.