com.aceql.jdbc.commons.main.batch.PrepStatementParamsHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aceql-http-client-jdbc-driver Show documentation
Show all versions of aceql-http-client-jdbc-driver Show documentation
The AceQL Java Client JDBC Driver allows to wrap the AceQL HTTP APIs and eliminates the tedious works of handling communications errors and parsing JSON results.
Android and Java Desktop application developers can access remote SQL databases and/or SQL databases in the cloud by simply including standard JDBC calls in their code, just like they would for a local database.
The newest version!
/**
*
*/
package com.aceql.jdbc.commons.main.batch;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author Nicolas de Pomereu
*
*/
public class PrepStatementParamsHolder {
/** All the PreparedStatement parameters and their values */
private Map statementParameters = new LinkedHashMap<>();
public PrepStatementParamsHolder(Map statementParameters) {
this.statementParameters = statementParameters;
}
/**
* @return the statementParameters
*/
public Map getStatementParameters() {
return statementParameters;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((statementParameters == null) ? 0 : statementParameters.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
PrepStatementParamsHolder other = (PrepStatementParamsHolder) obj;
if (statementParameters == null) {
if (other.statementParameters != null)
return false;
} else if (!statementParameters.equals(other.statementParameters))
return false;
return true;
}
@Override
public String toString() {
return "PrepStatementParamsHolder [statementParameters=" + statementParameters + "]";
}
}