📄 category.java
字号:
package ch07.object.unit;
import java.sql.ResultSet;
//针对user表的bean类
public class Category
{
private String categoryId = ""; //分类ID
private String categoryName = ""; //分类名称
private int questionNumber = 0; //题目数目
private int testTime = 0; //测试时间
//空的构造方法
public Category()
{
}
//针对rs对象的构造方法
public Category( ResultSet rs )
throws Exception
{
this.categoryId = rs.getString("category_id");
this.categoryName = rs.getString("category_name");
this.questionNumber = rs.getInt("question_number");
this.testTime = rs.getInt("test_time");
}
//get/set方法
public String getCategoryId()
{
return categoryId;
}
public void setCategoryId( String categoryId )
{
this.categoryId = categoryId;
}
public String getCategoryName()
{
return categoryName;
}
public void setCategoryName( String categoryName )
{
this.categoryName = categoryName;
}
public int getQuestionNumber()
{
return questionNumber;
}
public void setQuestionNumber( int questionNumber )
{
this.questionNumber = questionNumber;
}
public int getTestTime()
{
return testTime;
}
public void setTestTime( int testTime )
{
this.testTime = testTime;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -