Refactor Passenger Entity
Change seat number type to integer wrapper. Enable QuerybyExample (QBE) BAEL-2406
This commit is contained in:
parent
369655aa02
commit
974950923c
|
@ -25,15 +25,15 @@ class Passenger {
|
|||
|
||||
@Basic(optional = false)
|
||||
@Column(nullable = false)
|
||||
private int seatNumber;
|
||||
private Integer seatNumber;
|
||||
|
||||
private Passenger(String firstName, String lastName, int seatNumber) {
|
||||
private Passenger(String firstName, String lastName, Integer seatNumber) {
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
this.seatNumber = seatNumber;
|
||||
}
|
||||
|
||||
static Passenger from(String firstName, String lastName, int seatNumber) {
|
||||
static Passenger from(String firstName, String lastName, Integer seatNumber) {
|
||||
return new Passenger(firstName, lastName, seatNumber);
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ class Passenger {
|
|||
return lastName;
|
||||
}
|
||||
|
||||
int getSeatNumber() {
|
||||
Integer getSeatNumber() {
|
||||
return seatNumber;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue