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

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

?? categoryxml.java

?? java servlet著名論壇源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * $Header: /cvsroot/mvnforum/mvnforum/src/com/mvnforum/admin/CategoryXML.java,v 1.4 2004/05/19 19:11:56 minhnn Exp $
 * $Author: minhnn $
 * $Revision: 1.4 $
 * $Date: 2004/05/19 19:11:56 $
 *
 * ====================================================================
 *
 * Copyright (C) 2002-2004 by MyVietnam.net
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * All copyright notices regarding mvnForum MUST remain intact
 * in the scripts and in the outputted HTML.
 * The "powered by" text/logo with a link back to
 * http://www.mvnForum.com and http://www.MyVietnam.net in the
 * footer of the pages MUST remain visible when the pages
 * are viewed on the internet or intranet.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * Support can be obtained from support forums at:
 * http://www.mvnForum.com/mvnforum/index
 *
 * Correspondence and Marketing Questions can be sent to:
 * info@MyVietnam.net
 *
 * @author: Igor Manic   imanic@users.sourceforge.net
 */
package com.mvnforum.admin;

import java.io.IOException;
import java.util.*;

import com.mvnforum.admin.importexport.XMLUtil;
import com.mvnforum.admin.importexport.XMLWriter;
import com.mvnforum.db.*;
import net.myvietnam.mvncore.exception.*;
import net.myvietnam.mvncore.filter.DisableHtmlTagFilter;
import net.myvietnam.mvncore.filter.EnableHtmlTagFilter;

/**
 * @author <a href="mailto:imanic@users.sourceforge.net">Igor Manic</a>
 * @version $Revision: 1.4 $, $Date: 2004/05/19 19:11:56 $
 * <br/>
 * <code>CategoryXML</code> todo Igor: enter description
 *
 */
public class CategoryXML {

    private int categoryID;
    /** Returns <code>CategoryID</code> of this category or
      * <code>-1</code> if category is not created yet. */
    public int getCategoryID() { return categoryID; }

    private int parentCategoryID;
    /** Returns <code>ThreadID</code> of this category's parent category or
      * <code>0</code> if this category is not created yet or has no parent category. */
    public int getParentCategoryID() { return parentCategoryID; }

    public CategoryXML() {
        super();
        categoryID=-1;
        parentCategoryID=0;
    }

    public void setCategoryID(String id) {
        categoryID=XMLUtil.stringToIntDef(id, -1);
    }

    public void setParentCategory(CategoryXML parentCategory)
    throws ForeignKeyNotFoundException {
        parentCategoryID=parentCategory.getCategoryID();
    }

    public void setParentCategoryID(int value) {
        if (value<0) parentCategoryID=-1;
        else parentCategoryID=value;
    }

    /**
     * Creates a category. All argument values (<code>int</code>s, <code>Timestamp</code>s, ...)
     * are represented as <code>String</code>s, because of more convenient using
     * of this method for XML parsing.
     *
     * @param categoryName Name of a category to be created.
     * @param categoryDesc Can be null.
     * @param categoryCreationDate Can be null.
     * @param categoryModifiedDate Can be null.
     * @param categoryOrder Can be null.
     * @param categoryOption Can be null.
     * @param categoryStatus Can be null.
     *
     * @throws CreateException
     * @throws DuplicateKeyException
     * @throws ObjectNotFoundException
     * @throws DatabaseException
     * @throws ForeignKeyNotFoundException
     *
     */
    public void addCategory(String categoryName,
                            String categoryDesc, String categoryCreationDate,
                            String categoryModifiedDate, String categoryOrder,
                            String categoryOption, String categoryStatus)
    throws CreateException, DuplicateKeyException, ObjectNotFoundException,
    DatabaseException, ForeignKeyNotFoundException {
        //parentCategoryID can be 0, and don't need to check if it's set or not
        if ( (categoryName==null) || (categoryName.equals("")) ) {
            throw new CreateException("Can't create a category with empty CategoryName.");
        } else {
            java.sql.Timestamp categoryCreationDate1;
            java.sql.Timestamp categoryModifiedDate1;
            int categoryOrder1;
            int categoryOption1;
            int categoryStatus1;

            try {
                if (categoryDesc==null) categoryDesc="";
                categoryCreationDate1= XMLUtil.stringToSqlTimestampDefNow(categoryCreationDate);
                categoryModifiedDate1= XMLUtil.stringToSqlTimestampDefNow(categoryModifiedDate);
                categoryOrder1= XMLUtil.stringToIntDef(categoryOrder, 0);
                categoryOption1= XMLUtil.stringToIntDef(categoryOption, 0);
                categoryStatus1= XMLUtil.stringToIntDef(categoryStatus, 0);
            } catch (NumberFormatException e) {
                throw new CreateException("Invalid data for a category. Expected a number.");
            }

            categoryName=EnableHtmlTagFilter.filter(categoryName);
            categoryDesc=EnableHtmlTagFilter.filter(categoryDesc);

            DAOFactory.getCategoryDAO().create(
                parentCategoryID, categoryName, categoryDesc,
                categoryCreationDate1, categoryModifiedDate1,
                categoryOrder1, categoryOption1, categoryStatus1);

            //todo Igor: Minh, you could move next piece of code into CategoryWebHelper.getCategoryIDFromPrimaryKey method
            Collection categories=DAOFactory.getCategoryDAO().getBeans();
            Iterator iter=categories.iterator();
            try {
                CategoryBean cat=null;
                categoryID=-1;
                while ( (cat=(CategoryBean)iter.next() )!=null) {
                    if ((cat.getCategoryName().equals(categoryName)) &&
                        (cat.getParentCategoryID()==parentCategoryID)) {
                        categoryID=cat.getCategoryID();
                        break;
                    }
                }
                if (categoryID<0) {
                    throw new ObjectNotFoundException("Can't find category I've just added.");
                }
            } catch (NoSuchElementException e) {
                throw new ObjectNotFoundException("Can't find category I've just added.");
            }

        }
    }

