@Override public Object nullSafeGet(final ResultSet rs, final String[] names, final SessionImplementor session, final Object owner) throws HibernateException, SQLException { final Object identifier = type.get(rs, names[0], session); if (identifier == null) { return null; } try { return valueOfMethod.invoke(enumClass, new Object[] { identifier }); } catch (final Exception e) { final StringBuilder stb = new StringBuilder("Exception while invoking valueOf method '"); stb.append(valueOfMethod.getName()); stb.append("' of enumeration class '"); stb.append(enumClass); stb.append('\''); throw new HibernateException(stb.toString(), e); } }
@Override public Object nullSafeGet(final ResultSet rs, final String[] names, final SessionImplementor session, final Object owner) throws HibernateException, SQLException { final Object identifier = type.get(rs, names[0], session); if (identifier == null) { return null; } try { return valueOfMethod.invoke(enumClass, new Object[] { identifier }); } catch (final Exception e) { final StringBuilder stb = new StringBuilder("Exception while invoking valueOf method '"); stb.append(valueOfMethod.getName()); stb.append("' of enumeration class '"); stb.append(enumClass); stb.append('\''); throw new HibernateException(stb.toString(), e); } }
@Override public Object nullSafeGet(final ResultSet rs, final String[] names, final Object owner) throws SQLException { final Object identifier = type.get(rs, names[0]); if (identifier == null) { return null; } try { return valueOfMethod.invoke(enumClass, new Object[] { identifier }); } catch (final Exception e) { final String message = ExceptionManager.getInstance().getFullMessage("bh_GEUT_5", valueOfMethod.getName(), enumClass); throw new HibernateException(message, e); } }