package com.tfy.heibernate.mangtoone;
import java.io.Serializable;
import java.util.Set;
public class Classes implements Serializable{
private Long cid;
private String cname;
private String description;
private Set<Student> students;
public Long getCid() {
return cid;
}
public void setCid(Long cid) {
this.cid = cid;
}
public String getCname() {
return cname;
}
public void setCname(String cname) {
this.cname = cname;
}
public Set<Student> getStudents() {
return students;
}
public void setStudents(Set<Student> students) {
this.students = students;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}
import java.io.Serializable;
import java.util.Set;
public class Classes implements Serializable{
private Long cid;
private String cname;
private String description;
private Set<Student> students;
public Long getCid() {
return cid;
}
public void setCid(Long cid) {
this.cid = cid;
}
public String getCname() {
return cname;
}
public void setCname(String cname) {
this.cname = cname;
}
public Set<Student> getStudents() {
return students;
}
public void setStudents(Set<Student> students) {
this.students = students;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}
本文介绍了一个Java实体类——Classes, 它用于表示班级信息,并包含与学生的一对多关联关系。该类实现了Serializable接口,拥有班级ID、名称、描述及学生集合等属性。
3545

被折叠的 条评论
为什么被折叠?



