@Override public int[] executeBatch() throws SQLException { return executeBatch(batchParameters); }
public ResultSet executeQuery() throws SQLException { ResultSet resultSet = executeQuery(getParameterMap()); lastOutParameters = getOutParameterMap(); return resultSet; }
public int executeUpdate() throws SQLException { int updateCount = executeUpdate(getParameterMap()); lastOutParameters = getOutParameterMap(); return updateCount; }
public String getString(int parameterIndex) throws SQLException { Object value = getObject(parameterIndex); if(null != value) return value.toString(); return null; }
private Map getOutParameterMap() { Map outParameter = resultSetHandler.getOutParameter(getSQL(), getParameterMap()); if(null == outParameter) { outParameter = resultSetHandler.getOutParameter(getSQL()); } if(null == outParameter) { outParameter = resultSetHandler.getGlobalOutParameter(); } if(resultSetHandler.getMustRegisterOutParameters()) { return filterNotRegisteredParameters(outParameter); } return outParameter; }
public NClob getNClob(String parameterName) throws SQLException { Object value = getObject(parameterName); if(null != value) { if(value instanceof NClob) return (NClob)value; if(value instanceof Clob) return getNClobFromClob((Clob)value); return new MockNClob(getString(parameterName)); } return null; }
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { MockCallableStatement statement = new MockCallableStatement(this, sql, resultSetType, resultSetConcurrency, resultSetHoldability); getCallableStatementResultSetHandler().addCallableStatement(statement); return statement; }
public Reader getNCharacterStream(String parameterName) throws SQLException { return getCharacterStream(parameterName); }
public Date getDate(int parameterIndex, Calendar calendar) throws SQLException { return getDate(parameterIndex); }
public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException { return getBigDecimal(parameterIndex); }
public String getString(String parameterName) throws SQLException { Object value = getObject(parameterName); if(null != value) return value.toString(); return null; }
private MockParameterMap getOutParameterMap() { MockParameterMap outParameter = resultSetHandler.getOutParameter(getSQL(), getParameterMap()); if(null == outParameter) { outParameter = resultSetHandler.getOutParameter(getSQL()); } if(null == outParameter) { outParameter = resultSetHandler.getGlobalOutParameter(); } if(resultSetHandler.getMustRegisterOutParameters()) { return filterNotRegisteredParameters(outParameter); } return outParameter; }
public CallableStatement prepareCall(String sql) throws SQLException { MockCallableStatement statement = new MockCallableStatement(this, sql); getCallableStatementResultSetHandler().addCallableStatement(statement); return statement; }
public Reader getNCharacterStream(int parameterIndex) throws SQLException { return getCharacterStream(parameterIndex); }
public Date getDate(String parameterName, Calendar calendar) throws SQLException { return getDate(parameterName); }
public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException { return getBigDecimal(parameterIndex); }