package com.plannaplan.entities; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class Lecturer { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String title; private String name; private String surname; public String getTitle() { return title; } public String getSurname() { return surname; } public void setSurname(String surname) { this.surname = surname; } public String getName() { return name; } public void setName(String name) { this.name = name; } public void setTitle(String title) { this.title = title; } public Lecturer(String title, String name, String surname) { this.title = title; this.name = name; this.surname = surname; } public Lecturer() { } @Override public String toString() { return String.format("%s %s %s", this.title, this.name, this.surname); } }