Hibernate ORM NullableType - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM NullableType class.

This code example shows how to use the following methods:get
    public Class returnedClass() {
        return enumClass;
    } 
 
    public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
        Object identifier = type.get(rs, names[0]);
        if (rs.wasNull()) {
            return null; 
        } 
 
        try { 
            return valueOfMethod.invoke(enumClass, new Object[]{identifier});
        } catch (Exception e) {
            throw new HibernateException("Exception while invoking valueOf method '" + valueOfMethod.getName() + "' of " +
                    "enumeration class '" + enumClass + "'", e);
        } 
    } 
 
    public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
        try { 
3
CodeRank
This code example shows how to use the following methods:get
    } 
 
    public Object nullSafeGet(ResultSet rs, String[] names, Object owner)
        throws HibernateException, SQLException
    { 
        Object identifier = type.get(rs, names[0]);
        if (rs.wasNull())
        { 
            return null; 
        } 
 
        try 
        { 
            return valueOfMethod.invoke(enumClass, new Object[] {identifier});
        } 
        catch (Exception e)
        { 
            throw new HibernateException("Exception while invoking valueOf method '"
                + valueOfMethod.getName() + "' of " + "enumeration class '" + enumClass + "'", e);
        } 
3
CodeRank
See Code Examples for Hibernate ORM NullableType Methods: