org.hibernate.type

Class BigIntegerType

Implemented Interfaces:
DiscriminatorType, IdentifierType, Serializable, LiteralType, Serializable, Type

public class BigIntegerType
extends ImmutableType
implements DiscriminatorType

big_integer: A type that maps an SQL NUMERIC to a java.math.BigInteger
Author:
Gavin King
See Also:
java.math.BigInteger

Method Summary

Object
fromStringValue(String xml)
Object
get(ResultSet rs, String name)
int
getHashCode(Object x, EntityMode entityMode)
Get a hashcode, consistent with persistence "equality"
String
getName()
Returns the abbreviated name of the type.
Class
getReturnedClass()
The class returned by nullSafeGet() methods.
boolean
isEqual(Object x, Object y)
String
objectToSQLString(Object value, Dialect dialect)
void
set(PreparedStatement st, Object value, int index)
int
sqlType()
Object
stringToObject(String xml)
String
toString(Object value)

Methods inherited from class org.hibernate.type.ImmutableType

deepCopy, 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

fromStringValue

public Object fromStringValue(String xml)
Overrides:
fromStringValue in interface NullableType

get

public Object get(ResultSet rs,
                  String name)
            throws HibernateException,
                   SQLException
Overrides:
get in interface NullableType

getHashCode

public int getHashCode(Object x,
                       EntityMode entityMode)
Get a hashcode, consistent with persistence "equality"
Specified by:
getHashCode in interface Type
Overrides:
getHashCode in interface AbstractType
Parameters:
x -
entityMode -

getName

public String getName()
Returns the abbreviated name of the type.
Specified by:
getName in interface Type
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

isEqual

public boolean isEqual(Object x,
                       Object y)
Overrides:
isEqual in interface NullableType

objectToSQLString

public String objectToSQLString(Object value,
                                Dialect dialect)
            throws Exception
Specified by:
objectToSQLString in interface LiteralType

set

public void set(PreparedStatement st,
                Object value,
                int index)
            throws HibernateException,
                   SQLException
Overrides:
set in interface NullableType

sqlType

public int sqlType()
Overrides:
sqlType in interface NullableType

stringToObject

public Object stringToObject(String xml)
            throws Exception
Specified by:
stringToObject in interface IdentifierType

toString

public String toString(Object value)
            throws HibernateException
Overrides:
toString in interface NullableType