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

📄 administrator.java

📁 图书管管理系统是基于JAVA的 很好的
💻 JAVA
字号:
/*
 * Administrator.java
 *
 * Created on 2007年11月22日, 上午10:47
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package h6.data;

import java.sql.ResultSet;
import java.sql.SQLException;
import h6.action.*;

/**
 *
 * @author dinga
 */
public class Administrator {
    
    /** Creates a new instance of Administrator */
    private String name;
    private String popedom;
    private String password;
    public Administrator() {
        
    }
    
    public void initializeReader() throws SQLException{
        DataBase db = new DataBase();
        String []s = {"*"};
        ResultSet rs =  db.search("administrator",s,"name = '" + name + "'");
        if (rs.next()){
            popedom = rs.getString(2);
            password = rs.getString(3);
        }
        rs.close();
        db.closeConnection();        
    }
    
    public void setName(String adName){
        name = adName;
    }
    
    public String getName(){
        return name;
    }
    
    public String getPopedom(){
        return popedom;
    }
    
    public String getPassword(){
        return password;
    }
}

⌨️ 快捷键说明

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