Example usage for org.hibernate.usertype UserType disassemble

List of usage examples for org.hibernate.usertype UserType disassemble

Introduction

In this page you can find the example usage for org.hibernate.usertype UserType disassemble.

Prototype

Serializable disassemble(Object value) throws HibernateException;

Source Link

Document

Transform the object into its cacheable representation.

Usage

From source file:org.codekaizen.vtj.hibernate3.AbstractValueTypeUserTypeTest.java

License:Open Source License

@Test
public void givenVTObjectWhenDisassembleThenReturnSameObject() {
    UserType ut = this.newUserTypeInstance();
    ValueType<?> vt1 = this.getDefaultTestInstance();
    ValueType<?> vt2 = (ValueType<?>) ut.disassemble(vt1);
    assertEquals(vt2, vt1);/*w  ww.  j a v  a 2 s  .co m*/
    assertTrue(vt1 == vt2);
}

From source file:org.codekaizen.vtj.hibernate3.AbstractValueTypeUserTypeTest.java

License:Open Source License

@Test
public void givenNullWhenDisassembleThenReturnNull() {
    UserType ut = this.newUserTypeInstance();
    assertNull(ut.disassemble(null));
}