org.hibernate.type

Class BinaryType

Implemented Interfaces:
Comparator, Serializable, Type, VersionType

public class BinaryType
extends AbstractBynaryType

binary: A type that maps an SQL VARBINARY to a Java byte[].
Author:
Gavin King

Method Summary

String
getName()
Returns the abbreviated name of the type.
Class
getReturnedClass()
The class returned by nullSafeGet() methods.
protected Object
toExternalFormat(byte[] bytes)
Convert the byte[] into the expected object type
protected byte[]
toInternalFormat(Object bytes)
Convert the object into the internal byte[] representation

Methods inherited from class org.hibernate.type.AbstractBynaryType

compare, compare, deepCopyNotNull, fromStringValue, get, getComparator, getHashCode, getName, isEqual, next, seed, set, sqlType, toExternalFormat, toInternalFormat, toString

Methods inherited from class org.hibernate.type.MutableType

deepCopy, deepCopyNotNull, isMutable, replace

Methods inherited from class org.hibernate.type.NullableType

fromStringValue, fromXMLNode, fromXMLString, get, getColumnSpan, isDirty, isEqual, isEqual, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, nullSafeSet, nullSafeToString, set, setToXMLNode, sqlType, sqlTypes, toColumnNullness, toLoggableString, toString, toXMLString

Methods inherited from class org.hibernate.type.AbstractType

assemble, beforeAssemble, compare, disassemble, getHashCode, getHashCode, getSemiResolvedType, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isEntityType, isEqual, isEqual, isModified, isSame, isXMLElement, replace, replaceNode, resolve, semiResolve

Method Details

getName

public String getName()
Returns the abbreviated name of the type.
Specified by:
getName in interface Type
Overrides:
getName in interface AbstractBynaryType
Returns:
String the Hibernate type name

getReturnedClass

public Class getReturnedClass()
The class returned by nullSafeGet() methods. This is used to establish the class of an array of this type.
Specified by:
getReturnedClass in interface Type
Returns:
Class

toExternalFormat

protected Object toExternalFormat(byte[] bytes)
Convert the byte[] into the expected object type
Overrides:
toExternalFormat in interface AbstractBynaryType

toInternalFormat

protected byte[] toInternalFormat(Object bytes)
Convert the object into the internal byte[] representation
Overrides:
toInternalFormat in interface AbstractBynaryType