Skip to content

Instantly share code, notes, and snippets.

@azizkale
Last active August 20, 2023 14:40
Show Gist options
  • Save azizkale/e5f2a950989092cb57f1ceccc794ce97 to your computer and use it in GitHub Desktop.
Save azizkale/e5f2a950989092cb57f1ceccc794ce97 to your computer and use it in GitHub Desktop.
the article - How to implement Hibernate in Spring Boot
package com.kale.hibernatetutorial.model;
import jakarta.persistence.*;
@Entity
@Table(name="employee")
public class Employee {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column
private Integer id;
@Column
private String name;
@Column
private String department;
@Column
private String gender;
public Integer getId() {
return id;
}
public String getName() {
return name;
}
public String getDepartment() {
return department;
}
public String getGender() {
return gender;
}
public void setId(Integer id) {
this.id = id;
}
public void setName(String name) {
this.name = name;
}
public void setDepartment(String department) {
this.department = department;
}
public void setGender(String gender) {
this.gender = gender;
}
@Override
public String toString() {
return "Employee{" +
"id=" + id +
", name='" + name + '\'' +
", department='" + department + '\'' +
", gender='" + gender + '\'' +
'}';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment