3
import org.eclipse.persistence.jpa.config.UuidGenerator;
5
import javax.annotation.Generated;
6
import javax.persistence.Entity;
7
import javax.persistence.GeneratedValue;
8
import javax.persistence.Id;
9
import javax.persistence.UniqueConstraint;
10
import javax.validation.constraints.NotNull;
11
3
import java.io.Serializable;
12
import java.math.BigInteger;
14
import java.util.UUID;
4
import javax.persistence.*;
9
* The persistent class for the student database table.
13
@Table(name="student")
14
@NamedQuery(name="Student.findAll", query="SELECT s FROM Student s")
17
15
public class Student implements Serializable {
24
protected String firstName, lastName;
27
protected String city, street, postCode, houseNumber, apartmentNumber;
30
protected Date dateOfBirth;
34
return firstName + " " + lastName;
48
setCity (String city) {
58
setStreet (String street) {
68
setPostCode (String postCode) {
69
this.postCode = postCode;
78
setHouseNumber (String houseNumber) {
79
this.houseNumber = houseNumber;
83
getApartmentNumber () {
84
return apartmentNumber;
88
setApartmentNumber (String apartmentNumber) {
89
this.apartmentNumber = apartmentNumber;
98
setDateOfBirth (Date dateOfBirth) {
99
this.dateOfBirth = dateOfBirth;
118
setFirstName (String firstName) {
119
this.firstName = firstName;
123
setLastName (String lastName) {
124
this.lastName = lastName;
16
private static final long serialVersionUID = 1L;
18
private String class_;
19
private String nameFirst;
20
private String nameLast;
22
private String userName;
23
private List<StudentAttendance> studentAttendances;
30
@GeneratedValue(strategy=GenerationType.AUTO)
31
@Column(unique=true, nullable=false)
32
public Integer getId() {
36
public void setId(Integer id) {
41
@Column(name="class", length=32)
42
public String getClass_() {
46
public void setClass_(String class_) {
51
@Column(name="name_first", nullable=false, length=32)
52
public String getNameFirst() {
53
return this.nameFirst;
56
public void setNameFirst(String nameFirst) {
57
this.nameFirst = nameFirst;
61
@Column(name="name_last", nullable=false, length=32)
62
public String getNameLast() {
66
public void setNameLast(String nameLast) {
67
this.nameLast = nameLast;
71
@Column(nullable=false, length=256)
72
public String getPwd() {
76
public void setPwd(String pwd) {
81
@Column(name="user_name", nullable=false, length=32)
82
public String getUserName() {
86
public void setUserName(String userName) {
87
this.userName = userName;
91
//bi-directional many-to-one association to StudentAttendance
92
@OneToMany(mappedBy="studentBean")
93
public List<StudentAttendance> getStudentAttendances() {
94
return this.studentAttendances;
97
public void setStudentAttendances(List<StudentAttendance> studentAttendances) {
98
this.studentAttendances = studentAttendances;
101
public StudentAttendance addStudentAttendance(StudentAttendance studentAttendance) {
102
getStudentAttendances().add(studentAttendance);
103
studentAttendance.setStudentBean(this);
105
return studentAttendance;
108
public StudentAttendance removeStudentAttendance(StudentAttendance studentAttendance) {
109
getStudentAttendances().remove(studentAttendance);
110
studentAttendance.setStudentBean(null);
112
return studentAttendance;
b'\\ No newline at end of file'