98 lines
1.8 KiB
Java
Executable File
98 lines
1.8 KiB
Java
Executable File
package com.plannaplan.entities;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.GenerationType;
|
|
import javax.persistence.Id;
|
|
|
|
/**
|
|
* Entity of Lecturer grouping of state ssociated about id,title,name,surname
|
|
*/
|
|
|
|
@Entity
|
|
public class Lecturer {
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
|
private Long id;
|
|
private String title;
|
|
private String name;
|
|
private String surname;
|
|
|
|
|
|
/**
|
|
* Lecturer
|
|
*
|
|
* @param title title given to the lecturer
|
|
* @param name name given to the lecturer
|
|
* @param surname surname given to the lecturer
|
|
*/
|
|
public Lecturer(String title, String name, String surname) {
|
|
this.title = title;
|
|
this.name = name;
|
|
this.surname = surname;
|
|
}
|
|
|
|
public Lecturer() {
|
|
}
|
|
|
|
/**
|
|
* getTitle
|
|
* @return title
|
|
*
|
|
*/
|
|
public String getTitle() {
|
|
return title;
|
|
}
|
|
|
|
/**
|
|
* getSurname
|
|
* @return surname
|
|
*
|
|
*/
|
|
public String getSurname() {
|
|
return surname;
|
|
}
|
|
|
|
/**
|
|
* setSurname
|
|
* @param surname set surname to the lecturer
|
|
*
|
|
*/
|
|
public void setSurname(String surname) {
|
|
this.surname = surname;
|
|
}
|
|
|
|
/**
|
|
* getName
|
|
* @return name
|
|
*
|
|
*/
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
/**
|
|
* setName
|
|
* @param name set name to the lecturer
|
|
*
|
|
*/
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
/**
|
|
* setTitle
|
|
* @param title set title to the lecturer
|
|
*
|
|
*/
|
|
public void setTitle(String title) {
|
|
this.title = title;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.format("%s %s %s", this.title, this.name, this.surname);
|
|
}
|
|
|
|
}
|