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

📄 callablestatementresultset.java

📁 本套系统采用了业界当前最为流行的beanAction组件
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/*
 *  Copyright 2004 Clinton Begin
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.ibatis.sqlmap.engine.type;

import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.*;
import java.util.Calendar;
import java.util.Map;

/**
 * A way to make a CallableStatement look like a ResultSet 
 */
public class CallableStatementResultSet implements ResultSet {

  private CallableStatement cs;

  /**
   * Constructor to stretch a ResultSet interface over a CallableStatement
   *  
   * @param cs - the CallableStatement
   */
  public CallableStatementResultSet(CallableStatement cs) {
    this.cs = cs;
  }

  public boolean absolute(int row) throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public void afterLast() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public void beforeFirst() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public void cancelRowUpdates() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public void clearWarnings() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public void close() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public void deleteRow() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public int findColumn(String columnName) throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public boolean first() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public Array getArray(String colName) throws SQLException {
    return cs.getArray(colName);
  }

  public Array getArray(int i) throws SQLException {
    return cs.getArray(i);
  }

  public InputStream getAsciiStream(int columnIndex) throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public InputStream getAsciiStream(String columnName) throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
    return cs.getBigDecimal(columnIndex);
  }

  public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public BigDecimal getBigDecimal(String columnName) throws SQLException {
    return cs.getBigDecimal(columnName);
  }

  public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public InputStream getBinaryStream(int columnIndex) throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public InputStream getBinaryStream(String columnName) throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public Blob getBlob(String colName) throws SQLException {
    return cs.getBlob(colName);
  }

  public Blob getBlob(int i) throws SQLException {
    return cs.getBlob(i);
  }

  public boolean getBoolean(int columnIndex) throws SQLException {
    return cs.getBoolean(columnIndex);
  }

  public boolean getBoolean(String columnName) throws SQLException {
    return cs.getBoolean(columnName);
  }

  public byte getByte(int columnIndex) throws SQLException {
    return cs.getByte(columnIndex);
  }

  public byte getByte(String columnName) throws SQLException {
    return cs.getByte(columnName);
  }

  public byte[] getBytes(int columnIndex) throws SQLException {
    return cs.getBytes(columnIndex);
  }

  public byte[] getBytes(String columnName) throws SQLException {
    return cs.getBytes(columnName);
  }

  public Reader getCharacterStream(int columnIndex) throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public Reader getCharacterStream(String columnName) throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public Clob getClob(String colName) throws SQLException {
    return cs.getClob(colName);
  }

  public Clob getClob(int i) throws SQLException {
    return cs.getClob(i);
  }

  public int getConcurrency() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public String getCursorName() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public Date getDate(int columnIndex) throws SQLException {
    return cs.getDate(columnIndex);
  }

  public Date getDate(int columnIndex, Calendar cal) throws SQLException {
    return cs.getDate(columnIndex, cal);
  }

  public Date getDate(String columnName) throws SQLException {
    return cs.getDate(columnName);
  }

  public Date getDate(String columnName, Calendar cal) throws SQLException {
    return cs.getDate(columnName, cal);
  }

  public double getDouble(int columnIndex) throws SQLException {
    return cs.getDouble(columnIndex);
  }

  public double getDouble(String columnName) throws SQLException {
    return cs.getDouble(columnName);
  }

  public int getFetchDirection() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public int getFetchSize() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public float getFloat(int columnIndex) throws SQLException {
    return cs.getFloat(columnIndex);
  }

  public float getFloat(String columnName) throws SQLException {
    return cs.getFloat(columnName);
  }

  public int getInt(int columnIndex) throws SQLException {
    return cs.getInt(columnIndex);
  }

  public int getInt(String columnName) throws SQLException {
    return cs.getInt(columnName);
  }

  public long getLong(int columnIndex) throws SQLException {
    return cs.getLong(columnIndex);
  }

  public long getLong(String columnName) throws SQLException {
    return cs.getLong(columnName);
  }

  public ResultSetMetaData getMetaData() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public Object getObject(String colName, Map map) throws SQLException {
    return cs.getObject(colName, map);
  }

  public Object getObject(int columnIndex) throws SQLException {
    return cs.getObject(columnIndex);
  }

  public Object getObject(String columnName) throws SQLException {
    return cs.getObject(columnName);
  }

  public Object getObject(int i, Map map) throws SQLException {
    return cs.getObject(i, map);
  }

  public Ref getRef(String colName) throws SQLException {
    return cs.getRef(colName);
  }

  public Ref getRef(int i) throws SQLException {
    return cs.getRef(i);
  }

  public int getRow() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public short getShort(int columnIndex) throws SQLException {
    return cs.getShort(columnIndex);
  }

  public short getShort(String columnName) throws SQLException {
    return cs.getShort(columnName);
  }

  public Statement getStatement() throws SQLException {
    throw new UnsupportedOperationException("CallableStatement does not support this method.");
  }

  public String getString(int columnIndex) throws SQLException {
    return cs.getString(columnIndex);
  }

  public String getString(String columnName) throws SQLException {
    return cs.getString(columnName);
  }

  public Time getTime(int columnIndex) throws SQLException {
    return cs.getTime(columnIndex);
  }

  public Time getTime(int columnIndex, Calendar cal) throws SQLException {
    return cs.getTime(columnIndex, cal);
  }

  public Time getTime(String columnName) throws SQLException {
    return cs.getTime(columnName);
  }

  public Time getTime(String columnName, Calendar cal) throws SQLException {
    return cs.getTime(columnName, cal);
  }

  public Timestamp getTimestamp(int columnIndex) throws SQLException {
    return cs.getTimestamp(columnIndex);
  }

⌨️ 快捷键说明

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