|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.springframework.jdbc.support.lob.DefaultLobHandler
Default implementation of the LobHandler interface. Invokes the direct accessor methods that java.sql.ResultSet and java.sql.PreparedStatement offer.
This LobHandler should work for any JDBC driver that is JDBC compliant in terms of the spec's suggestions regarding simple BLOB and CLOB handling.
ResultSet.getBytes(int),
ResultSet.getBinaryStream(int),
ResultSet.getString(int),
ResultSet.getAsciiStream(int),
ResultSet.getCharacterStream(int),
PreparedStatement.setBytes(int, byte[]),
PreparedStatement.setBinaryStream(int, java.io.InputStream, int),
PreparedStatement.setString(int, java.lang.String),
PreparedStatement.setAsciiStream(int, java.io.InputStream, int),
PreparedStatement.setCharacterStream(int, java.io.Reader, int)| Nested Class Summary | |
protected class |
DefaultLobHandler.DefaultLobCreator
|
| Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
| Constructor Summary | |
DefaultLobHandler()
|
|
| Method Summary | |
java.io.InputStream |
getBlobAsBinaryStream(java.sql.ResultSet rs,
int columnIndex)
Retrieve the given column as binary stream from the given ResultSet. |
byte[] |
getBlobAsBytes(java.sql.ResultSet rs,
int columnIndex)
Retrieve the given column as bytes from the given ResultSet. |
java.io.InputStream |
getClobAsAsciiStream(java.sql.ResultSet rs,
int columnIndex)
Retrieve the given column as ASCII stream from the given ResultSet. |
java.io.Reader |
getClobAsCharacterStream(java.sql.ResultSet rs,
int columnIndex)
Retrieve the given column as character stream from the given ResultSet. |
java.lang.String |
getClobAsString(java.sql.ResultSet rs,
int columnIndex)
Retrieve the given column as String from the given ResultSet. |
LobCreator |
getLobCreator()
Create a new LobCreator instance, i.e. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final org.apache.commons.logging.Log logger
| Constructor Detail |
public DefaultLobHandler()
| Method Detail |
public byte[] getBlobAsBytes(java.sql.ResultSet rs,
int columnIndex)
throws java.sql.SQLException
LobHandler
getBlobAsBytes in interface LobHandlerrs - the ResultSet to retrieve the content fromcolumnIndex - the column index to use
java.sql.SQLException - if thrown by JDBC methods
public java.io.InputStream getBlobAsBinaryStream(java.sql.ResultSet rs,
int columnIndex)
throws java.sql.SQLException
LobHandler
getBlobAsBinaryStream in interface LobHandlerrs - the ResultSet to retrieve the content fromcolumnIndex - the column index to use
java.sql.SQLException - if thrown by JDBC methods
public java.lang.String getClobAsString(java.sql.ResultSet rs,
int columnIndex)
throws java.sql.SQLException
LobHandler
getClobAsString in interface LobHandlerrs - the ResultSet to retrieve the content fromcolumnIndex - the column index to use
java.sql.SQLException - if thrown by JDBC methods
public java.io.InputStream getClobAsAsciiStream(java.sql.ResultSet rs,
int columnIndex)
throws java.sql.SQLException
LobHandler
getClobAsAsciiStream in interface LobHandlerrs - the ResultSet to retrieve the content fromcolumnIndex - the column index to use
java.sql.SQLException - if thrown by JDBC methods
public java.io.Reader getClobAsCharacterStream(java.sql.ResultSet rs,
int columnIndex)
throws java.sql.SQLException
LobHandler
getClobAsCharacterStream in interface LobHandlerrs - the ResultSet to retrieve the content fromcolumnIndex - the column index to use
java.sql.SQLException - if thrown by JDBC methodspublic LobCreator getLobCreator()
LobHandler
getLobCreator in interface LobHandlerLobCreator.close()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||