@Override public void setValues(PreparedStatement ps) throws SQLException { int parameterPosition = 1; if (this.args != null && this.argTypes != null) { for (int i = 0; i < this.args.length; i++) { Object arg = this.args[i]; if (arg instanceof Collection && this.argTypes[i] != Types.ARRAY) { Collection<?> entries = (Collection<?>) arg; for (Object entry : entries) { if (entry instanceof Object[]) { Object[] valueArray = ((Object[]) entry); for (Object argValue : valueArray) { doSetValue(ps, parameterPosition, this.argTypes[i], argValue); parameterPosition++; } } else { doSetValue(ps, parameterPosition, this.argTypes[i], entry); parameterPosition++; } } } else { doSetValue(ps, parameterPosition, this.argTypes[i], arg); parameterPosition++; } } } }
@Override public void setValues(PreparedStatement ps) throws SQLException { int parameterPosition = 1; if (this.args != null && this.argTypes != null) { for (int i = 0; i < this.args.length; i++) { Object arg = this.args[i]; if (arg instanceof Collection && this.argTypes[i] != Types.ARRAY) { Collection<?> entries = (Collection<?>) arg; for (Object entry : entries) { if (entry instanceof Object[]) { Object[] valueArray = ((Object[]) entry); for (Object argValue : valueArray) { doSetValue(ps, parameterPosition, this.argTypes[i], argValue); parameterPosition++; } } else { doSetValue(ps, parameterPosition, this.argTypes[i], entry); parameterPosition++; } } } else { doSetValue(ps, parameterPosition, this.argTypes[i], arg); parameterPosition++; } } } }