Example usage for org.hibernate.type StringRepresentableType fromStringValue

List of usage examples for org.hibernate.type StringRepresentableType fromStringValue

Introduction

In this page you can find the example usage for org.hibernate.type StringRepresentableType fromStringValue.

Prototype

T fromStringValue(String string) throws HibernateException;

Source Link

Document

Consume the given string representation back into this types java form.

Usage

From source file:org.riotfamily.common.hibernate.AnyIdAnyType.java

License:Apache License

private Serializable idFromString(String entityName, String id, SessionImplementor session) {

    if (id == null) {
        return null;
    }/* w  w  w .j ava  2 s.  c  om*/
    StringRepresentableType<Serializable> idType = getStringRepresentableIdType(entityName, session);
    return idType.fromStringValue(id);
}