/** * @param <T> * @param stmt * @param path * @param i * @param value * @throws SQLException */ @SuppressWarnings({ "unchecked", "rawtypes" }) public <T> void set(PreparedStatement stmt, Path<?> path, int i, T value) throws SQLException { if (Null.class.isInstance(value)) { Integer sqlType = path != null ? ColumnMetadata.getColumnMetadata(path).getJdbcType() : null; if (sqlType != null) { stmt.setNull(i, sqlType); } else { stmt.setNull(i, Types.NULL); } } else { getType(path, (Class)value.getClass()).setValue(stmt, i, value); } }