use of org.apache.cayenne.access.translator.ProcedureParameterBinding in project cayenne by apache.
the class ProcedureTranslator method setInParam.
/**
* Sets a single IN parameter of the CallableStatement.
*/
protected void setInParam(CallableStatement stmt, ProcedureParameter param, Object val, int pos) throws Exception {
ExtendedType extendedType = val != null ? adapter.getExtendedTypes().getRegisteredType(val.getClass()) : adapter.getExtendedTypes().getDefaultType();
ProcedureParameterBinding binding = new ProcedureParameterBinding(param);
binding.setStatementPosition(pos);
binding.setValue(val);
binding.setExtendedType(extendedType);
adapter.bindParameter(stmt, binding);
}
Aggregations