Package org.dbunit.ext.postgresql
Class PostgreSQLOidDataType
java.lang.Object
org.dbunit.dataset.datatype.DataType
org.dbunit.dataset.datatype.AbstractDataType
org.dbunit.dataset.datatype.BytesDataType
org.dbunit.ext.postgresql.PostgreSQLOidDataType
BytesDataType specialization for PostgreSQL's oid large object columns.- Since:
- 2.7.0
-
Field Summary
Fields inherited from class org.dbunit.dataset.datatype.DataType
BIGINT, BIGINT_AUX_LONG, BINARY, BIT, BLOB, BOOLEAN, CHAR, CLOB, DATE, DECIMAL, DOUBLE, FLOAT, INTEGER, LONGNVARCHAR, LONGVARBINARY, LONGVARCHAR, NCHAR, NUMERIC, NVARCHAR, REAL, RELATIVE_DATE_TIME_PARSER, SMALLINT, TIME, TIMESTAMP, TINYINT, UNKNOWN, VARBINARY, VARCHAR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSqlValue(int column, ResultSet resultSet) Reads the large object referenced by the column's oid.voidsetSqlValue(Object value, int column, PreparedStatement statement) Set the specified value to the specified prepared statement object.Methods inherited from class org.dbunit.dataset.datatype.BytesDataType
compare, compareNonNulls, loadFile, loadURL, typeCastMethods inherited from class org.dbunit.dataset.datatype.AbstractDataType
areObjectsEqual, compare, getSqlType, getTypeClass, isDateTime, isNumber, loadClass, loadClass, toStringMethods inherited from class org.dbunit.dataset.datatype.DataType
asString, forObject, forSqlType, forSqlTypeName, getSqlTypeName, isExtendedSyntax
-
Constructor Details
-
PostgreSQLOidDataType
public PostgreSQLOidDataType()Default constructor.
-
-
Method Details
-
getSqlValue
Reads the large object referenced by the column's oid.- Overrides:
getSqlValuein classBytesDataType- Parameters:
column- the column index to read, starting at 1.resultSet- the result set to read the column value from.- Returns:
- the large object's bytes, or
nullif the oid is zero (a SQLNULL) or does not refer to a large object. - Throws:
SQLException- if a database access error occurs.TypeCastException- never thrown by this implementation.
-
setSqlValue
public void setSqlValue(Object value, int column, PreparedStatement statement) throws SQLException, TypeCastException Description copied from class:DataTypeSet the specified value to the specified prepared statement object.- Overrides:
setSqlValuein classBytesDataType- 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 thisDataType.
-