Code example for NullableType

Methods: get

0
    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 { 
Experience pair programming with AI  Get Codota for Java