1 | public class MyEntity {↵ | | 1 | public class ↵
|
2 | private Long id;↵ | | |
|
3 | private String name;↵ | | |
|
|
4 | public MyEntity() {↵ | | |
|
5 | }↵ | | |
|
|
6 | public MyEntity(String name) {↵ | | |
|
7 | this.name = name;↵ | | |
|
8 | }↵ | | |
|
|
9 | public Long getId() {↵ | | |
|
10 | return id;↵ | | |
|
11 | }↵ | | |
|
| | | 2 | Customer extends Person {↵
|
| | | 3 | private Employee salesperson;↵
|
| | | 4 | private String comments;↵
|
|
| | | 5 | /**↵
|
| | | 6 | * @return Returns the salesperson.↵
|
| | | 7 | */↵
|
| | | 8 | public Employee getSalesperson() {↵
|
| | | 9 | return salesperson;↵
|
| | | 10 | }↵
|
| | | 11 | /**↵
|
| | | 12 | * @param salesperson The salesperson to set.↵
|
| | | 13 | */↵
|
| | | 14 | public void setSalesperson(Employee salesperson) {↵
|
| | | 15 | this.salesperson = salesperson;↵
|
| | | 16 | }↵
|
| | | 17 | /**↵
|
| | | 18 | * @return Returns the comments.↵
|
| | | 19 | */↵
|
12 | public String getName() {↵ | | 20 | public String getComments() {↵
|
13 | return name;↵ | | 21 | return ↵
|
14 | }↵ | | |
|
| | | 22 | comments;↵
|
| | | 23 | }↵
|
| | | 24 | /**↵
|
| | | 25 | * @param comments The comments to set.↵
|
| | | 26 | */↵
|
15 | public void setName(String name) {↵ | | 27 | public void set↵
|
16 | this.name = name↵ | | 28 | Comments(String comments) {↵
|
17 | ;↵ | | 29 | this.comments = comments;↵
|
18 | | | 30 |
|