📄 teacher.java
字号:
package com.middle.graduate.biz.entity;
import java.util.HashSet;
import java.util.Set;
public class Teacher {
private Integer teacherId;
private String teacherName;
private String password;
private String department;
private Set<Topic> topics = new HashSet<Topic>();
public Teacher() {
super();
}
public Teacher(String teacherName, String password, String department) {
super();
this.teacherName = teacherName;
this.department = department;
this.password = password;
}
public void addTopic(Topic topic) {
topics.add(topic);
topic.setTeacher(this);
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Integer getTeacherId() {
return teacherId;
}
public void setTeacherId(Integer teacherId) {
this.teacherId = teacherId;
}
public String getTeacherName() {
return teacherName;
}
public void setTeacherName(String teacherName) {
this.teacherName = teacherName;
}
public Set<Topic> getTopics() {
return topics;
}
public void setTopics(Set<Topic> topics) {
this.topics = topics;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -