Code example for NullableType

Methods: get

0
    } 
 
    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);
        }