Class BlobDataType

Direct Known Subclasses:
OracleBlobDataType, OracleXMLTypeDataType

public class BlobDataType extends BytesDataType
BytesDataType specialization mapping the SQL BLOB type to a byte[].
Since:
Jan 12, 2004
Version:
$Revision$
Author:
Manuel Laflamme
  • Constructor Details

    • BlobDataType

      public BlobDataType()
      Default constructor.
    • BlobDataType

      public BlobDataType(String name, int sqlType)
      Constructs a data type with the given SQL type mapping.
      Parameters:
      name - the data type name.
      sqlType - the Types constant this data type maps to.
  • Method Details

    • getSqlValue

      public Object getSqlValue(int column, ResultSet resultSet) throws SQLException, TypeCastException
      Description copied from class: DataType
      Returns the specified column value from the specified resultset object.
      Overrides:
      getSqlValue in class BytesDataType
      Parameters:
      column - the column index to read, starting at 1.
      resultSet - the result set to read the column value from.
      Returns:
      the column value.
      Throws:
      SQLException - if a database access error occurs.
      TypeCastException - if the value cannot be typecast to this DataType.
    • setSqlValue

      public void setSqlValue(Object value, int column, PreparedStatement statement) throws SQLException, TypeCastException
      Description copied from class: DataType
      Set the specified value to the specified prepared statement object.
      Overrides:
      setSqlValue in class BytesDataType
      Parameters:
      value - the value to bind.
      column - the parameter index to bind to, starting at 1.
      statement - the prepared statement to bind the value on.
      Throws:
      SQLException - if a database access error occurs.
      TypeCastException - if the value cannot be typecast to this DataType.