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

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

?? resultsetiterator.java

?? 這是一個有關common beanutils 的源碼
?? JAVA
字號:
/*
 * 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.sql.SQLException;
import java.util.Iterator;
import java.util.NoSuchElementException;


/**
 * <p>Implementation of <code>java.util.Iterator</code> returned by the
 * <code>iterator()</code> method of {@link ResultSetDynaClass}.  Each
 * object returned by this iterator will be a {@link DynaBean} that
 * represents a single row from the result set being wrapped.</p>
 *
 * @author Craig R. McClanahan
 * @version $Revision: 556221 $ $Date: 2007-07-14 05:19:21 +0100 (Sat, 14 Jul 2007) $
 */

public class ResultSetIterator implements DynaBean, Iterator {


    // ------------------------------------------------------------ Constructor


    /**
     * <p>Construct an <code>Iterator</code> for the result set being wrapped
     * by the specified {@link ResultSetDynaClass}.</p>
     *
     * @param dynaClass The {@link ResultSetDynaClass} wrapping the
     *  result set we will iterate over
     */
    ResultSetIterator(ResultSetDynaClass dynaClass) {

        this.dynaClass = dynaClass;

    }


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



    /**
     * <p>Flag indicating whether the result set is currently positioned at a
     * row for which we have not yet returned an element in the iteration.</p>
     */
    protected boolean current = false;


    /**
     * <p>The {@link ResultSetDynaClass} we are associated with.</p>
     */
    protected ResultSetDynaClass dynaClass = null;


    /**
     * <p>Flag indicating whether the result set has indicated that there are
     * no further rows.</p>
     */
    protected boolean eof = false;


    // ------------------------------------------------------- DynaBean Methods


    /**
     * Does the specified mapped property contain a value for the specified
     * key value?
     *
     * @param name Name of the property to check
     * @param key Name of the key to check
     * @return <code>true<code> if the mapped property contains a value for
     * the specified key, otherwise <code>false</code>
     *
     * @exception IllegalArgumentException if there is no property
     *  of the specified name
     */
    public boolean contains(String name, String key) {

        throw new UnsupportedOperationException
            ("FIXME - mapped properties not currently supported");

    }


    /**
     * Return the value of a simple property with the specified name.
     *
     * @param name Name of the property whose value is to be retrieved
     * @return The property's value
     *
     * @exception IllegalArgumentException if there is no property
     *  of the specified name
     */
    public Object get(String name) {

        if (dynaClass.getDynaProperty(name) == null) {
            throw new IllegalArgumentException(name);
        }
        try {
            return dynaClass.getObjectFromResultSet(name);
        } catch (SQLException e) {
            throw new RuntimeException
                ("get(" + name + "): SQLException: " + e);
        }

    }


    /**
     * Return the value of an indexed property with the specified name.
     *
     * @param name Name of the property whose value is to be retrieved
     * @param index Index of the value to be retrieved
     * @return The indexed property's value
     *
     * @exception IllegalArgumentException if there is no property
     *  of the specified name
     * @exception IllegalArgumentException if the specified property
     *  exists, but is not indexed
     * @exception IndexOutOfBoundsException if the specified index
     *  is outside the range of the underlying property
     * @exception NullPointerException if no array or List has been
     *  initialized for this property
     */
    public Object get(String name, int index) {

        throw new UnsupportedOperationException
            ("FIXME - indexed properties not currently supported");

    }


    /**
     * Return the value of a mapped property with the specified name,
     * or <code>null</code> if there is no value for the specified key.
     *
     * @param name Name of the property whose value is to be retrieved
     * @param key Key of the value to be retrieved
     * @return The mapped property's value
     *
     * @exception IllegalArgumentException if there is no property
     *  of the specified name
     * @exception IllegalArgumentException if the specified property
     *  exists, but is not mapped
     */
    public Object get(String name, String key) {

        throw new UnsupportedOperationException
            ("FIXME - mapped properties not currently supported");

    }


    /**
     * Return the <code>DynaClass</code> instance that describes the set of
     * properties available for this DynaBean.
     *
     * @return The associated DynaClass
     */
    public DynaClass getDynaClass() {

        return (this.dynaClass);

    }


    /**
     * Remove any existing value for the specified key on the
     * specified mapped property.
     *
     * @param name Name of the property for which a value is to
     *  be removed
     * @param key Key of the value to be removed
     *
     * @exception IllegalArgumentException if there is no property
     *  of the specified name
     */
    public void remove(String name, String key) {

        throw new UnsupportedOperationException
            ("FIXME - mapped operations not currently supported");

    }


