-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuthors.java
More file actions
40 lines (28 loc) · 863 Bytes
/
Authors.java
File metadata and controls
40 lines (28 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.example.accessingdatajpa;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Authors{
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private String FirstName;
private String LastName;
protected Authors() {}
public Genre(String FirstName, String LastName) {
this.FirstName = FirstName;
this.LastName = LastName;
@Override
public String toString() {
return String.format(
"Authors[FirstName=%d, LastName='%s']",
FirstName, LastName);
}
public String getFirstName() {
return FirstName;
}
public String getLastName() {
return LastName;
}
}