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

📄 encoderesultset.java~1~

📁 一个很有特点的地图平台,可以以动画方试展现电子地图,有拉近,拉远,滑动功能,最主要的是它是一个地图维护台,处理地图到数据库的数据导入
💻 JAVA~1~
📖 第 1 页 / 共 2 页
字号:
package webgis.server.service;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import java.io.InputStream;
import java.sql.SQLWarning;
import java.sql.ResultSetMetaData;
import java.io.Reader;
import java.sql.Statement;
import java.util.Map;
import java.sql.Ref;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Array;
import java.util.Calendar;
import java.net.URL;
import java.io.UnsupportedEncodingException;

public class EncodeResultSet implements ResultSet {
  private ResultSet resultSet;
  private String OrigCharSet, TargCharSet;
  private static Log log = LogFactory.getLog("WebGIS");

  public EncodeResultSet(ResultSet resultSet, String OrigCharSet, String TargCharSet) {
    this.resultSet = resultSet;
    this.OrigCharSet = OrigCharSet;
    this.TargCharSet = TargCharSet;
  }
  public boolean next() throws java.sql.SQLException {
    return resultSet.next();
  }
  public void close() throws java.sql.SQLException {
    resultSet.close();
  }
  public boolean wasNull() throws java.sql.SQLException {
    return resultSet.wasNull();
  }
  public String getString(int parm1) throws java.sql.SQLException {
    String returnValue = null;
    try{
      returnValue = new String(resultSet.getString(parm1).getBytes(OrigCharSet), TargCharSet);
    }catch(UnsupportedEncodingException e){
      log.error(e.getMessage());
    }
    return returnValue;
  }
  public boolean getBoolean(int parm1) throws java.sql.SQLException {
    return resultSet.getBoolean(parm1);
  }
  public byte getByte(int parm1) throws java.sql.SQLException {
    return resultSet.getByte(parm1);
  }
  public short getShort(int parm1) throws java.sql.SQLException {
    return resultSet.getShort(parm1);
  }
  public int getInt(int parm1) throws java.sql.SQLException {
    return resultSet.getInt(parm1);
  }
  public long getLong(int parm1) throws java.sql.SQLException {
    return resultSet.getLong(parm1);
  }
  public float getFloat(int parm1) throws java.sql.SQLException {
    return resultSet.getFloat(parm1);
  }
  public double getDouble(int parm1) throws java.sql.SQLException {
    return resultSet.getDouble(parm1);
  }
  public BigDecimal getBigDecimal(int parm1, int parm2) throws java.sql.SQLException {
    return resultSet.getBigDecimal(parm1,parm2);
  }
  public byte[] getBytes(int parm1) throws java.sql.SQLException {
    return resultSet.getBytes(parm1);
  }
  public Date getDate(int parm1) throws java.sql.SQLException {
    return resultSet.getDate(parm1);
  }
  public Time getTime(int parm1) throws java.sql.SQLException {
    return resultSet.getTime(parm1);
  }
  public Timestamp getTimestamp(int parm1) throws java.sql.SQLException {
    return resultSet.getTimestamp(parm1);
  }
  public InputStream getAsciiStream(int parm1) throws java.sql.SQLException {
    return resultSet.getAsciiStream(parm1);
  }
  public InputStream getUnicodeStream(int parm1) throws java.sql.SQLException {
    return resultSet.getUnicodeStream(parm1);
  }
  public InputStream getBinaryStream(int parm1) throws java.sql.SQLException {
    return resultSet.getBinaryStream(parm1);
  }
  //================= 需对输入参数进行预编码,对返回值进行重解码 =================
  public String getString(String parm1) throws java.sql.SQLException {
    String returnValue = null;
    String parm1Value = null;
    try{
      parm1Value = new String(parm1.getBytes(TargCharSet), OrigCharSet);
      returnValue = resultSet.getString(parm1Value);
      if(returnValue == null)return "";
      returnValue = new String(returnValue.getBytes(OrigCharSet), TargCharSet);
    }catch(UnsupportedEncodingException e){
      log.error(e.getMessage());
    }
    return returnValue;
  }
  public boolean getBoolean(String parm1) throws java.sql.SQLException {
    return resultSet.getBoolean(parm1);
  }
  public byte getByte(String parm1) throws java.sql.SQLException {
    return resultSet.getByte(parm1);
  }
  public short getShort(String parm1) throws java.sql.SQLException {
    return resultSet.getShort(parm1);
  }
  public int getInt(String parm1) throws java.sql.SQLException {
    return resultSet.getInt(parm1);
  }
  public long getLong(String parm1) throws java.sql.SQLException {
    return resultSet.getLong(parm1);
  }
  public float getFloat(String parm1) throws java.sql.SQLException {
    return resultSet.getFloat(parm1);
  }
  public double getDouble(String parm1) throws java.sql.SQLException {
    return resultSet.getDouble(parm1);
  }
  public BigDecimal getBigDecimal(String parm1, int parm2) throws java.sql.SQLException {
    return resultSet.getBigDecimal(parm1,parm2);
  }
  public byte[] getBytes(String parm1) throws java.sql.SQLException {
    return resultSet.getBytes(parm1);
  }
  public Date getDate(String parm1) throws java.sql.SQLException {
    return resultSet.getDate(parm1);
  }
  public Time getTime(String parm1) throws java.sql.SQLException {
    return resultSet.getTime(parm1);
  }
  public Timestamp getTimestamp(String parm1) throws java.sql.SQLException {
    return resultSet.getTimestamp(parm1);
  }
  public InputStream getAsciiStream(String parm1) throws java.sql.SQLException {
    return resultSet.getAsciiStream(parm1);
  }
  public InputStream getUnicodeStream(String parm1) throws java.sql.SQLException {
    return resultSet.getUnicodeStream(parm1);
  }
  public InputStream getBinaryStream(String parm1) throws java.sql.SQLException {
    return resultSet.getBinaryStream(parm1);
  }
  public SQLWarning getWarnings() throws java.sql.SQLException {
    return resultSet.getWarnings();
  }
  public void clearWarnings() throws java.sql.SQLException {
    resultSet.clearWarnings();
  }
  public String getCursorName() throws java.sql.SQLException {
    return resultSet.getCursorName();
  }
  public ResultSetMetaData getMetaData() throws java.sql.SQLException {
    return new EncodeResultSetMetaData(resultSet.getMetaData(),OrigCharSet, TargCharSet);
  }
  public Object getObject(int parm1) throws java.sql.SQLException {
    return resultSet.getObject(parm1);
  }
  public Object getObject(String parm1) throws java.sql.SQLException {
    return resultSet.getObject(parm1);
  }
  public int findColumn(String parm1) throws java.sql.SQLException {
    return resultSet.findColumn(parm1);
  }
  public Reader getCharacterStream(int parm1) throws java.sql.SQLException {
    return resultSet.getCharacterStream(parm1);
  }
  public Reader getCharacterStream(String parm1) throws java.sql.SQLException {
    return resultSet.getCharacterStream(parm1);
  }
  public BigDecimal getBigDecimal(int parm1) throws java.sql.SQLException {
    return resultSet.getBigDecimal(parm1);
  }
  public BigDecimal getBigDecimal(String parm1) throws java.sql.SQLException {
    return resultSet.getBigDecimal(parm1);
  }
  public boolean isBeforeFirst() throws java.sql.SQLException {
    return resultSet.isBeforeFirst();
  }
  public boolean isAfterLast() throws java.sql.SQLException {
    return resultSet.isAfterLast();
  }
  public boolean isFirst() throws java.sql.SQLException {
    return resultSet.isFirst();
  }
  public boolean isLast() throws java.sql.SQLException {
    return resultSet.isLast();
  }
  public void beforeFirst() throws java.sql.SQLException {
    resultSet.beforeFirst();
  }
  public void afterLast() throws java.sql.SQLException {
    resultSet.afterLast();
  }
  public boolean first() throws java.sql.SQLException {
    return resultSet.first();
  }
  public boolean last() throws java.sql.SQLException {
    return resultSet.last();
  }
  public int getRow() throws java.sql.SQLException {
    return resultSet.getRow();
  }
  public boolean absolute(int parm1) throws java.sql.SQLException {
    return resultSet.absolute(parm1);
  }
  public boolean relative(int parm1) throws java.sql.SQLException {
    return resultSet.relative(parm1);
  }
  public boolean previous() throws java.sql.SQLException {
    return resultSet.previous();
  }
  public void setFetchDirection(int parm1) throws java.sql.SQLException {
    resultSet.setFetchDirection(parm1);
  }
  public int getFetchDirection() throws java.sql.SQLException {
    return resultSet.getFetchDirection();
  }
  public void setFetchSize(int parm1) throws java.sql.SQLException {
    resultSet.setFetchSize(parm1);
  }
  public int getFetchSize() throws java.sql.SQLException {
    return resultSet.getFetchSize();
  }
  public int getType() throws java.sql.SQLException {
    return resultSet.getType();
  }
  public int getConcurrency() throws java.sql.SQLException {
    return resultSet.getConcurrency();
  }
  public boolean rowUpdated() throws java.sql.SQLException {

⌨️ 快捷键说明

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