BAEL-2043: An Intro to Hibernate Entity Lifecycle (#4960)

* "An Intro to Hibernate Entity Lifecycle"

"An Intro to Hibernate Entity Lifecycle"
by Rudi

* Revision from Predrag's feedback

* Another revision from Predrag's feedback

* Another feedback.
This commit is contained in:
bungrudi
2018-08-15 20:23:19 +07:00
committed by Predrag Maric
parent 96e1728d7f
commit 3f2271f51b
7 changed files with 355 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
package com.baeldung.hibernate.lifecycle;
import javax.persistence.*;
@Entity
@Table(name = "Football_Player")
public class FootballPlayer {
@Id
@GeneratedValue
private long id;
@Column
private String name;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "FootballPlayer{" + "id=" + id + ", name='" + name + '\'' + '}';
}
}