亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? testresultset.java

?? 這是一個有關common beanutils 的源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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 org.apache.commons.beanutils;


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


/**
 * <p>Mock object that implements enough of <code>java.sql.ResultSet</code>
 * to exercise the {@link ResultSetDyaClass} functionality.</p>
 *
 * @author Craig R. McClanahan
 * @version $Revision: 556233 $ $Date: 2007-07-14 07:37:06 +0100 (Sat, 14 Jul 2007) $
 */

public class TestResultSet implements InvocationHandler {


    // ----------------------------------------------------- Instance Variables


    /**
     * Current row number (0 means "before the first one").
     */
    protected int row = 0;


    /**
     * The constant (per run) value used to initialize date/time/timestamp.
     */
    protected long timestamp = System.currentTimeMillis();

    /**
     * Meta data for the result set.
     */
    protected ResultSetMetaData resultSetMetaData;

    /**
     * Factory method for creating {@link ResultSet} proxies.
     *
     * @return A result set proxy
     */
    public static ResultSet createProxy() {
        return TestResultSet.createProxy(new TestResultSet());
    }

    /**
     * Factory method for creating {@link ResultSet} proxies.
     *
     * @param invocationHandler Invocation Handler
     * @return A result set proxy
     */
    public static ResultSet createProxy(InvocationHandler invocationHandler) {
        ClassLoader classLoader = ResultSet.class.getClassLoader();
        Class[] interfaces = new Class[] { ResultSet.class };
        return (ResultSet)Proxy.newProxyInstance(classLoader, interfaces, invocationHandler);
    }
    
    /**
     * Create a proxy ResultSet.
     */
    public TestResultSet() {
        this(TestResultSetMetaData.createProxy());
    }
    
    /**
     * Create a proxy ResultSet with the specified meta data.
     *
     * @param resultSetMetaData The result set meta data
     */
    public TestResultSet(ResultSetMetaData resultSetMetaData) {
        this.resultSetMetaData = resultSetMetaData;
    }

    /**
     * Handles method invocation on the ResultSet proxy. 
     *
     * @param proxy The proxy ResultSet object
     * @param method the method being invoked
     * @param args The method arguments
     * @return The result of invoking the method.
     * @throws Throwable if an error occurs.
     */
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        String methodName = method.getName();
        if ("close".equals(methodName)) {
            return null;
        } if ("getMetaData".equals(methodName)) {
            return getMetaData();
        } if ("getObject".equals(methodName)) {
            return getObject(columnName(args[0]));
        } if ("getDate".equals(methodName)) {
            return getDate(columnName(args[0]));
        } if ("getTime".equals(methodName)) {
            return getTime(columnName(args[0]));
        } if ("getTimestamp".equals(methodName)) {
            return getTimestamp(columnName(args[0]));
        } if ("next".equals(methodName)) {
            return (next() ? Boolean.TRUE : Boolean.FALSE);
        } if ("updateObject".equals(methodName)) {
            updateObject((String)args[0], args[1]);
            return null;
        }
        
        throw new UnsupportedOperationException(methodName + " not implemented");
    }

    private String columnName(Object arg) throws SQLException {
        if (arg instanceof Integer) {
            return resultSetMetaData.getColumnName(((Integer)arg).intValue());
        } else {
            return (String)arg;
        }
    }

    // ---------------------------------------------------- Implemented Methods


    public void close() throws SQLException {
        // No action required
    }


    public ResultSetMetaData getMetaData() throws SQLException {
        return resultSetMetaData;
    }


    public Object getObject(String columnName) throws SQLException {
        if (row > 5) {
            throw new SQLException("No current row");
        }
        if ("bigDecimalProperty".equals(columnName)) {
            return (new BigDecimal(123.45));
        } else if ("booleanProperty".equals(columnName)) {
            if ((row % 2) == 0) {
                return (Boolean.TRUE);
            } else {
                return (Boolean.FALSE);
            }
        } else if ("byteProperty".equals(columnName)) {
            return (new Byte((byte) row));
        } else if ("dateProperty".equals(columnName)) {
            return (new Date(timestamp));
        } else if ("doubleProperty".equals(columnName)) {
            return (new Double(321.0));
        } else if ("floatProperty".equals(columnName)) {
            return (new Float((float) 123.0));
        } else if ("intProperty".equals(columnName)) {
            return (new Integer(100 + row));
        } else if ("longProperty".equals(columnName)) {
            return (new Long(200 + row));
        } else if ("nullProperty".equals(columnName)) {
            return (null);
        } else if ("shortProperty".equals(columnName)) {
            return (new Short((short) (300 + row)));
        } else if ("stringProperty".equals(columnName)) {
            return ("This is a string");
        } else if ("timeProperty".equals(columnName)) {
            return (new Time(timestamp));
        } else if ("timestampProperty".equals(columnName)) {
            return (new Timestamp(timestamp));
        } else {
            throw new SQLException("Unknown column name " + columnName);
        }
    }

    public Date getDate(String columnName) throws SQLException {
        return (new Date(timestamp));
    }

    public Time getTime(String columnName) throws SQLException {
        return (new Time(timestamp));
    }

    public Timestamp getTimestamp(String columnName) throws SQLException {
        return (new Timestamp(timestamp));
    }

    public boolean next() throws SQLException {
        if (row++ < 5) {
            return (true);
        } else {
            return (false);
        }
    }


    public void updateObject(String columnName, Object x)
        throws SQLException {
        if (row > 5) {
            throw new SQLException("No current row");
        }
        // FIXME - updateObject()
    }


    // -------------------------------------------------- Unimplemented Methods


    public boolean absolute(int row) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public void afterLast() throws SQLException {
        throw new UnsupportedOperationException();
    }


    public void beforeFirst() throws SQLException {
        throw new UnsupportedOperationException();
    }


    public void cancelRowUpdates() throws SQLException {
        throw new UnsupportedOperationException();
    }


    public void clearWarnings() throws SQLException {
        throw new UnsupportedOperationException();
    }


    public void deleteRow() throws SQLException {
        throw new UnsupportedOperationException();
    }


    public int findColumn(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public boolean first() throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Array getArray(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Array getArray(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public InputStream getAsciiStream(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public InputStream getAsciiStream(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }

    /** @deprecated */
    public BigDecimal getBigDecimal(int columnIndex, int scale)
        throws SQLException {
        throw new UnsupportedOperationException();
    }


    public BigDecimal getBigDecimal(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    /** @deprecated */
    public BigDecimal getBigDecimal(String columnName, int scale)
        throws SQLException {
        throw new UnsupportedOperationException();
    }


    public InputStream getBinaryStream(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public InputStream getBinaryStream(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Blob getBlob(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Blob getBlob(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public boolean getBoolean(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public boolean getBoolean(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public byte getByte(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public byte getByte(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public byte[] getBytes(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public byte[] getBytes(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Reader getCharacterStream(int columnIndex)
        throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Reader getCharacterStream(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Clob getClob(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Clob getClob(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public int getConcurrency() throws SQLException {
        throw new UnsupportedOperationException();
    }


    public String getCursorName() throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Date getDate(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Date getDate(int columnIndex, Calendar cal) throws SQLException {
        throw new UnsupportedOperationException();
    }




    public Date getDate(String columnName, Calendar cal) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public double getDouble(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public double getDouble(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public int getFetchDirection() throws SQLException {
        throw new UnsupportedOperationException();
    }


    public int getFetchSize() throws SQLException {
        throw new UnsupportedOperationException();
    }


    public float getFloat(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public float getFloat(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public int getInt(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public int getInt(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public long getLong(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public long getLong(String columnName) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Object getObject(int columnIndex) throws SQLException {
        throw new UnsupportedOperationException();
    }


    public Object getObject(int columnIndex, Map map) throws SQLException {
        throw new UnsupportedOperationException();
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久www成人免费毛片麻豆| 欧美色综合久久| 亚洲啪啪综合av一区二区三区| 91同城在线观看| 老司机午夜精品99久久| 国产精品国产三级国产普通话99| 欧美视频一区在线| av毛片久久久久**hd| 日韩av一区二区三区| 久久中文娱乐网| 欧美性videosxxxxx| 国产精品中文欧美| 青青草成人在线观看| 国产精品美女一区二区三区| 91视视频在线观看入口直接观看www| 免费xxxx性欧美18vr| 综合亚洲深深色噜噜狠狠网站| 日韩欧美一区二区在线视频| a亚洲天堂av| 视频精品一区二区| 中文字幕中文字幕在线一区| 91精品欧美一区二区三区综合在| 91蜜桃免费观看视频| 久久99九九99精品| 亚洲一区二区三区四区在线观看 | 成人性生交大片免费看中文| 一区二区三区不卡视频| 久久精品欧美一区二区三区不卡 | 国产成人免费在线| 三级在线观看一区二区| 亚洲图片欧美激情| 久久久久久免费毛片精品| 在线播放91灌醉迷j高跟美女| eeuss鲁片一区二区三区在线观看| 经典一区二区三区| 日韩极品在线观看| 亚洲免费观看高清完整版在线观看熊| 久久伊99综合婷婷久久伊| 在线综合视频播放| 欧美在线色视频| 91片黄在线观看| 波多野结衣精品在线| 国产精品一区二区三区四区| 蜜桃视频免费观看一区| 亚洲成人av一区二区| 一二三四区精品视频| 亚洲色图.com| 亚洲三级电影网站| **性色生活片久久毛片| 欧美国产国产综合| 久久精品欧美日韩| 久久久久国产精品厨房| 2欧美一区二区三区在线观看视频| 欧美嫩在线观看| 欧美日韩视频在线第一区| 色噜噜狠狠一区二区三区果冻| 成人国产精品免费观看动漫| 国产成人精品一区二| 高潮精品一区videoshd| 丰满亚洲少妇av| 国产乱理伦片在线观看夜一区| 激情成人综合网| 精品一区二区三区免费毛片爱| 久久不见久久见中文字幕免费| 久久99精品久久久久久国产越南| 另类专区欧美蜜桃臀第一页| 久久国产生活片100| 国产一区二区美女| 国产成人一级电影| 成人免费观看视频| 91免费版在线看| 欧美性猛交xxxxxx富婆| 欧美精品一二三区| 欧美大片拔萝卜| 精品福利一区二区三区免费视频| 亚洲精品一区二区三区99| 国产亚洲欧洲997久久综合| 国产日本欧美一区二区| 成人欧美一区二区三区小说| 亚洲在线中文字幕| 日本怡春院一区二区| 免费久久精品视频| 日韩精品91亚洲二区在线观看| 国产最新精品免费| 国产一区美女在线| 不卡视频一二三| 欧美日韩中文字幕一区| 在线观看日产精品| 91超碰这里只有精品国产| 91精品国模一区二区三区| 久久精品无码一区二区三区| 一区二区日韩av| 一区二区三区免费看视频| 亚洲在线视频一区| 精品一区二区影视| 99麻豆久久久国产精品免费优播| 欧美日韩综合在线免费观看| 2023国产精品自拍| 一区二区三区在线视频免费| 日产国产欧美视频一区精品| 高清不卡在线观看av| 99视频有精品| 精品国偷自产国产一区| 亚洲美女屁股眼交| 精品一区二区三区久久久| 一本一道久久a久久精品综合蜜臀| 欧美特级限制片免费在线观看| 久久精品夜色噜噜亚洲a∨| 一区二区三区小说| 国产一区不卡视频| 欧美在线一二三四区| 久久精品夜色噜噜亚洲aⅴ| 亚洲va欧美va天堂v国产综合| 国产精品一二二区| 7777精品伊人久久久大香线蕉经典版下载 | 国产原创一区二区三区| 色成人在线视频| 久久久久久影视| 日本亚洲一区二区| 97精品视频在线观看自产线路二| 日韩欧美成人午夜| 亚洲国产一区二区在线播放| 国产激情一区二区三区| 7777精品伊人久久久大香线蕉的 | 欧美福利一区二区| 国产精品二三区| 国产乱子轮精品视频| 欧美精品在线观看播放| 亚洲精品乱码久久久久久黑人| 国内精品久久久久影院色| 欧美丰满一区二区免费视频| 一区二区中文字幕在线| 国产乱人伦偷精品视频不卡| 5月丁香婷婷综合| 亚洲综合免费观看高清完整版在线| 丰满放荡岳乱妇91ww| 欧美一级久久久| 午夜欧美在线一二页| 91香蕉视频污在线| 中文字幕在线一区二区三区| 国产在线不卡视频| 欧美日韩亚洲高清一区二区| 日本一区二区视频在线| 国内偷窥港台综合视频在线播放| 欧美日本免费一区二区三区| 一区二区三区美女| 色一情一伦一子一伦一区| 国产精品乱码一区二区三区软件| 国产麻豆精品95视频| 7777精品伊人久久久大香线蕉超级流畅 | 欧美亚洲高清一区| 久久久久久一级片| 国产激情91久久精品导航| 久久精品亚洲精品国产欧美kt∨| 精品亚洲porn| 欧美日韩大陆在线| 亚洲成a人片在线观看中文| 成人av免费网站| 国产精品国产成人国产三级| 国产一区三区三区| 国产三级精品在线| 理论电影国产精品| 久久久噜噜噜久噜久久综合| 国产成人亚洲综合色影视| 欧美国产精品v| 国产乱码精品一区二区三区av| 欧美一个色资源| 国内久久婷婷综合| 国产精品理伦片| 色悠久久久久综合欧美99| 亚洲精品久久嫩草网站秘色| 欧美影院精品一区| 午夜精品久久久久久久久久| 欧美一二区视频| 国产精品99精品久久免费| 国产欧美综合在线观看第十页| 91在线云播放| 午夜精品久久久久久久99水蜜桃 | 欧美a级理论片| 在线播放91灌醉迷j高跟美女| 美日韩一区二区| 26uuu国产电影一区二区| 成人自拍视频在线观看| 亚洲日本在线a| 欧美日韩精品一区二区三区四区| 日韩高清在线观看| 久久色中文字幕| av电影在线观看一区| 亚洲色图另类专区| 欧美视频自拍偷拍| 久久精品久久精品| 国产精品美女一区二区| 欧美丝袜自拍制服另类| 精品一区二区三区免费毛片爱| 91在线视频在线| 五月婷婷激情综合网| 中文字幕一区视频| 337p粉嫩大胆色噜噜噜噜亚洲| 精品视频1区2区3区| 99精品视频在线播放观看|