Search in sources :

Example 1 with SingleColumnType

use of org.hibernate.type.SingleColumnType in project hibernate-orm by hibernate.

the class LiteralNode method getLiteralValue.

public Object getLiteralValue() {
    String text = getText();
    if (getType() == QUOTED_STRING) {
        text = text.substring(1, text.length() - 1);
    }
    final Type inherentType = getDataType();
    if (inherentType == null) {
        return text;
    }
    return ((SingleColumnType) inherentType).fromStringValue(text);
}
Also used : Type(org.hibernate.type.Type) SingleColumnType(org.hibernate.type.SingleColumnType) SingleColumnType(org.hibernate.type.SingleColumnType)

Aggregations

SingleColumnType (org.hibernate.type.SingleColumnType)1 Type (org.hibernate.type.Type)1