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

📄 testrecord.java

📁 在线模拟选课系统
💻 JAVA
字号:
package ch07.object.unit;

import java.sql.ResultSet;

//针对test_record表的bean类
public class TestRecord 
{
    private String recordId       = "";    //记录ID
    private String username       = "";    //用户ID
    private String categoryId     = "";    //分类ID
    private String testTime       = "";    //测试时间
    private int    testResult     = 0;     //测试分数
    private int    useTime        = 0;     //用去时间
    
    //针对rs对象的构造方法
    public TestRecord( ResultSet rs )
        throws Exception
    {
        this.recordId = rs.getString("record_id");
        this.username = rs.getString("username");
        this.categoryId = rs.getString("category_id");
        this.testTime = rs.getString("test_time");
        this.testResult = rs.getInt("test_result");
        this.useTime = rs.getInt("use_time");
    }
    
    //get/set方法
    
    public String getRecordId()
    {
        return recordId;
    }
    public void setRecordId( String recordId )
    {
        this.recordId = recordId;
    }
    
    public String getUsername()
    {
        return username;
    }
    public void setUsername( String username )
    {
        this.username = username;
    }
    
    public String getCategoryId()
    {
        return categoryId;
    }
    public void setCategoryId( String categoryId )
    {
        this.categoryId = categoryId;
    }
    
    public String getTestTime()
    {
        return testTime;
    }
    public void setTestTime( String testTime )
    {
        this.testTime = testTime;
    }
    
    public int getTestResult()
    {
        return testResult;
    }
    public void setTestResult( int testResult )
    {
        this.testResult = testResult;
    }
    
    public int getUseTime()
    {
        return useTime;
    }
    public void setUseTime( int useTime )
    {
        this.useTime = useTime;
    }
}

⌨️ 快捷键说明

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