01: //$Id: ImmutableType.java 5744 2005-02-16 12:50:19Z oneovthafew $
02: package org.hibernate.type;
03:
04: import java.util.Map;
05:
06: import org.hibernate.EntityMode;
07: import org.hibernate.HibernateException;
08: import org.hibernate.engine.SessionFactoryImplementor;
09: import org.hibernate.engine.SessionImplementor;
10:
11: /**
12: * Superclass of nullable immutable types.
13: * @author Gavin King
14: */
15: public abstract class ImmutableType extends NullableType {
16:
17: public final Object deepCopy(Object value, EntityMode entityMode,
18: SessionFactoryImplementor factory) {
19: return value;
20: }
21:
22: public final boolean isMutable() {
23: return false;
24: }
25:
26: public Object replace(Object original, Object target,
27: SessionImplementor session, Object owner, Map copyCache)
28: throws HibernateException {
29: return original;
30: }
31:
32: }
|