List of usage examples for org.hibernate.usertype UserType deepCopy
Object deepCopy(Object value) throws HibernateException;
From source file:org.codekaizen.vtj.hibernate3.AbstractValueTypeUserTypeTest.java
License:Open Source License
@Test public void givenVTObjectWhenDeepCopyThenReturnSameObject() { UserType ut = this.newUserTypeInstance(); ValueType<?> vt1 = this.getDefaultTestInstance(); ValueType<?> vt2 = (ValueType<?>) ut.deepCopy(vt1); assertEquals(vt2, vt1);//w ww. ja v a 2 s . c om assertTrue(vt1 == vt2); }
From source file:org.codekaizen.vtj.hibernate3.AbstractValueTypeUserTypeTest.java
License:Open Source License
@Test public void givenNullWhenDeepCopyThenReturnNull() { UserType ut = this.newUserTypeInstance(); assertNull(ut.deepCopy(null)); }