org.hibernate.type

Class CurrencyType

Implemented Interfaces:
LiteralType, Serializable, Type

public class CurrencyType
extends ImmutableType
implements LiteralType

currency: A type that maps an SQL VARCHAR to a java.util.Currency
Author:
Gavin King
See Also:
java.util.Currency

Field Summary

static Class
CURRENCY_CLASS

Method Summary

Object
fromStringValue(String xml)
Object
get(ResultSet rs, String name)
String
getName()
Class
getReturnedClass()
String
objectToSQLString(Object value, Dialect dialect)
void
set(PreparedStatement st, Object value, int index)
int
sqlType()
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

Field Details

CURRENCY_CLASS

public static final Class CURRENCY_CLASS

Method Details

fromStringValue

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

get

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

getName

public String getName()
Specified by:
getName in interface Type

getReturnedClass

public Class getReturnedClass()
Specified by:
getReturnedClass in interface Type

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

toString

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