com.j_spaces.sadapter.GenericJDBC.lob
Interface ILobHandler

All Known Implementing Classes:
DefaultLobHandler, OracleLobHandler

public interface ILobHandler

Interface that abstracts potentially database-specific creation and retrieval of large binary fields and large text fields.

Since:
5.1

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.
 

Method Detail

init

void init()
          throws Exception
Initialize lob handler

Throws:
Exception

setBlobAsBytes

void setBlobAsBytes(PreparedStatement ps,
                    int paramIndex,
                    byte[] content)
                    throws SQLException
Set the given content as bytes on the given statement, using the given parameter index.

Parameters:
ps - the PreparedStatement to the set the content on
paramIndex - the parameter index to use
content - the content as byte array
Throws:
SQLException - if thrown by JDBC methods

getBlobAsBytes

byte[] getBlobAsBytes(ResultSet rs,
                      int columnIndex)
                      throws SQLException
Retrieve the given column as bytes from the given ResultSet.

Parameters:
rs - the ResultSet to retrieve the content from
columnIndex - the column index to use
Returns:
the content as byte array.
Throws:
SQLException - if thrown by JDBC methods

getBlobAsBytes

byte[] getBlobAsBytes(ResultSet rs,
                      String columnName)
                      throws SQLException
Retrieve the given column as bytes from the given ResultSet.

Parameters:
rs - the ResultSet to retrieve the content from
columnName - the column name to use
Returns:
the content as byte array.
Throws:
SQLException - if thrown by JDBC methods