📄 stuinfo.java
字号:
package test;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
/**
* Stuinfo generated by MyEclipse Persistence Tools
*/
@Entity
@Table(name = "stuinfo", catalog = "student", uniqueConstraints = { @UniqueConstraint(columnNames = { "stuName" }) })
public class Stuinfo implements java.io.Serializable {
// Fields
private Integer stuId;
private String stuName;
private String stuSex;
private Integer stuAge;
private String stuAddress;
private Set<Scores> scoreses = new HashSet<Scores>(0);
// Constructors
/** default constructor */
public Stuinfo() {
}
/** minimal constructor */
public Stuinfo(Integer stuId, String stuSex, Integer stuAge,
String stuAddress) {
this.stuId = stuId;
this.stuSex = stuSex;
this.stuAge = stuAge;
this.stuAddress = stuAddress;
}
/** full constructor */
public Stuinfo(Integer stuId, String stuName, String stuSex,
Integer stuAge, String stuAddress, Set<Scores> scoreses) {
this.stuId = stuId;
this.stuName = stuName;
this.stuSex = stuSex;
this.stuAge = stuAge;
this.stuAddress = stuAddress;
this.scoreses = scoreses;
}
// Property accessors
@Id
@Column(name = "stuId", unique = true, nullable = false, insertable = true, updatable = true)
public Integer getStuId() {
return this.stuId;
}
public void setStuId(Integer stuId) {
this.stuId = stuId;
}
@Column(name = "stuName", unique = true, nullable = true, insertable = true, updatable = true, length = 20)
public String getStuName() {
return this.stuName;
}
public void setStuName(String stuName) {
this.stuName = stuName;
}
@Column(name = "stuSex", unique = false, nullable = false, insertable = true, updatable = true, length = 4)
public String getStuSex() {
return this.stuSex;
}
public void setStuSex(String stuSex) {
this.stuSex = stuSex;
}
@Column(name = "stuAge", unique = false, nullable = false, insertable = true, updatable = true)
public Integer getStuAge() {
return this.stuAge;
}
public void setStuAge(Integer stuAge) {
this.stuAge = stuAge;
}
@Column(name = "stuAddress", unique = false, nullable = false, insertable = true, updatable = true, length = 40)
public String getStuAddress() {
return this.stuAddress;
}
public void setStuAddress(String stuAddress) {
this.stuAddress = stuAddress;
}
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "stuinfo")
public Set<Scores> getScoreses() {
return this.scoreses;
}
public void setScoreses(Set<Scores> scoreses) {
this.scoreses = scoreses;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -