javabean和jdbc的使用实例系列(二.1)

本文介绍了一个用于犯人信息管理系统的实体类设计,包括了犯人的基本信息如姓名、年龄、性别等,并提供了对应的get和set方法以及构造函数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

第二步:给prisoner表建立实体类

package com.sc.bean;


/*
 * 犯人个人信息的实体类
 */
public class prisoner {
	
	//prisoner表中的所有字段
	private int    id;
	private String number;
	private String name;
	private int age;
	private String birthday;
	private String sex;
	private String nation;
	private String address;
	private String phone;
	private String inTime;
	private int    time;
	private int    aNumber;
	private String outTime;
	private int    Ttype;
	private int    station;
	private int    score;
	
	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	//构造函数
	public prisoner() {
	}
	
	//构造函数
	public prisoner(int id, String number, String name, String birthday,
			String sex, String nation, String address, String phone,
			String inTime, int time, int aNumber, String outTime, int ttype,
			int station, int score) {
		this.id = id;
		this.number = number;
		this.name = name;
		this.birthday = birthday;
		this.sex = sex;
		this.nation = nation;
		this.address = address;
		this.phone = phone;
		this.inTime = inTime;
		this.time = time;
		this.aNumber = aNumber;
		this.outTime = outTime;
		this.Ttype = ttype;
		this.station = station;
		this.score = score;
	}

	//get,set方法
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getNation() {
		return nation;
	}

	public void setNation(String nation) {
		this.nation = nation;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getInTime() {
		return inTime;
	}

	public void setInTime(String inTime) {
		this.inTime = inTime;
	}

	public int getTime() {
		return time;
	}

	public void setTime(int time) {
		this.time = time;
	}

	public int getaNumber() {
		return aNumber;
	}

	public void setaNumber(int aNumber) {
		this.aNumber = aNumber;
	}

	public String getOutTime() {
		return outTime;
	}

	public void setOutTime(String outTime) {
		this.outTime = outTime;
	}

	public int getTtype() {
		return Ttype;
	}

	public void setTtype(int ttype) {
		Ttype = ttype;
	}

	public int getStation() {
		return station;
	}

	public void setStation(int station) {
		this.station = station;
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}
	
}


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

蟹道人

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值