?? studentinfo.java
字號:
package cn.st.data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import cn.st.util.OtherUtil;
import cn.st.util.UUIDHexGenerator;
/**
* 學生
* @author zn
*
*/
public class StudentInfo {
private String UUID = UUIDHexGenerator.getUUID();
private String name = "";
private String fatherName = "";
private String motherName = "";
private String fatherPhone = "";
private String motherPhone = "";
private String addres = "";
private int age;
// 籍貫
private String nativePlace = "";
private String sex = "";
private Date birthday;
private String number = "";
//民族
private String phyle = "";
// 郵編
private String zip = "";
// 班級
private ClassInfo classInfo;
private String className;
private String zhuangYe;
//課程列表
private List<CoursesInfo> coursesList = new ArrayList<CoursesInfo>();
public String getUUID() {
return UUID;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setFatherName(String fatherName) {
this.fatherName = fatherName;
}
public String getFatherName() {
return fatherName;
}
public void setMotherName(String motherName) {
this.motherName = motherName;
}
public String getMotherName() {
return motherName;
}
public void setFatherPhone(String fatherPhone) {
this.fatherPhone = fatherPhone;
}
public String getFatherPhone() {
return fatherPhone;
}
public void setMotherPhone(String motherPhone) {
this.motherPhone = motherPhone;
}
public String getMotherPhone() {
return motherPhone;
}
public void setAddres(String addres) {
this.addres = addres;
}
public String getAddres() {
return addres;
}
public void setAge(int age) {
this.age = age;
}
public int getAge() {
return age;
}
/**
* 籍貫
* @param nativePlace
*/
public void setNativePlace(String nativePlace) {
this.nativePlace = nativePlace;
}
/**
* 籍貫
* @return
*/
public String getNativePlace() {
return nativePlace;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getSex() {
return sex;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public Date getBirthday() {
return birthday;
}
public void setNumber(String number) {
this.number = number;
}
public String getNumber() {
return number;
}
/**
* 民族
* @param phyle
*/
public void setPhyle(String phyle) {
this.phyle = phyle;
}
/**
* 民族
* @return
*/
public String getPhyle() {
return phyle;
}
public void setZip(String zip) {
this.zip = zip;
}
public String getZip() {
return zip;
}
/**
* 添加課程
* @param courses
* @return
*/
public void addCoursesInfo(CoursesInfo courses) {
this.getCoursesList().add(courses);
}
/**
* 根據課程名獲得課程對象
* @param coursesNum
* @return
*/
public CoursesInfo getCourses(String coursesNum) {
for(CoursesInfo courses : this.getCoursesList()) {
if(courses.getNumber().trim().equals(coursesNum)) {
return courses;
}
}
return null;
}
public CoursesInfo getCoursesByUUID(String uuid) {
for(CoursesInfo courses : this.getCoursesList()) {
if(courses.getUUID().trim().equals(uuid)) {
return courses;
}
}
return null;
}
public void setClassInfo(ClassInfo classInfo) {
this.classInfo = classInfo;
classInfo.addStudent(this);
}
public ClassInfo getClassInfo() {
return classInfo;
}
public void setZhuangYe(String zhuangYe) {
this.zhuangYe = zhuangYe;
}
public String getZhuangYe() {
return zhuangYe;
}
public void setClassName(String className) {
this.className = className;
}
public String getClassName() {
return className;
}
public List<CoursesInfo> getCoursesList() {
return coursesList;
}
/**
* 獲得該學生下的所有科目成績
* @return
*/
public List<KeMuChengJi> getKeMuChengJi() {
OtherUtil other = new OtherUtil();
List<KeMuChengJi> tmp = other.getKeMuChengJis();
List<KeMuChengJi> list = new ArrayList<KeMuChengJi>();
for(KeMuChengJi kj : tmp){
kj.getStuInfo().getUUID().trim().equals(this.UUID);
list.add(kj);
}
return list;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -