Top Description Constructors Methods
org.springframework.jdbc.support.lob

public abstract Class AbstractLobHandler

extends Object
implements LobHandler
Class Inheritance
All Implemented Interfaces
org.springframework.jdbc.support.lob.LobHandler
Known Direct Subclasses
org.springframework.jdbc.support.lob.DefaultLobHandler
Imports
java.io.InputStream, .Reader, java.sql.ResultSet, .SQLException, org.springframework.lang.Nullable

Abstract base class for LobHandler implementations.

Implements all accessor methods for column names through a column lookup and delegating to the corresponding accessor that takes a column index.

Author
Juergen Hoeller
Since
1.2
See Also
java.sql.ResultSet#findColumn

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public InputStream
getBlobAsBinaryStream(ResultSet
the ResultSet to retrieve the content from
rs
,
String
the column name to use
columnName
)

Implements org.springframework.jdbc.support.lob.LobHandler.getBlobAsBinaryStream.

Retrieve the given column as binary stream from the given ResultSet.
public byte[]
getBlobAsBytes(ResultSet
the ResultSet to retrieve the content from
rs
,
String
the column name to use
columnName
)

Implements org.springframework.jdbc.support.lob.LobHandler.getBlobAsBytes.

Retrieve the given column as bytes from the given ResultSet.
public InputStream
getClobAsAsciiStream(ResultSet
the ResultSet to retrieve the content from
rs
,
String
the column name to use
columnName
)

Implements org.springframework.jdbc.support.lob.LobHandler.getClobAsAsciiStream.

Retrieve the given column as ASCII stream from the given ResultSet.
public Reader
getClobAsCharacterStream(ResultSet
the ResultSet to retrieve the content from
rs
,
String
the column name to use
columnName
)

Implements org.springframework.jdbc.support.lob.LobHandler.getClobAsCharacterStream.

Retrieve the given column as character stream from the given ResultSet.
public String
getClobAsString(ResultSet
the ResultSet to retrieve the content from
rs
,
String
the column name to use
columnName
)

Implements org.springframework.jdbc.support.lob.LobHandler.getClobAsString.

Retrieve the given column as String from the given ResultSet.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractLobHandlerback to summary
public AbstractLobHandler()

Method Detail

getBlobAsBinaryStreamback to summary
public InputStream getBlobAsBinaryStream(ResultSet rs, String columnName) throws SQLException

Implements org.springframework.jdbc.support.lob.LobHandler.getBlobAsBinaryStream.

Doc from org.springframework.jdbc.support.lob.LobHandler.getBlobAsBinaryStream.

Retrieve the given column as binary stream from the given ResultSet. Might simply invoke ResultSet.getBinaryStream or work with ResultSet.getBlob, depending on the database and driver.

Parameters
rs:ResultSet

the ResultSet to retrieve the content from

columnName:String

the column name to use

Returns:InputStream

the content as binary stream, or null in case of SQL NULL

Annotations
@Override
@Nullable
Exceptions
SQLException:
if thrown by JDBC methods
getBlobAsBytesback to summary
public byte[] getBlobAsBytes(ResultSet rs, String columnName) throws SQLException

Implements org.springframework.jdbc.support.lob.LobHandler.getBlobAsBytes.

Doc from org.springframework.jdbc.support.lob.LobHandler.getBlobAsBytes.

Retrieve the given column as bytes from the given ResultSet. Might simply invoke ResultSet.getBytes or work with ResultSet.getBlob, depending on the database and driver.

Parameters
rs:ResultSet

the ResultSet to retrieve the content from

columnName:String

the column name to use

Returns:byte[]

the content as byte array, or null in case of SQL NULL

Annotations
@Override
@Nullable
Exceptions
SQLException:
if thrown by JDBC methods
getClobAsAsciiStreamback to summary
public InputStream getClobAsAsciiStream(ResultSet rs, String columnName) throws SQLException

Implements org.springframework.jdbc.support.lob.LobHandler.getClobAsAsciiStream.

Doc from org.springframework.jdbc.support.lob.LobHandler.getClobAsAsciiStream.

Retrieve the given column as ASCII stream from the given ResultSet. Might simply invoke ResultSet.getAsciiStream or work with ResultSet.getClob, depending on the database and driver.

Parameters
rs:ResultSet

the ResultSet to retrieve the content from

columnName:String

the column name to use

Returns:InputStream

the content as ASCII stream, or null in case of SQL NULL

Annotations
@Override
@Nullable
Exceptions
SQLException:
if thrown by JDBC methods
getClobAsCharacterStreamback to summary
public Reader getClobAsCharacterStream(ResultSet rs, String columnName) throws SQLException

Implements org.springframework.jdbc.support.lob.LobHandler.getClobAsCharacterStream.

Doc from org.springframework.jdbc.support.lob.LobHandler.getClobAsCharacterStream.

Retrieve the given column as character stream from the given ResultSet. Might simply invoke ResultSet.getCharacterStream or work with ResultSet.getClob, depending on the database and driver.

Parameters
rs:ResultSet

the ResultSet to retrieve the content from

columnName:String

the column name to use

Returns:Reader

the content as character stream

Annotations
@Override
Exceptions
SQLException:
if thrown by JDBC methods
getClobAsStringback to summary
public String getClobAsString(ResultSet rs, String columnName) throws SQLException

Implements org.springframework.jdbc.support.lob.LobHandler.getClobAsString.

Doc from org.springframework.jdbc.support.lob.LobHandler.getClobAsString.

Retrieve the given column as String from the given ResultSet. Might simply invoke ResultSet.getString or work with ResultSet.getClob, depending on the database and driver.

Parameters
rs:ResultSet

the ResultSet to retrieve the content from

columnName:String

the column name to use

Returns:String

the content as String, or null in case of SQL NULL

Annotations
@Override
@Nullable
Exceptions
SQLException:
if thrown by JDBC methods