⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 callablestatement.java

📁 derby database source code.good for you.
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
                result = agent_.crossConverters_.getShortFromInt(returnValueFromProcedure_);                this.wasNull_ = this.WAS_NOT_NULL;                if (agent_.loggingEnabled()) {                    agent_.logWriter_.traceExit(this, "getShort", result);                }                return result;            }            checkGetterPreconditions(parameterIndex);            setWasNull(parameterIndex);            result = wasNullX() ? 0 : singletonRowData_.getShort(parameterIndex);            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getShort", result);            }            return result;        }    }    public int getInt(int parameterIndex) throws SqlException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceEntry(this, "getInt", parameterIndex);            }            int result = getIntX(parameterIndex);            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getInt", result);            }            return result;        }    }    // also used by SQLCA    int getIntX(int parameterIndex) throws SqlException {        super.checkForClosedStatement();        parameterIndex = checkForEscapedCallWithResult(parameterIndex);        if (parameterIndex == 0 && escapedProcedureCallWithResult_) {            this.wasNull_ = this.WAS_NOT_NULL;            return returnValueFromProcedure_;        }        checkGetterPreconditions(parameterIndex);        setWasNull(parameterIndex);        return wasNullX() ? 0 : singletonRowData_.getInt(parameterIndex);    }    public long getLong(int parameterIndex) throws SqlException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceEntry(this, "getLong", parameterIndex);            }            super.checkForClosedStatement();            parameterIndex = checkForEscapedCallWithResult(parameterIndex);            long result;            if (parameterIndex == 0 && escapedProcedureCallWithResult_) {                result = (long) returnValueFromProcedure_;                this.wasNull_ = this.WAS_NOT_NULL;                if (agent_.loggingEnabled()) {                    agent_.logWriter_.traceExit(this, "getLong", result);                }                return result;            }            checkGetterPreconditions(parameterIndex);            setWasNull(parameterIndex);            result = wasNullX() ? 0 : singletonRowData_.getLong(parameterIndex);            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getLong", result);            }            return result;        }    }    public float getFloat(int parameterIndex) throws SqlException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceEntry(this, "getFloat", parameterIndex);            }            super.checkForClosedStatement();            parameterIndex = checkForEscapedCallWithResult(parameterIndex);            float result;            if (parameterIndex == 0 && escapedProcedureCallWithResult_) {                result = (float) returnValueFromProcedure_;                this.wasNull_ = this.WAS_NOT_NULL;                if (agent_.loggingEnabled()) {                    agent_.logWriter_.traceExit(this, "getFloat", result);                }                return result;            }            checkGetterPreconditions(parameterIndex);            setWasNull(parameterIndex);            result = wasNullX() ? 0 : singletonRowData_.getFloat(parameterIndex);            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getFloat", result);            }            return result;        }    }    public double getDouble(int parameterIndex) throws SqlException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceEntry(this, "getDouble", parameterIndex);            }            super.checkForClosedStatement();            parameterIndex = checkForEscapedCallWithResult(parameterIndex);            double result;            if (parameterIndex == 0 && escapedProcedureCallWithResult_) {                result = (double) returnValueFromProcedure_;                this.wasNull_ = this.WAS_NOT_NULL;                if (agent_.loggingEnabled()) {                    agent_.logWriter_.traceExit(this, "getDouble", result);                }                return result;            }            checkGetterPreconditions(parameterIndex);            setWasNull(parameterIndex);            result = wasNullX() ? 0 : singletonRowData_.getDouble(parameterIndex);            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getDouble", result);            }            return result;        }    }    public java.math.BigDecimal getBigDecimal(int parameterIndex, int scale) throws SqlException, ArithmeticException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceDeprecatedEntry(this, "getBigDecimal", parameterIndex, scale);            }            super.checkForClosedStatement();            checkForValidScale(scale);            parameterIndex = checkForEscapedCallWithResult(parameterIndex);            java.math.BigDecimal result;            if (parameterIndex == 0 && escapedProcedureCallWithResult_) {                result = java.math.BigDecimal.valueOf(returnValueFromProcedure_).setScale(scale);                this.wasNull_ = this.WAS_NOT_NULL;                if (agent_.loggingEnabled()) {                    agent_.logWriter_.traceDeprecatedExit(this, "getBigDecimal", result);                }                return result;            }            checkGetterPreconditions(parameterIndex);            setWasNull(parameterIndex);            result = wasNullX() ? null : singletonRowData_.getBigDecimal(parameterIndex);            if (result != null) {                result = result.setScale(scale, java.math.BigDecimal.ROUND_DOWN);            }            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceDeprecatedExit(this, "getBigDecimal", result);            }            return result;        }    }    public java.math.BigDecimal getBigDecimal(int parameterIndex) throws SqlException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceEntry(this, "getBigDecimal", parameterIndex);            }            super.checkForClosedStatement();            parameterIndex = checkForEscapedCallWithResult(parameterIndex);            java.math.BigDecimal result;            if (parameterIndex == 0 && escapedProcedureCallWithResult_) {                result = java.math.BigDecimal.valueOf(returnValueFromProcedure_);                this.wasNull_ = this.WAS_NOT_NULL;                if (agent_.loggingEnabled()) {                    agent_.logWriter_.traceExit(this, "getBigDecimal", result);                }                return result;            }            checkGetterPreconditions(parameterIndex);            setWasNull(parameterIndex);            result = wasNullX() ? null : singletonRowData_.getBigDecimal(parameterIndex);            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getBigDecimal", result);            }            return result;        }    }    public java.sql.Date getDate(int parameterIndex) throws SqlException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceEntry(this, "getDate", parameterIndex);            }            super.checkForClosedStatement();            parameterIndex = checkForEscapedCallWithResult(parameterIndex);            if (parameterIndex == 0 && escapedProcedureCallWithResult_) {                throw new SqlException(agent_.logWriter_, "Invalid method call: parameter 1 is an integer OUT parameter returned by the stored procedure, use getInt call.");            }            checkGetterPreconditions(parameterIndex);            setWasNull(parameterIndex);            java.sql.Date result = wasNullX() ? null : singletonRowData_.getDate(parameterIndex);            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getDate", result);            }            return result;        }    }    public java.sql.Date getDate(int parameterIndex, java.util.Calendar cal) throws SqlException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceEntry(this, "getDate", parameterIndex, cal);            }            if (cal == null) {                throw new SqlException(agent_.logWriter_, "Invalid parameter: calendar is null");            }            java.sql.Date result = getDate(parameterIndex);            if (result != null) {                java.util.Calendar targetCalendar = java.util.Calendar.getInstance(cal.getTimeZone());                targetCalendar.clear();                targetCalendar.setTime(result);                java.util.Calendar defaultCalendar = java.util.Calendar.getInstance();                defaultCalendar.clear();                defaultCalendar.setTime(result);                long timeZoneOffset =                        targetCalendar.get(java.util.Calendar.ZONE_OFFSET) - defaultCalendar.get(java.util.Calendar.ZONE_OFFSET) +                        targetCalendar.get(java.util.Calendar.DST_OFFSET) - defaultCalendar.get(java.util.Calendar.DST_OFFSET);                result.setTime(result.getTime() - timeZoneOffset);            }            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getDate", result);            }            return result;        }    }    public java.sql.Time getTime(int parameterIndex) throws SqlException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceEntry(this, "getTime", parameterIndex);            }            super.checkForClosedStatement();            parameterIndex = checkForEscapedCallWithResult(parameterIndex);            if (parameterIndex == 0 && escapedProcedureCallWithResult_) {                throw new SqlException(agent_.logWriter_, "Invalid method call: parameter 1 is an integer OUT parameter returned by the stored procedure, use getInt call.");            }            checkGetterPreconditions(parameterIndex);            setWasNull(parameterIndex);            java.sql.Time result = wasNullX() ? null : singletonRowData_.getTime(parameterIndex);            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getTime", result);            }            return result;        }    }    public java.sql.Time getTime(int parameterIndex, java.util.Calendar cal) throws SqlException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceEntry(this, "getTime", parameterIndex, cal);            }            if (cal == null) {                throw new SqlException(agent_.logWriter_, "Invalid parameter: calendar is null");            }            java.sql.Time result = getTime(parameterIndex);            if (result != null) {                java.util.Calendar targetCalendar = java.util.Calendar.getInstance(cal.getTimeZone());                targetCalendar.clear();                targetCalendar.setTime(result);                java.util.Calendar defaultCalendar = java.util.Calendar.getInstance();                defaultCalendar.clear();                defaultCalendar.setTime(result);                long timeZoneOffset =                        targetCalendar.get(java.util.Calendar.ZONE_OFFSET) - defaultCalendar.get(java.util.Calendar.ZONE_OFFSET) +                        targetCalendar.get(java.util.Calendar.DST_OFFSET) - defaultCalendar.get(java.util.Calendar.DST_OFFSET);                result.setTime(result.getTime() - timeZoneOffset);            }            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getTime", result);            }            return result;        }    }    public java.sql.Timestamp getTimestamp(int parameterIndex) throws SqlException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceEntry(this, "getTimestamp", parameterIndex);            }            super.checkForClosedStatement();            parameterIndex = checkForEscapedCallWithResult(parameterIndex);            if (parameterIndex == 0 && escapedProcedureCallWithResult_) {                throw new SqlException(agent_.logWriter_, "Invalid method call: parameter 1 is an integer OUT parameter returned by the stored procedure, use getInt call.");            }            checkGetterPreconditions(parameterIndex);            setWasNull(parameterIndex);            java.sql.Timestamp result = wasNullX() ? null : singletonRowData_.getTimestamp(parameterIndex);            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getTimestamp", result);            }            return result;        }    }    public java.sql.Timestamp getTimestamp(int parameterIndex, java.util.Calendar cal) throws SqlException {        synchronized (connection_) {            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceEntry(this, "getTimestamp", parameterIndex, cal);            }            if (cal == null) {                throw new SqlException(agent_.logWriter_, "Invalid parameter: calendar is null");            }            java.sql.Timestamp result = getTimestamp(parameterIndex);            if (result != null) {                int nano = result.getNanos();                java.util.Calendar targetCalendar = java.util.Calendar.getInstance(cal.getTimeZone());                targetCalendar.clear();                targetCalendar.setTime(result);                java.util.Calendar defaultCalendar = java.util.Calendar.getInstance();                defaultCalendar.clear();                defaultCalendar.setTime(result);                long timeZoneOffset =                        targetCalendar.get(java.util.Calendar.ZONE_OFFSET) - defaultCalendar.get(java.util.Calendar.ZONE_OFFSET) +                        targetCalendar.get(java.util.Calendar.DST_OFFSET) - defaultCalendar.get(java.util.Calendar.DST_OFFSET);                result.setTime(result.getTime() - timeZoneOffset);                result.setNanos(nano);            }            if (agent_.loggingEnabled()) {                agent_.logWriter_.traceExit(this, "getTimestamp", result);            }            return result;

⌨️ 快捷键说明

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