Code example for IntegerType

Methods: sqlType

0
 
    @Override 
    public void nullSafeSet(final PreparedStatement st, final Object value, final int index, final SessionImplementor session) throws HibernateException {
        try { 
            if (value == null) { 
                st.setNull(index, type.sqlType());
            } else { 
                final Integer identifier = (Integer) identifierMethod.invoke(value, new Object[0]);
                type.set(st, identifier, index, session);
            } 
        } catch (final Exception e) {
            final StringBuilder stb = new StringBuilder("Exception while invoking identifierMethod '");
            stb.append(valueOfMethod.getName());
            stb.append("' of enumeration class '");
            stb.append(enumClass);
            stb.append('\'');
            throw new HibernateException(stb.toString(), e);
        } 
 
    } 
Experience pair programming with AI  Get Codota for Java