Created
December 31, 2017 12:53
-
-
Save ajfmo/121a144b8e05eba18d0263afd51f642d to your computer and use it in GitHub Desktop.
Student entity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ajfmo.studycontrol.entities; | |
// Generated 30/12/2017 03:49:40 PM by Hibernate Tools 5.2.6.Final | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.FetchType; | |
import javax.persistence.Id; | |
import javax.persistence.JoinColumn; | |
import javax.persistence.ManyToOne; | |
import javax.persistence.Table; | |
/** | |
* Student generated by hbm2java | |
*/ | |
@Entity | |
@Table(name = "student", catalog = "students") | |
public class Student implements java.io.Serializable { | |
private static final long serialVersionUID = 1822536094816863947L; | |
@Id | |
@Column(name = "student_id", unique = true, nullable = false, length = 50) | |
private String studentId; | |
@Column(name = "student_name", nullable = false, length = 100) | |
private String studentName; | |
@ManyToOne(fetch = FetchType.LAZY) | |
@JoinColumn(name = "student_career", nullable = false) | |
private Career career; | |
@ManyToOne(fetch = FetchType.LAZY) | |
@JoinColumn(name = "student_section", nullable = false) | |
private Section section; | |
public Student() { | |
} | |
public Student(String studentId, String studentName, Career career, Section section) { | |
this.studentId = studentId; | |
this.studentName = studentName; | |
this.career = career; | |
this.section = section; | |
} | |
public String getStudentId() { | |
return this.studentId; | |
} | |
public void setStudentId(String studentId) { | |
this.studentId = studentId; | |
} | |
public String getStudentName() { | |
return this.studentName; | |
} | |
public void setStudentName(String studentName) { | |
this.studentName = studentName; | |
} | |
public Career getCareer() { | |
return this.career; | |
} | |
public void setCareer(Career career) { | |
this.career = career; | |
} | |
public Section getSection() { | |
return this.section; | |
} | |
public void setSection(Section section) { | |
this.section = section; | |
} | |
/* | |
* (non-Javadoc) | |
* | |
* @see java.lang.Object#toString() | |
*/ | |
@Override | |
public String toString() { | |
return "Student [studentId=" + studentId + ", studentName=" + studentName + ", career=" + career + ", section=" | |
+ section + "]"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment