com.wedasoft.simpleJavaFxApplicationBase.excludeInJar.hibernateUtil.Student Maven / Gradle / Ivy
package com.wedasoft.simpleJavaFxApplicationBase.excludeInJar.hibernateUtil;
import jakarta.persistence.*;
@SuppressWarnings("all")
@Entity
@Table(name = "student")
public class Student {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column()
private int id;
@Column(name = "first_name")
private String firstName;
@Column(name = "last_name")
private String lastName;
@Column(name = "email")
private String email;
@Column(name = "age")
private int age;
public Student() {
}
public Student(String firstName, String lastName, String email, int age) {
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
this.age = age;
}
public Student(String firstName, String lastName, String email) {
this(firstName, lastName, email, -1);
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return "Student [id=" + id + ", firstName=" + firstName + ", lastName=" + lastName + ", email=" + email + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy