1 | public class Boat {↵ | | 1 | public class Order {
↵
|
2 | private Long id;↵ | | 2 | private Long number;
↵
|
3 | private String tag;↵ | | 3 | private Date placed;
↵
|
4 | private Person driver;↵ | | 4 | private Person ↵
|
5 | private Person boarder;↵ | | |
|
| | | 5 | orderee;↵
|
|
| | | 6 | private Set lineItems = new HashSet();↵
|
| | | 7 |
↵
|
6 | public Boat() {↵ | | 8 | public Order() {
↵
|
7 | }↵ | | 9 | }↵
|
|
| | | 10 |
↵
|
8 | public Boat(String tag, Person driver, Person boarder) {↵ | | 11 | public Order(Long number, Person orderee) {
↵
|
9 | this.tag = tag;↵ | | 12 | this.number = number;
↵
|
10 | this.driver = driver;↵ | | 13 | this.↵
|
11 | this.boarder = boarder;↵ | | |
|
12 | }↵ | | |
|
| | | 14 | orderee = orderee;↵
|
| | | 15 | this.placed = new Date();↵
|
| | | 16 | }↵
|
| | | 17 |
↵
|
13 | public Long getId() {↵ | | 18 | public Long getNumber() {
↵
|
14 | return id;↵ | | 19 | return ↵
|
15 | }↵ | | |
|
| | | 20 | number;↵
|
| | | 21 | }↵
|
| | | 22 |
↵
|
16 | public void setId(Long id) {↵ | | 23 | public void setNumber(Long number) {
↵
|
17 | this.id = id;↵ | | 24 | this.↵
|
18 | }↵ | | |
|
| | | 25 | number = number;↵
|
| | | 26 | }↵
|
| | | 27 |
↵
|
19 | public String getTag() {↵ | | 28 | public Date getPlaced() {
↵
|
20 | return tag;↵ | | 29 | return ↵
|
21 | }↵ | | |
|
| | | 30 | placed;↵
|
| | | 31 | }↵
|
| | | 32 |
↵
|
22 | public void setTag(String tag) {↵ | | 33 | public void setPlaced(Date placed) {
↵
|
23 | this.tag = tag;↵ | | 34 | this.↵
|
24 | }↵ | | |
|
| | | 35 | placed = placed;↵
|
| | | 36 | }↵
|
| | | 37 |
↵
|
25 | public Person getDriver() {↵ | | 38 | public Person getOrderee() {
↵
|
26 | return driver;↵ | | 39 | return ↵
|
27 | }↵ | | |
|
| | | 40 | orderee;↵
|
| | | 41 | }↵
|
| | | 42 |
↵
|
28 | public void setDriver(Person driver) {↵ | | 43 | public void setOrderee(Person orderee) {
↵
|
29 | this.driver = driver;↵ | | 44 | this.↵
|
30 | }↵ | | |
|
|
31 | public Person getBoarder↵ | | 45 | orderee = orderee;↵
|
| | | 46 | }↵
|
|
|
32 | () {↵ | | 47 | public Set getLineItems() {
↵
|
33 | return boarder;↵ | | 48 | return ↵
|
34 | }↵ | | |
|
|
35 | public void setBoarder(Person boarder↵ | | 49 | lineItems;↵
|
| | | 50 | }↵
|
|
36 | ) {↵ | | 51 | public void setLineItems(Set lineItems) {
↵
|
37 | this.boarder = boarder | | 52 | this.lineItems = lineItems
|