    /**
     * Creates a category watch for this category. In order to know which category we are
     * reffering to, this method is supposed to be called after {@link #setCategoryID(String)}
     * or {@link #addCategory(String, String, String, String, String, String, String)}
     * have been called. Otherwise, this watch will be simply ignored.
     *
     * @param memberName
     * @param watchType Can be null.
     * @param watchOption Can be null.
     * @param watchStatus Can be null.
     * @param watchCreationDate Can be null.
     * @param watchLastSentDate Can be null.
     * @param watchEndDate Can be null.
     *
     * @throws BadInputException
     * @throws CreateException
     * @throws DatabaseException
     * @throws ObjectNotFoundException

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久久精品| www国产亚洲精品久久麻豆| 在线播放欧美女士性生活| 欧美电视剧在线看免费| 亚洲三级在线看| 国产一区二三区好的| 日本高清无吗v一区| 久久免费看少妇高潮| 视频在线观看一区二区三区| 成人午夜激情影院| 精品日韩成人av| 午夜精品福利在线| 91色porny蝌蚪| 日本一区二区三区免费乱视频| 日韩精品免费专区| 欧美无乱码久久久免费午夜一区| 中文字幕av在线一区二区三区| 老司机免费视频一区二区| 精品视频在线免费看| 亚洲卡通动漫在线| 成人精品鲁一区一区二区| 26uuu久久天堂性欧美| 日韩和欧美的一区| 欧美日韩三级一区二区| 亚洲一区二区三区自拍| 色哟哟精品一区| 国产精品久久久久久一区二区三区 | 国产精品人成在线观看免费| 免费成人美女在线观看| 91精品国产综合久久精品图片| 亚洲精品综合在线| 一本久久综合亚洲鲁鲁五月天 | 亚洲韩国精品一区| 色一情一乱一乱一91av| 亚洲欧美日韩国产成人精品影院| 成人午夜免费av| 亚洲三级视频在线观看| 91色婷婷久久久久合中文| 亚洲精选一二三| 欧美性做爰猛烈叫床潮| 亚洲成人免费视| 欧美高清性hdvideosex| 免费av网站大全久久| 欧美成人性战久久| 国产曰批免费观看久久久| 久久久久久久电影| 成人免费黄色在线| 一区二区视频在线| 欧美福利视频导航| 久久91精品国产91久久小草| 精品福利一区二区三区| 国产白丝网站精品污在线入口| 国产农村妇女精品| 一本一道综合狠狠老| 亚洲.国产.中文慕字在线| 日韩欧美的一区二区| 国产高清精品网站| 一区二区在线观看免费| 日韩视频免费观看高清完整版| 国产一区在线看| 亚洲日穴在线视频| 欧美一区二区三区在线观看| 国产一区二区不卡在线| 一区二区在线观看不卡| 欧美不卡一区二区| 日本韩国精品在线| 国产一区欧美日韩| 亚洲国产精品一区二区www在线| 日韩一区二区高清| 91麻豆国产自产在线观看| 青草av.久久免费一区| 久久久久久久久久久久电影| 在线观看日韩高清av| 韩国中文字幕2020精品| 亚洲欧美电影一区二区| 精品国产乱码久久久久久免费| 成人黄色av电影| 免费人成黄页网站在线一区二区 | 东方欧美亚洲色图在线| 亚洲h动漫在线| 中文字幕一区在线观看| 日韩一级二级三级| 97超碰欧美中文字幕| 精品一区二区免费看| 一区二区三区日韩欧美| 久久理论电影网| 欧美肥妇毛茸茸| 91亚洲精华国产精华精华液| 国产原创一区二区三区| 免费在线观看视频一区| 亚洲自拍偷拍九九九| 国产精品免费看片| 精品精品国产高清一毛片一天堂| 欧美做爰猛烈大尺度电影无法无天| 国产一区亚洲一区| 精品一区二区在线播放| 爽好多水快深点欧美视频| 亚洲美女电影在线| 国产精品久久夜| 国产免费观看久久| 国产欧美日韩综合| 国产欧美一区二区三区鸳鸯浴| 91精品国产91久久综合桃花| 欧美系列一区二区| 91福利社在线观看| 99视频精品在线| 不卡的av网站| 99久久免费视频.com| 成人av在线播放网址| 成人高清免费观看| 不卡欧美aaaaa| 国产91精品欧美| 成人一二三区视频| 国产精品资源在线| 国产 日韩 欧美大片| 国产69精品一区二区亚洲孕妇| 国产精品一二三四五| 高清免费成人av| av网站一区二区三区| 91色porny在线视频| 日本韩国欧美一区| 欧美人狂配大交3d怪物一区| 欧美日韩亚洲综合| 欧美三级日本三级少妇99| 欧美日韩精品二区第二页| 在线不卡免费av| 91精品国产综合久久蜜臀| 日韩视频一区二区在线观看| 精品美女一区二区| 国产精品视频一二| 一区二区三区欧美久久| 婷婷一区二区三区| 国产综合一区二区| 91亚洲国产成人精品一区二三| 欧美午夜片在线观看| 91精品欧美一区二区三区综合在| 日韩手机在线导航| 欧美韩国一区二区| 一区二区三区不卡在线观看| 五月激情丁香一区二区三区| 蜜桃久久精品一区二区| 国产91对白在线观看九色| 在线视频一区二区三区| 欧美一区二区性放荡片| 国产午夜精品久久久久久久| 亚洲丝袜制服诱惑| 日本不卡在线视频| 成人免费视频国产在线观看| 在线免费一区三区| 精品国产伦一区二区三区观看体验| 国产精品女人毛片| 日日摸夜夜添夜夜添精品视频| 精品一区二区三区免费视频| 一本久久综合亚洲鲁鲁五月天| 欧美一级片免费看| 最好看的中文字幕久久| 日韩成人av影视| caoporn国产一区二区| 91精品欧美久久久久久动漫| 中文字幕一区二| 久久电影国产免费久久电影| 99精品视频在线观看| 日韩欧美一二三四区| 一区二区三区四区激情| 国产东北露脸精品视频| 欧美精品在线一区二区三区| 国产女人18毛片水真多成人如厕| 天天影视色香欲综合网老头| 97精品国产露脸对白| 久久这里只有精品视频网| 亚洲成人精品一区二区| 成人天堂资源www在线| 欧美一区二区三区四区久久| 亚洲免费电影在线| 国产91精品在线观看| 精品电影一区二区| 日韩中文字幕区一区有砖一区| 成人av电影在线| 国产亚洲一区二区三区| 男男gaygay亚洲| 欧美伦理影视网| 亚洲精品免费在线观看| 成人在线视频首页| 2021国产精品久久精品| 日韩高清一区二区| 欧美日韩国产美女| 亚洲国产视频直播| 色伊人久久综合中文字幕| 一区视频在线播放| 99视频精品全部免费在线| 国产午夜久久久久| 国产99精品国产| 久久久久久久久蜜桃| 国产精品乡下勾搭老头1| 精品美女在线观看| 国产精品一区2区| 久久久久久久网| 大白屁股一区二区视频| 中文一区一区三区高中清不卡| 国产精品夜夜爽|