1 package ejava.examples.orm.core.mapped;
2
3
4
5
6
7
8 public class Car {
9 private long id;
10 private String make;
11 private String model;
12 private int year;
13 private double cost;
14
15 public Car() {}
16 public Car(long id) { this.id = id; }
17
18 public long getId() {
19 return id;
20 }
21
22 public String getMake() { return make; }
23 public void setMake(String make) { this.make = make; }
24
25 public String getModel() { return model; }
26 public void setModel(String model) {
27 this.model = model;
28 }
29
30 public int getYear() { return year; }
31 public void setYear(int year) {
32 this.year = year;
33 }
34
35 public double getCost() { return cost; }
36 public void setCost(double cost) {
37 this.cost = cost;
38 }
39
40 public String toString() {
41 return super.toString()
42 + ", id=" + id
43 + ", make=" + make
44 + ", model=" + model
45 + ", year=" + year
46 + "$" + cost;
47 }
48 }