Example usage for org.hibernate.type AbstractStandardBasicType toString

List of usage examples for org.hibernate.type AbstractStandardBasicType toString

Introduction

In this page you can find the example usage for org.hibernate.type AbstractStandardBasicType toString.

Prototype

@Override
    public String toString(T value) 

Source Link

Usage

From source file:org.eclipse.emf.teneo.hibernate.mapping.econtainer.EContainerUserType.java

License:Open Source License

/** Creates an id string from a serializable object */
private String createIDString(Type type, Serializable id) {
    if (type instanceof AbstractStandardBasicType) {
        @SuppressWarnings("unchecked")
        final AbstractStandardBasicType<Object> ntype = (AbstractStandardBasicType<Object>) type;
        return ntype.toString(id);
    }/*from   w  ww .j  a v  a 2  s.  c  om*/

    return id.getClass().getName() + ENCODING_SEPARATOR + id.toString();
}

From source file:org.eclipse.emf.teneo.hibernate.mapping.identifier.IdentifierUtil.java

License:Open Source License

/** Creates an id string from a serializable object */
private static String createIDString(Type type, Serializable id) {
    if (type instanceof AbstractStandardBasicType) {
        @SuppressWarnings("unchecked")
        final AbstractStandardBasicType<Object> ntype = (AbstractStandardBasicType<Object>) type;
        return ntype.toString(id);
    }/*from  w  w w.  j ava  2 s  .c  o m*/

    return id.getClass().getName() + ENCODING_SEPARATOR + id.toString();
}