File tree Expand file tree Collapse file tree 2 files changed +86
-0
lines changed
src/main/java/guru/springframework/spring6webapp/domain Expand file tree Collapse file tree 2 files changed +86
-0
lines changed Original file line number Diff line number Diff line change 1+ package guru .springframework .spring6webapp .domain ;
2+
3+ import jakarta .persistence .Entity ;
4+ import jakarta .persistence .GeneratedValue ;
5+ import jakarta .persistence .GenerationType ;
6+ import jakarta .persistence .Id ;
7+
8+ /**
9+ * Created by jt, Spring Framework Guru.
10+ */
11+ @ Entity
12+ public class Author {
13+
14+ @ Id
15+ @ GeneratedValue (strategy = GenerationType .AUTO )
16+ private Long id ;
17+ private String firstName ;
18+ private String lastName ;
19+
20+ public Long getId () {
21+ return id ;
22+ }
23+
24+ public void setId (Long id ) {
25+ this .id = id ;
26+ }
27+
28+ public String getFirstName () {
29+ return firstName ;
30+ }
31+
32+ public void setFirstName (String firstName ) {
33+ this .firstName = firstName ;
34+ }
35+
36+ public String getLastName () {
37+ return lastName ;
38+ }
39+
40+ public void setLastName (String lastName ) {
41+ this .lastName = lastName ;
42+ }
43+ }
Original file line number Diff line number Diff line change 1+ package guru .springframework .spring6webapp .domain ;
2+
3+ import jakarta .persistence .Entity ;
4+ import jakarta .persistence .GeneratedValue ;
5+ import jakarta .persistence .GenerationType ;
6+ import jakarta .persistence .Id ;
7+
8+ /**
9+ * Created by jt, Spring Framework Guru.
10+ */
11+ @ Entity
12+ public class Book {
13+
14+ @ Id
15+ @ GeneratedValue (strategy = GenerationType .AUTO )
16+ private Long id ;
17+ private String title ;
18+ private String isbn ;
19+
20+ public Long getId () {
21+ return id ;
22+ }
23+
24+ public void setId (Long id ) {
25+ this .id = id ;
26+ }
27+
28+ public String getTitle () {
29+ return title ;
30+ }
31+
32+ public void setTitle (String title ) {
33+ this .title = title ;
34+ }
35+
36+ public String getIsbn () {
37+ return isbn ;
38+ }
39+
40+ public void setIsbn (String isbn ) {
41+ this .isbn = isbn ;
42+ }
43+ }
You can’t perform that action at this time.
0 commit comments