01: /*-------------------------------------------------------------------------
02: *
03: * Copyright (c) 2004-2005, PostgreSQL Global Development Group
04: *
05: * IDENTIFICATION
06: * $PostgreSQL: pgjdbc/org/postgresql/jdbc2/Jdbc2CallableStatement.java,v 1.14 2007/07/27 10:15:34 jurka Exp $
07: *
08: *-------------------------------------------------------------------------
09: */
10: package org.postgresql.jdbc2;
11:
12: import java.sql.*;
13: import java.util.Map;
14:
15: class Jdbc2CallableStatement extends Jdbc2PreparedStatement implements
16: CallableStatement {
17:
18: Jdbc2CallableStatement(Jdbc2Connection connection, String sql,
19: int rsType, int rsConcurrency) throws SQLException {
20: super (connection, sql, true, rsType, rsConcurrency);
21: if (!connection.haveMinimumServerVersion("8.1")
22: || connection.getProtocolVersion() == 2) {
23: // if there is no out parameter before the function determined by modifyJdbcCall then do not
24: // set adjustIndex to true
25: adjustIndex = outParmBeforeFunc;
26: }
27: }
28:
29: public void registerOutParameter(int parameterIndex, int sqlType)
30: throws SQLException {
31: registerOutParameter(parameterIndex, sqlType, !adjustIndex);
32: }
33:
34: public void registerOutParameter(int parameterIndex, int sqlType,
35: int scale) throws SQLException {
36: registerOutParameter(parameterIndex, sqlType);
37: }
38:
39: public Object getObject(int i, Map map) throws SQLException {
40: return getObjectImpl(i, map);
41: }
42: }
|