poolmancallablestatement.java

来自「Java Database connection pool」· Java 代码 · 共 180 行

JAVA
180
字号
/* *  PoolMan Java Object Pooling and Caching Library *  Copyright (C) 1999-2001 The Code Studio * *  This library is free software; you can redistribute it and/or *  modify it under the terms of the GNU Lesser General Public *  License as published by the Free Software Foundation; either *  version 2 of the License, or (at your option) any later version. * *  This library is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *  Lesser General Public License for more details. * *  The full license is located at the root of this distribution *  in the LICENSE file. */package com.codestudio.sql;// Code Studio Libraryimport com.codestudio.util.ObjectPool;import java.math.BigDecimal;import java.sql.Array;import java.sql.Blob;import java.sql.CallableStatement;import java.sql.Clob;import java.sql.Ref;import java.sql.SQLException;import java.sql.Time;import java.sql.Timestamp;import java.util.Calendar;import java.util.Map;/** * A CallableStatement that is aware of its Connection and resources. *<p> * It encapsulates a true driver-specific Statement that handles * all the necessary JDBC methods by delegation. */public class PoolManCallableStatement        extends PoolManPreparedStatement        implements CallableStatement {    private CallableStatement statement;    public PoolManCallableStatement(PoolManConnection pcon, CallableStatement s, ObjectPool p) {        super(pcon, s, p);        this.statement = s;    }    public CallableStatement getNativeCallableStatement() {        return this.statement;    }    public boolean execute() throws SQLException {        return this.statement.execute();    }    // JDBC 2.0    public Array getArray(int i) throws SQLException {        return this.statement.getArray(i);    }    public BigDecimal getBigDecimal(int i) throws SQLException {        return this.statement.getBigDecimal(i);    }    public BigDecimal getBigDecimal(int i, int scale) throws SQLException {        return this.statement.getBigDecimal(i, scale);    }    public Blob getBlob(int i) throws SQLException {        return this.statement.getBlob(i);    }    public boolean getBoolean(int i) throws SQLException {        return this.statement.getBoolean(i);    }    public byte getByte(int i) throws SQLException {        return this.statement.getByte(i);    }    public byte[] getBytes(int i) throws SQLException {        return this.statement.getBytes(i);    }    public Clob getClob(int i) throws SQLException {        return this.statement.getClob(i);    }    public java.sql.Date getDate(int i) throws SQLException {        return this.statement.getDate(i);    }    public java.sql.Date getDate(int i, Calendar cal) throws SQLException {        return this.statement.getDate(i, cal);    }    public double getDouble(int i) throws SQLException {        return this.statement.getDouble(i);    }    public float getFloat(int i) throws SQLException {        return this.statement.getFloat(i);    }    public int getInt(int i) throws SQLException {        return this.statement.getInt(i);    }    public long getLong(int i) throws SQLException {        return this.statement.getLong(i);    }    public Object getObject(int i) throws SQLException {        return this.statement.getObject(i);    }    public Object getObject(int i, Map map) throws SQLException {        return this.statement.getObject(i, map);    }    public Ref getRef(int i) throws SQLException {        return this.statement.getRef(i);    }    public short getShort(int i) throws SQLException {        return this.statement.getShort(i);    }    public String getString(int i) throws SQLException {        return this.statement.getString(i);    }    public Time getTime(int i) throws SQLException {        return this.statement.getTime(i);    }    public Time getTime(int i, Calendar cal) throws SQLException {        return this.statement.getTime(i, cal);    }    public Timestamp getTimestamp(int i) throws SQLException {        return this.statement.getTimestamp(i);    }    public Timestamp getTimestamp(int i, Calendar cal) throws SQLException {        return this.statement.getTimestamp(i, cal);    }    public void registerOutParameter(int i, int sqlType) throws SQLException {        this.statement.registerOutParameter(i, sqlType);    }    public void registerOutParameter(int i, int sqlType, int scale) throws SQLException {        this.statement.registerOutParameter(i, sqlType, scale);    }    public void registerOutParameter(int i, int sqlType, String typeName) throws SQLException {        this.statement.registerOutParameter(i, sqlType, typeName);    }    public boolean wasNull() throws SQLException {        return this.statement.wasNull();    }

    /* OBJECT MTHODS */

    public String toString() {        return "PoolManCallableStatement-[UnderlyingStatement:" + this.statement.toString() + "]";    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?