public class BytesDataType extends AbstractDataType
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
Modifier and Type | Method and Description |
---|---|
int |
compare(byte[] v1,
byte[] v2) |
protected int |
compareNonNulls(Object value1,
Object value2)
Compares non-null values to each other.
|
Object |
getSqlValue(int column,
ResultSet resultSet)
Returns the specified column value from the specified resultset object.
|
void |
setSqlValue(Object value,
int column,
PreparedStatement statement)
Set the specified value to the specified prepared statement object.
|
Object |
typeCast(Object value)
Casts the given value into a byte[] using different strategies.
|
areObjectsEqual, compare, getSqlType, getTypeClass, isDateTime, isNumber, loadClass, loadClass, toString
asString, forObject, forSqlType, forSqlTypeName
public Object typeCast(Object value) throws TypeCastException
typeCast
in class DataType
TypeCastException
DataType.typeCast(java.lang.Object)
protected int compareNonNulls(Object value1, Object value2) throws TypeCastException
AbstractDataType
Comparable
. The two given objects
are the results of the DataType.typeCast(Object)
method call which is usually
implemented by a specialized DataType
implementation.compareNonNulls
in class AbstractDataType
value1
- First value resulting from the DataType.typeCast(Object)
method callvalue2
- Second value resulting from the DataType.typeCast(Object)
method callComparable.compareTo(Object)
invocation.TypeCastException
public int compare(byte[] v1, byte[] v2) throws TypeCastException
TypeCastException
public Object getSqlValue(int column, ResultSet resultSet) throws SQLException, TypeCastException
DataType
getSqlValue
in class AbstractDataType
SQLException
TypeCastException
public void setSqlValue(Object value, int column, PreparedStatement statement) throws SQLException, TypeCastException
DataType
setSqlValue
in class AbstractDataType
SQLException
TypeCastException
Copyright © 2002–2019. All rights reserved.