hibernate正向生成数据库表以及配置——Teacher.java
2024-05-31 07:36:18 阅读次数:28
hibernate,java,数据库
package cn.bdqn.studentInfo.entity;
import java.util.HashSet;
import java.util.Set;
/**
* 老师的实体类
* @author Administrator
*
*/
public class Teacher {
private Integer id;
private String name;
private Set<Student> students =new HashSet<Student>();
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
= name;
}
public Set<Student> getStudents() {
return students;
}
public void setStudents(Set<Student> students) {
this.students = students;
}
public Teacher(Integer id, String name, Set<Student> students) {
super();
this.id = id;
= name;
this.students = students;
}
public Teacher() {
super();
}
}
版权声明:本文内容来自第三方投稿或授权转载,原文地址:https://blog.51cto.com/u_12718584/2843117,作者:穆雄雄的博客,版权归原作者所有。本网站转在其作品的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如因作品内容、版权等问题需要同本网站联系,请发邮件至ctyunbbs@chinatelecom.cn沟通。
上一篇:Linux删除目录下的大量文件命令
下一篇:OSCP-Postfish(postfix、smtp、根据页面生成字典、pop3)