List of usage examples for org.hibernate.usertype UserType assemble
Object assemble(Serializable cached, Object owner) throws HibernateException;
From source file:org.codekaizen.vtj.hibernate3.AbstractValueTypeUserTypeTest.java
License:Open Source License
@Test public void givenVTObjectWhenAssembleThenReturnSameObject() { UserType ut = this.newUserTypeInstance(); ValueType<?> vt1 = this.getDefaultTestInstance(); TestEntity entity = this.newTestEntity(); ValueType<?> vt2 = (ValueType<?>) ut.assemble(vt1, entity); assertEquals(vt2, vt1);/*from www.j a va 2 s . c om*/ assertTrue(vt1 == vt2); }
From source file:org.codekaizen.vtj.hibernate3.AbstractValueTypeUserTypeTest.java
License:Open Source License
@Test public void givenNullWhenAssembleThenReturnNull() { UserType ut = this.newUserTypeInstance(); TestEntity entity = this.newTestEntity(); assertNull(ut.assemble(null, entity)); }