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| Constructor and Description |
|---|
BytesDataType(java.lang.String name,
int sqlType) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
byte[] |
loadFile(java.lang.String filename) |
byte[] |
loadURL(java.lang.String urlAsString) |
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.
|
areObjectsEqual, compare, getSqlType, getTypeClass, isDateTime, isNumber, loadClass, loadClass, toStringasString, forObject, forSqlType, forSqlTypeName, getSqlTypeNamepublic byte[] loadFile(java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionpublic byte[] loadURL(java.lang.String urlAsString)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object typeCast(java.lang.Object value)
throws TypeCastException
typeCast in class DataTypeTypeCastExceptionDataType.typeCast(java.lang.Object)protected int compareNonNulls(java.lang.Object value1,
java.lang.Object value2)
throws TypeCastException
AbstractDataTypeComparable. 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 AbstractDataTypevalue1 - First value resulting from the DataType.typeCast(Object) method callvalue2 - Second value resulting from the DataType.typeCast(Object) method callComparable.compareTo(Object) invocation.TypeCastExceptionpublic int compare(byte[] v1,
byte[] v2)
throws TypeCastException
TypeCastExceptionpublic java.lang.Object getSqlValue(int column,
java.sql.ResultSet resultSet)
throws java.sql.SQLException,
TypeCastException
DataTypegetSqlValue in class AbstractDataTypejava.sql.SQLExceptionTypeCastExceptionpublic void setSqlValue(java.lang.Object value,
int column,
java.sql.PreparedStatement statement)
throws java.sql.SQLException,
TypeCastException
DataTypesetSqlValue in class AbstractDataTypejava.sql.SQLExceptionTypeCastExceptionCopyright © 2002-2018. All Rights Reserved.