Refactor Passenger Entity

Change seat number type to integer wrapper.
Enable QuerybyExample (QBE)

BAEL-2406
This commit is contained in:
Trevor Gowing 2018-12-24 17:15:46 +02:00
parent 369655aa02
commit 974950923c
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}
}