wt.pds
Interface LobHandler

All Known Implementing Classes:
AbstractLobHandler

public interface LobHandler

This interface specificies the operations for reading and writing LOB data. This interface supports both raw data as well as serialized object data.

Supported API: false

Extendable: false


Method Summary
 Object getBlob(ResultSet a_resultSet, int a_index)
          Gets the Blob object from the ResultSet.
 InputStream getLob(WTConnection a_connection, Object a_blob)
          Gets the data from the specified LOB as an InputStream.
 byte[] getLobAsByteArray(WTConnection a_connection, Object a_blob)
          Gets the Lob as a byte array.
 Object getLobAsObject(WTConnection a_connection, Object a_blob)
          Gets the Lob as an object.
 void setBlob(CallableStatement a_statement, int a_index, Object a_blob)
          Sets the Blob object in the CallableStatement.
 long setLob(WTConnection a_connection, LobLocator a_lobLocator, InputStream a_inputStream)
          Set the data in the InputStream to the specified LOB.
 void setLob(WTConnection a_connection, LobLocator a_lobLocator, InputStream a_inputStream, long a_length)
          Set the data in the InputStream to the specified LOB.
 void setObjectAsLob(WTConnection a_connection, LobLocator a_lobLocator, Object a_object)
          Set the object as LOB.
 

Method Detail

setLob

public void setLob(WTConnection a_connection,
                   LobLocator a_lobLocator,
                   InputStream a_inputStream,
                   long a_length)
            throws DatastoreException
Set the data in the InputStream to the specified LOB.

Supported API: false

Parameters:
a_connection - Connection to the database
a_lobLocator - specifies the Lob column
a_inputStream - Data stream for input to the lob
a_length - Number of bytes to set
Throws:
DatastoreException

setLob

public long setLob(WTConnection a_connection,
                   LobLocator a_lobLocator,
                   InputStream a_inputStream)
            throws DatastoreException
Set the data in the InputStream to the specified LOB.

Supported API: false

Parameters:
a_connection - Connection to the database
a_lobLocator - specifies the Lob column
a_inputStream - Data stream for input to the lob
Returns:
long
Throws:
DatastoreException

setObjectAsLob

public void setObjectAsLob(WTConnection a_connection,
                           LobLocator a_lobLocator,
                           Object a_object)
                    throws DatastoreException
Set the object as LOB.

Supported API: false

Parameters:
a_connection - Connection to the database
a_lobLocator - specifies the Lob column
a_object - Object to set
Throws:
DatastoreException

getLob

public InputStream getLob(WTConnection a_connection,
                          Object a_blob)
                   throws DatastoreException
Gets the data from the specified LOB as an InputStream.

Supported API: false

Parameters:
a_connection - Connection to the database
a_blob - Blob reference to the data
Returns:
InputStream
Throws:
DatastoreException

getLobAsByteArray

public byte[] getLobAsByteArray(WTConnection a_connection,
                                Object a_blob)
                         throws DatastoreException
Gets the Lob as a byte array.

Supported API: false

Parameters:
a_connection - Connection to the database
a_blob - Blob reference to the data
Returns:
byte[]
Throws:
DatastoreException

getLobAsObject

public Object getLobAsObject(WTConnection a_connection,
                             Object a_blob)
                      throws DatastoreException
Gets the Lob as an object.

Supported API: false

Parameters:
a_connection - Connection to the database
a_blob - Blob reference to the data
Returns:
Object
Throws:
DatastoreException

setBlob

public void setBlob(CallableStatement a_statement,
                    int a_index,
                    Object a_blob)
             throws SQLException
Sets the Blob object in the CallableStatement.

Supported API: false

Parameters:
a_statement - instance to get Blob from
a_index - Index in result set to get Blob at
a_blob -
Throws:
SQLException

getBlob

public Object getBlob(ResultSet a_resultSet,
                      int a_index)
               throws SQLException
Gets the Blob object from the ResultSet.

Supported API: false

Parameters:
a_resultSet - instance to get Blob from
a_index - Index in result set to get Blob at
Returns:
Object
Throws:
SQLException