/** * INTERNAL * Used by SQLCall.prepareStatement(..) * Note that parameterIndex corresponds to parameters vector and * index corresponds to statement: * statement.setObject(parameterIndex + 1, parameters.elementAt(parameterIndex)) * Therefore parameterIndex may be 0. */ public void setParameterValueInDatabaseCall(Vector parameters, PreparedStatement statement, int parameterIndex, AbstractSession session) throws SQLException { setParameterValueInDatabaseCall(parameters, statement, parameterIndex, parameterIndex + 1, session); }
public void set(DatabasePlatform platform, PreparedStatement statement, int index, AbstractSession session) throws SQLException { platform.setParameterValueInDatabaseCall(obj, statement, index, session); }
/** * INTERNAL * Used by StoredProcedureCall.prepareStatement(..) * Note that parameterIndex corresponds to parameters vector and * index corresponds to statement: * statement.setObject(index, parameters.elementAt(parameterIndex)) * Therefore parameterIndex may be 0, but index > 0. */ public void setParameterValueInDatabaseCall(Vector parameters, PreparedStatement statement, int parameterIndex, int index, AbstractSession session) throws SQLException { setParameterValueInDatabaseCall(parameters.elementAt(parameterIndex), statement, index, session); }
public void set(DatabasePlatform platform, PreparedStatement statement, int index, AbstractSession session) throws SQLException { platform.setParameterValueInDatabaseCall(inParameter, statement, index, session); super.set(platform, statement, index, session); }
/** * INTERNAL: * Prepare the JDBC statement, this may be parameterize or a call statement. * If caching statements this must check for the pre-prepared statement and re-bind to it. */ public Statement prepareStatement(DatabaseAccessor accessor, AbstractRecord translationRow, AbstractSession session) throws SQLException { Statement statement = accessor.prepareStatement(this, session); if (getMaxRows() > 0) { statement.setMaxRows(getMaxRows()); } if (!hasParameters()) { return statement; } for (int index = 0; index < getParameters().size(); index++) { session.getPlatform().setParameterValueInDatabaseCall(this.getParameters(), (PreparedStatement)statement, index, session); } return statement; }