/** * INTERNAL: * Return 1-based index of out cursor parameter, or -1. */ public int getCursorOutIndex() { for (int i = 0; i < getParameters().size(); i++) { Object parameter = getParameters().elementAt(i); if (parameter instanceof OutputParameterForCallableStatement) { if (((OutputParameterForCallableStatement)parameter).isCursor()) { return i + 1; } } } return -1; }
/** * INTERNAL: */ public void appendOut(DatabaseField outField) { getParameters().add(outField); getParameterTypes().add(OUT); }
/** * INTERNAL: */ public void appendInOut(Object inValueOrField, DatabaseField outField) { Object[] inOut = { inValueOrField, outField }; getParameters().add(inOut); getParameterTypes().add(INOUT); }
/** * INTERNAL: */ public void appendInOut(Object inValueOrField, DatabaseField outField) { Object[] inOut = { inValueOrField, outField }; getParameters().add(inOut); getParameterTypes().add(INOUT); }
/** * INTERNAL: */ public void appendOut(DatabaseField outField) { getParameters().add(outField); getParameterTypes().add(OUT); }
/** * INTERNAL: */ public void appendInOut(DatabaseField inoutField) { Object[] inOut = { inoutField, inoutField }; getParameters().add(inOut); getParameterTypes().add(INOUT); }
/** * INTERNAL: */ public void appendIn(Object inObject) { getParameters().add(inObject); getParameterTypes().add(IN); }
/** * INTERNAL: */ public void appendInOut(DatabaseField inoutField) { Object[] inOut = { inoutField, inoutField }; getParameters().add(inOut); getParameterTypes().add(INOUT); }
/** * INTERNAL: */ public void appendInOut(Object inValueOrField, DatabaseField outField) { Object[] inOut = { inValueOrField, outField }; getParameters().add(inOut); getParameterTypes().add(INOUT); }
/** * INTERNAL: */ public void appendIn(Object inObject) { getParameters().add(inObject); getParameterTypes().add(IN); }
/** * INTERNAL: */ public void appendOut(DatabaseField outField) { getParameters().add(outField); getParameterTypes().add(OUT); }
/** * INTERNAL: */ public void appendOutCursor(DatabaseField outField) { getParameters().add(outField); getParameterTypes().add(OUT_CURSOR); }
/** * INTERNAL: */ public void appendIn(Object inObject) { getParameters().add(inObject); getParameterTypes().add(IN); }
/** * INTERNAL: */ public void appendInOut(DatabaseField inoutField) { Object[] inOut = { inoutField, inoutField }; getParameters().add(inOut); getParameterTypes().add(INOUT); }
/** * INTERNAL: */ public void appendOutCursor(DatabaseField outField) { getParameters().add(outField); getParameterTypes().add(OUT_CURSOR); getOutputCursors().add(outField); }
/** * INTERNAL: */ public void appendOutCursor(DatabaseField outField) { getParameters().add(outField); getParameterTypes().add(OUT_CURSOR); getOutputCursors().add(outField); }
@SuppressWarnings("unchecked") // Bug #453208 - Duplicate call parameters since the query is performed twice private void duplicateCallParameters(DatabaseCall call) { ArrayList newParameterList = new ArrayList(call.getParameters()); newParameterList.addAll(call.getParameters()); call.setParameters(newParameterList); ArrayList<Integer> newParameterTypesList = new ArrayList(call.getParameterTypes()); newParameterTypesList.addAll(call.getParameterTypes()); call.setParameterTypes(newParameterTypesList); }
/** * Bind the parameter. Binding is determined by the call and second the platform. */ public void bindParameter(Writer writer, Object parameter) { if (parameter instanceof Collection) { throw QueryException.inCannotBeParameterized(getQuery()); } try { writer.write("?"); } catch (IOException exception) { throw ValidationException.fileError(exception); } getParameters().add(parameter); }
/** * Bind the parameter. Binding is determined by the call and second the platform. */ public void bindParameter(Writer writer, Object parameter) { if (parameter instanceof Collection) { throw QueryException.inCannotBeParameterized(getQuery()); } try { writer.write("?"); } catch (IOException exception) { throw ValidationException.fileError(exception); } getParameters().addElement(parameter); }
/** * Bind the parameter. Binding is determined by the call and second the platform. */ public void bindParameter(Writer writer, Object parameter) { if (parameter instanceof Collection) { throw QueryException.inCannotBeParameterized(getQuery()); } try { writer.write("?"); } catch (IOException exception) { throw ValidationException.fileError(exception); } getParameters().add(parameter); }