FileDocCategorySizeDatePackage
TypedValue.javaAPI DocHibernate 3.2.51366Mon May 02 09:34:18 BST 2005org.hibernate.engine

TypedValue

public final class TypedValue extends Object implements Serializable
An ordered pair of a value and its Hibernate type.
see
org.hibernate.type.Type
author
Gavin King

Fields Summary
private final org.hibernate.type.Type
type
private final Object
value
private final org.hibernate.EntityMode
entityMode
Constructors Summary
public TypedValue(org.hibernate.type.Type type, Object value, org.hibernate.EntityMode entityMode)

		this.type = type;
		this.value=value;
		this.entityMode = entityMode;
	
Methods Summary
public booleanequals(java.lang.Object other)

		if ( !(other instanceof TypedValue) ) return false;
		TypedValue that = (TypedValue) other;
		/*return that.type.equals(type) && 
			EqualsHelper.equals(that.value, value);*/
		return type.getReturnedClass() == that.type.getReturnedClass() &&
			type.isEqual(that.value, value, entityMode);
	
public org.hibernate.type.TypegetType()

		return type;
	
public java.lang.ObjectgetValue()

		return value;
	
public inthashCode()

		//int result = 17;
		//result = 37 * result + type.hashCode();
		//result = 37 * result + ( value==null ? 0 : value.hashCode() );
		//return result;
		return value==null ? 0 : type.getHashCode(value, entityMode);
	
public java.lang.StringtoString()

		return value==null ? "null" : value.toString();