forked from resinas/hello-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGreeting.java
More file actions
38 lines (31 loc) · 703 Bytes
/
Copy pathGreeting.java
File metadata and controls
38 lines (31 loc) · 703 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
package hello;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Greeting {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String lang;
private String greeting;
protected Greeting() {}
public Greeting(String lang, String greeting) {
super();
this.lang = lang;
this.greeting = greeting;
}
/**
* @return the lang
*/
public String getLang() {
return lang;
}
/**
* @return the greeting
*/
public String getGreeting() {
return greeting;
}
}