1 | public class Car implements java.io.Serializable {↵ | | 1 | public class Person {↵
|
|
2 | private long id;↵ | | 2 | private ↵
|
3 | private String model;↵ | | |
|
4 | private CarType carType;↵ | | |
|
5 | private Set carParts = new HashSet();↵ | | |
|
6 | ↵ | | |
|
7 | /**↵ | | |
|
8 | * @return Returns the carType.↵ | | |
|
9 | */↵ | | |
|
10 | public CarType getCarType() {↵ | | |
|
11 | return carType;↵ | | |
|
12 | }↵ | | |
|
13 | /**↵ | | |
|
14 | * @param carType The carType to set.↵ | | |
|
15 | */↵ | | |
|
16 | public void setCarType(CarType carType) {↵ | | |
|
17 | this.carType = carType;↵ | | |
|
18 | }↵ | | |
|
19 | /**↵ | | |
|
20 | * @return Returns the id.↵ | | |
|
21 | */↵ | | |
|
22 | public long getId() {↵ | | |
|
23 | return id;↵ | | |
|
24 | }↵ | | |
|
25 | /**↵ | | |
|
26 | * @param id The id to set.↵ | | |
|
27 | */↵ | | |
|
28 | public void setId(long id) {↵ | | |
|
29 | this.id = id;↵ | | |
|
30 | }↵ | | |
|
31 | /**↵ | | |
|
32 | * @return Returns the model.↵ | | |
|
33 | */↵ | | 3 | String name;↵
|
| | | 4 | private Date dob;↵
|
| | | 5 | private Employee employee;↵
|
| | | 6 | private Customer customer;↵
|
| | | 7 | public Customer getCustomer() {↵
|
| | | 8 | return customer;↵
|
| | | 9 | }↵
|
| | | 10 | public void setCustomer(Customer customer) {↵
|
| | | 11 | this.customer = customer;↵
|
| | | 12 | }↵
|
| | | 13 | public Employee getEmployee() {↵
|
| | | 14 | return employee;↵
|
| | | 15 | }↵
|
| | | 16 | public void setEmployee(Employee employee) {↵
|
| | | 17 | this.employee = employee;↵
|
| | | 18 | }↵
|
34 | public String getModel() {↵ | | 19 | public String getName() {↵
|
35 | return model;↵ | | 20 | return name;↵
|
36 | }↵ | | 21 | }↵
|
37 | /**↵ | | 22 | ↵
|
38 | * @param model The model to set.↵ | | |
|
39 | */↵ | | |
|
40 | public void setModel(String model) {↵ | | 23 | public void setName(String name) {↵
|
41 | this.model = model;↵ | | 24 | this.↵
|
42 | }↵ | | |
|
43 | public Set getCarParts↵ | | 25 | name = name;↵
|
| | | 26 | }↵
|
44 | () {↵ | | 27 | public Date getDob() {↵
|
45 | return carParts;↵ | | 28 | return dob;↵
|
46 | }↵ | | 29 | }↵
|
47 | public void setCarParts(Set carParts) {↵ | | 30 | public void set↵
|
48 | this.carParts = carParts↵ | | 31 | Dob(Date dob) {↵
|
49 | ;↵ | | 32 | this.dob = dob;↵
|
50 | | | 33 |
|