    /**
     * Set the value of a simple property with the specified name.
     *
     * @param name Name of the property whose value is to be set
     * @param value Value to which this property is to be set
     *
     * @exception ConversionException if the specified value cannot be
     *  converted to the type required for this property
     * @exception IllegalArgumentException if there is no property
     *  of the specified name
     * @exception NullPointerException if an attempt is made to set a
     *  primitive property to null
     */
    public void set(String name, Object value) {

        if (dynaClass.getDynaProperty(name) == null) {
            throw new IllegalArgumentException(name);
        }
        try {
            dynaClass.getResultSet().updateObject(name, value);
        } catch (SQLException e) {
            throw new RuntimeException
                ("set(" + name + "): SQLException: " + e);
        }

    }


    /**
     * Set the value of an indexed property with the specified name.
     *
     * @param name Name of the property whose value is to be set
     * @param index Index of the property to be set
     * @param value Value to which this property is to be set
     *
     * @exception ConversionException if the specified value cannot be
     *  converted to the type required for this property
     * @exception IllegalArgumentException if there is no property
     *  of the specified name
     * @exception IllegalArgumentException if the specified property
     *  exists, but is not indexed
     * @exception IndexOutOfBoundsException if the specified index
     *  is outside the range of the underlying property
     */
    public void set(String name, int index, Object value) {

        throw new UnsupportedOperationException
            ("FIXME - indexed properties not currently supported");

    }


    /**
     * Set the value of a mapped property with the specified name.
     *
     * @param name Name of the property whose value is to be set
     * @param key Key of the property to be set
     * @param value Value to which this property is to be set
     *
     * @exception ConversionException if the specified value cannot be
     *  converted to the type required for this property
     * @exception IllegalArgumentException if there is no property
     *  of the specified name
     * @exception IllegalArgumentException if the specified property
     *  exists, but is not mapped
     */
    public void set(String name, String key, Object value) {

        throw new UnsupportedOperationException
            ("FIXME - mapped properties not currently supported");

    }


    // ------------------------------------------------------- Iterator Methods


    /**
     * <p>Return <code>true</code> if the iteration has more elements.</p>
     *
     * @return <code>true</code> if the result set has another
     * row, otherwise <code>false</code>
     */
    public boolean hasNext() {

        try {
            advance();
            return (!eof);
        } catch (SQLException e) {
            throw new RuntimeException("hasNext():  SQLException:  " + e);
        }

    }


    /**
     * <p>Return the next element in the iteration.</p>
     *
     * @return advance to the new row and return this
     */
    public Object next() {

        try {
            advance();
            if (eof) {
                throw new NoSuchElementException();
            }
            current = false;
            return (this);
        } catch (SQLException e) {
            throw new RuntimeException("next():  SQLException:  " + e);
        }

    }


    /**
     * <p>Remove the current element from the iteration.  This method is
     * not supported.</p>
     */
    public void remove() {

        throw new UnsupportedOperationException("remove()");

    }


    // ------------------------------------------------------ Protected Methods


    /**
     * <p>Advance the result set to the next row, if there is not a current
     * row (and if we are not already at eof).</p>
     *
     * @exception SQLException if the result set throws an exception
     */
    protected void advance() throws SQLException {

        if (!current && !eof) {
            if (dynaClass.getResultSet().next()) {
                current = true;
                eof = false;
            } else {
                current = false;
                eof = true;
            }
        }

    }


}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线成人小视频| 精品在线观看免费| 一个色妞综合视频在线观看| 自拍av一区二区三区| 亚洲黄色免费网站| 日韩av一二三| 粉嫩绯色av一区二区在线观看 | 成人免费精品视频| 色婷婷av一区| 精品卡一卡二卡三卡四在线| 国产精品短视频| 日韩精品午夜视频| 99综合电影在线视频| 欧美精品日韩精品| 国产日韩av一区二区| 夜夜精品视频一区二区| 久久亚区不卡日本| 激情文学综合网| 色综合天天做天天爱| 欧美成人a∨高清免费观看| 国产精品激情偷乱一区二区∴| 亚洲第一狼人社区| 99精品一区二区三区| 欧美成人伊人久久综合网| 亚洲一区二区三区小说| 成人黄色软件下载| 欧美zozozo| 老色鬼精品视频在线观看播放| 91同城在线观看| 精品国产免费一区二区三区四区| 亚洲国产中文字幕| 91久久人澡人人添人人爽欧美| 中文字幕在线一区免费| 国产sm精品调教视频网站| 欧美一区二区女人| 美女在线一区二区| 久久亚洲免费视频| 国产精品69久久久久水密桃| 精品国产免费人成电影在线观看四季| 亚洲第一福利一区| 日韩一区二区影院| 韩国成人福利片在线播放| 91麻豆精品国产无毒不卡在线观看 | 在线观看国产精品网站| 日本一区二区免费在线| 国产在线视视频有精品| 欧美一级午夜免费电影| 蜜桃av噜噜一区二区三区小说| 欧美人体做爰大胆视频| 日韩黄色一级片| 欧美巨大另类极品videosbest | 在线电影欧美成精品| 美女视频一区二区三区| 亚洲精品一区二区三区在线观看 | 91亚洲精品一区二区乱码| 国产精品国产精品国产专区不蜜| 97精品国产露脸对白| 一片黄亚洲嫩模| 69成人精品免费视频| 日韩二区在线观看| 国产欧美日韩久久| 日本韩国精品在线| 五月激情综合色| 2014亚洲片线观看视频免费| 丁香婷婷深情五月亚洲| 久久久久久久久久久久久久久99 | 亚洲欧美成aⅴ人在线观看 | 久久天天做天天爱综合色| 国产成人aaa| 亚洲444eee在线观看| 久久精品人人做| 欧美日韩dvd在线观看| 国产曰批免费观看久久久| 一区二区视频在线看| 日韩一区二区电影网| 精品视频在线看| 国产经典欧美精品| 精品一二线国产| 亚洲第一电影网| 亚洲女与黑人做爰| 国产精品成人一区二区三区夜夜夜| 精品一二线国产| 国产美女在线观看一区| 亚洲色图视频网站| 26uuu另类欧美| 欧美日韩亚洲综合一区| 国产亚洲精品精华液| 国产高清在线观看免费不卡| 91精品一区二区三区久久久久久| 亚洲精品国久久99热| 欧美日韩在线播放三区| 手机精品视频在线观看| 国产精品亚洲人在线观看| 日韩午夜在线观看| 亚洲综合免费观看高清完整版 | 精品少妇一区二区| 国产河南妇女毛片精品久久久| 中文字幕 久热精品 视频在线| 毛片基地黄久久久久久天堂| 日韩精品一区二| 欧美人狂配大交3d怪物一区| 狠狠v欧美v日韩v亚洲ⅴ| 国产精品嫩草久久久久| 91国在线观看| 国产高清在线精品| 国产在线观看免费一区| 天天操天天色综合| 一区二区国产视频| 天堂蜜桃一区二区三区| 欧美精品一区二区高清在线观看 | 日韩三级精品电影久久久| 6080yy午夜一二三区久久| 日韩欧美在线综合网| 久久久影院官网| 午夜激情久久久| 91久久一区二区| 欧美日韩精品一区二区天天拍小说| 日韩视频免费观看高清完整版 | 国产精品456露脸| 日本国产一区二区| 欧美精品 国产精品| 欧美高清在线精品一区| 蜜臀av一区二区在线免费观看 | 国产一区二区免费在线| 成人精品视频一区二区三区| 日韩你懂的在线播放| 欧美日韩亚洲综合一区| 中文字幕电影一区| 波多野结衣视频一区| 日韩免费一区二区三区在线播放| 久久97超碰色| 国产成人久久精品77777最新版本| 欧美一区二区在线免费观看| 秋霞电影网一区二区| 国产日韩欧美制服另类| 狠狠色丁香婷综合久久| 国产日韩高清在线| 欧美亚洲丝袜传媒另类| 欧美草草影院在线视频| 日韩一区二区三区电影在线观看| 欧美色大人视频| 777亚洲妇女| 亚洲男帅同性gay1069| 麻豆freexxxx性91精品| 精品国产亚洲在线| 亚洲成人激情av| 亚洲在线观看免费| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 亚洲欧美激情插| 亚洲综合丁香婷婷六月香| 国产麻豆一精品一av一免费| 91精品国产麻豆国产自产在线| 国产精品天干天干在线综合| 日韩二区三区四区| 在线视频你懂得一区二区三区| 国产精品国产三级国产专播品爱网 | 精品一区二区三区在线播放| 欧美亚洲综合另类| 亚洲免费在线视频一区 二区| 福利91精品一区二区三区| 26uuu成人网一区二区三区| 免费看欧美美女黄的网站| 欧美视频一区二| 亚洲成a人v欧美综合天堂下载| 色综合天天综合狠狠| 国产精品国产三级国产aⅴ入口 | 欧美性生活大片视频| 一区二区三区在线观看欧美 | 欧美色倩网站大全免费| 一区二区三区欧美亚洲| 色婷婷综合久久久久中文一区二区 | 成人av资源在线| 国产精品午夜在线| 波多野结衣中文字幕一区二区三区 | 麻豆国产欧美一区二区三区| 91精品国产乱| 日韩一区欧美二区| 日韩欧美一二区| 精品一区二区综合| 欧美成人一区二区三区在线观看| 麻豆国产精品视频| 国产欧美久久久精品影院| 成人国产亚洲欧美成人综合网| 亚洲人123区| 精品久久久久久久久久久院品网| 韩国女主播一区| 中文幕一区二区三区久久蜜桃| 不卡视频一二三四| 亚洲综合激情另类小说区| 欧美一级欧美一级在线播放| 久久国产婷婷国产香蕉| 国产日韩在线不卡| 91福利社在线观看| 蜜桃精品视频在线| 国产精品久久一卡二卡| 欧美又粗又大又爽| 久久99精品网久久| 亚洲日本在线观看| 欧美一区二区三区在| 高清不卡在线观看av|