public class PrimitiveByteArrayTypeDescriptor extends AbstractTypeDescriptor<byte[]>
byte[] handling.| Modifier and Type | Field and Description |
|---|---|
static PrimitiveByteArrayTypeDescriptor |
INSTANCE |
| Constructor and Description |
|---|
PrimitiveByteArrayTypeDescriptor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areEqual(byte[] one,
byte[] another)
Determine if two instances are equal
|
int |
extractHashCode(byte[] bytes)
Extract a proper hash code for this value.
|
String |
extractLoggableRepresentation(byte[] value)
Extract a loggable representation of the value.
|
byte[] |
fromString(String string) |
Comparator<byte[]> |
getComparator()
Retrieve the natural comparator for this type.
|
String |
toString(byte[] bytes) |
<X> X |
unwrap(byte[] value,
Class<X> type,
WrapperOptions options)
Unwrap an instance of our handled Java type into the requested type.
|
<X> byte[] |
wrap(X value,
WrapperOptions options)
Wrap a value as our handled Java type.
|
getJavaType, getJavaTypeClass, getMutabilityPlan, unknownUnwrap, unknownWrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetJdbcRecommendedSqlTypepublic static final PrimitiveByteArrayTypeDescriptor INSTANCE
public boolean areEqual(byte[] one,
byte[] another)
JavaTypeDescriptorareEqual in interface JavaTypeDescriptor<byte[]>areEqual in class AbstractTypeDescriptor<byte[]>one - One instanceanother - The other instancepublic int extractHashCode(byte[] bytes)
JavaTypeDescriptorextractHashCode in interface JavaTypeDescriptor<byte[]>extractHashCode in class AbstractTypeDescriptor<byte[]>bytes - The value for which to extract a hash code.public String toString(byte[] bytes)
public String extractLoggableRepresentation(byte[] value)
JavaTypeDescriptorextractLoggableRepresentation in interface JavaTypeDescriptor<byte[]>extractLoggableRepresentation in class AbstractTypeDescriptor<byte[]>value - The value for which to extract a loggable representation.public byte[] fromString(String string)
public Comparator<byte[]> getComparator()
JavaTypeDescriptorgetComparator in interface JavaTypeDescriptor<byte[]>getComparator in class AbstractTypeDescriptor<byte[]>public <X> X unwrap(byte[] value,
Class<X> type,
WrapperOptions options)
JavaTypeDescriptorJavaTypeDescriptor<Integer> and we are asked to unwrap
the Integer value as a Long we would return something like
Long.valueOf( value.longValue() ).
Intended use is during PreparedStatement binding.X - The conversion type.value - The value to unwraptype - The type as which to unwrapoptions - The optionspublic <X> byte[] wrap(X value,
WrapperOptions options)
JavaTypeDescriptorResultSet extraction.X - The conversion type.value - The value to wrap.options - The optionsCopyright © 2001-2021 Red Hat, Inc. All Rights Reserved.