org.dbunit.dataset.datatype
Class BytesDataType
java.lang.Object
org.dbunit.dataset.datatype.DataType
org.dbunit.dataset.datatype.AbstractDataType
org.dbunit.dataset.datatype.BytesDataType
- Direct Known Subclasses:
- BinaryStreamDataType, BlobDataType
public class BytesDataType
- extends AbstractDataType
- Since:
- 1.0 (Mar 20, 2002)
- Version:
- $Revision: 1179 $ $Date: 2010-03-25 23:09:07 +0100 (gio, 25 mar 2010) $
- Author:
- Manuel Laflamme, Last changed by: $Author: gommma $
| 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, SMALLINT, TIME, TIMESTAMP, TINYINT, UNKNOWN, VARBINARY, VARCHAR |
|
Method Summary |
int |
compare(byte[] v1,
byte[] v2)
|
protected int |
compareNonNulls(java.lang.Object value1,
java.lang.Object value2)
Compares non-null values to each other. |
java.lang.Object |
getSqlValue(int column,
java.sql.ResultSet resultSet)
Returns the specified column value from the specified resultset object. |
void |
setSqlValue(java.lang.Object value,
int column,
java.sql.PreparedStatement statement)
Set the specified value to the specified prepared statement object. |
java.lang.Object |
typeCast(java.lang.Object value)
Casts the given value into a byte[] using different strategies. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
typeCast
public java.lang.Object typeCast(java.lang.Object value)
throws TypeCastException
- Casts the given value into a byte[] using different strategies. Note
that this might sometimes result in undesired behavior when character
data (Strings) are used.
- Specified by:
typeCast in class DataType
- Throws:
TypeCastException- See Also:
DataType.typeCast(java.lang.Object)
compareNonNulls
protected int compareNonNulls(java.lang.Object value1,
java.lang.Object value2)
throws TypeCastException
- Description copied from class:
AbstractDataType
- Compares non-null values to each other. Both objects are guaranteed to be not
null and to implement the interface
Comparable. The two given objects
are the results of the DataType.typeCast(Object) method call which is usually
implemented by a specialized DataType implementation.
- Overrides:
compareNonNulls in class AbstractDataType
- Parameters:
value1 - First value resulting from the DataType.typeCast(Object) method callvalue2 - Second value resulting from the DataType.typeCast(Object) method call
- Returns:
- The result of the
Comparable.compareTo(Object) invocation.
- Throws:
TypeCastException
compare
public int compare(byte[] v1,
byte[] v2)
throws TypeCastException
- Throws:
TypeCastException
getSqlValue
public java.lang.Object getSqlValue(int column,
java.sql.ResultSet resultSet)
throws java.sql.SQLException,
TypeCastException
- Description copied from class:
DataType
- Returns the specified column value from the specified resultset object.
- Overrides:
getSqlValue in class AbstractDataType
- Throws:
java.sql.SQLException
TypeCastException
setSqlValue
public void setSqlValue(java.lang.Object value,
int column,
java.sql.PreparedStatement statement)
throws java.sql.SQLException,
TypeCastException
- Description copied from class:
DataType
- Set the specified value to the specified prepared statement object.
- Overrides:
setSqlValue in class AbstractDataType
- Throws:
java.sql.SQLException
TypeCastException
Copyright © 2002-2010. All Rights Reserved.