Example usage for org.hibernate.usertype UserType returnedClass

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

Introduction

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

Prototype

Class returnedClass();

Source Link

Document

The class returned by nullSafeGet().

Usage

From source file:net.derquinse.common.orm.hib.Configurations.java

License:Apache License

private static void registerTypes(Configuration configuration, UserType... types) {
    for (UserType type : types) {
        String name = type.returnedClass().getName();
        configuration.registerTypeOverride(type, new String[] { name });
    }/* w  w  w .  j av  a  2  s  . c om*/
}

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

License:Open Source License

@Test
public void shouldReturnConfiguredReturnedClass() {
    UserType ut = this.newUserTypeInstance();
    assertEquals(ut.returnedClass(), this.getValueClazz());
}

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

License:Open Source License

@Test
public void shouldSerializeWithoutComplaint() {
    UserType ut1 = this.newUserTypeInstance();
    UserType ut2 = (UserType) SerializationUtils.deserialize(SerializationUtils.serialize((Serializable) ut1));
    assertEquals(ut2.returnedClass(), ut1.returnedClass());
}

From source file:org.jadira.usertype.spi.shared.AbstractUserTypeHibernateIntegrator.java

License:Apache License

private void registerType(Configuration configuration, UserType type) {
    String className = type.returnedClass().getName();
    configuration.registerTypeOverride(type, new String[] { className });
}

From source file:org.jadira.usertype.spi.shared.AbstractUserTypeHibernateIntegrator.java

License:Apache License

private void registerType(MetadataImplementor mi, UserType type) {
    String className = type.returnedClass().getName();
    mi.getTypeResolver().registerTypeOverride(type, new String[] { className });
}