com.jn.sqlhelper.springjdbc.statement.PreparedStatementSetterAdapter Maven / Gradle / Ivy
The newest version!
package com.jn.sqlhelper.springjdbc.statement;
import org.springframework.jdbc.core.PreparedStatementSetter;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public class PreparedStatementSetterAdapter implements PreparedStatementSetter {
private com.jn.sqlhelper.common.statement.PreparedStatementSetter
delegate;
private P parameters;
public PreparedStatementSetterAdapter(com.jn.sqlhelper.common.statement.PreparedStatementSetter
delegate, P parameters) {
this.delegate = delegate;
this.parameters = parameters;
}
@Override
public void setValues(PreparedStatement ps) throws SQLException {
delegate.setParameters(ps, 1, parameters);
}
}