类 AbstractLobHandler
- java.lang.Object
- org.springframework.jdbc.support.lob.AbstractLobHandler
- 所有已实现的接口:
LobHandler
- 直接已知子类:
DefaultLobHandler
,OracleLobHandler
public abstract class AbstractLobHandler extends Object implements LobHandler
Abstract base class forLobHandler
implementations.Implements all accessor methods for column names through a column lookup and delegating to the corresponding accessor that takes a column index.
- 从以下版本开始:
- 1.2
- 作者:
- Juergen Hoeller
- 另请参阅:
ResultSet.findColumn(java.lang.String)
构造器概要
构造器 构造器 说明 AbstractLobHandler()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 InputStream
getBlobAsBinaryStream(ResultSet rs, String columnName)
Retrieve the given column as binary stream from the given ResultSet.byte[]
getBlobAsBytes(ResultSet rs, String columnName)
Retrieve the given column as bytes from the given ResultSet.InputStream
getClobAsAsciiStream(ResultSet rs, String columnName)
Retrieve the given column as ASCII stream from the given ResultSet.Reader
getClobAsCharacterStream(ResultSet rs, String columnName)
Retrieve the given column as character stream from the given ResultSet.String
getClobAsString(ResultSet rs, String columnName)
Retrieve the given column as String from the given ResultSet.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.jdbc.support.lob.LobHandler
getBlobAsBinaryStream, getBlobAsBytes, getClobAsAsciiStream, getClobAsCharacterStream, getClobAsString, getLobCreator
构造器详细资料
AbstractLobHandler
public AbstractLobHandler()
方法详细资料
getBlobAsBytes
public byte[] getBlobAsBytes(ResultSet rs, String columnName) throws SQLException
从接口复制的说明:LobHandler
Retrieve the given column as bytes from the given ResultSet. Might simply invokeResultSet.getBytes
or work withResultSet.getBlob
, depending on the database and driver.- 指定者:
getBlobAsBytes
在接口中LobHandler
- 参数:
rs
- the ResultSet to retrieve the content fromcolumnName
- the column name to use- 返回:
- the content as byte array, or
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getBytes(int)
getBlobAsBinaryStream
public InputStream getBlobAsBinaryStream(ResultSet rs, String columnName) throws SQLException
从接口复制的说明:LobHandler
Retrieve the given column as binary stream from the given ResultSet. Might simply invokeResultSet.getBinaryStream
or work withResultSet.getBlob
, depending on the database and driver.- 指定者:
getBlobAsBinaryStream
在接口中LobHandler
- 参数:
rs
- the ResultSet to retrieve the content fromcolumnName
- the column name to use- 返回:
- the content as binary stream, or
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getBinaryStream(int)
getClobAsString
public String getClobAsString(ResultSet rs, String columnName) throws SQLException
从接口复制的说明:LobHandler
Retrieve the given column as String from the given ResultSet. Might simply invokeResultSet.getString
or work withResultSet.getClob
, depending on the database and driver.- 指定者:
getClobAsString
在接口中LobHandler
- 参数:
rs
- the ResultSet to retrieve the content fromcolumnName
- the column name to use- 返回:
- the content as String, or
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getString(int)
getClobAsAsciiStream
public InputStream getClobAsAsciiStream(ResultSet rs, String columnName) throws SQLException
从接口复制的说明:LobHandler
Retrieve the given column as ASCII stream from the given ResultSet. Might simply invokeResultSet.getAsciiStream
or work withResultSet.getClob
, depending on the database and driver.- 指定者:
getClobAsAsciiStream
在接口中LobHandler
- 参数:
rs
- the ResultSet to retrieve the content fromcolumnName
- the column name to use- 返回:
- the content as ASCII stream, or
null
in case of SQL NULL - 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getAsciiStream(int)
getClobAsCharacterStream
public Reader getClobAsCharacterStream(ResultSet rs, String columnName) throws SQLException
从接口复制的说明:LobHandler
Retrieve the given column as character stream from the given ResultSet. Might simply invokeResultSet.getCharacterStream
or work withResultSet.getClob
, depending on the database and driver.- 指定者:
getClobAsCharacterStream
在接口中LobHandler
- 参数:
rs
- the ResultSet to retrieve the content fromcolumnName
- the column name to use- 返回:
- the content as character stream
- 抛出:
SQLException
- if thrown by JDBC methods- 另请参阅:
ResultSet.getCharacterStream(int)