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

📄 archivelist.java

📁 一套完整的档案管理系统
💻 JAVA
字号:
package com.stsc.archive.file;

import java.util.Hashtable;
import java.util.Enumeration;

public class ArchiveList {

    /**
     * The set of Subscriptions associated with this User.
     */
    private Hashtable archives = new Hashtable();

	private int total	= 0;
	private int curPage = 0;
	private String goPage	= "1";

	/**
     * Return the total.
     */
    public int getTotal() {
		return (this.total);
    }

    /**
     * Set the total.
     *
     * @param total The new total
     */
    public void setTotal(int total) {
        this.total = total;
    }

    /**
     * Return the curPage.
     */
    public int getCurPage() {
		return (this.curPage);
    }

    /**
     * Set the curPage.
     *
     * @param curPage The new curPage
     */
    public void setCurPage(int curPage) {
        this.curPage = curPage;
    }

	/**
     * Return the goPage.
     */
    public String getGoPage() {
		return (this.goPage);
    }

    /**
     * Set the goPage.
     *
     * @param goPage The new goPage
     */
    public void setGoPage(String goPage) {
        this.goPage = goPage;
    }

    public void setGoPage(int goPage) {
        this.goPage = String.valueOf(goPage);
    }
    /**
     * Find and return all Archive associated with this user.  If there
     * are none, a zero-length array is returned.
     */
    public Archive[] getArchives() {

	synchronized (archives) {
	    Archive results[] = new Archive[archives.size()];
	    Enumeration archs = archives.elements();
	    int n = 0;
	    while (archs.hasMoreElements()) {
			results[n++] = (Archive) archs.nextElement();
	    }
	    return (results);
	}

    }

    /**
     * Find and return the Subscription associated with the specified host.
     * If none is found, return <code>null</code>.
     *
     * @param host Host name to look up
     */
    public Archive findArchive(String serialno) {

	if (serialno == null)
	    return (null);
	return ((Archive) archives.get(serialno));

    }

    // ====================================================== Package Methods


    /**
     * Add the specified Subscription to the set associated with this User.
     *
     * @param subscription The subscription to add
     */
    void addArchive(Archive archive) {

	archives.put(String.valueOf(archive.getSerialno()), archive);

    }
	
	
    /**
     * Add the specified Subscription to the set associated with this User.
     *
     * @param subscription The subscription to add
     */
    void addLog(Archive archive) {

	archives.put(String.valueOf(archive.getHandleid()), archive);

    }


    /**
     * Remove the specified Subscription from the set associated with
     * this User.
     *
     * @param subscription The subscription to remove
     */
    void removeArchive(Archive archive) {

	archives.remove(String.valueOf(archive.getSerialno()));

    }


}

⌨️ 快捷键说明

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