class NullableIntArrayTypeHandler implements TypeHandler<int[]> {
    @Override
    public void setParameter(PreparedStatement preparedStatement, int i, int[] param, JdbcType jdbcType) throws SQLException {
        if (null == param) {
            preparedStatement.setNull(i, jdbcType.TYPE_CODE);
        } else {
            preparedStatement.setString(i, Arrays.stream(param).mapToObj(Integer::toString).collect(Collectors.joining(",")));
        }
    }

    @Override
    public int[] getResult(ResultSet resultSet, String s) throws SQLException {
        return parseString(resultSet.getString(s));
    }

    @Override
    public int[] getResult(ResultSet resultSet, int i) throws SQLException {
        return parseString(resultSet.getString(i));
    }

    @Override
    public int[] getResult(CallableStatement callableStatement, int i) throws SQLException {
        return parseString(callableStatement.getString(i));
    }

    private int[] parseString(String ret) {<FILL_FUNCTION_BODY>}
}

        if (ret == null) return null;
        try {
            return Arrays.stream(ret.split(",", 0)).mapToInt(Integer::valueOf).toArray();
        } catch (NumberFormatException e) {
            return new int[0];
        }
    
<no_super_class>