|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.j_spaces.sadapter.GenericJDBC.lob.DefaultLobHandler
public class DefaultLobHandler
Default implementation of the ILobHandler interface.
This LobHandler should work for any JDBC driver that is JDBC compliant in terms of the spec's suggestions regarding simple BLOB handling. This does not apply to Oracle 9i - in this case use OracleLobHandler.
Constructor Summary | |
---|---|
DefaultLobHandler()
|
Method Summary | |
---|---|
byte[] |
getBlobAsBytes(ResultSet rs,
int columnIndex)
Retrieve the given column as bytes from the given ResultSet. |
byte[] |
getBlobAsBytes(ResultSet rs,
String columnName)
Retrieve the given column as bytes from the given ResultSet. |
void |
init()
Initialize lob handler |
void |
setBlobAsBytes(PreparedStatement ps,
int paramIndex,
byte[] content)
Set the given content as bytes on the given statement, using the given parameter index. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultLobHandler()
Method Detail |
---|
public byte[] getBlobAsBytes(ResultSet rs, int columnIndex) throws SQLException
ILobHandler
getBlobAsBytes
in interface ILobHandler
rs
- the ResultSet to retrieve the content fromcolumnIndex
- the column index to use
SQLException
- if thrown by JDBC methodspublic void setBlobAsBytes(PreparedStatement ps, int paramIndex, byte[] content) throws SQLException
ILobHandler
setBlobAsBytes
in interface ILobHandler
ps
- the PreparedStatement to the set the content onparamIndex
- the parameter index to usecontent
- the content as byte array
SQLException
- if thrown by JDBC methodspublic void init() throws Exception
ILobHandler
init
in interface ILobHandler
Exception
public byte[] getBlobAsBytes(ResultSet rs, String columnName) throws SQLException
ILobHandler
getBlobAsBytes
in interface ILobHandler
rs
- the ResultSet to retrieve the content fromcolumnName
- the column name to use
SQLException
- if thrown by JDBC methods
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |