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

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

?? dbusermessagesiterator.java

?? Jvie論壇的程序
?? JAVA
字號:
/**
 * Copyright (C) 2001 Yasna.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        Yasna.com (http://www.yasna.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Yazd" and "Yasna.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact yazd@yasna.com.
 *
 * 5. Products derived from this software may not be called "Yazd",
 *    nor may "Yazd" appear in their name, without prior written
 *    permission of Yasna.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL YASNA.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of Yasna.com. For more information
 * on Yasna.com, please see <http://www.yasna.com>.
 */

/**
 * Copyright (C) 2000 CoolServlets.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        CoolServlets.com (http://www.coolservlets.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Jive" and "CoolServlets.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact webmaster@coolservlets.com.
 *
 * 5. Products derived from this software may not be called "Jive",
 *    nor may "Jive" appear in their name, without prior written
 *    permission of CoolServlets.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL COOLSERVLETS.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CoolServlets.com. For more information
 * on CoolServlets.com, please see <http://www.coolservlets.com>.
 */

package com.Yasna.forum.database;

import java.util.*;
//JDK1.1// import com.sun.java.util.collections.*;
import java.sql.*;
import com.Yasna.forum.*;

/**
 * An Iterator for all the user's Messages in a forum.
 */
public class DbUserMessagesIterator implements Iterator, ListIterator {

    /** DATABASE QUERIES **/
    private static final String USER_MESSAGES =
        "SELECT messageID, yazdMessage.threadID FROM yazdMessage,yazdForum,yazdThread WHERE " +
        "yazdMessage.userID=? AND yazdForum.forumID=? AND " +
        "yazdThread.forumID=yazdForum.forumID AND " +
        "yazdMessage.threadID=yazdThread.threadID";

    private int currentIndex = -1;
    private int [] messages;
    //The threads that correspond to each message.
    private int [] threads;
    private Forum forum;

    private DbForumFactory factory;

    protected DbUserMessagesIterator(DbForumFactory factory, User user, Forum forum)
    {
        this.factory = factory;
        this.forum = forum;
        //We don't know how many results will be returned, so store them
        //in an ArrayList.
        ArrayList tempMessages = new ArrayList();
        ArrayList tempThreads = new ArrayList();
        Connection con = null;
        PreparedStatement pstmt = null;
        try {
            con = DbConnectionManager.getConnection();
            pstmt = con.prepareStatement(USER_MESSAGES);
            pstmt.setInt(1, user.getID());
            pstmt.setInt(2, forum.getID());
            ResultSet rs = pstmt.executeQuery();
            while (rs.next()) {
                tempMessages.add(new Integer(rs.getInt(1)));
                tempThreads.add(new Integer(rs.getInt(2)));
            }
        }
        catch( SQLException sqle ) {
            System.err.println("Error in DbUserMessagesIterator:constructor()-" + sqle);
            sqle.printStackTrace();
        }
        finally {
            try {  pstmt.close(); }
            catch (Exception e) { e.printStackTrace(); }
            try {  con.close();   }
            catch (Exception e) { e.printStackTrace(); }
        }
        //Now copy into an array.
        messages = new int[tempMessages.size()];
        for (int i=0; i<messages.length; i++) {
            messages[i] = ((Integer)tempMessages.get(i)).intValue();
        }
        //Now copy into an array.
        threads = new int[tempThreads.size()];
        for (int i=0; i<threads.length; i++) {
            threads[i] = ((Integer)tempThreads.get(i)).intValue();
        }
    }

    /**
     * Returns true if there are more users left to iteratate through forwards.
     */
    public boolean hasNext() {
        return (currentIndex+1 < messages.length);
    }

    /**
     * Returns true if there are more users left to iteratore through backwards.
     */
    public boolean hasPrevious() {
        return (currentIndex > 0);
    }

    /**
     * Returns the next User.
     */
    public Object next() throws java.util.NoSuchElementException {
        ForumMessage message = null;
        currentIndex++;
        if (currentIndex >= messages.length) {
            throw new java.util.NoSuchElementException();
        }
        try {
            message = forum.getThread(threads[currentIndex]).getMessage(messages[currentIndex]);
        }
        catch (ForumThreadNotFoundException ftnfe) {
            ftnfe.printStackTrace();
        }
        catch (ForumMessageNotFoundException fmnfe) {
            fmnfe.printStackTrace();
        }
        return message;
    }

    /**
     * For security reasons, the add operation is not supported. Use
     * ProfileManager instead.
     *
     * @see ProfileManager
     */
    public void add(Object o) throws UnsupportedOperationException {
        throw new UnsupportedOperationException();
    }

    /**
     * For security reasons, the remove operation is not supported. Use
     * ProfileManager instead.
     *
     * @see ProfileManager
     */
    public void remove() {
        throw new UnsupportedOperationException();
    }

    /**
     * For security reasons, the set operation is not supported. Use
     * ProfileManager instead.
     *
     * @see ProfileManager
     */
    public void set(Object o) throws UnsupportedOperationException {
        throw new UnsupportedOperationException();
    }

    /**
     * Returns the index number that would be returned with a call to next().
     */
    public int nextIndex() {
        return currentIndex+1;
    }

    /**
     * Returns the previous user.
     */
    public Object previous() throws java.util.NoSuchElementException {
        ForumMessage message = null;
        currentIndex--;
        if (currentIndex < 0) {
            currentIndex++;
            throw new java.util.NoSuchElementException();
        }
        try {
            message = forum.getThread(threads[currentIndex]).getMessage(messages[currentIndex]);
        }
        catch (ForumThreadNotFoundException ftnfe) {
            ftnfe.printStackTrace();
        }
        catch (ForumMessageNotFoundException fmnfe) {
            fmnfe.printStackTrace();
        }
        return message;
    }

    /**
     * Returns the index number that would be returned with a call to previous().
     */
    public int previousIndex() {
        return currentIndex-1;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费在线观看不卡| 精品国产91久久久久久久妲己 | 精品av久久707| 欧美高清在线一区二区| 亚洲欧美国产三级| 免费欧美在线视频| 国产91对白在线观看九色| 欧美中文字幕不卡| 26uuu国产日韩综合| 亚洲最新视频在线播放| 精品一区二区免费视频| 色香色香欲天天天影视综合网| 欧美精品国产精品| 中文字幕的久久| 日韩在线a电影| 成人h版在线观看| 欧美日韩不卡在线| 国产精品全国免费观看高清| 亚洲福利一区二区| 成人做爰69片免费看网站| 欧美日韩的一区二区| 欧美激情综合在线| 免费成人在线观看视频| 99久精品国产| 久久先锋影音av| 亚洲一区二区在线视频| 国产精品一区一区| 欧美日韩一区二区三区在线看| 久久久不卡影院| 天堂成人国产精品一区| 国产99精品国产| 日韩一区二区不卡| 一区二区三区欧美在线观看| 国产麻豆精品theporn| 欧美日韩一区二区欧美激情| 国产校园另类小说区| 日韩av一区二区三区| 91亚洲国产成人精品一区二三 | 美国av一区二区| 日本精品一区二区三区四区的功能| 欧美不卡一二三| 天天影视色香欲综合网老头| 91色porny在线视频| 国产三级一区二区| 老司机免费视频一区二区三区| 欧美亚洲尤物久久| 日韩美女视频一区二区| 福利91精品一区二区三区| 欧美一区二区三区性视频| 夜夜嗨av一区二区三区中文字幕| 国产精品1024| 久久影视一区二区| 美女脱光内衣内裤视频久久网站| 欧美日韩精品一区二区天天拍小说 | 国产精品毛片高清在线完整版| 日韩av午夜在线观看| 在线观看av一区| 中文字幕一区视频| 成人av免费在线观看| 国产日韩高清在线| 国产成人三级在线观看| 2020日本不卡一区二区视频| 免费精品99久久国产综合精品| 欧美日本在线看| 亚洲第一会所有码转帖| 欧美三级在线播放| 亚洲va欧美va人人爽| 欧美色区777第一页| 一个色妞综合视频在线观看| 在线观看免费一区| 亚洲一区二区欧美日韩| 欧美日韩一区在线| 三级一区在线视频先锋| 91精品黄色片免费大全| 日韩avvvv在线播放| 日韩欧美国产wwwww| 老司机精品视频在线| 精品国产免费视频| 国产综合色在线视频区| 国产性做久久久久久| 国产91精品一区二区麻豆网站| 国产亚洲精品超碰| 国产69精品久久久久毛片| 中文字幕精品三区| 色诱视频网站一区| 一区二区三区日韩| 911精品国产一区二区在线| 日本成人在线一区| 精品理论电影在线| 国产999精品久久久久久| 国产精品国产三级国产a| 91丨九色丨蝌蚪富婆spa| 亚洲综合色视频| 91精品国产综合久久精品性色| 美女网站色91| 国产欧美精品区一区二区三区 | 久久久精品国产免费观看同学| 国产69精品久久久久777| 中文字幕制服丝袜一区二区三区 | 亚洲人成人一区二区在线观看| 在线看日韩精品电影| 日日噜噜夜夜狠狠视频欧美人| www欧美成人18+| 9i在线看片成人免费| 亚洲成人精品一区二区| 精品国产乱码久久久久久浪潮| 成人ar影院免费观看视频| 亚洲永久免费av| 精品理论电影在线| 色综合色综合色综合 | 精品国产亚洲在线| av一区二区三区在线| 视频一区二区不卡| 中文字幕免费一区| 欧美精品久久99| 国产凹凸在线观看一区二区| 一区二区三区日韩欧美精品| 日韩一区二区三区四区五区六区| 国产成人日日夜夜| 亚洲图片一区二区| 久久精品夜色噜噜亚洲a∨| 91黄视频在线| 韩国成人精品a∨在线观看| 亚洲色大成网站www久久九九| 欧美日韩精品一区二区三区| 国产成人综合在线播放| 亚洲一区在线视频| 国产欧美一区二区三区网站| 欧美日韩在线精品一区二区三区激情| 国产中文字幕精品| 五月婷婷另类国产| 中文字幕在线播放不卡一区| 欧美电影免费观看高清完整版 | 一区二区不卡在线视频 午夜欧美不卡在| 欧美高清性hdvideosex| 成人性生交大片免费看视频在线| 日本欧美久久久久免费播放网| 国产精品免费看片| 欧美成人一级视频| 欧美性三三影院| www.爱久久.com| 毛片av一区二区| 亚洲成a人在线观看| 国产日韩欧美精品综合| 欧美一区二区三区在线观看视频| 色婷婷亚洲综合| 粉嫩久久99精品久久久久久夜| 首页国产欧美日韩丝袜| 亚洲精品中文字幕在线观看| 久久婷婷一区二区三区| 欧美老肥妇做.爰bbww视频| 成人高清伦理免费影院在线观看| 久久国产人妖系列| 亚洲成国产人片在线观看| 亚洲男人的天堂在线观看| 国产日韩欧美激情| 精品国产伦一区二区三区免费| 欧美日本国产视频| 在线观看91精品国产入口| 91在线视频免费观看| 成人免费视频一区| 精品一区二区三区视频在线观看| 日韩一区欧美二区| 亚洲国产aⅴ天堂久久| 亚洲猫色日本管| 亚洲视频中文字幕| 中文文精品字幕一区二区| 久久久99精品免费观看不卡| 精品日韩欧美在线| 91精品一区二区三区久久久久久| 欧美系列日韩一区| 91福利视频在线| 在线观看一区二区视频| 91老师国产黑色丝袜在线| 99久久久无码国产精品| www.日本不卡| 成人精品国产一区二区4080| 国产91精品在线观看| 国产不卡在线播放| 成人一道本在线| 成人免费不卡视频| 成人伦理片在线| 99精品久久免费看蜜臀剧情介绍| 99视频国产精品| 91丝袜高跟美女视频| 色综合久久久久久久久久久| 99re免费视频精品全部| 色综合视频一区二区三区高清| 色吊一区二区三区| 欧美色视频在线观看| 91麻豆精品91久久久久同性| 欧美一区二区视频免费观看| 911国产精品| 精品国产网站在线观看| 精品国产一区二区三区久久久蜜月 | 国产精品国产自产拍在线| 国产精品国产三级国产aⅴ中文 | 成人免费精品视频| 一本大道av一区二区在线播放| 91成人看片片|