public void setPreparedFilterValues(
PreparedStatement ps, PreparedFilterToSQL toSQL, int offset, Connection cx)
throws SQLException {
PreparedStatementSQLDialect dialect = (PreparedStatementSQLDialect) getSQLDialect();
for (int i = 0; i < toSQL.getLiteralValues().size(); i++) {
Object value = toSQL.getLiteralValues().get(i);
Class binding = toSQL.getLiteralTypes().get(i);
Integer srid = toSQL.getSRIDs().get(i);
Integer dimension = toSQL.getDimensions().get(i);
AttributeDescriptor ad = toSQL.getDescriptors().get(i);
if (srid == null) {
srid = -1;
}
if (dimension == null) {
dimension = 2;
}
if (binding != null && Geometry.class.isAssignableFrom(binding)) {
dialect.setGeometryValue(
(Geometry) value, dimension, srid, binding, ps, offset + i + 1);
} else if (ad != null && isArray(ad)) {
dialect.setArrayValue(value, ad, ps, offset + i + 1, cx);
} else {
dialect.setValue(value, binding, ps, offset + i + 1, cx);
}
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine((i + 1) + " = " + value);
}
}
}